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": "775ae0a87727439ec5a5a8fec1658b66153105fc",
"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", "2021-07-01-preview"],
"client": {
"name": "SecurityCenter",
"filename": "_security_center",
Expand Down Expand Up @@ -110,6 +110,7 @@
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"custom_assessment_automations": "CustomAssessmentAutomationsOperations",
"compliance_results": "ComplianceResultsOperations",
"pricings": "PricingsOperations",
"advanced_threat_protection": "AdvancedThreatProtectionOperations",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import SecurityCenterConfiguration
from .operations import CustomAssessmentAutomationsOperations
from .operations import ComplianceResultsOperations
from .operations import PricingsOperations
from .operations import AdvancedThreatProtectionOperations
Expand Down Expand Up @@ -70,6 +71,8 @@
class SecurityCenter(object):
"""API spec for Microsoft.Security (Azure Security Center) resource provider.

:ivar custom_assessment_automations: CustomAssessmentAutomationsOperations operations
:vartype custom_assessment_automations: azure.mgmt.security.operations.CustomAssessmentAutomationsOperations
:ivar compliance_results: ComplianceResultsOperations operations
:vartype compliance_results: azure.mgmt.security.operations.ComplianceResultsOperations
:ivar pricings: PricingsOperations operations
Expand Down Expand Up @@ -189,6 +192,8 @@ def __init__(
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.custom_assessment_automations = CustomAssessmentAutomationsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.compliance_results = ComplianceResultsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.pricings = PricingsOperations(
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 @@ -17,6 +17,7 @@
from azure.core.credentials_async import AsyncTokenCredential

from ._configuration import SecurityCenterConfiguration
from .operations import CustomAssessmentAutomationsOperations
from .operations import ComplianceResultsOperations
from .operations import PricingsOperations
from .operations import AdvancedThreatProtectionOperations
Expand Down Expand Up @@ -68,6 +69,8 @@
class SecurityCenter(object):
"""API spec for Microsoft.Security (Azure Security Center) resource provider.

:ivar custom_assessment_automations: CustomAssessmentAutomationsOperations operations
:vartype custom_assessment_automations: azure.mgmt.security.aio.operations.CustomAssessmentAutomationsOperations
:ivar compliance_results: ComplianceResultsOperations operations
:vartype compliance_results: azure.mgmt.security.aio.operations.ComplianceResultsOperations
:ivar pricings: PricingsOperations operations
Expand Down Expand Up @@ -186,6 +189,8 @@ def __init__(
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.custom_assessment_automations = CustomAssessmentAutomationsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.compliance_results = ComplianceResultsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.pricings = PricingsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._custom_assessment_automations_operations import CustomAssessmentAutomationsOperations
from ._compliance_results_operations import ComplianceResultsOperations
from ._pricings_operations import PricingsOperations
from ._advanced_threat_protection_operations import AdvancedThreatProtectionOperations
Expand Down Expand Up @@ -53,6 +54,7 @@
from ._software_inventories_operations import SoftwareInventoriesOperations

__all__ = [
'CustomAssessmentAutomationsOperations',
'ComplianceResultsOperations',
'PricingsOperations',
'AdvancedThreatProtectionOperations',
Expand Down
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
Loading