Skip to content

Commit f30dd28

Browse files
author
SDKAuto
committed
CodeGen from PR 15390 in Azure/azure-rest-api-specs
Merge 27c22de42e562f58ee7c4dbabe312a0c23e42762 into 1a5e9c6
1 parent 599ef47 commit f30dd28

File tree

13 files changed

+1357
-188
lines changed

13 files changed

+1357
-188
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/[email protected]",
55
"@autorest/[email protected]"
66
],
7-
"commit": "a8719243647b7c6d06ed287483d788808de7ecab",
7+
"commit": "18609e4a2911f3d7992c7d42f5eec80e4f42e1a6",
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/[email protected] --use=@autorest/[email protected] --version=3.4.5",
1010
"readme": "specification/security/resource-manager/readme.md"

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

Lines changed: 1 addition & 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"],
44
"client": {
55
"name": "SecurityCenter",
66
"filename": "_security_center",

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/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

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def list(
6262
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
6363
}
6464
error_map.update(kwargs.pop('error_map', {}))
65-
api_version = "2020-01-01"
65+
api_version = "2021-06-01"
6666
accept = "application/json"
6767

6868
def prepare_request(next_link=None):
@@ -118,7 +118,7 @@ async def get(
118118
assessment_name: str,
119119
expand: Optional[Union[str, "_models.ExpandEnum"]] = None,
120120
**kwargs: Any
121-
) -> "_models.SecurityAssessment":
121+
) -> "_models.SecurityAssessmentResponse":
122122
"""Get a security assessment on your scanned resource.
123123
124124
:param resource_id: The identifier of the resource.
@@ -128,16 +128,16 @@ async def get(
128128
:param expand: OData expand. Optional.
129129
:type expand: str or ~azure.mgmt.security.models.ExpandEnum
130130
:keyword callable cls: A custom type or function that will be passed the direct response
131-
:return: SecurityAssessment, or the result of cls(response)
132-
:rtype: ~azure.mgmt.security.models.SecurityAssessment
131+
:return: SecurityAssessmentResponse, or the result of cls(response)
132+
:rtype: ~azure.mgmt.security.models.SecurityAssessmentResponse
133133
:raises: ~azure.core.exceptions.HttpResponseError
134134
"""
135-
cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessment"]
135+
cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentResponse"]
136136
error_map = {
137137
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
138138
}
139139
error_map.update(kwargs.pop('error_map', {}))
140-
api_version = "2020-01-01"
140+
api_version = "2021-06-01"
141141
accept = "application/json"
142142

143143
# Construct URL
@@ -166,7 +166,7 @@ async def get(
166166
map_error(status_code=response.status_code, response=response, error_map=error_map)
167167
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
168168

169-
deserialized = self._deserialize('SecurityAssessment', pipeline_response)
169+
deserialized = self._deserialize('SecurityAssessmentResponse', pipeline_response)
170170

171171
if cls:
172172
return cls(pipeline_response, deserialized, {})
@@ -180,7 +180,7 @@ async def create_or_update(
180180
assessment_name: str,
181181
assessment: "_models.SecurityAssessment",
182182
**kwargs: Any
183-
) -> "_models.SecurityAssessment":
183+
) -> "_models.SecurityAssessmentResponse":
184184
"""Create a security assessment on your resource. An assessment metadata that describes this
185185
assessment must be predefined with the same name before inserting the assessment result.
186186
@@ -191,16 +191,16 @@ async def create_or_update(
191191
:param assessment: Calculated assessment on a pre-defined assessment metadata.
192192
:type assessment: ~azure.mgmt.security.models.SecurityAssessment
193193
:keyword callable cls: A custom type or function that will be passed the direct response
194-
:return: SecurityAssessment, or the result of cls(response)
195-
:rtype: ~azure.mgmt.security.models.SecurityAssessment
194+
:return: SecurityAssessmentResponse, or the result of cls(response)
195+
:rtype: ~azure.mgmt.security.models.SecurityAssessmentResponse
196196
:raises: ~azure.core.exceptions.HttpResponseError
197197
"""
198-
cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessment"]
198+
cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityAssessmentResponse"]
199199
error_map = {
200200
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
201201
}
202202
error_map.update(kwargs.pop('error_map', {}))
203-
api_version = "2020-01-01"
203+
api_version = "2021-06-01"
204204
content_type = kwargs.pop("content_type", "application/json")
205205
accept = "application/json"
206206

@@ -233,10 +233,10 @@ async def create_or_update(
233233
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
234234

235235
if response.status_code == 200:
236-
deserialized = self._deserialize('SecurityAssessment', pipeline_response)
236+
deserialized = self._deserialize('SecurityAssessmentResponse', pipeline_response)
237237

238238
if response.status_code == 201:
239-
deserialized = self._deserialize('SecurityAssessment', pipeline_response)
239+
deserialized = self._deserialize('SecurityAssessmentResponse', pipeline_response)
240240

241241
if cls:
242242
return cls(pipeline_response, deserialized, {})
@@ -267,7 +267,7 @@ async def delete(
267267
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
268268
}
269269
error_map.update(kwargs.pop('error_map', {}))
270-
api_version = "2020-01-01"
270+
api_version = "2021-06-01"
271271
accept = "application/json"
272272

273273
# Construct URL

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ async def get_next(next_link=None):
109109

110110
async def get(
111111
self,
112-
setting_name: Union[str, "_models.Enum69"],
112+
setting_name: Union[str, "_models.Enum71"],
113113
**kwargs: Any
114114
) -> "_models.Setting":
115115
"""Settings of different configurations in security center.
116116
117117
:param setting_name: The name of the setting.
118-
:type setting_name: str or ~azure.mgmt.security.models.Enum69
118+
:type setting_name: str or ~azure.mgmt.security.models.Enum71
119119
:keyword callable cls: A custom type or function that will be passed the direct response
120120
:return: Setting, or the result of cls(response)
121121
:rtype: ~azure.mgmt.security.models.Setting
@@ -163,14 +163,14 @@ async def get(
163163

164164
async def update(
165165
self,
166-
setting_name: Union[str, "_models.Enum69"],
166+
setting_name: Union[str, "_models.Enum71"],
167167
setting: "_models.Setting",
168168
**kwargs: Any
169169
) -> "_models.Setting":
170170
"""updating settings about different configurations in security center.
171171
172172
:param setting_name: The name of the setting.
173-
:type setting_name: str or ~azure.mgmt.security.models.Enum69
173+
:type setting_name: str or ~azure.mgmt.security.models.Enum71
174174
:param setting: Setting object.
175175
:type setting: ~azure.mgmt.security.models.Setting
176176
:keyword callable cls: A custom type or function that will be passed the direct response

0 commit comments

Comments
 (0)