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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/security/azure-mgmt-security/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "a8719243647b7c6d06ed287483d788808de7ecab",
"commit": "18609e4a2911f3d7992c7d42f5eec80e4f42e1a6",
"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/[email protected] --use=@autorest/[email protected] --version=3.4.5",
"readme": "specification/security/resource-manager/readme.md"
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "2.0.0b1"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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, {})
Expand All @@ -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):
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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, {})
Expand All @@ -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"

Expand All @@ -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)
Expand All @@ -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, {})
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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, {})
Expand All @@ -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.

Expand All @@ -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"

Expand Down Expand Up @@ -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, {})
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading