Skip to content

Commit 85c5fe5

Browse files
author
SDKAuto
committed
CodeGen from PR 15857 in Azure/azure-rest-api-specs
Merge 7f5dfd3896fa5bce129b6cb61fb00a82afc0e701 into 9a19506
1 parent b2bdfe6 commit 85c5fe5

23 files changed

+2374
-223
lines changed

sdk/security/azure-mgmt-security/_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@autorest/python@5.8.4",
55
"@autorest/modelerfour@4.19.2"
66
],
7-
"commit": "a8719243647b7c6d06ed287483d788808de7ecab",
7+
"commit": "775ae0a87727439ec5a5a8fec1658b66153105fc",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
99
"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",
1010
"readme": "specification/security/resource-manager/readme.md"

sdk/security/azure-mgmt-security/azure/mgmt/security/_metadata.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"chosen_version": "",
3-
"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"],
3+
"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"],
44
"client": {
55
"name": "SecurityCenter",
66
"filename": "_security_center",
@@ -110,6 +110,7 @@
110110
"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\"]}}}"
111111
},
112112
"operation_groups": {
113+
"custom_assessment_automations": "CustomAssessmentAutomationsOperations",
113114
"compliance_results": "ComplianceResultsOperations",
114115
"pricings": "PricingsOperations",
115116
"advanced_threat_protection": "AdvancedThreatProtectionOperations",

sdk/security/azure-mgmt-security/azure/mgmt/security/_security_center.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from azure.core.pipeline.transport import HttpRequest, HttpResponse
2020

2121
from ._configuration import SecurityCenterConfiguration
22+
from .operations import CustomAssessmentAutomationsOperations
2223
from .operations import ComplianceResultsOperations
2324
from .operations import PricingsOperations
2425
from .operations import AdvancedThreatProtectionOperations
@@ -70,6 +71,8 @@
7071
class SecurityCenter(object):
7172
"""API spec for Microsoft.Security (Azure Security Center) resource provider.
7273
74+
:ivar custom_assessment_automations: CustomAssessmentAutomationsOperations operations
75+
:vartype custom_assessment_automations: azure.mgmt.security.operations.CustomAssessmentAutomationsOperations
7376
:ivar compliance_results: ComplianceResultsOperations operations
7477
:vartype compliance_results: azure.mgmt.security.operations.ComplianceResultsOperations
7578
:ivar pricings: PricingsOperations operations
@@ -189,6 +192,8 @@ def __init__(
189192
self._serialize.client_side_validation = False
190193
self._deserialize = Deserializer(client_models)
191194

195+
self.custom_assessment_automations = CustomAssessmentAutomationsOperations(
196+
self._client, self._config, self._serialize, self._deserialize)
192197
self.compliance_results = ComplianceResultsOperations(
193198
self._client, self._config, self._serialize, self._deserialize)
194199
self.pricings = PricingsOperations(

sdk/security/azure-mgmt-security/azure/mgmt/security/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "2.0.0b1"
9+
VERSION = "1.0.0b1"

sdk/security/azure-mgmt-security/azure/mgmt/security/aio/_security_center.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from azure.core.credentials_async import AsyncTokenCredential
1818

1919
from ._configuration import SecurityCenterConfiguration
20+
from .operations import CustomAssessmentAutomationsOperations
2021
from .operations import ComplianceResultsOperations
2122
from .operations import PricingsOperations
2223
from .operations import AdvancedThreatProtectionOperations
@@ -68,6 +69,8 @@
6869
class SecurityCenter(object):
6970
"""API spec for Microsoft.Security (Azure Security Center) resource provider.
7071
72+
:ivar custom_assessment_automations: CustomAssessmentAutomationsOperations operations
73+
:vartype custom_assessment_automations: azure.mgmt.security.aio.operations.CustomAssessmentAutomationsOperations
7174
:ivar compliance_results: ComplianceResultsOperations operations
7275
:vartype compliance_results: azure.mgmt.security.aio.operations.ComplianceResultsOperations
7376
:ivar pricings: PricingsOperations operations
@@ -186,6 +189,8 @@ def __init__(
186189
self._serialize.client_side_validation = False
187190
self._deserialize = Deserializer(client_models)
188191

192+
self.custom_assessment_automations = CustomAssessmentAutomationsOperations(
193+
self._client, self._config, self._serialize, self._deserialize)
189194
self.compliance_results = ComplianceResultsOperations(
190195
self._client, self._config, self._serialize, self._deserialize)
191196
self.pricings = PricingsOperations(

sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9+
from ._custom_assessment_automations_operations import CustomAssessmentAutomationsOperations
910
from ._compliance_results_operations import ComplianceResultsOperations
1011
from ._pricings_operations import PricingsOperations
1112
from ._advanced_threat_protection_operations import AdvancedThreatProtectionOperations
@@ -53,6 +54,7 @@
5354
from ._software_inventories_operations import SoftwareInventoriesOperations
5455

5556
__all__ = [
57+
'CustomAssessmentAutomationsOperations',
5658
'ComplianceResultsOperations',
5759
'PricingsOperations',
5860
'AdvancedThreatProtectionOperations',

sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_assessments_metadata_operations.py

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,20 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4444
def list(
4545
self,
4646
**kwargs: Any
47-
) -> AsyncIterable["_models.SecurityAssessmentMetadataList"]:
47+
) -> AsyncIterable["_models.SecurityAssessmentMetadataResponseList"]:
4848
"""Get metadata information on all assessment types.
4949
5050
:keyword callable cls: A custom type or function that will be passed the direct response
51-
:return: An iterator like instance of either SecurityAssessmentMetadataList or the result of cls(response)
52-
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.security.models.SecurityAssessmentMetadataList]
51+
:return: An iterator like instance of either SecurityAssessmentMetadataResponseList or the result of cls(response)
52+
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.security.models.SecurityAssessmentMetadataResponseList]
5353
:raises: ~azure.core.exceptions.HttpResponseError
5454
"""
55-
cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataList"]
55+
cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataResponseList"]
5656
error_map = {
5757
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
5858
}
5959
error_map.update(kwargs.pop('error_map', {}))
60-
api_version = "2020-01-01"
60+
api_version = "2021-06-01"
6161
accept = "application/json"
6262

6363
def prepare_request(next_link=None):
@@ -80,7 +80,7 @@ def prepare_request(next_link=None):
8080
return request
8181

8282
async def extract_data(pipeline_response):
83-
deserialized = self._deserialize('SecurityAssessmentMetadataList', pipeline_response)
83+
deserialized = self._deserialize('SecurityAssessmentMetadataResponseList', pipeline_response)
8484
list_of_elem = deserialized.value
8585
if cls:
8686
list_of_elem = cls(list_of_elem)
@@ -107,22 +107,22 @@ async def get(
107107
self,
108108
assessment_metadata_name: str,
109109
**kwargs: Any
110-
) -> "_models.SecurityAssessmentMetadata":
110+
) -> "_models.SecurityAssessmentMetadataResponse":
111111
"""Get metadata information on an assessment type.
112112
113113
:param assessment_metadata_name: The Assessment Key - Unique key for the assessment type.
114114
:type assessment_metadata_name: str
115115
:keyword callable cls: A custom type or function that will be passed the direct response
116-
:return: SecurityAssessmentMetadata, or the result of cls(response)
117-
:rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadata
116+
:return: SecurityAssessmentMetadataResponse, or the result of cls(response)
117+
:rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadataResponse
118118
:raises: ~azure.core.exceptions.HttpResponseError
119119
"""
120-
cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadata"]
120+
cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataResponse"]
121121
error_map = {
122122
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
123123
}
124124
error_map.update(kwargs.pop('error_map', {}))
125-
api_version = "2020-01-01"
125+
api_version = "2021-06-01"
126126
accept = "application/json"
127127

128128
# Construct URL
@@ -148,7 +148,7 @@ async def get(
148148
map_error(status_code=response.status_code, response=response, error_map=error_map)
149149
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
150150

151-
deserialized = self._deserialize('SecurityAssessmentMetadata', pipeline_response)
151+
deserialized = self._deserialize('SecurityAssessmentMetadataResponse', pipeline_response)
152152

153153
if cls:
154154
return cls(pipeline_response, deserialized, {})
@@ -159,20 +159,20 @@ async def get(
159159
def list_by_subscription(
160160
self,
161161
**kwargs: Any
162-
) -> AsyncIterable["_models.SecurityAssessmentMetadataList"]:
162+
) -> AsyncIterable["_models.SecurityAssessmentMetadataResponseList"]:
163163
"""Get metadata information on all assessment types in a specific subscription.
164164
165165
:keyword callable cls: A custom type or function that will be passed the direct response
166-
:return: An iterator like instance of either SecurityAssessmentMetadataList or the result of cls(response)
167-
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.security.models.SecurityAssessmentMetadataList]
166+
:return: An iterator like instance of either SecurityAssessmentMetadataResponseList or the result of cls(response)
167+
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.security.models.SecurityAssessmentMetadataResponseList]
168168
:raises: ~azure.core.exceptions.HttpResponseError
169169
"""
170-
cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataList"]
170+
cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataResponseList"]
171171
error_map = {
172172
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
173173
}
174174
error_map.update(kwargs.pop('error_map', {}))
175-
api_version = "2020-01-01"
175+
api_version = "2021-06-01"
176176
accept = "application/json"
177177

178178
def prepare_request(next_link=None):
@@ -199,7 +199,7 @@ def prepare_request(next_link=None):
199199
return request
200200

201201
async def extract_data(pipeline_response):
202-
deserialized = self._deserialize('SecurityAssessmentMetadataList', pipeline_response)
202+
deserialized = self._deserialize('SecurityAssessmentMetadataResponseList', pipeline_response)
203203
list_of_elem = deserialized.value
204204
if cls:
205205
list_of_elem = cls(list_of_elem)
@@ -226,22 +226,22 @@ async def get_in_subscription(
226226
self,
227227
assessment_metadata_name: str,
228228
**kwargs: Any
229-
) -> "_models.SecurityAssessmentMetadata":
229+
) -> "_models.SecurityAssessmentMetadataResponse":
230230
"""Get metadata information on an assessment type in a specific subscription.
231231
232232
:param assessment_metadata_name: The Assessment Key - Unique key for the assessment type.
233233
:type assessment_metadata_name: str
234234
:keyword callable cls: A custom type or function that will be passed the direct response
235-
:return: SecurityAssessmentMetadata, or the result of cls(response)
236-
:rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadata
235+
:return: SecurityAssessmentMetadataResponse, or the result of cls(response)
236+
:rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadataResponse
237237
:raises: ~azure.core.exceptions.HttpResponseError
238238
"""
239-
cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadata"]
239+
cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataResponse"]
240240
error_map = {
241241
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
242242
}
243243
error_map.update(kwargs.pop('error_map', {}))
244-
api_version = "2020-01-01"
244+
api_version = "2021-06-01"
245245
accept = "application/json"
246246

247247
# Construct URL
@@ -268,7 +268,7 @@ async def get_in_subscription(
268268
map_error(status_code=response.status_code, response=response, error_map=error_map)
269269
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
270270

271-
deserialized = self._deserialize('SecurityAssessmentMetadata', pipeline_response)
271+
deserialized = self._deserialize('SecurityAssessmentMetadataResponse', pipeline_response)
272272

273273
if cls:
274274
return cls(pipeline_response, deserialized, {})
@@ -279,26 +279,26 @@ async def get_in_subscription(
279279
async def create_in_subscription(
280280
self,
281281
assessment_metadata_name: str,
282-
assessment_metadata: "_models.SecurityAssessmentMetadata",
282+
assessment_metadata: "_models.SecurityAssessmentMetadataResponse",
283283
**kwargs: Any
284-
) -> "_models.SecurityAssessmentMetadata":
284+
) -> "_models.SecurityAssessmentMetadataResponse":
285285
"""Create metadata information on an assessment type in a specific subscription.
286286
287287
:param assessment_metadata_name: The Assessment Key - Unique key for the assessment type.
288288
:type assessment_metadata_name: str
289289
:param assessment_metadata: AssessmentMetadata object.
290-
:type assessment_metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadata
290+
:type assessment_metadata: ~azure.mgmt.security.models.SecurityAssessmentMetadataResponse
291291
:keyword callable cls: A custom type or function that will be passed the direct response
292-
:return: SecurityAssessmentMetadata, or the result of cls(response)
293-
:rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadata
292+
:return: SecurityAssessmentMetadataResponse, or the result of cls(response)
293+
:rtype: ~azure.mgmt.security.models.SecurityAssessmentMetadataResponse
294294
:raises: ~azure.core.exceptions.HttpResponseError
295295
"""
296-
cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadata"]
296+
cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentMetadataResponse"]
297297
error_map = {
298298
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
299299
}
300300
error_map.update(kwargs.pop('error_map', {}))
301-
api_version = "2020-01-01"
301+
api_version = "2021-06-01"
302302
content_type = kwargs.pop("content_type", "application/json")
303303
accept = "application/json"
304304

@@ -320,7 +320,7 @@ async def create_in_subscription(
320320
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
321321

322322
body_content_kwargs = {} # type: Dict[str, Any]
323-
body_content = self._serialize.body(assessment_metadata, 'SecurityAssessmentMetadata')
323+
body_content = self._serialize.body(assessment_metadata, 'SecurityAssessmentMetadataResponse')
324324
body_content_kwargs['content'] = body_content
325325
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
326326
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -330,7 +330,7 @@ async def create_in_subscription(
330330
map_error(status_code=response.status_code, response=response, error_map=error_map)
331331
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
332332

333-
deserialized = self._deserialize('SecurityAssessmentMetadata', pipeline_response)
333+
deserialized = self._deserialize('SecurityAssessmentMetadataResponse', pipeline_response)
334334

335335
if cls:
336336
return cls(pipeline_response, deserialized, {})
@@ -358,7 +358,7 @@ async def delete_in_subscription(
358358
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
359359
}
360360
error_map.update(kwargs.pop('error_map', {}))
361-
api_version = "2020-01-01"
361+
api_version = "2021-06-01"
362362
accept = "application/json"
363363

364364
# Construct URL

0 commit comments

Comments
 (0)