From ffae9d3a967f85c44abbcb6d22d28e6e162111ed Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 3 Sep 2021 04:17:45 +0000 Subject: [PATCH] CodeGen from PR 15904 in Azure/azure-rest-api-specs delete python track1 config (#15904) --- sdk/security/azure-mgmt-security/_meta.json | 2 +- .../azure/mgmt/security/_metadata.json | 2 +- .../azure/mgmt/security/_version.py | 2 +- .../_assessments_metadata_operations.py | 68 +- .../aio/operations/_assessments_operations.py | 30 +- .../aio/operations/_settings_operations.py | 8 +- .../azure/mgmt/security/models/__init__.py | 38 +- .../azure/mgmt/security/models/_models.py | 547 ++++++++++++++-- .../azure/mgmt/security/models/_models_py3.py | 611 ++++++++++++++++-- .../security/models/_security_center_enums.py | 131 +++- .../_assessments_metadata_operations.py | 68 +- .../operations/_assessments_operations.py | 30 +- .../operations/_settings_operations.py | 8 +- 13 files changed, 1357 insertions(+), 188 deletions(-) diff --git a/sdk/security/azure-mgmt-security/_meta.json b/sdk/security/azure-mgmt-security/_meta.json index 4fcd76c66d92d..934767f953390 100644 --- a/sdk/security/azure-mgmt-security/_meta.json +++ b/sdk/security/azure-mgmt-security/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "a8719243647b7c6d06ed287483d788808de7ecab", + "commit": "629616f2ae3a029e1235ea9177116a576f4f9663", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/security/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/security/resource-manager/readme.md" diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/_metadata.json b/sdk/security/azure-mgmt-security/azure/mgmt/security/_metadata.json index 57c07b73f3a86..40fbaf241867a 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/_metadata.json +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/_metadata.json @@ -1,6 +1,6 @@ { "chosen_version": "", - "total_api_version_list": ["2015-06-01-preview", "2017-08-01", "2017-08-01-preview", "2018-06-01", "2019-01-01", "2019-01-01-preview", "2019-08-01", "2020-01-01", "2020-01-01-preview", "2020-07-01-preview", "2021-01-01", "2021-01-15-preview", "2021-05-01-preview", "2021-07-01"], + "total_api_version_list": ["2015-06-01-preview", "2017-08-01", "2017-08-01-preview", "2018-06-01", "2019-01-01", "2019-01-01-preview", "2019-08-01", "2020-01-01", "2020-01-01-preview", "2020-07-01-preview", "2021-01-01", "2021-01-15-preview", "2021-05-01-preview", "2021-06-01", "2021-07-01"], "client": { "name": "SecurityCenter", "filename": "_security_center", diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/_version.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/_version.py index e32dc6ec42180..e5754a47ce68f 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/_version.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0b1" +VERSION = "1.0.0b1" diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_assessments_metadata_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_assessments_metadata_operations.py index df9555e68ef32..718a664d6cd44 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_assessments_metadata_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_assessments_metadata_operations.py @@ -44,20 +44,20 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, **kwargs: Any - ) -> AsyncIterable["_models.SecurityAssessmentMetadataList"]: + ) -> AsyncIterable["_models.SecurityAssessmentMetadataResponseList"]: """Get metadata information on all assessment types. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SecurityAssessmentMetadataList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.security.models.SecurityAssessmentMetadataList] + :return: An iterator like instance of either SecurityAssessmentMetadataResponseList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.security.models.SecurityAssessmentMetadataResponseList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataResponseList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -80,7 +80,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('SecurityAssessmentMetadataList', pipeline_response) + deserialized = self._deserialize('SecurityAssessmentMetadataResponseList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -107,22 +107,22 @@ async def get( self, assessment_metadata_name: str, **kwargs: Any - ) -> "_models.SecurityAssessmentMetadata": + ) -> "_models.SecurityAssessmentMetadataResponse": """Get metadata information on an assessment type. :param assessment_metadata_name: The Assessment Key - Unique key for the assessment type. :type assessment_metadata_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityAssessmentMetadata, or the result of cls(response) - :rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadata + :return: SecurityAssessmentMetadataResponse, or the result of cls(response) + :rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadataResponse :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadata"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataResponse"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -148,7 +148,7 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SecurityAssessmentMetadata', pipeline_response) + deserialized = self._deserialize('SecurityAssessmentMetadataResponse', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -159,20 +159,20 @@ async def get( def list_by_subscription( self, **kwargs: Any - ) -> AsyncIterable["_models.SecurityAssessmentMetadataList"]: + ) -> AsyncIterable["_models.SecurityAssessmentMetadataResponseList"]: """Get metadata information on all assessment types in a specific subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SecurityAssessmentMetadataList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.security.models.SecurityAssessmentMetadataList] + :return: An iterator like instance of either SecurityAssessmentMetadataResponseList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.security.models.SecurityAssessmentMetadataResponseList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataResponseList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -199,7 +199,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('SecurityAssessmentMetadataList', pipeline_response) + deserialized = self._deserialize('SecurityAssessmentMetadataResponseList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -226,22 +226,22 @@ async def get_in_subscription( self, assessment_metadata_name: str, **kwargs: Any - ) -> "_models.SecurityAssessmentMetadata": + ) -> "_models.SecurityAssessmentMetadataResponse": """Get metadata information on an assessment type in a specific subscription. :param assessment_metadata_name: The Assessment Key - Unique key for the assessment type. :type assessment_metadata_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityAssessmentMetadata, or the result of cls(response) - :rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadata + :return: SecurityAssessmentMetadataResponse, or the result of cls(response) + :rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadataResponse :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadata"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataResponse"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -268,7 +268,7 @@ async def get_in_subscription( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SecurityAssessmentMetadata', pipeline_response) + deserialized = self._deserialize('SecurityAssessmentMetadataResponse', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -279,26 +279,26 @@ async def get_in_subscription( async def create_in_subscription( self, assessment_metadata_name: str, - assessment_metadata: "_models.SecurityAssessmentMetadata", + assessment_metadata: "_models.SecurityAssessmentMetadataResponse", **kwargs: Any - ) -> "_models.SecurityAssessmentMetadata": + ) -> "_models.SecurityAssessmentMetadataResponse": """Create metadata information on an assessment type in a specific subscription. :param assessment_metadata_name: The Assessment Key - Unique key for the assessment type. :type assessment_metadata_name: str :param assessment_metadata: AssessmentMetadata object. - :type assessment_metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadata + :type assessment_metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadataResponse :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityAssessmentMetadata, or the result of cls(response) - :rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadata + :return: SecurityAssessmentMetadataResponse, or the result of cls(response) + :rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadataResponse :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadata"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataResponse"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -320,7 +320,7 @@ async def create_in_subscription( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(assessment_metadata, 'SecurityAssessmentMetadata') + body_content = self._serialize.body(assessment_metadata, 'SecurityAssessmentMetadataResponse') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -330,7 +330,7 @@ async def create_in_subscription( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SecurityAssessmentMetadata', pipeline_response) + deserialized = self._deserialize('SecurityAssessmentMetadataResponse', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -358,7 +358,7 @@ async def delete_in_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_assessments_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_assessments_operations.py index 306648b7d29e5..460dce53bce54 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_assessments_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_assessments_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -118,7 +118,7 @@ async def get( assessment_name: str, expand: Optional[Union[str, "_models.ExpandEnum"]] = None, **kwargs: Any - ) -> "_models.SecurityAssessment": + ) -> "_models.SecurityAssessmentResponse": """Get a security assessment on your scanned resource. :param resource_id: The identifier of the resource. @@ -128,16 +128,16 @@ async def get( :param expand: OData expand. Optional. :type expand: str or ~azure.mgmt.security.models.ExpandEnum :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityAssessment, or the result of cls(response) - :rtype: ~azure.mgmt.security.models.SecurityAssessment + :return: SecurityAssessmentResponse, or the result of cls(response) + :rtype: ~azure.mgmt.security.models.SecurityAssessmentResponse :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessment"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentResponse"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -166,7 +166,7 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SecurityAssessment', pipeline_response) + deserialized = self._deserialize('SecurityAssessmentResponse', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -180,7 +180,7 @@ async def create_or_update( assessment_name: str, assessment: "_models.SecurityAssessment", **kwargs: Any - ) -> "_models.SecurityAssessment": + ) -> "_models.SecurityAssessmentResponse": """Create a security assessment on your resource. An assessment metadata that describes this assessment must be predefined with the same name before inserting the assessment result. @@ -191,16 +191,16 @@ async def create_or_update( :param assessment: Calculated assessment on a pre-defined assessment metadata. :type assessment: ~azure.mgmt.security.models.SecurityAssessment :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityAssessment, or the result of cls(response) - :rtype: ~azure.mgmt.security.models.SecurityAssessment + :return: SecurityAssessmentResponse, or the result of cls(response) + :rtype: ~azure.mgmt.security.models.SecurityAssessmentResponse :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessment"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentResponse"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -233,10 +233,10 @@ async def create_or_update( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('SecurityAssessment', pipeline_response) + deserialized = self._deserialize('SecurityAssessmentResponse', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('SecurityAssessment', pipeline_response) + deserialized = self._deserialize('SecurityAssessmentResponse', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -267,7 +267,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_settings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_settings_operations.py index bd641d4d7e726..1ca5a9c3c869e 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_settings_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_settings_operations.py @@ -109,13 +109,13 @@ async def get_next(next_link=None): async def get( self, - setting_name: Union[str, "_models.Enum69"], + setting_name: Union[str, "_models.Enum71"], **kwargs: Any ) -> "_models.Setting": """Settings of different configurations in security center. :param setting_name: The name of the setting. - :type setting_name: str or ~azure.mgmt.security.models.Enum69 + :type setting_name: str or ~azure.mgmt.security.models.Enum71 :keyword callable cls: A custom type or function that will be passed the direct response :return: Setting, or the result of cls(response) :rtype: ~azure.mgmt.security.models.Setting @@ -163,14 +163,14 @@ async def get( async def update( self, - setting_name: Union[str, "_models.Enum69"], + setting_name: Union[str, "_models.Enum71"], setting: "_models.Setting", **kwargs: Any ) -> "_models.Setting": """updating settings about different configurations in security center. :param setting_name: The name of the setting. - :type setting_name: str or ~azure.mgmt.security.models.Enum69 + :type setting_name: str or ~azure.mgmt.security.models.Enum71 :param setting: Setting object. :type setting: ~azure.mgmt.security.models.Setting :keyword callable cls: A custom type or function that will be passed the direct response diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py index f841b789d1e39..10fcabc2f6edb 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py @@ -39,6 +39,7 @@ from ._models_py3 import AscLocationList from ._models_py3 import AssessmentLinks from ._models_py3 import AssessmentStatus + from ._models_py3 import AssessmentStatusResponse from ._models_py3 import AtaExternalSecuritySolution from ._models_py3 import AtaSolutionProperties from ._models_py3 import AuthenticationDetailsProperties @@ -194,10 +195,17 @@ from ._models_py3 import SecurityAssessment from ._models_py3 import SecurityAssessmentList from ._models_py3 import SecurityAssessmentMetadata - from ._models_py3 import SecurityAssessmentMetadataList from ._models_py3 import SecurityAssessmentMetadataPartnerData from ._models_py3 import SecurityAssessmentMetadataProperties + from ._models_py3 import SecurityAssessmentMetadataPropertiesResponse + from ._models_py3 import SecurityAssessmentMetadataPropertiesResponsePublishDates + from ._models_py3 import SecurityAssessmentMetadataResponse + from ._models_py3 import SecurityAssessmentMetadataResponseList from ._models_py3 import SecurityAssessmentPartnerData + from ._models_py3 import SecurityAssessmentProperties + from ._models_py3 import SecurityAssessmentPropertiesBase + from ._models_py3 import SecurityAssessmentPropertiesResponse + from ._models_py3 import SecurityAssessmentResponse from ._models_py3 import SecurityContact from ._models_py3 import SecurityContactList from ._models_py3 import SecuritySolution @@ -275,6 +283,7 @@ from ._models import AscLocationList # type: ignore from ._models import AssessmentLinks # type: ignore from ._models import AssessmentStatus # type: ignore + from ._models import AssessmentStatusResponse # type: ignore from ._models import AtaExternalSecuritySolution # type: ignore from ._models import AtaSolutionProperties # type: ignore from ._models import AuthenticationDetailsProperties # type: ignore @@ -430,10 +439,17 @@ from ._models import SecurityAssessment # type: ignore from ._models import SecurityAssessmentList # type: ignore from ._models import SecurityAssessmentMetadata # type: ignore - from ._models import SecurityAssessmentMetadataList # type: ignore from ._models import SecurityAssessmentMetadataPartnerData # type: ignore from ._models import SecurityAssessmentMetadataProperties # type: ignore + from ._models import SecurityAssessmentMetadataPropertiesResponse # type: ignore + from ._models import SecurityAssessmentMetadataPropertiesResponsePublishDates # type: ignore + from ._models import SecurityAssessmentMetadataResponse # type: ignore + from ._models import SecurityAssessmentMetadataResponseList # type: ignore from ._models import SecurityAssessmentPartnerData # type: ignore + from ._models import SecurityAssessmentProperties # type: ignore + from ._models import SecurityAssessmentPropertiesBase # type: ignore + from ._models import SecurityAssessmentPropertiesResponse # type: ignore + from ._models import SecurityAssessmentResponse # type: ignore from ._models import SecurityContact # type: ignore from ._models import SecurityContactList # type: ignore from ._models import SecuritySolution # type: ignore @@ -508,7 +524,7 @@ EnforcementSupport, Enum13, Enum15, - Enum69, + Enum71, EventSource, ExpandControlsEnum, ExpandEnum, @@ -550,6 +566,8 @@ Status, StatusReason, SubAssessmentStatusCode, + Tactics, + Techniques, Threats, TransportProtocol, UnmaskedIpLoggingStatus, @@ -590,6 +608,7 @@ 'AscLocationList', 'AssessmentLinks', 'AssessmentStatus', + 'AssessmentStatusResponse', 'AtaExternalSecuritySolution', 'AtaSolutionProperties', 'AuthenticationDetailsProperties', @@ -745,10 +764,17 @@ 'SecurityAssessment', 'SecurityAssessmentList', 'SecurityAssessmentMetadata', - 'SecurityAssessmentMetadataList', 'SecurityAssessmentMetadataPartnerData', 'SecurityAssessmentMetadataProperties', + 'SecurityAssessmentMetadataPropertiesResponse', + 'SecurityAssessmentMetadataPropertiesResponsePublishDates', + 'SecurityAssessmentMetadataResponse', + 'SecurityAssessmentMetadataResponseList', 'SecurityAssessmentPartnerData', + 'SecurityAssessmentProperties', + 'SecurityAssessmentPropertiesBase', + 'SecurityAssessmentPropertiesResponse', + 'SecurityAssessmentResponse', 'SecurityContact', 'SecurityContactList', 'SecuritySolution', @@ -821,7 +847,7 @@ 'EnforcementSupport', 'Enum13', 'Enum15', - 'Enum69', + 'Enum71', 'EventSource', 'ExpandControlsEnum', 'ExpandEnum', @@ -863,6 +889,8 @@ 'Status', 'StatusReason', 'SubAssessmentStatusCode', + 'Tactics', + 'Techniques', 'Threats', 'TransportProtocol', 'UnmaskedIpLoggingStatus', diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py index 13b2d159b9d31..9ff157b7be147 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py @@ -1784,6 +1784,51 @@ def __init__( self.description = kwargs.get('description', None) +class AssessmentStatusResponse(AssessmentStatus): + """The result of the assessment. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Programmatic code for the status of the assessment. Possible values + include: "Healthy", "Unhealthy", "NotApplicable". + :type code: str or ~azure.mgmt.security.models.AssessmentStatusCode + :param cause: Programmatic code for the cause of the assessment status. + :type cause: str + :param description: Human readable description of the assessment status. + :type description: str + :ivar first_evaluation_date: The time that the assessment was created and first evaluated. + Returned as UTC time in ISO 8601 format. + :vartype first_evaluation_date: ~datetime.datetime + :ivar status_change_date: The time that the status of the assessment last changed. Returned as + UTC time in ISO 8601 format. + :vartype status_change_date: ~datetime.datetime + """ + + _validation = { + 'code': {'required': True}, + 'first_evaluation_date': {'readonly': True}, + 'status_change_date': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'cause': {'key': 'cause', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'first_evaluation_date': {'key': 'firstEvaluationDate', 'type': 'iso-8601'}, + 'status_change_date': {'key': 'statusChangeDate', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(AssessmentStatusResponse, self).__init__(**kwargs) + self.first_evaluation_date = None + self.status_change_date = None + + class AtaExternalSecuritySolution(ExternalSecuritySolution): """Represents an ATA security solution which sends logs to an OMS workspace. @@ -7725,8 +7770,6 @@ class SecurityAssessment(Resource): :type resource_details: ~azure.mgmt.security.models.ResourceDetails :ivar display_name: User friendly display name of the assessment. :vartype display_name: str - :param status: The result of the assessment. - :type status: ~azure.mgmt.security.models.AssessmentStatus :param additional_data: Additional data regarding the assessment. :type additional_data: dict[str, str] :ivar links: Links relevant to the assessment. @@ -7735,6 +7778,8 @@ class SecurityAssessment(Resource): :type metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadataProperties :param partners_data: Data regarding 3rd party partner integration. :type partners_data: ~azure.mgmt.security.models.SecurityAssessmentPartnerData + :param status: The result of the assessment. + :type status: ~azure.mgmt.security.models.AssessmentStatus """ _validation = { @@ -7751,11 +7796,11 @@ class SecurityAssessment(Resource): 'type': {'key': 'type', 'type': 'str'}, 'resource_details': {'key': 'properties.resourceDetails', 'type': 'ResourceDetails'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'AssessmentStatus'}, 'additional_data': {'key': 'properties.additionalData', 'type': '{str}'}, 'links': {'key': 'properties.links', 'type': 'AssessmentLinks'}, 'metadata': {'key': 'properties.metadata', 'type': 'SecurityAssessmentMetadataProperties'}, 'partners_data': {'key': 'properties.partnersData', 'type': 'SecurityAssessmentPartnerData'}, + 'status': {'key': 'properties.status', 'type': 'AssessmentStatus'}, } def __init__( @@ -7765,11 +7810,11 @@ def __init__( super(SecurityAssessment, self).__init__(**kwargs) self.resource_details = kwargs.get('resource_details', None) self.display_name = None - self.status = kwargs.get('status', None) self.additional_data = kwargs.get('additional_data', None) self.links = None self.metadata = kwargs.get('metadata', None) self.partners_data = kwargs.get('partners_data', None) + self.status = kwargs.get('status', None) class SecurityAssessmentList(msrest.serialization.Model): @@ -7778,7 +7823,7 @@ class SecurityAssessmentList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Collection of security assessments in this page. - :vartype value: list[~azure.mgmt.security.models.SecurityAssessment] + :vartype value: list[~azure.mgmt.security.models.SecurityAssessmentResponse] :ivar next_link: The URI to fetch the next page. :vartype next_link: str """ @@ -7789,7 +7834,7 @@ class SecurityAssessmentList(msrest.serialization.Model): } _attribute_map = { - 'value': {'key': 'value', 'type': '[SecurityAssessment]'}, + 'value': {'key': 'value', 'type': '[SecurityAssessmentResponse]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } @@ -7890,36 +7935,6 @@ def __init__( self.partner_data = kwargs.get('partner_data', None) -class SecurityAssessmentMetadataList(msrest.serialization.Model): - """List of security assessment metadata. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: - :vartype value: list[~azure.mgmt.security.models.SecurityAssessmentMetadata] - :ivar next_link: The URI to fetch the next page. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SecurityAssessmentMetadata]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityAssessmentMetadataList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - class SecurityAssessmentMetadataPartnerData(msrest.serialization.Model): """Describes the partner that created the assessment. @@ -8036,6 +8051,259 @@ def __init__( self.partner_data = kwargs.get('partner_data', None) +class SecurityAssessmentMetadataPropertiesResponse(SecurityAssessmentMetadataProperties): + """Describes properties of an assessment metadata response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param display_name: Required. User friendly display name of the assessment. + :type display_name: str + :ivar policy_definition_id: Azure resource ID of the policy definition that turns this + assessment calculation on. + :vartype policy_definition_id: str + :param description: Human readable description of the assessment. + :type description: str + :param remediation_description: Human readable description of what you should do to mitigate + this security issue. + :type remediation_description: str + :param categories: + :type categories: list[str or ~azure.mgmt.security.models.Categories] + :param severity: Required. The severity level of the assessment. Possible values include: + "Low", "Medium", "High". + :type severity: str or ~azure.mgmt.security.models.Severity + :param user_impact: The user impact of the assessment. Possible values include: "Low", + "Moderate", "High". + :type user_impact: str or ~azure.mgmt.security.models.UserImpact + :param implementation_effort: The implementation effort required to remediate this assessment. + Possible values include: "Low", "Moderate", "High". + :type implementation_effort: str or ~azure.mgmt.security.models.ImplementationEffort + :param threats: + :type threats: list[str or ~azure.mgmt.security.models.Threats] + :param preview: True if this assessment is in preview release status. + :type preview: bool + :param assessment_type: Required. BuiltIn if the assessment based on built-in Azure Policy + definition, Custom if the assessment based on custom Azure Policy definition. Possible values + include: "BuiltIn", "CustomPolicy", "CustomerManaged", "VerifiedPartner". + :type assessment_type: str or ~azure.mgmt.security.models.AssessmentType + :param partner_data: Describes the partner that created the assessment. + :type partner_data: ~azure.mgmt.security.models.SecurityAssessmentMetadataPartnerData + :param publish_dates: + :type publish_dates: + ~azure.mgmt.security.models.SecurityAssessmentMetadataPropertiesResponsePublishDates + :param planned_deprecation_date: + :type planned_deprecation_date: str + :param tactics: + :type tactics: list[str or ~azure.mgmt.security.models.Tactics] + :param techniques: + :type techniques: list[str or ~azure.mgmt.security.models.Techniques] + """ + + _validation = { + 'display_name': {'required': True}, + 'policy_definition_id': {'readonly': True}, + 'severity': {'required': True}, + 'assessment_type': {'required': True}, + 'planned_deprecation_date': {'pattern': r'^[0-9]{2}/[0-9]{4}$'}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'remediation_description': {'key': 'remediationDescription', 'type': 'str'}, + 'categories': {'key': 'categories', 'type': '[str]'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'user_impact': {'key': 'userImpact', 'type': 'str'}, + 'implementation_effort': {'key': 'implementationEffort', 'type': 'str'}, + 'threats': {'key': 'threats', 'type': '[str]'}, + 'preview': {'key': 'preview', 'type': 'bool'}, + 'assessment_type': {'key': 'assessmentType', 'type': 'str'}, + 'partner_data': {'key': 'partnerData', 'type': 'SecurityAssessmentMetadataPartnerData'}, + 'publish_dates': {'key': 'publishDates', 'type': 'SecurityAssessmentMetadataPropertiesResponsePublishDates'}, + 'planned_deprecation_date': {'key': 'plannedDeprecationDate', 'type': 'str'}, + 'tactics': {'key': 'tactics', 'type': '[str]'}, + 'techniques': {'key': 'techniques', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityAssessmentMetadataPropertiesResponse, self).__init__(**kwargs) + self.publish_dates = kwargs.get('publish_dates', None) + self.planned_deprecation_date = kwargs.get('planned_deprecation_date', None) + self.tactics = kwargs.get('tactics', None) + self.techniques = kwargs.get('techniques', None) + + +class SecurityAssessmentMetadataPropertiesResponsePublishDates(msrest.serialization.Model): + """SecurityAssessmentMetadataPropertiesResponsePublishDates. + + All required parameters must be populated in order to send to Azure. + + :param ga: + :type ga: str + :param public: Required. + :type public: str + """ + + _validation = { + 'ga': {'pattern': r'^([0-9]{2}/){2}[0-9]{4}$'}, + 'public': {'required': True, 'pattern': r'^([0-9]{2}/){2}[0-9]{4}$'}, + } + + _attribute_map = { + 'ga': {'key': 'GA', 'type': 'str'}, + 'public': {'key': 'public', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityAssessmentMetadataPropertiesResponsePublishDates, self).__init__(**kwargs) + self.ga = kwargs.get('ga', None) + self.public = kwargs['public'] + + +class SecurityAssessmentMetadataResponse(Resource): + """Security assessment metadata response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param display_name: User friendly display name of the assessment. + :type display_name: str + :ivar policy_definition_id: Azure resource ID of the policy definition that turns this + assessment calculation on. + :vartype policy_definition_id: str + :param description: Human readable description of the assessment. + :type description: str + :param remediation_description: Human readable description of what you should do to mitigate + this security issue. + :type remediation_description: str + :param categories: + :type categories: list[str or ~azure.mgmt.security.models.Categories] + :param severity: The severity level of the assessment. Possible values include: "Low", + "Medium", "High". + :type severity: str or ~azure.mgmt.security.models.Severity + :param user_impact: The user impact of the assessment. Possible values include: "Low", + "Moderate", "High". + :type user_impact: str or ~azure.mgmt.security.models.UserImpact + :param implementation_effort: The implementation effort required to remediate this assessment. + Possible values include: "Low", "Moderate", "High". + :type implementation_effort: str or ~azure.mgmt.security.models.ImplementationEffort + :param threats: + :type threats: list[str or ~azure.mgmt.security.models.Threats] + :param preview: True if this assessment is in preview release status. + :type preview: bool + :param assessment_type: BuiltIn if the assessment based on built-in Azure Policy definition, + Custom if the assessment based on custom Azure Policy definition. Possible values include: + "BuiltIn", "CustomPolicy", "CustomerManaged", "VerifiedPartner". + :type assessment_type: str or ~azure.mgmt.security.models.AssessmentType + :param partner_data: Describes the partner that created the assessment. + :type partner_data: ~azure.mgmt.security.models.SecurityAssessmentMetadataPartnerData + :param publish_dates: + :type publish_dates: + ~azure.mgmt.security.models.SecurityAssessmentMetadataPropertiesResponsePublishDates + :param planned_deprecation_date: + :type planned_deprecation_date: str + :param tactics: + :type tactics: list[str or ~azure.mgmt.security.models.Tactics] + :param techniques: + :type techniques: list[str or ~azure.mgmt.security.models.Techniques] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'policy_definition_id': {'readonly': True}, + 'planned_deprecation_date': {'pattern': r'^[0-9]{2}/[0-9]{4}$'}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'policy_definition_id': {'key': 'properties.policyDefinitionId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'remediation_description': {'key': 'properties.remediationDescription', 'type': 'str'}, + 'categories': {'key': 'properties.categories', 'type': '[str]'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'user_impact': {'key': 'properties.userImpact', 'type': 'str'}, + 'implementation_effort': {'key': 'properties.implementationEffort', 'type': 'str'}, + 'threats': {'key': 'properties.threats', 'type': '[str]'}, + 'preview': {'key': 'properties.preview', 'type': 'bool'}, + 'assessment_type': {'key': 'properties.assessmentType', 'type': 'str'}, + 'partner_data': {'key': 'properties.partnerData', 'type': 'SecurityAssessmentMetadataPartnerData'}, + 'publish_dates': {'key': 'properties.publishDates', 'type': 'SecurityAssessmentMetadataPropertiesResponsePublishDates'}, + 'planned_deprecation_date': {'key': 'properties.plannedDeprecationDate', 'type': 'str'}, + 'tactics': {'key': 'properties.tactics', 'type': '[str]'}, + 'techniques': {'key': 'properties.techniques', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityAssessmentMetadataResponse, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.policy_definition_id = None + self.description = kwargs.get('description', None) + self.remediation_description = kwargs.get('remediation_description', None) + self.categories = kwargs.get('categories', None) + self.severity = kwargs.get('severity', None) + self.user_impact = kwargs.get('user_impact', None) + self.implementation_effort = kwargs.get('implementation_effort', None) + self.threats = kwargs.get('threats', None) + self.preview = kwargs.get('preview', None) + self.assessment_type = kwargs.get('assessment_type', None) + self.partner_data = kwargs.get('partner_data', None) + self.publish_dates = kwargs.get('publish_dates', None) + self.planned_deprecation_date = kwargs.get('planned_deprecation_date', None) + self.tactics = kwargs.get('tactics', None) + self.techniques = kwargs.get('techniques', None) + + +class SecurityAssessmentMetadataResponseList(msrest.serialization.Model): + """List of security assessment metadata. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: + :vartype value: list[~azure.mgmt.security.models.SecurityAssessmentMetadataResponse] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecurityAssessmentMetadataResponse]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityAssessmentMetadataResponseList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecurityAssessmentPartnerData(msrest.serialization.Model): """Data regarding 3rd party partner integration. @@ -8066,6 +8334,213 @@ def __init__( self.secret = kwargs['secret'] +class SecurityAssessmentPropertiesBase(msrest.serialization.Model): + """Describes properties of an assessment. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param resource_details: Required. Details of the resource that was assessed. + :type resource_details: ~azure.mgmt.security.models.ResourceDetails + :ivar display_name: User friendly display name of the assessment. + :vartype display_name: str + :param additional_data: Additional data regarding the assessment. + :type additional_data: dict[str, str] + :ivar links: Links relevant to the assessment. + :vartype links: ~azure.mgmt.security.models.AssessmentLinks + :param metadata: Describes properties of an assessment metadata. + :type metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadataProperties + :param partners_data: Data regarding 3rd party partner integration. + :type partners_data: ~azure.mgmt.security.models.SecurityAssessmentPartnerData + """ + + _validation = { + 'resource_details': {'required': True}, + 'display_name': {'readonly': True}, + 'links': {'readonly': True}, + } + + _attribute_map = { + 'resource_details': {'key': 'resourceDetails', 'type': 'ResourceDetails'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'additional_data': {'key': 'additionalData', 'type': '{str}'}, + 'links': {'key': 'links', 'type': 'AssessmentLinks'}, + 'metadata': {'key': 'metadata', 'type': 'SecurityAssessmentMetadataProperties'}, + 'partners_data': {'key': 'partnersData', 'type': 'SecurityAssessmentPartnerData'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityAssessmentPropertiesBase, self).__init__(**kwargs) + self.resource_details = kwargs['resource_details'] + self.display_name = None + self.additional_data = kwargs.get('additional_data', None) + self.links = None + self.metadata = kwargs.get('metadata', None) + self.partners_data = kwargs.get('partners_data', None) + + +class SecurityAssessmentProperties(SecurityAssessmentPropertiesBase): + """Describes properties of an assessment. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param resource_details: Required. Details of the resource that was assessed. + :type resource_details: ~azure.mgmt.security.models.ResourceDetails + :ivar display_name: User friendly display name of the assessment. + :vartype display_name: str + :param additional_data: Additional data regarding the assessment. + :type additional_data: dict[str, str] + :ivar links: Links relevant to the assessment. + :vartype links: ~azure.mgmt.security.models.AssessmentLinks + :param metadata: Describes properties of an assessment metadata. + :type metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadataProperties + :param partners_data: Data regarding 3rd party partner integration. + :type partners_data: ~azure.mgmt.security.models.SecurityAssessmentPartnerData + :param status: Required. The result of the assessment. + :type status: ~azure.mgmt.security.models.AssessmentStatus + """ + + _validation = { + 'resource_details': {'required': True}, + 'display_name': {'readonly': True}, + 'links': {'readonly': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'resource_details': {'key': 'resourceDetails', 'type': 'ResourceDetails'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'additional_data': {'key': 'additionalData', 'type': '{str}'}, + 'links': {'key': 'links', 'type': 'AssessmentLinks'}, + 'metadata': {'key': 'metadata', 'type': 'SecurityAssessmentMetadataProperties'}, + 'partners_data': {'key': 'partnersData', 'type': 'SecurityAssessmentPartnerData'}, + 'status': {'key': 'status', 'type': 'AssessmentStatus'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityAssessmentProperties, self).__init__(**kwargs) + self.status = kwargs['status'] + + +class SecurityAssessmentPropertiesResponse(SecurityAssessmentPropertiesBase): + """Describes properties of an assessment. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param resource_details: Required. Details of the resource that was assessed. + :type resource_details: ~azure.mgmt.security.models.ResourceDetails + :ivar display_name: User friendly display name of the assessment. + :vartype display_name: str + :param additional_data: Additional data regarding the assessment. + :type additional_data: dict[str, str] + :ivar links: Links relevant to the assessment. + :vartype links: ~azure.mgmt.security.models.AssessmentLinks + :param metadata: Describes properties of an assessment metadata. + :type metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadataProperties + :param partners_data: Data regarding 3rd party partner integration. + :type partners_data: ~azure.mgmt.security.models.SecurityAssessmentPartnerData + :param status: Required. The result of the assessment. + :type status: ~azure.mgmt.security.models.AssessmentStatusResponse + """ + + _validation = { + 'resource_details': {'required': True}, + 'display_name': {'readonly': True}, + 'links': {'readonly': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'resource_details': {'key': 'resourceDetails', 'type': 'ResourceDetails'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'additional_data': {'key': 'additionalData', 'type': '{str}'}, + 'links': {'key': 'links', 'type': 'AssessmentLinks'}, + 'metadata': {'key': 'metadata', 'type': 'SecurityAssessmentMetadataProperties'}, + 'partners_data': {'key': 'partnersData', 'type': 'SecurityAssessmentPartnerData'}, + 'status': {'key': 'status', 'type': 'AssessmentStatusResponse'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityAssessmentPropertiesResponse, self).__init__(**kwargs) + self.status = kwargs['status'] + + +class SecurityAssessmentResponse(Resource): + """Security assessment on a resource - response format. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param resource_details: Details of the resource that was assessed. + :type resource_details: ~azure.mgmt.security.models.ResourceDetails + :ivar display_name: User friendly display name of the assessment. + :vartype display_name: str + :param additional_data: Additional data regarding the assessment. + :type additional_data: dict[str, str] + :ivar links: Links relevant to the assessment. + :vartype links: ~azure.mgmt.security.models.AssessmentLinks + :param metadata: Describes properties of an assessment metadata. + :type metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadataProperties + :param partners_data: Data regarding 3rd party partner integration. + :type partners_data: ~azure.mgmt.security.models.SecurityAssessmentPartnerData + :param status: The result of the assessment. + :type status: ~azure.mgmt.security.models.AssessmentStatusResponse + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'links': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_details': {'key': 'properties.resourceDetails', 'type': 'ResourceDetails'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'additional_data': {'key': 'properties.additionalData', 'type': '{str}'}, + 'links': {'key': 'properties.links', 'type': 'AssessmentLinks'}, + 'metadata': {'key': 'properties.metadata', 'type': 'SecurityAssessmentMetadataProperties'}, + 'partners_data': {'key': 'properties.partnersData', 'type': 'SecurityAssessmentPartnerData'}, + 'status': {'key': 'properties.status', 'type': 'AssessmentStatusResponse'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityAssessmentResponse, self).__init__(**kwargs) + self.resource_details = kwargs.get('resource_details', None) + self.display_name = None + self.additional_data = kwargs.get('additional_data', None) + self.links = None + self.metadata = kwargs.get('metadata', None) + self.partners_data = kwargs.get('partners_data', None) + self.status = kwargs.get('status', None) + + class SecurityContact(Resource): """Contact details for security issues. diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py index cc336c5b2ea0b..a0312b163e872 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py @@ -1901,6 +1901,55 @@ def __init__( self.description = description +class AssessmentStatusResponse(AssessmentStatus): + """The result of the assessment. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Programmatic code for the status of the assessment. Possible values + include: "Healthy", "Unhealthy", "NotApplicable". + :type code: str or ~azure.mgmt.security.models.AssessmentStatusCode + :param cause: Programmatic code for the cause of the assessment status. + :type cause: str + :param description: Human readable description of the assessment status. + :type description: str + :ivar first_evaluation_date: The time that the assessment was created and first evaluated. + Returned as UTC time in ISO 8601 format. + :vartype first_evaluation_date: ~datetime.datetime + :ivar status_change_date: The time that the status of the assessment last changed. Returned as + UTC time in ISO 8601 format. + :vartype status_change_date: ~datetime.datetime + """ + + _validation = { + 'code': {'required': True}, + 'first_evaluation_date': {'readonly': True}, + 'status_change_date': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'cause': {'key': 'cause', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'first_evaluation_date': {'key': 'firstEvaluationDate', 'type': 'iso-8601'}, + 'status_change_date': {'key': 'statusChangeDate', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + code: Union[str, "AssessmentStatusCode"], + cause: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(AssessmentStatusResponse, self).__init__(code=code, cause=cause, description=description, **kwargs) + self.first_evaluation_date = None + self.status_change_date = None + + class AtaExternalSecuritySolution(ExternalSecuritySolution): """Represents an ATA security solution which sends logs to an OMS workspace. @@ -8273,8 +8322,6 @@ class SecurityAssessment(Resource): :type resource_details: ~azure.mgmt.security.models.ResourceDetails :ivar display_name: User friendly display name of the assessment. :vartype display_name: str - :param status: The result of the assessment. - :type status: ~azure.mgmt.security.models.AssessmentStatus :param additional_data: Additional data regarding the assessment. :type additional_data: dict[str, str] :ivar links: Links relevant to the assessment. @@ -8283,6 +8330,8 @@ class SecurityAssessment(Resource): :type metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadataProperties :param partners_data: Data regarding 3rd party partner integration. :type partners_data: ~azure.mgmt.security.models.SecurityAssessmentPartnerData + :param status: The result of the assessment. + :type status: ~azure.mgmt.security.models.AssessmentStatus """ _validation = { @@ -8299,31 +8348,31 @@ class SecurityAssessment(Resource): 'type': {'key': 'type', 'type': 'str'}, 'resource_details': {'key': 'properties.resourceDetails', 'type': 'ResourceDetails'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'AssessmentStatus'}, 'additional_data': {'key': 'properties.additionalData', 'type': '{str}'}, 'links': {'key': 'properties.links', 'type': 'AssessmentLinks'}, 'metadata': {'key': 'properties.metadata', 'type': 'SecurityAssessmentMetadataProperties'}, 'partners_data': {'key': 'properties.partnersData', 'type': 'SecurityAssessmentPartnerData'}, + 'status': {'key': 'properties.status', 'type': 'AssessmentStatus'}, } def __init__( self, *, resource_details: Optional["ResourceDetails"] = None, - status: Optional["AssessmentStatus"] = None, additional_data: Optional[Dict[str, str]] = None, metadata: Optional["SecurityAssessmentMetadataProperties"] = None, partners_data: Optional["SecurityAssessmentPartnerData"] = None, + status: Optional["AssessmentStatus"] = None, **kwargs ): super(SecurityAssessment, self).__init__(**kwargs) self.resource_details = resource_details self.display_name = None - self.status = status self.additional_data = additional_data self.links = None self.metadata = metadata self.partners_data = partners_data + self.status = status class SecurityAssessmentList(msrest.serialization.Model): @@ -8332,7 +8381,7 @@ class SecurityAssessmentList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Collection of security assessments in this page. - :vartype value: list[~azure.mgmt.security.models.SecurityAssessment] + :vartype value: list[~azure.mgmt.security.models.SecurityAssessmentResponse] :ivar next_link: The URI to fetch the next page. :vartype next_link: str """ @@ -8343,7 +8392,7 @@ class SecurityAssessmentList(msrest.serialization.Model): } _attribute_map = { - 'value': {'key': 'value', 'type': '[SecurityAssessment]'}, + 'value': {'key': 'value', 'type': '[SecurityAssessmentResponse]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } @@ -8456,36 +8505,6 @@ def __init__( self.partner_data = partner_data -class SecurityAssessmentMetadataList(msrest.serialization.Model): - """List of security assessment metadata. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: - :vartype value: list[~azure.mgmt.security.models.SecurityAssessmentMetadata] - :ivar next_link: The URI to fetch the next page. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SecurityAssessmentMetadata]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityAssessmentMetadataList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - class SecurityAssessmentMetadataPartnerData(msrest.serialization.Model): """Describes the partner that created the assessment. @@ -8618,6 +8637,294 @@ def __init__( self.partner_data = partner_data +class SecurityAssessmentMetadataPropertiesResponse(SecurityAssessmentMetadataProperties): + """Describes properties of an assessment metadata response. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param display_name: Required. User friendly display name of the assessment. + :type display_name: str + :ivar policy_definition_id: Azure resource ID of the policy definition that turns this + assessment calculation on. + :vartype policy_definition_id: str + :param description: Human readable description of the assessment. + :type description: str + :param remediation_description: Human readable description of what you should do to mitigate + this security issue. + :type remediation_description: str + :param categories: + :type categories: list[str or ~azure.mgmt.security.models.Categories] + :param severity: Required. The severity level of the assessment. Possible values include: + "Low", "Medium", "High". + :type severity: str or ~azure.mgmt.security.models.Severity + :param user_impact: The user impact of the assessment. Possible values include: "Low", + "Moderate", "High". + :type user_impact: str or ~azure.mgmt.security.models.UserImpact + :param implementation_effort: The implementation effort required to remediate this assessment. + Possible values include: "Low", "Moderate", "High". + :type implementation_effort: str or ~azure.mgmt.security.models.ImplementationEffort + :param threats: + :type threats: list[str or ~azure.mgmt.security.models.Threats] + :param preview: True if this assessment is in preview release status. + :type preview: bool + :param assessment_type: Required. BuiltIn if the assessment based on built-in Azure Policy + definition, Custom if the assessment based on custom Azure Policy definition. Possible values + include: "BuiltIn", "CustomPolicy", "CustomerManaged", "VerifiedPartner". + :type assessment_type: str or ~azure.mgmt.security.models.AssessmentType + :param partner_data: Describes the partner that created the assessment. + :type partner_data: ~azure.mgmt.security.models.SecurityAssessmentMetadataPartnerData + :param publish_dates: + :type publish_dates: + ~azure.mgmt.security.models.SecurityAssessmentMetadataPropertiesResponsePublishDates + :param planned_deprecation_date: + :type planned_deprecation_date: str + :param tactics: + :type tactics: list[str or ~azure.mgmt.security.models.Tactics] + :param techniques: + :type techniques: list[str or ~azure.mgmt.security.models.Techniques] + """ + + _validation = { + 'display_name': {'required': True}, + 'policy_definition_id': {'readonly': True}, + 'severity': {'required': True}, + 'assessment_type': {'required': True}, + 'planned_deprecation_date': {'pattern': r'^[0-9]{2}/[0-9]{4}$'}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'remediation_description': {'key': 'remediationDescription', 'type': 'str'}, + 'categories': {'key': 'categories', 'type': '[str]'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'user_impact': {'key': 'userImpact', 'type': 'str'}, + 'implementation_effort': {'key': 'implementationEffort', 'type': 'str'}, + 'threats': {'key': 'threats', 'type': '[str]'}, + 'preview': {'key': 'preview', 'type': 'bool'}, + 'assessment_type': {'key': 'assessmentType', 'type': 'str'}, + 'partner_data': {'key': 'partnerData', 'type': 'SecurityAssessmentMetadataPartnerData'}, + 'publish_dates': {'key': 'publishDates', 'type': 'SecurityAssessmentMetadataPropertiesResponsePublishDates'}, + 'planned_deprecation_date': {'key': 'plannedDeprecationDate', 'type': 'str'}, + 'tactics': {'key': 'tactics', 'type': '[str]'}, + 'techniques': {'key': 'techniques', 'type': '[str]'}, + } + + def __init__( + self, + *, + display_name: str, + severity: Union[str, "Severity"], + assessment_type: Union[str, "AssessmentType"], + description: Optional[str] = None, + remediation_description: Optional[str] = None, + categories: Optional[List[Union[str, "Categories"]]] = None, + user_impact: Optional[Union[str, "UserImpact"]] = None, + implementation_effort: Optional[Union[str, "ImplementationEffort"]] = None, + threats: Optional[List[Union[str, "Threats"]]] = None, + preview: Optional[bool] = None, + partner_data: Optional["SecurityAssessmentMetadataPartnerData"] = None, + publish_dates: Optional["SecurityAssessmentMetadataPropertiesResponsePublishDates"] = None, + planned_deprecation_date: Optional[str] = None, + tactics: Optional[List[Union[str, "Tactics"]]] = None, + techniques: Optional[List[Union[str, "Techniques"]]] = None, + **kwargs + ): + super(SecurityAssessmentMetadataPropertiesResponse, self).__init__(display_name=display_name, description=description, remediation_description=remediation_description, categories=categories, severity=severity, user_impact=user_impact, implementation_effort=implementation_effort, threats=threats, preview=preview, assessment_type=assessment_type, partner_data=partner_data, **kwargs) + self.publish_dates = publish_dates + self.planned_deprecation_date = planned_deprecation_date + self.tactics = tactics + self.techniques = techniques + + +class SecurityAssessmentMetadataPropertiesResponsePublishDates(msrest.serialization.Model): + """SecurityAssessmentMetadataPropertiesResponsePublishDates. + + All required parameters must be populated in order to send to Azure. + + :param ga: + :type ga: str + :param public: Required. + :type public: str + """ + + _validation = { + 'ga': {'pattern': r'^([0-9]{2}/){2}[0-9]{4}$'}, + 'public': {'required': True, 'pattern': r'^([0-9]{2}/){2}[0-9]{4}$'}, + } + + _attribute_map = { + 'ga': {'key': 'GA', 'type': 'str'}, + 'public': {'key': 'public', 'type': 'str'}, + } + + def __init__( + self, + *, + public: str, + ga: Optional[str] = None, + **kwargs + ): + super(SecurityAssessmentMetadataPropertiesResponsePublishDates, self).__init__(**kwargs) + self.ga = ga + self.public = public + + +class SecurityAssessmentMetadataResponse(Resource): + """Security assessment metadata response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param display_name: User friendly display name of the assessment. + :type display_name: str + :ivar policy_definition_id: Azure resource ID of the policy definition that turns this + assessment calculation on. + :vartype policy_definition_id: str + :param description: Human readable description of the assessment. + :type description: str + :param remediation_description: Human readable description of what you should do to mitigate + this security issue. + :type remediation_description: str + :param categories: + :type categories: list[str or ~azure.mgmt.security.models.Categories] + :param severity: The severity level of the assessment. Possible values include: "Low", + "Medium", "High". + :type severity: str or ~azure.mgmt.security.models.Severity + :param user_impact: The user impact of the assessment. Possible values include: "Low", + "Moderate", "High". + :type user_impact: str or ~azure.mgmt.security.models.UserImpact + :param implementation_effort: The implementation effort required to remediate this assessment. + Possible values include: "Low", "Moderate", "High". + :type implementation_effort: str or ~azure.mgmt.security.models.ImplementationEffort + :param threats: + :type threats: list[str or ~azure.mgmt.security.models.Threats] + :param preview: True if this assessment is in preview release status. + :type preview: bool + :param assessment_type: BuiltIn if the assessment based on built-in Azure Policy definition, + Custom if the assessment based on custom Azure Policy definition. Possible values include: + "BuiltIn", "CustomPolicy", "CustomerManaged", "VerifiedPartner". + :type assessment_type: str or ~azure.mgmt.security.models.AssessmentType + :param partner_data: Describes the partner that created the assessment. + :type partner_data: ~azure.mgmt.security.models.SecurityAssessmentMetadataPartnerData + :param publish_dates: + :type publish_dates: + ~azure.mgmt.security.models.SecurityAssessmentMetadataPropertiesResponsePublishDates + :param planned_deprecation_date: + :type planned_deprecation_date: str + :param tactics: + :type tactics: list[str or ~azure.mgmt.security.models.Tactics] + :param techniques: + :type techniques: list[str or ~azure.mgmt.security.models.Techniques] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'policy_definition_id': {'readonly': True}, + 'planned_deprecation_date': {'pattern': r'^[0-9]{2}/[0-9]{4}$'}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'policy_definition_id': {'key': 'properties.policyDefinitionId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'remediation_description': {'key': 'properties.remediationDescription', 'type': 'str'}, + 'categories': {'key': 'properties.categories', 'type': '[str]'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'user_impact': {'key': 'properties.userImpact', 'type': 'str'}, + 'implementation_effort': {'key': 'properties.implementationEffort', 'type': 'str'}, + 'threats': {'key': 'properties.threats', 'type': '[str]'}, + 'preview': {'key': 'properties.preview', 'type': 'bool'}, + 'assessment_type': {'key': 'properties.assessmentType', 'type': 'str'}, + 'partner_data': {'key': 'properties.partnerData', 'type': 'SecurityAssessmentMetadataPartnerData'}, + 'publish_dates': {'key': 'properties.publishDates', 'type': 'SecurityAssessmentMetadataPropertiesResponsePublishDates'}, + 'planned_deprecation_date': {'key': 'properties.plannedDeprecationDate', 'type': 'str'}, + 'tactics': {'key': 'properties.tactics', 'type': '[str]'}, + 'techniques': {'key': 'properties.techniques', 'type': '[str]'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + remediation_description: Optional[str] = None, + categories: Optional[List[Union[str, "Categories"]]] = None, + severity: Optional[Union[str, "Severity"]] = None, + user_impact: Optional[Union[str, "UserImpact"]] = None, + implementation_effort: Optional[Union[str, "ImplementationEffort"]] = None, + threats: Optional[List[Union[str, "Threats"]]] = None, + preview: Optional[bool] = None, + assessment_type: Optional[Union[str, "AssessmentType"]] = None, + partner_data: Optional["SecurityAssessmentMetadataPartnerData"] = None, + publish_dates: Optional["SecurityAssessmentMetadataPropertiesResponsePublishDates"] = None, + planned_deprecation_date: Optional[str] = None, + tactics: Optional[List[Union[str, "Tactics"]]] = None, + techniques: Optional[List[Union[str, "Techniques"]]] = None, + **kwargs + ): + super(SecurityAssessmentMetadataResponse, self).__init__(**kwargs) + self.display_name = display_name + self.policy_definition_id = None + self.description = description + self.remediation_description = remediation_description + self.categories = categories + self.severity = severity + self.user_impact = user_impact + self.implementation_effort = implementation_effort + self.threats = threats + self.preview = preview + self.assessment_type = assessment_type + self.partner_data = partner_data + self.publish_dates = publish_dates + self.planned_deprecation_date = planned_deprecation_date + self.tactics = tactics + self.techniques = techniques + + +class SecurityAssessmentMetadataResponseList(msrest.serialization.Model): + """List of security assessment metadata. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: + :vartype value: list[~azure.mgmt.security.models.SecurityAssessmentMetadataResponse] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecurityAssessmentMetadataResponse]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityAssessmentMetadataResponseList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SecurityAssessmentPartnerData(msrest.serialization.Model): """Data regarding 3rd party partner integration. @@ -8651,6 +8958,236 @@ def __init__( self.secret = secret +class SecurityAssessmentPropertiesBase(msrest.serialization.Model): + """Describes properties of an assessment. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param resource_details: Required. Details of the resource that was assessed. + :type resource_details: ~azure.mgmt.security.models.ResourceDetails + :ivar display_name: User friendly display name of the assessment. + :vartype display_name: str + :param additional_data: Additional data regarding the assessment. + :type additional_data: dict[str, str] + :ivar links: Links relevant to the assessment. + :vartype links: ~azure.mgmt.security.models.AssessmentLinks + :param metadata: Describes properties of an assessment metadata. + :type metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadataProperties + :param partners_data: Data regarding 3rd party partner integration. + :type partners_data: ~azure.mgmt.security.models.SecurityAssessmentPartnerData + """ + + _validation = { + 'resource_details': {'required': True}, + 'display_name': {'readonly': True}, + 'links': {'readonly': True}, + } + + _attribute_map = { + 'resource_details': {'key': 'resourceDetails', 'type': 'ResourceDetails'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'additional_data': {'key': 'additionalData', 'type': '{str}'}, + 'links': {'key': 'links', 'type': 'AssessmentLinks'}, + 'metadata': {'key': 'metadata', 'type': 'SecurityAssessmentMetadataProperties'}, + 'partners_data': {'key': 'partnersData', 'type': 'SecurityAssessmentPartnerData'}, + } + + def __init__( + self, + *, + resource_details: "ResourceDetails", + additional_data: Optional[Dict[str, str]] = None, + metadata: Optional["SecurityAssessmentMetadataProperties"] = None, + partners_data: Optional["SecurityAssessmentPartnerData"] = None, + **kwargs + ): + super(SecurityAssessmentPropertiesBase, self).__init__(**kwargs) + self.resource_details = resource_details + self.display_name = None + self.additional_data = additional_data + self.links = None + self.metadata = metadata + self.partners_data = partners_data + + +class SecurityAssessmentProperties(SecurityAssessmentPropertiesBase): + """Describes properties of an assessment. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param resource_details: Required. Details of the resource that was assessed. + :type resource_details: ~azure.mgmt.security.models.ResourceDetails + :ivar display_name: User friendly display name of the assessment. + :vartype display_name: str + :param additional_data: Additional data regarding the assessment. + :type additional_data: dict[str, str] + :ivar links: Links relevant to the assessment. + :vartype links: ~azure.mgmt.security.models.AssessmentLinks + :param metadata: Describes properties of an assessment metadata. + :type metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadataProperties + :param partners_data: Data regarding 3rd party partner integration. + :type partners_data: ~azure.mgmt.security.models.SecurityAssessmentPartnerData + :param status: Required. The result of the assessment. + :type status: ~azure.mgmt.security.models.AssessmentStatus + """ + + _validation = { + 'resource_details': {'required': True}, + 'display_name': {'readonly': True}, + 'links': {'readonly': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'resource_details': {'key': 'resourceDetails', 'type': 'ResourceDetails'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'additional_data': {'key': 'additionalData', 'type': '{str}'}, + 'links': {'key': 'links', 'type': 'AssessmentLinks'}, + 'metadata': {'key': 'metadata', 'type': 'SecurityAssessmentMetadataProperties'}, + 'partners_data': {'key': 'partnersData', 'type': 'SecurityAssessmentPartnerData'}, + 'status': {'key': 'status', 'type': 'AssessmentStatus'}, + } + + def __init__( + self, + *, + resource_details: "ResourceDetails", + status: "AssessmentStatus", + additional_data: Optional[Dict[str, str]] = None, + metadata: Optional["SecurityAssessmentMetadataProperties"] = None, + partners_data: Optional["SecurityAssessmentPartnerData"] = None, + **kwargs + ): + super(SecurityAssessmentProperties, self).__init__(resource_details=resource_details, additional_data=additional_data, metadata=metadata, partners_data=partners_data, **kwargs) + self.status = status + + +class SecurityAssessmentPropertiesResponse(SecurityAssessmentPropertiesBase): + """Describes properties of an assessment. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param resource_details: Required. Details of the resource that was assessed. + :type resource_details: ~azure.mgmt.security.models.ResourceDetails + :ivar display_name: User friendly display name of the assessment. + :vartype display_name: str + :param additional_data: Additional data regarding the assessment. + :type additional_data: dict[str, str] + :ivar links: Links relevant to the assessment. + :vartype links: ~azure.mgmt.security.models.AssessmentLinks + :param metadata: Describes properties of an assessment metadata. + :type metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadataProperties + :param partners_data: Data regarding 3rd party partner integration. + :type partners_data: ~azure.mgmt.security.models.SecurityAssessmentPartnerData + :param status: Required. The result of the assessment. + :type status: ~azure.mgmt.security.models.AssessmentStatusResponse + """ + + _validation = { + 'resource_details': {'required': True}, + 'display_name': {'readonly': True}, + 'links': {'readonly': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'resource_details': {'key': 'resourceDetails', 'type': 'ResourceDetails'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'additional_data': {'key': 'additionalData', 'type': '{str}'}, + 'links': {'key': 'links', 'type': 'AssessmentLinks'}, + 'metadata': {'key': 'metadata', 'type': 'SecurityAssessmentMetadataProperties'}, + 'partners_data': {'key': 'partnersData', 'type': 'SecurityAssessmentPartnerData'}, + 'status': {'key': 'status', 'type': 'AssessmentStatusResponse'}, + } + + def __init__( + self, + *, + resource_details: "ResourceDetails", + status: "AssessmentStatusResponse", + additional_data: Optional[Dict[str, str]] = None, + metadata: Optional["SecurityAssessmentMetadataProperties"] = None, + partners_data: Optional["SecurityAssessmentPartnerData"] = None, + **kwargs + ): + super(SecurityAssessmentPropertiesResponse, self).__init__(resource_details=resource_details, additional_data=additional_data, metadata=metadata, partners_data=partners_data, **kwargs) + self.status = status + + +class SecurityAssessmentResponse(Resource): + """Security assessment on a resource - response format. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param resource_details: Details of the resource that was assessed. + :type resource_details: ~azure.mgmt.security.models.ResourceDetails + :ivar display_name: User friendly display name of the assessment. + :vartype display_name: str + :param additional_data: Additional data regarding the assessment. + :type additional_data: dict[str, str] + :ivar links: Links relevant to the assessment. + :vartype links: ~azure.mgmt.security.models.AssessmentLinks + :param metadata: Describes properties of an assessment metadata. + :type metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadataProperties + :param partners_data: Data regarding 3rd party partner integration. + :type partners_data: ~azure.mgmt.security.models.SecurityAssessmentPartnerData + :param status: The result of the assessment. + :type status: ~azure.mgmt.security.models.AssessmentStatusResponse + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'links': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_details': {'key': 'properties.resourceDetails', 'type': 'ResourceDetails'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'additional_data': {'key': 'properties.additionalData', 'type': '{str}'}, + 'links': {'key': 'properties.links', 'type': 'AssessmentLinks'}, + 'metadata': {'key': 'properties.metadata', 'type': 'SecurityAssessmentMetadataProperties'}, + 'partners_data': {'key': 'properties.partnersData', 'type': 'SecurityAssessmentPartnerData'}, + 'status': {'key': 'properties.status', 'type': 'AssessmentStatusResponse'}, + } + + def __init__( + self, + *, + resource_details: Optional["ResourceDetails"] = None, + additional_data: Optional[Dict[str, str]] = None, + metadata: Optional["SecurityAssessmentMetadataProperties"] = None, + partners_data: Optional["SecurityAssessmentPartnerData"] = None, + status: Optional["AssessmentStatusResponse"] = None, + **kwargs + ): + super(SecurityAssessmentResponse, self).__init__(**kwargs) + self.resource_details = resource_details + self.display_name = None + self.additional_data = additional_data + self.links = None + self.metadata = metadata + self.partners_data = partners_data + self.status = status + + class SecurityContact(Resource): """Contact details for security issues. diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py index 5a8510226b69d..1fb8a5e13089a 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py @@ -284,7 +284,7 @@ class Enum15(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): EFFECTIVE = "effective" CUSTOM = "custom" -class Enum69(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class Enum71(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MCAS = "MCAS" WDATP = "WDATP" @@ -784,6 +784,135 @@ class SubAssessmentStatusCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum #: Assessment for this resource did not happen. NOT_APPLICABLE = "NotApplicable" +class Tactics(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tactic of the assessment + """ + + RECONNAISSANCE = "Reconnaissance" + RESOURCE_DEVELOPMENT = "Resource Development" + INITIAL_ACCESS = "Initial Access" + EXECUTION = "Execution" + PERSISTENCE = "Persistence" + PRIVILEGE_ESCALATION = "Privilege Escalation" + DEFENSE_EVASION = "Defense Evasion" + CREDENTIAL_ACCESS = "Credential Access" + DISCOVERY = "Discovery" + LATERAL_MOVEMENT = "Lateral Movement" + COLLECTION = "Collection" + COMMAND_AND_CONTROL = "Command and Control" + EXFILTRATION = "Exfiltration" + IMPACT = "Impact" + +class Techniques(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Techniques of the assessment + """ + + ABUSE_ELEVATION_CONTROL_MECHANISM = "Abuse Elevation Control Mechanism" + ACCESS_TOKEN_MANIPULATION = "Access Token Manipulation" + ACCOUNT_DISCOVERY = "Account Discovery" + ACCOUNT_MANIPULATION = "Account Manipulation" + ACTIVE_SCANNING = "Active Scanning" + APPLICATION_LAYER_PROTOCOL = "Application Layer Protocol" + AUDIO_CAPTURE = "Audio Capture" + BOOT_OR_LOGON_AUTOSTART_EXECUTION = "Boot or Logon Autostart Execution" + BOOT_OR_LOGON_INITIALIZATION_SCRIPTS = "Boot or Logon Initialization Scripts" + BRUTE_FORCE = "Brute Force" + CLOUD_INFRASTRUCTURE_DISCOVERY = "Cloud Infrastructure Discovery" + CLOUD_SERVICE_DASHBOARD = "Cloud Service Dashboard" + CLOUD_SERVICE_DISCOVERY = "Cloud Service Discovery" + COMMAND_AND_SCRIPTING_INTERPRETER = "Command and Scripting Interpreter" + COMPROMISE_CLIENT_SOFTWARE_BINARY = "Compromise Client Software Binary" + COMPROMISE_INFRASTRUCTURE = "Compromise Infrastructure" + CONTAINER_AND_RESOURCE_DISCOVERY = "Container and Resource Discovery" + CREATE_ACCOUNT = "Create Account" + CREATE_OR_MODIFY_SYSTEM_PROCESS = "Create or Modify System Process" + CREDENTIALS_FROM_PASSWORD_STORES = "Credentials from Password Stores" + DATA_DESTRUCTION = "Data Destruction" + DATA_ENCRYPTED_FOR_IMPACT = "Data Encrypted for Impact" + DATA_FROM_CLOUD_STORAGE_OBJECT = "Data from Cloud Storage Object" + DATA_FROM_CONFIGURATION_REPOSITORY = "Data from Configuration Repository" + DATA_FROM_INFORMATION_REPOSITORIES = "Data from Information Repositories" + DATA_FROM_LOCAL_SYSTEM = "Data from Local System" + DATA_MANIPULATION = "Data Manipulation" + DATA_STAGED = "Data Staged" + DEFACEMENT = "Defacement" + DEOBFUSCATE_DECODE_FILES_OR_INFORMATION = "Deobfuscate/Decode Files or Information" + DISK_WIPE = "Disk Wipe" + DOMAIN_TRUST_DISCOVERY = "Domain Trust Discovery" + DRIVE_BY_COMPROMISE = "Drive-by Compromise" + DYNAMIC_RESOLUTION = "Dynamic Resolution" + ENDPOINT_DENIAL_OF_SERVICE = "Endpoint Denial of Service" + EVENT_TRIGGERED_EXECUTION = "Event Triggered Execution" + EXFILTRATION_OVER_ALTERNATIVE_PROTOCOL = "Exfiltration Over Alternative Protocol" + EXPLOIT_PUBLIC_FACING_APPLICATION = "Exploit Public-Facing Application" + EXPLOITATION_FOR_CLIENT_EXECUTION = "Exploitation for Client Execution" + EXPLOITATION_FOR_CREDENTIAL_ACCESS = "Exploitation for Credential Access" + EXPLOITATION_FOR_DEFENSE_EVASION = "Exploitation for Defense Evasion" + EXPLOITATION_FOR_PRIVILEGE_ESCALATION = "Exploitation for Privilege Escalation" + EXPLOITATION_OF_REMOTE_SERVICES = "Exploitation of Remote Services" + EXTERNAL_REMOTE_SERVICES = "External Remote Services" + FALLBACK_CHANNELS = "Fallback Channels" + FILE_AND_DIRECTORY_DISCOVERY = "File and Directory Discovery" + GATHER_VICTIM_NETWORK_INFORMATION = "Gather Victim Network Information" + HIDE_ARTIFACTS = "Hide Artifacts" + HIJACK_EXECUTION_FLOW = "Hijack Execution Flow" + IMPAIR_DEFENSES = "Impair Defenses" + IMPLANT_CONTAINER_IMAGE = "Implant Container Image" + INDICATOR_REMOVAL_ON_HOST = "Indicator Removal on Host" + INDIRECT_COMMAND_EXECUTION = "Indirect Command Execution" + INGRESS_TOOL_TRANSFER = "Ingress Tool Transfer" + INPUT_CAPTURE = "Input Capture" + INTER_PROCESS_COMMUNICATION = "Inter-Process Communication" + LATERAL_TOOL_TRANSFER = "Lateral Tool Transfer" + MAN_IN_THE_MIDDLE = "Man-in-the-Middle" + MASQUERADING = "Masquerading" + MODIFY_AUTHENTICATION_PROCESS = "Modify Authentication Process" + MODIFY_REGISTRY = "Modify Registry" + NETWORK_DENIAL_OF_SERVICE = "Network Denial of Service" + NETWORK_SERVICE_SCANNING = "Network Service Scanning" + NETWORK_SNIFFING = "Network Sniffing" + NON_APPLICATION_LAYER_PROTOCOL = "Non-Application Layer Protocol" + NON_STANDARD_PORT = "Non-Standard Port" + OBFUSCATED_FILES_OR_INFORMATION = "Obfuscated Files or Information" + OBTAIN_CAPABILITIES = "Obtain Capabilities" + OBUSCATED_FILES_OR_INFORMATION = "Obuscated Files or Information" + OFFICE_APPLICATION_STARTUP = "Office Application Startup" + OS_CREDENTIAL_DUMPING = "OS Credential Dumping" + PERMISSION_GROUPS_DISCOVERY = "Permission Groups Discovery" + PHISHING = "Phishing" + PRE_OS_BOOT = "Pre-OS Boot" + PROCESS_DISCOVERY = "Process Discovery" + PROCESS_INJECTION = "Process Injection" + PROTOCOL_TUNNELING = "Protocol Tunneling" + PROXY = "Proxy" + QUERY_REGISTRY = "Query Registry" + REMOTE_ACCESS_SOFTWARE = "Remote Access Software" + REMOTE_SERVICE_SESSION_HIJACKING = "Remote Service Session Hijacking" + REMOTE_SERVICES = "Remote Services" + REMOTE_SYSTEM_DISCOVERY = "Remote System Discovery" + RESOURCE_HIJACKING = "Resource Hijacking" + SCHEDULED_TASK_JOB = "Scheduled Task/Job" + SCREEN_CAPTURE = "Screen Capture" + SEARCH_VICTIM_OWNED_WEBSITES = "Search Victim-Owned Websites" + SERVER_SOFTWARE_COMPONENT = "Server Software Component" + SERVICE_STOP = "Service Stop" + SIGNED_BINARY_PROXY_EXECUTION = "Signed Binary Proxy Execution" + SOFTWARE_DEPLOYMENT_TOOLS = "Software Deployment Tools" + SQL_STORED_PROCEDURES = "SQL Stored Procedures" + STEAL_OR_FORGE_KERBEROS_TICKETS = "Steal or Forge Kerberos Tickets" + SUBVERT_TRUST_CONTROLS = "Subvert Trust Controls" + SUPPLY_CHAIN_COMPROMISE = "Supply Chain Compromise" + SYSTEM_INFORMATION_DISCOVERY = "System Information Discovery" + TAINT_SHARED_CONTENT = "Taint Shared Content" + TRAFFIC_SIGNALING = "Traffic Signaling" + TRANSFER_DATA_TO_CLOUD_ACCOUNT = "Transfer Data to Cloud Account" + TRUSTED_RELATIONSHIP = "Trusted Relationship" + UNSECURED_CREDENTIALS = "Unsecured Credentials" + USER_EXECUTION = "User Execution" + VALID_ACCOUNTS = "Valid Accounts" + WINDOWS_MANAGEMENT_INSTRUMENTATION = "Windows Management Instrumentation" + FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION = "File and Directory Permissions Modification" + class Threats(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Threats impact of the assessment """ diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_assessments_metadata_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_assessments_metadata_operations.py index df24fe791662d..5275fc883a14c 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_assessments_metadata_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_assessments_metadata_operations.py @@ -49,20 +49,20 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> Iterable["_models.SecurityAssessmentMetadataList"] + # type: (...) -> Iterable["_models.SecurityAssessmentMetadataResponseList"] """Get metadata information on all assessment types. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SecurityAssessmentMetadataList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.security.models.SecurityAssessmentMetadataList] + :return: An iterator like instance of either SecurityAssessmentMetadataResponseList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.security.models.SecurityAssessmentMetadataResponseList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataResponseList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -85,7 +85,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('SecurityAssessmentMetadataList', pipeline_response) + deserialized = self._deserialize('SecurityAssessmentMetadataResponseList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -113,22 +113,22 @@ def get( assessment_metadata_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.SecurityAssessmentMetadata" + # type: (...) -> "_models.SecurityAssessmentMetadataResponse" """Get metadata information on an assessment type. :param assessment_metadata_name: The Assessment Key - Unique key for the assessment type. :type assessment_metadata_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityAssessmentMetadata, or the result of cls(response) - :rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadata + :return: SecurityAssessmentMetadataResponse, or the result of cls(response) + :rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadataResponse :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadata"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataResponse"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -154,7 +154,7 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SecurityAssessmentMetadata', pipeline_response) + deserialized = self._deserialize('SecurityAssessmentMetadataResponse', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -166,20 +166,20 @@ def list_by_subscription( self, **kwargs # type: Any ): - # type: (...) -> Iterable["_models.SecurityAssessmentMetadataList"] + # type: (...) -> Iterable["_models.SecurityAssessmentMetadataResponseList"] """Get metadata information on all assessment types in a specific subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SecurityAssessmentMetadataList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.security.models.SecurityAssessmentMetadataList] + :return: An iterator like instance of either SecurityAssessmentMetadataResponseList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.security.models.SecurityAssessmentMetadataResponseList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataResponseList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -206,7 +206,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('SecurityAssessmentMetadataList', pipeline_response) + deserialized = self._deserialize('SecurityAssessmentMetadataResponseList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -234,22 +234,22 @@ def get_in_subscription( assessment_metadata_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.SecurityAssessmentMetadata" + # type: (...) -> "_models.SecurityAssessmentMetadataResponse" """Get metadata information on an assessment type in a specific subscription. :param assessment_metadata_name: The Assessment Key - Unique key for the assessment type. :type assessment_metadata_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityAssessmentMetadata, or the result of cls(response) - :rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadata + :return: SecurityAssessmentMetadataResponse, or the result of cls(response) + :rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadataResponse :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadata"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataResponse"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -276,7 +276,7 @@ def get_in_subscription( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SecurityAssessmentMetadata', pipeline_response) + deserialized = self._deserialize('SecurityAssessmentMetadataResponse', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -287,27 +287,27 @@ def get_in_subscription( def create_in_subscription( self, assessment_metadata_name, # type: str - assessment_metadata, # type: "_models.SecurityAssessmentMetadata" + assessment_metadata, # type: "_models.SecurityAssessmentMetadataResponse" **kwargs # type: Any ): - # type: (...) -> "_models.SecurityAssessmentMetadata" + # type: (...) -> "_models.SecurityAssessmentMetadataResponse" """Create metadata information on an assessment type in a specific subscription. :param assessment_metadata_name: The Assessment Key - Unique key for the assessment type. :type assessment_metadata_name: str :param assessment_metadata: AssessmentMetadata object. - :type assessment_metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadata + :type assessment_metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadataResponse :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityAssessmentMetadata, or the result of cls(response) - :rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadata + :return: SecurityAssessmentMetadataResponse, or the result of cls(response) + :rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadataResponse :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadata"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataResponse"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -329,7 +329,7 @@ def create_in_subscription( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(assessment_metadata, 'SecurityAssessmentMetadata') + body_content = self._serialize.body(assessment_metadata, 'SecurityAssessmentMetadataResponse') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -339,7 +339,7 @@ def create_in_subscription( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SecurityAssessmentMetadata', pipeline_response) + deserialized = self._deserialize('SecurityAssessmentMetadataResponse', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -368,7 +368,7 @@ def delete_in_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_assessments_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_assessments_operations.py index 0b7b28c2f6a3a..52997d7f48364 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_assessments_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_assessments_operations.py @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -124,7 +124,7 @@ def get( expand=None, # type: Optional[Union[str, "_models.ExpandEnum"]] **kwargs # type: Any ): - # type: (...) -> "_models.SecurityAssessment" + # type: (...) -> "_models.SecurityAssessmentResponse" """Get a security assessment on your scanned resource. :param resource_id: The identifier of the resource. @@ -134,16 +134,16 @@ def get( :param expand: OData expand. Optional. :type expand: str or ~azure.mgmt.security.models.ExpandEnum :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityAssessment, or the result of cls(response) - :rtype: ~azure.mgmt.security.models.SecurityAssessment + :return: SecurityAssessmentResponse, or the result of cls(response) + :rtype: ~azure.mgmt.security.models.SecurityAssessmentResponse :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessment"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentResponse"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -172,7 +172,7 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SecurityAssessment', pipeline_response) + deserialized = self._deserialize('SecurityAssessmentResponse', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -187,7 +187,7 @@ def create_or_update( assessment, # type: "_models.SecurityAssessment" **kwargs # type: Any ): - # type: (...) -> "_models.SecurityAssessment" + # type: (...) -> "_models.SecurityAssessmentResponse" """Create a security assessment on your resource. An assessment metadata that describes this assessment must be predefined with the same name before inserting the assessment result. @@ -198,16 +198,16 @@ def create_or_update( :param assessment: Calculated assessment on a pre-defined assessment metadata. :type assessment: ~azure.mgmt.security.models.SecurityAssessment :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityAssessment, or the result of cls(response) - :rtype: ~azure.mgmt.security.models.SecurityAssessment + :return: SecurityAssessmentResponse, or the result of cls(response) + :rtype: ~azure.mgmt.security.models.SecurityAssessmentResponse :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessment"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentResponse"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -240,10 +240,10 @@ def create_or_update( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('SecurityAssessment', pipeline_response) + deserialized = self._deserialize('SecurityAssessmentResponse', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('SecurityAssessment', pipeline_response) + deserialized = self._deserialize('SecurityAssessmentResponse', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -275,7 +275,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-01-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_settings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_settings_operations.py index 6d8ccf6bd0442..446581c7349b5 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_settings_operations.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_settings_operations.py @@ -114,14 +114,14 @@ def get_next(next_link=None): def get( self, - setting_name, # type: Union[str, "_models.Enum69"] + setting_name, # type: Union[str, "_models.Enum71"] **kwargs # type: Any ): # type: (...) -> "_models.Setting" """Settings of different configurations in security center. :param setting_name: The name of the setting. - :type setting_name: str or ~azure.mgmt.security.models.Enum69 + :type setting_name: str or ~azure.mgmt.security.models.Enum71 :keyword callable cls: A custom type or function that will be passed the direct response :return: Setting, or the result of cls(response) :rtype: ~azure.mgmt.security.models.Setting @@ -169,7 +169,7 @@ def get( def update( self, - setting_name, # type: Union[str, "_models.Enum69"] + setting_name, # type: Union[str, "_models.Enum71"] setting, # type: "_models.Setting" **kwargs # type: Any ): @@ -177,7 +177,7 @@ def update( """updating settings about different configurations in security center. :param setting_name: The name of the setting. - :type setting_name: str or ~azure.mgmt.security.models.Enum69 + :type setting_name: str or ~azure.mgmt.security.models.Enum71 :param setting: Setting object. :type setting: ~azure.mgmt.security.models.Setting :keyword callable cls: A custom type or function that will be passed the direct response