Skip to content

Commit 0ebe9ab

Browse files
author
SDKAuto
committed
CodeGen from PR 31358 in Azure/azure-rest-api-specs
Merge ff1711f383d18d6d25f9ae6daf2f8a9adaff5f0f into 07c0f76f53ae661897e5eb3b47ec151dc2990c6b
1 parent e95bc99 commit 0ebe9ab

File tree

466 files changed

+8187
-6202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

466 files changed

+8187
-6202
lines changed
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"commit": "5485fc4eb11debd9cc8d92ec156b573998aae977",
2+
"commit": "542baac64495a374e2d6b76030faa70816a00cab",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.13.16",
6+
"@autorest/python@6.19.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/security/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.13.16 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/security/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.19.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/security/resource-manager/readme.md",
1111
"package-2023-11-15": "2023-09-12 12:04:57 -0700 32c178f2467f792a322f56174be244135d2c907f Microsoft.Security/stable/2023-11-15/apiCollections.json",
1212
"package-preview-2023-03-only": "2023-03-23 11:34:42 +0200 2db2beee2fed67b08d273fdac7a51aba02ac2f80 Microsoft.Security/preview/2023-03-01-preview/securityConnectors.json",
1313
"package-preview-2023-02-only": "2023-03-10 09:31:28 +0200 a2e2617050e68ae1c445db565076c5a7f42ebad4 Microsoft.Security/preview/2023-02-01-preview/healthReports.json",
1414
"package-preview-2023-01-only": "2023-03-28 11:35:29 +0300 0e2c3d175e126284c5db1d3099b61e46e462fb74 Microsoft.Security/preview/2023-01-01-preview/securityOperators.json",
15-
"package-2023-01": "2023-03-27 17:16:35 +0300 efd2b52bcf2b06e174f7008b2728f70ee7f972bd Microsoft.Security/stable/2023-01-01/pricings.json",
16-
"package-preview-2022-12": "2023-09-12 22:01:54 +0300 b09b155f738b4178bcfe820f54f8702a94eb9d90 Microsoft.Security/preview/2022-12-01-preview/defenderForStorageSettings.json",
15+
"package-2023-01": "2024-10-07 12:45:11 +0300 6fbbe1db056a37600cc4d60007a76113a1ad0074 Microsoft.Security/stable/2023-01-01/pricings.json",
16+
"package-preview-2022-12": "2024-07-01 22:47:55 +0300 be978e57137bfd799e350575c0fdd53511f0e4a8 Microsoft.Security/preview/2022-12-01-preview/defenderForStorageSettings.json",
1717
"package-preview-2022-08": "2022-09-20 03:45:43 +0300 9000eea3aa90071c2814f663dd763d7fc1668bed Microsoft.Security/preview/2022-08-01-preview/securityConnectors.json",
1818
"package-preview-2022-07": "2022-11-01 04:47:16 +0200 312544c27464f61bf9639924099d4238bdfa1d71 Microsoft.Security/preview/2022-07-01-preview/applications.json",
1919
"package-2022-05": "2022-06-09 12:47:24 +0300 d006e1d15d8fe19a6c558861dd5bba6b7baa8dd8 Microsoft.Security/stable/2022-05-01/settings.json",
@@ -29,7 +29,7 @@
2929
"package-2021-05-preview-only": "2021-05-20 10:54:13 +0300 5fcc6854765009e891052653b304cfe80353430a Microsoft.Security/preview/2021-05-01-preview/softwareInventories.json",
3030
"package-2021-01-only": "2021-02-23 03:48:25 +0200 605f17bf33f419ee5cd3899f3ff799318a7caeb1 Microsoft.Security/stable/2021-01-01/alerts.json",
3131
"package-2020-07-preview-only": "2020-10-28 04:54:24 +0200 f8440e900cea52b8347f63f9a755d1feeae6f161 Microsoft.Security/preview/2020-07-01-preview/sqlVulnerabilityAssessmentsScanResultsOperations.json",
32-
"package-2020-01-python-only": "2022-05-17 18:32:46 +0300 9896393247d4098e6ff91944d2471385efaac804 Microsoft.Security/stable/2020-01-01/topologies.json",
32+
"package-2020-01-python-only": "2024-11-04 13:02:48 +0200 6c0473de84667918a1eb3fbd66ac0cbe12af2d36 Microsoft.Security/stable/2020-01-01/externalSecuritySolutions.json",
3333
"package-2020-01-preview-python-only": "2022-04-13 06:23:26 +0300 880394b28e0f4e7925f4ecb3edc46b651ab58129 Microsoft.Security/preview/2020-01-01-preview/securityContacts.json",
3434
"package-2019-08-python-only": "2021-01-04 04:26:12 +0200 e5c779c267ed9d5ae7115ca71e16f3a6e6152bdd Microsoft.Security/stable/2019-08-01/iotSecuritySolutions.json",
3535
"package-2019-01-python-only": "2022-02-23 11:14:18 +0800 8aa184e00b5314f9e293db0401e002cb99c85a91 Microsoft.Security/stable/2019-01-01/advancedThreatProtectionSettings.json",
@@ -38,11 +38,12 @@
3838
"package-2017-08-only": "2022-04-13 06:23:26 +0300 880394b28e0f4e7925f4ecb3edc46b651ab58129 Microsoft.Security/stable/2017-08-01/complianceResults.json",
3939
"package-2017-08-preview-python-only": "2022-04-13 06:23:26 +0300 880394b28e0f4e7925f4ecb3edc46b651ab58129 Microsoft.Security/preview/2017-08-01-preview/securityContacts.json",
4040
"package-2015-06-preview-python-only": "2022-04-13 06:23:26 +0300 880394b28e0f4e7925f4ecb3edc46b651ab58129 Microsoft.Security/preview/2015-06-01-preview/tasks.json",
41-
"package-2024-04": "fatal: invalid object name 'from'. from: securityConnectorsDevOps.json",
42-
"package-2024-01": "2023-12-13 05:43:47 +0200 b52464f520b77222ac8b0bdeb80a030c0fdf5b1b Microsoft.Security/stable/2024-01-01/pricings.json",
41+
"package-2024-04": "2024-04-03 19:34:30 -0700 378a5fdb7e92454442ab647a856bee4f717f526b Microsoft.Security/stable/2024-04-01/securityConnectorsDevOps.json",
42+
"package-2024-01": "2024-10-07 12:45:11 +0300 6fbbe1db056a37600cc4d60007a76113a1ad0074 Microsoft.Security/stable/2024-01-01/pricings.json",
4343
"package-preview-2023-10": "2023-10-27 04:43:14 +0300 2eb036ae2fcf0dab9bbc49f3aeadb7847c953f9a Microsoft.Security/preview/2023-10-01-preview/securityConnectors.json",
44-
"package-preview-2023-09": "fatal: invalid object name 'from'. from: securityConnectorsDevOps.json",
44+
"package-preview-2023-09": "2023-08-21 20:02:49 -0700 64ffad1a3042017e07f8a47df17d6acaa2c1e609 Microsoft.Security/preview/2023-09-01-preview/securityConnectorsDevOps.json",
4545
"package-2023-05": "2023-06-07 22:07:01 -0700 483cdd30332340a14e3d09eafdc1a18f3ba4324c Microsoft.Security/stable/2023-05-01/ServerVulnerabilityAssessmentsSettings.json",
4646
"package-preview-2023-05": "2023-05-29 05:03:56 +0300 be02493774ad6450166fa3383c109027658567b4 Microsoft.Security/preview/2023-05-01-preview/healthReports.json",
47-
"package-preview-2023-02-15-only": "2024-03-29 06:00:35 +0300 7fa04c618c9a280dba63303b0034fa9f0aabab1f Microsoft.Security/preview/2023-02-15-preview/sensitivitySettings.json"
47+
"package-preview-2023-02-15-only": "2024-03-29 06:00:35 +0300 7fa04c618c9a280dba63303b0034fa9f0aabab1f Microsoft.Security/preview/2023-02-15-preview/sensitivitySettings.json",
48+
"package-2024-08": "2024-09-12 11:55:45 +0300 317b99705871df3a32c68889ab7858a0c88d89f0 Microsoft.Security/stable/2024-08-01/standardAssignments.json"
4849
}

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,17 @@ class SecurityCenterConfiguration:
2727
2828
:param credential: Credential needed for the client to connect to Azure. Required.
2929
:type credential: ~azure.core.credentials.TokenCredential
30-
:param subscription_id: The ID of the target subscription. Required.
31-
:type subscription_id: str
3230
"""
3331

3432
def __init__(
3533
self,
3634
credential: "TokenCredential",
37-
subscription_id: str,
3835
**kwargs: Any
3936
):
4037
if credential is None:
4138
raise ValueError("Parameter 'credential' must not be None.")
42-
if subscription_id is None:
43-
raise ValueError("Parameter 'subscription_id' must not be None.")
4439

4540
self.credential = credential
46-
self.subscription_id = subscription_id
4741
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
4842
kwargs.setdefault('sdk_moniker', 'azure-mgmt-security/{}'.format(VERSION))
4943
self.polling_interval = kwargs.get("polling_interval", 30)

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

Lines changed: 59 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# --------------------------------------------------------------------------
1111

1212
from typing import Any, Optional, TYPE_CHECKING
13+
from typing_extensions import Self
1314

1415
from azure.core.pipeline import policies
1516
from azure.mgmt.core import ARMPipelineClient
@@ -44,8 +45,6 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
4445
4546
:param credential: Credential needed for the client to connect to Azure. Required.
4647
:type credential: ~azure.core.credentials.TokenCredential
47-
:param subscription_id: The ID of the target subscription. Required.
48-
:type subscription_id: str
4948
:param api_version: API version to use if no profile is provided, or if missing in profile.
5049
:type api_version: str
5150
:param base_url: Service URL
@@ -55,13 +54,11 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
5554
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
5655
"""
5756

58-
DEFAULT_API_VERSION = '2024-04-01'
57+
DEFAULT_API_VERSION = '2024-08-01'
5958
_PROFILE_TAG = "azure.mgmt.security.SecurityCenter"
6059
LATEST_PROFILE = ProfileDefinition({
6160
_PROFILE_TAG: {
6261
None: DEFAULT_API_VERSION,
63-
'adaptive_application_controls': '2020-01-01',
64-
'adaptive_network_hardenings': '2020-01-01',
6562
'advanced_threat_protection': '2019-01-01',
6663
'alerts': '2022-01-01',
6764
'alerts_suppression_rules': '2019-01-01-preview',
@@ -76,15 +73,25 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
7673
'assessments_metadata': '2021-06-01',
7774
'auto_provisioning_settings': '2017-08-01-preview',
7875
'automations': '2019-01-01-preview',
76+
'azure_dev_ops_orgs': '2024-04-01',
77+
'azure_dev_ops_projects': '2024-04-01',
78+
'azure_dev_ops_repos': '2024-04-01',
7979
'compliance_results': '2017-08-01',
8080
'compliances': '2017-08-01-preview',
8181
'connectors': '2020-01-01-preview',
8282
'custom_assessment_automations': '2021-07-01-preview',
8383
'custom_entity_store_assignments': '2021-07-01-preview',
8484
'defender_for_storage': '2022-12-01-preview',
85+
'dev_ops_configurations': '2024-04-01',
86+
'dev_ops_operation_results': '2024-04-01',
8587
'device_security_groups': '2019-08-01',
8688
'discovered_security_solutions': '2020-01-01',
8789
'external_security_solutions': '2020-01-01',
90+
'git_hub_owners': '2024-04-01',
91+
'git_hub_repos': '2024-04-01',
92+
'git_lab_groups': '2024-04-01',
93+
'git_lab_projects': '2024-04-01',
94+
'git_lab_subgroups': '2024-04-01',
8895
'governance_assignments': '2022-01-01-preview',
8996
'governance_rules': '2022-01-01-preview',
9097
'health_report': '2023-02-01-preview',
@@ -131,15 +138,14 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
131138
def __init__(
132139
self,
133140
credential: "TokenCredential",
134-
subscription_id: str,
135141
api_version: Optional[str]=None,
136142
base_url: str = "https://management.azure.com",
137143
profile: KnownProfiles=KnownProfiles.default,
138144
**kwargs: Any
139145
):
140146
if api_version:
141147
kwargs.setdefault('api_version', api_version)
142-
self._config = SecurityCenterConfiguration(credential, subscription_id, **kwargs)
148+
self._config = SecurityCenterConfiguration(credential, **kwargs)
143149
_policies = kwargs.pop("policies", None)
144150
if _policies is None:
145151
_policies = [
@@ -209,6 +215,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
209215
* 2023-11-15: :mod:`v2023_11_15.models<azure.mgmt.security.v2023_11_15.models>`
210216
* 2024-01-01: :mod:`v2024_01_01.models<azure.mgmt.security.v2024_01_01.models>`
211217
* 2024-04-01: :mod:`v2024_04_01.models<azure.mgmt.security.v2024_04_01.models>`
218+
* 2024-08-01: :mod:`v2024_08_01.models<azure.mgmt.security.v2024_08_01.models>`
212219
"""
213220
if api_version == '2015-06-01-preview':
214221
from .v2015_06_01_preview import models
@@ -321,36 +328,11 @@ def models(cls, api_version=DEFAULT_API_VERSION):
321328
elif api_version == '2024-04-01':
322329
from .v2024_04_01 import models
323330
return models
331+
elif api_version == '2024-08-01':
332+
from .v2024_08_01 import models
333+
return models
324334
raise ValueError("API version {} is not available".format(api_version))
325335

326-
@property
327-
def adaptive_application_controls(self):
328-
"""Instance depends on the API version:
329-
330-
* 2020-01-01: :class:`AdaptiveApplicationControlsOperations<azure.mgmt.security.v2020_01_01.operations.AdaptiveApplicationControlsOperations>`
331-
"""
332-
api_version = self._get_api_version('adaptive_application_controls')
333-
if api_version == '2020-01-01':
334-
from .v2020_01_01.operations import AdaptiveApplicationControlsOperations as OperationClass
335-
else:
336-
raise ValueError("API version {} does not have operation group 'adaptive_application_controls'".format(api_version))
337-
self._config.api_version = api_version
338-
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
339-
340-
@property
341-
def adaptive_network_hardenings(self):
342-
"""Instance depends on the API version:
343-
344-
* 2020-01-01: :class:`AdaptiveNetworkHardeningsOperations<azure.mgmt.security.v2020_01_01.operations.AdaptiveNetworkHardeningsOperations>`
345-
"""
346-
api_version = self._get_api_version('adaptive_network_hardenings')
347-
if api_version == '2020-01-01':
348-
from .v2020_01_01.operations import AdaptiveNetworkHardeningsOperations as OperationClass
349-
else:
350-
raise ValueError("API version {} does not have operation group 'adaptive_network_hardenings'".format(api_version))
351-
self._config.api_version = api_version
352-
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
353-
354336
@property
355337
def advanced_threat_protection(self):
356338
"""Instance depends on the API version:
@@ -677,6 +659,20 @@ def custom_entity_store_assignments(self):
677659
self._config.api_version = api_version
678660
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
679661

662+
@property
663+
def custom_recommendations(self):
664+
"""Instance depends on the API version:
665+
666+
* 2024-08-01: :class:`CustomRecommendationsOperations<azure.mgmt.security.v2024_08_01.operations.CustomRecommendationsOperations>`
667+
"""
668+
api_version = self._get_api_version('custom_recommendations')
669+
if api_version == '2024-08-01':
670+
from .v2024_08_01.operations import CustomRecommendationsOperations as OperationClass
671+
else:
672+
raise ValueError("API version {} does not have operation group 'custom_recommendations'".format(api_version))
673+
self._config.api_version = api_version
674+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
675+
680676
@property
681677
def defender_for_storage(self):
682678
"""Instance depends on the API version:
@@ -1257,6 +1253,20 @@ def security_solutions_reference_data(self):
12571253
self._config.api_version = api_version
12581254
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
12591255

1256+
@property
1257+
def security_standards(self):
1258+
"""Instance depends on the API version:
1259+
1260+
* 2024-08-01: :class:`SecurityStandardsOperations<azure.mgmt.security.v2024_08_01.operations.SecurityStandardsOperations>`
1261+
"""
1262+
api_version = self._get_api_version('security_standards')
1263+
if api_version == '2024-08-01':
1264+
from .v2024_08_01.operations import SecurityStandardsOperations as OperationClass
1265+
else:
1266+
raise ValueError("API version {} does not have operation group 'security_standards'".format(api_version))
1267+
self._config.api_version = api_version
1268+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
1269+
12601270
@property
12611271
def sensitivity_settings(self):
12621272
"""Instance depends on the API version:
@@ -1384,6 +1394,20 @@ def sql_vulnerability_assessment_scans(self):
13841394
self._config.api_version = api_version
13851395
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
13861396

1397+
@property
1398+
def standard_assignments(self):
1399+
"""Instance depends on the API version:
1400+
1401+
* 2024-08-01: :class:`StandardAssignmentsOperations<azure.mgmt.security.v2024_08_01.operations.StandardAssignmentsOperations>`
1402+
"""
1403+
api_version = self._get_api_version('standard_assignments')
1404+
if api_version == '2024-08-01':
1405+
from .v2024_08_01.operations import StandardAssignmentsOperations as OperationClass
1406+
else:
1407+
raise ValueError("API version {} does not have operation group 'standard_assignments'".format(api_version))
1408+
self._config.api_version = api_version
1409+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
1410+
13871411
@property
13881412
def sub_assessments(self):
13891413
"""Instance depends on the API version:

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ def _json_attemp(data):
144144
# context otherwise.
145145
_LOGGER.critical("Wasn't XML not JSON, failing")
146146
raise DeserializationError("XML is invalid") from err
147+
elif content_type.startswith("text/"):
148+
return data_as_str
147149
raise DeserializationError("Cannot deserialize content-type: {}".format(content_type))
148150

149151
@classmethod
@@ -1447,7 +1449,7 @@ def _deserialize(self, target_obj, data):
14471449
elif isinstance(response, type) and issubclass(response, Enum):
14481450
return self.deserialize_enum(data, response)
14491451

1450-
if data is None:
1452+
if data is None or data is CoreNull:
14511453
return data
14521454
try:
14531455
attributes = response._attribute_map # type: ignore

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,17 @@ class SecurityCenterConfiguration:
2727
2828
:param credential: Credential needed for the client to connect to Azure. Required.
2929
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
30-
:param subscription_id: The ID of the target subscription. Required.
31-
:type subscription_id: str
3230
"""
3331

3432
def __init__(
3533
self,
3634
credential: "AsyncTokenCredential",
37-
subscription_id: str,
3835
**kwargs: Any
3936
) -> None:
4037
if credential is None:
4138
raise ValueError("Parameter 'credential' must not be None.")
42-
if subscription_id is None:
43-
raise ValueError("Parameter 'subscription_id' must not be None.")
4439

4540
self.credential = credential
46-
self.subscription_id = subscription_id
4741
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
4842
kwargs.setdefault('sdk_moniker', 'azure-mgmt-security/{}'.format(VERSION))
4943
self.polling_interval = kwargs.get("polling_interval", 30)

0 commit comments

Comments
 (0)