Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sdk/security/azure-mgmt-security/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "a3974594e96506c6fa921be80f349d67b555e534",
"commit": "d702fd0f9e68bf182abdf7df2abbc57c2430829d",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/[email protected].7",
"@autorest/[email protected].8",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/security/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected].7 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/security/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/[email protected].8 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"readme": "specification/security/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from ._serialization import Serializer, Deserializer
from typing import Any, IO, Optional, Union

from . import models as _models


class SecurityCenterOperationsMixin(object):

def get_sensitivity_settings(
self,
**kwargs: Any
) -> _models.GetSensitivitySettingsResponse:
"""Gets data sensitivity settings for sensitive data discovery.

:keyword callable cls: A custom type or function that will be passed the direct response
:return: GetSensitivitySettingsResponse or the result of cls(response)
:rtype: ~azure.mgmt.security.v2023_02_01_preview.models.GetSensitivitySettingsResponse
:raises ~azure.core.exceptions.HttpResponseError:
"""
api_version = self._get_api_version('get_sensitivity_settings')
if api_version == '2023-02-01-preview':
from .v2023_02_01_preview.operations import SecurityCenterOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'get_sensitivity_settings'".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance._config = self._config
mixin_instance._config.api_version = api_version
mixin_instance._serialize = Serializer(self._models_dict(api_version))
mixin_instance._serialize.client_side_validation = False
mixin_instance._deserialize = Deserializer(self._models_dict(api_version))
return mixin_instance.get_sensitivity_settings(**kwargs)

def update_sensitivity_settings(
self,
sensitivity_settings: Union[_models.UpdateSensitivitySettingsRequest, IO],
**kwargs: Any
) -> _models.GetSensitivitySettingsResponse:
"""Updates data sensitivity settings for sensitive data discovery.

:param sensitivity_settings: The data sensitivity settings to update. Is either a
UpdateSensitivitySettingsRequest type or a IO type. Required.
:type sensitivity_settings:
~azure.mgmt.security.v2023_02_01_preview.models.UpdateSensitivitySettingsRequest or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
:paramtype content_type: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: GetSensitivitySettingsResponse or the result of cls(response)
:rtype: ~azure.mgmt.security.v2023_02_01_preview.models.GetSensitivitySettingsResponse
:raises ~azure.core.exceptions.HttpResponseError:
"""
api_version = self._get_api_version('update_sensitivity_settings')
if api_version == '2023-02-01-preview':
from .v2023_02_01_preview.operations import SecurityCenterOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'update_sensitivity_settings'".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance._config = self._config
mixin_instance._config.api_version = api_version
mixin_instance._serialize = Serializer(self._models_dict(api_version))
mixin_instance._serialize.client_side_validation = False
mixin_instance._deserialize = Deserializer(self._models_dict(api_version))
return mixin_instance.update_sensitivity_settings(sensitivity_settings, **kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, *args, **kwargs):
"""
pass

class SecurityCenter(MultiApiClientMixin, _SDKClient):
class SecurityCenter(SecurityCenterOperationsMixin, MultiApiClientMixin, _SDKClient):
"""API spec for Microsoft.Security (Azure Security Center) resource provider.

This ready contains multiple API versions, to help you deal with all of the Azure clouds
Expand Down Expand Up @@ -996,6 +996,20 @@ def security_solutions_reference_data(self):
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def sensitivity_settings(self):
"""Instance depends on the API version:

* 2023-02-01-preview: :class:`SensitivitySettingsOperations<azure.mgmt.security.v2023_02_01_preview.operations.SensitivitySettingsOperations>`
"""
api_version = self._get_api_version('sensitivity_settings')
if api_version == '2023-02-01-preview':
from .v2023_02_01_preview.operations import SensitivitySettingsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'sensitivity_settings'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def server_vulnerability_assessment(self):
"""Instance depends on the API version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "5.0.0"
VERSION = "0.1.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from .._serialization import Serializer, Deserializer
from typing import Any, IO, Optional, Union

from .. import models as _models


class SecurityCenterOperationsMixin(object):

async def get_sensitivity_settings(
self,
**kwargs: Any
) -> _models.GetSensitivitySettingsResponse:
"""Gets data sensitivity settings for sensitive data discovery.

:keyword callable cls: A custom type or function that will be passed the direct response
:return: GetSensitivitySettingsResponse or the result of cls(response)
:rtype: ~azure.mgmt.security.v2023_02_01_preview.models.GetSensitivitySettingsResponse
:raises ~azure.core.exceptions.HttpResponseError:
"""
api_version = self._get_api_version('get_sensitivity_settings')
if api_version == '2023-02-01-preview':
from ..v2023_02_01_preview.aio.operations import SecurityCenterOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'get_sensitivity_settings'".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance._config = self._config
mixin_instance._config.api_version = api_version
mixin_instance._serialize = Serializer(self._models_dict(api_version))
mixin_instance._serialize.client_side_validation = False
mixin_instance._deserialize = Deserializer(self._models_dict(api_version))
return await mixin_instance.get_sensitivity_settings(**kwargs)

async def update_sensitivity_settings(
self,
sensitivity_settings: Union[_models.UpdateSensitivitySettingsRequest, IO],
**kwargs: Any
) -> _models.GetSensitivitySettingsResponse:
"""Updates data sensitivity settings for sensitive data discovery.

:param sensitivity_settings: The data sensitivity settings to update. Is either a
UpdateSensitivitySettingsRequest type or a IO type. Required.
:type sensitivity_settings:
~azure.mgmt.security.v2023_02_01_preview.models.UpdateSensitivitySettingsRequest or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
:paramtype content_type: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: GetSensitivitySettingsResponse or the result of cls(response)
:rtype: ~azure.mgmt.security.v2023_02_01_preview.models.GetSensitivitySettingsResponse
:raises ~azure.core.exceptions.HttpResponseError:
"""
api_version = self._get_api_version('update_sensitivity_settings')
if api_version == '2023-02-01-preview':
from ..v2023_02_01_preview.aio.operations import SecurityCenterOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'update_sensitivity_settings'".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance._config = self._config
mixin_instance._config.api_version = api_version
mixin_instance._serialize = Serializer(self._models_dict(api_version))
mixin_instance._serialize.client_side_validation = False
mixin_instance._deserialize = Deserializer(self._models_dict(api_version))
return await mixin_instance.update_sensitivity_settings(sensitivity_settings, **kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, *args, **kwargs):
"""
pass

class SecurityCenter(MultiApiClientMixin, _SDKClient):
class SecurityCenter(SecurityCenterOperationsMixin, MultiApiClientMixin, _SDKClient):
"""API spec for Microsoft.Security (Azure Security Center) resource provider.

This ready contains multiple API versions, to help you deal with all of the Azure clouds
Expand Down Expand Up @@ -996,6 +996,20 @@ def security_solutions_reference_data(self):
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def sensitivity_settings(self):
"""Instance depends on the API version:

* 2023-02-01-preview: :class:`SensitivitySettingsOperations<azure.mgmt.security.v2023_02_01_preview.aio.operations.SensitivitySettingsOperations>`
"""
api_version = self._get_api_version('sensitivity_settings')
if api_version == '2023-02-01-preview':
from ..v2023_02_01_preview.aio.operations import SensitivitySettingsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'sensitivity_settings'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def server_vulnerability_assessment(self):
"""Instance depends on the API version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "5.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def build_list_by_home_region_request(
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)


def build_get_subscription_level_task_request(
def build_get_subscription_level_task_request( # pylint: disable=name-too-long
asc_location: str, task_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
Expand Down Expand Up @@ -130,7 +130,7 @@ def build_get_subscription_level_task_request(
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)


def build_update_subscription_level_task_state_request(
def build_update_subscription_level_task_state_request( # pylint: disable=name-too-long
asc_location: str,
task_name: str,
task_update_action_type: Union[str, _models.TaskUpdateActionType],
Expand Down Expand Up @@ -205,7 +205,7 @@ def build_list_by_resource_group_request(
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)


def build_get_resource_group_level_task_request(
def build_get_resource_group_level_task_request( # pylint: disable=name-too-long
resource_group_name: str, asc_location: str, task_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
Expand Down Expand Up @@ -241,7 +241,7 @@ def build_get_resource_group_level_task_request(
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)


def build_update_resource_group_level_task_state_request(
def build_update_resource_group_level_task_state_request( # pylint: disable=name-too-long
resource_group_name: str,
asc_location: str,
task_name: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "5.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "5.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "5.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "5.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "5.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "5.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "5.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)


def build_list_by_resource_group_and_region_request(
def build_list_by_resource_group_and_region_request( # pylint: disable=name-too-long
resource_group_name: str, asc_location: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "5.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "5.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "5.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ async def get_resource_group_level(
}

@distributed_trace_async
async def update_subscription_level_state_to_dismiss( # pylint: disable=inconsistent-return-statements
async def update_subscription_level_state_to_dismiss( # pylint: disable=inconsistent-return-statements,name-too-long
self, asc_location: str, alert_name: str, **kwargs: Any
) -> None:
"""Update the alert's state.
Expand Down Expand Up @@ -606,7 +606,7 @@ async def update_subscription_level_state_to_dismiss( # pylint: disable=inconsi
}

@distributed_trace_async
async def update_subscription_level_state_to_resolve( # pylint: disable=inconsistent-return-statements
async def update_subscription_level_state_to_resolve( # pylint: disable=inconsistent-return-statements,name-too-long
self, asc_location: str, alert_name: str, **kwargs: Any
) -> None:
"""Update the alert's state.
Expand Down Expand Up @@ -666,7 +666,7 @@ async def update_subscription_level_state_to_resolve( # pylint: disable=inconsi
}

@distributed_trace_async
async def update_subscription_level_state_to_activate( # pylint: disable=inconsistent-return-statements
async def update_subscription_level_state_to_activate( # pylint: disable=inconsistent-return-statements,name-too-long
self, asc_location: str, alert_name: str, **kwargs: Any
) -> None:
"""Update the alert's state.
Expand Down Expand Up @@ -726,7 +726,7 @@ async def update_subscription_level_state_to_activate( # pylint: disable=incons
}

@distributed_trace_async
async def update_resource_group_level_state_to_resolve( # pylint: disable=inconsistent-return-statements
async def update_resource_group_level_state_to_resolve( # pylint: disable=inconsistent-return-statements,name-too-long
self, asc_location: str, alert_name: str, resource_group_name: str, **kwargs: Any
) -> None:
"""Update the alert's state.
Expand Down Expand Up @@ -790,7 +790,7 @@ async def update_resource_group_level_state_to_resolve( # pylint: disable=incon
}

@distributed_trace_async
async def update_resource_group_level_state_to_dismiss( # pylint: disable=inconsistent-return-statements
async def update_resource_group_level_state_to_dismiss( # pylint: disable=inconsistent-return-statements,name-too-long
self, asc_location: str, alert_name: str, resource_group_name: str, **kwargs: Any
) -> None:
"""Update the alert's state.
Expand Down Expand Up @@ -854,7 +854,7 @@ async def update_resource_group_level_state_to_dismiss( # pylint: disable=incon
}

@distributed_trace_async
async def update_resource_group_level_state_to_activate( # pylint: disable=inconsistent-return-statements
async def update_resource_group_level_state_to_activate( # pylint: disable=inconsistent-return-statements,name-too-long
self, asc_location: str, alert_name: str, resource_group_name: str, **kwargs: Any
) -> None:
"""Update the alert's state.
Expand Down
Loading