Skip to content

Commit d0ffe18

Browse files
author
SDKAuto
committed
CodeGen from PR 30487 in Azure/azure-rest-api-specs
Merge 7b058e0e5b2762184191d28d1c59568bea14089d into 1ad29756bd141a47cac770140105a706d065ae1b
1 parent 1c2781c commit d0ffe18

File tree

440 files changed

+3333
-8983
lines changed

Some content is hidden

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

440 files changed

+3333
-8983
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"commit": "5485fc4eb11debd9cc8d92ec156b573998aae977",
2+
"commit": "7b8651bc7a030e18731309e2a691dba20e2d9c63",
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",
1515
"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",
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",
@@ -23,7 +23,7 @@
2323
"package-2022-01-only": "2023-03-02 10:05:39 +0800 c287c0fb1c00df4bb1812acec050d178fa969cb6 Microsoft.Security/stable/2022-01-01/alerts.json",
2424
"package-2022-01-preview-only": "2023-01-24 09:46:27 +0200 9eb9c45842ba2932eee57326189019adc3018397 Microsoft.Security/preview/2022-01-01-preview/governanceRules.json",
2525
"package-2021-10-preview-only": "2021-10-22 08:18:20 +0300 32652d34b63d39b2c9ca52cf97e2f805b881dd4a Microsoft.Security/preview/2021-10-01-preview/mdeOnboardings.json",
26-
"package-2021-07-preview-only": "2022-02-16 05:25:20 +0200 72808f0e1bef87104ed97735158547422acb3d17 Microsoft.Security/preview/2021-07-01-preview/customAssessmentAutomation.json",
26+
"package-2021-07-preview-only": "2022-02-08 09:36:53 +0200 0b40a820afcd4b8796d27f0d0ac29098804855e5 Microsoft.Security/preview/2021-07-01-preview/securityConnectors.json",
2727
"package-2021-07-only": "2022-04-13 06:23:26 +0300 880394b28e0f4e7925f4ecb3edc46b651ab58129 Microsoft.Security/stable/2021-07-01/settings.json",
2828
"package-2021-06-only": "2022-04-13 06:23:26 +0300 880394b28e0f4e7925f4ecb3edc46b651ab58129 Microsoft.Security/stable/2021-06-01/settings.json",
2929
"package-2021-05-preview-only": "2021-05-20 10:54:13 +0300 5fcc6854765009e891052653b304cfe80353430a Microsoft.Security/preview/2021-05-01-preview/softwareInventories.json",

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

Lines changed: 1 addition & 60 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
@@ -60,8 +61,6 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
6061
LATEST_PROFILE = ProfileDefinition({
6162
_PROFILE_TAG: {
6263
None: DEFAULT_API_VERSION,
63-
'adaptive_application_controls': '2020-01-01',
64-
'adaptive_network_hardenings': '2020-01-01',
6564
'advanced_threat_protection': '2019-01-01',
6665
'alerts': '2022-01-01',
6766
'alerts_suppression_rules': '2019-01-01-preview',
@@ -79,8 +78,6 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
7978
'compliance_results': '2017-08-01',
8079
'compliances': '2017-08-01-preview',
8180
'connectors': '2020-01-01-preview',
82-
'custom_assessment_automations': '2021-07-01-preview',
83-
'custom_entity_store_assignments': '2021-07-01-preview',
8481
'defender_for_storage': '2022-12-01-preview',
8582
'device_security_groups': '2019-08-01',
8683
'discovered_security_solutions': '2020-01-01',
@@ -323,34 +320,6 @@ def models(cls, api_version=DEFAULT_API_VERSION):
323320
return models
324321
raise ValueError("API version {} is not available".format(api_version))
325322

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-
354323
@property
355324
def advanced_threat_protection(self):
356325
"""Instance depends on the API version:
@@ -649,34 +618,6 @@ def connectors(self):
649618
self._config.api_version = api_version
650619
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
651620

652-
@property
653-
def custom_assessment_automations(self):
654-
"""Instance depends on the API version:
655-
656-
* 2021-07-01-preview: :class:`CustomAssessmentAutomationsOperations<azure.mgmt.security.v2021_07_01_preview.operations.CustomAssessmentAutomationsOperations>`
657-
"""
658-
api_version = self._get_api_version('custom_assessment_automations')
659-
if api_version == '2021-07-01-preview':
660-
from .v2021_07_01_preview.operations import CustomAssessmentAutomationsOperations as OperationClass
661-
else:
662-
raise ValueError("API version {} does not have operation group 'custom_assessment_automations'".format(api_version))
663-
self._config.api_version = api_version
664-
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
665-
666-
@property
667-
def custom_entity_store_assignments(self):
668-
"""Instance depends on the API version:
669-
670-
* 2021-07-01-preview: :class:`CustomEntityStoreAssignmentsOperations<azure.mgmt.security.v2021_07_01_preview.operations.CustomEntityStoreAssignmentsOperations>`
671-
"""
672-
api_version = self._get_api_version('custom_entity_store_assignments')
673-
if api_version == '2021-07-01-preview':
674-
from .v2021_07_01_preview.operations import CustomEntityStoreAssignmentsOperations as OperationClass
675-
else:
676-
raise ValueError("API version {} does not have operation group 'custom_entity_store_assignments'".format(api_version))
677-
self._config.api_version = api_version
678-
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
679-
680621
@property
681622
def defender_for_storage(self):
682623
"""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/_security_center.py

Lines changed: 1 addition & 60 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 AsyncARMPipelineClient
@@ -60,8 +61,6 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
6061
LATEST_PROFILE = ProfileDefinition({
6162
_PROFILE_TAG: {
6263
None: DEFAULT_API_VERSION,
63-
'adaptive_application_controls': '2020-01-01',
64-
'adaptive_network_hardenings': '2020-01-01',
6564
'advanced_threat_protection': '2019-01-01',
6665
'alerts': '2022-01-01',
6766
'alerts_suppression_rules': '2019-01-01-preview',
@@ -79,8 +78,6 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
7978
'compliance_results': '2017-08-01',
8079
'compliances': '2017-08-01-preview',
8180
'connectors': '2020-01-01-preview',
82-
'custom_assessment_automations': '2021-07-01-preview',
83-
'custom_entity_store_assignments': '2021-07-01-preview',
8481
'defender_for_storage': '2022-12-01-preview',
8582
'device_security_groups': '2019-08-01',
8683
'discovered_security_solutions': '2020-01-01',
@@ -323,34 +320,6 @@ def models(cls, api_version=DEFAULT_API_VERSION):
323320
return models
324321
raise ValueError("API version {} is not available".format(api_version))
325322

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.aio.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.aio.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.aio.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.aio.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-
354323
@property
355324
def advanced_threat_protection(self):
356325
"""Instance depends on the API version:
@@ -649,34 +618,6 @@ def connectors(self):
649618
self._config.api_version = api_version
650619
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
651620

652-
@property
653-
def custom_assessment_automations(self):
654-
"""Instance depends on the API version:
655-
656-
* 2021-07-01-preview: :class:`CustomAssessmentAutomationsOperations<azure.mgmt.security.v2021_07_01_preview.aio.operations.CustomAssessmentAutomationsOperations>`
657-
"""
658-
api_version = self._get_api_version('custom_assessment_automations')
659-
if api_version == '2021-07-01-preview':
660-
from ..v2021_07_01_preview.aio.operations import CustomAssessmentAutomationsOperations as OperationClass
661-
else:
662-
raise ValueError("API version {} does not have operation group 'custom_assessment_automations'".format(api_version))
663-
self._config.api_version = api_version
664-
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
665-
666-
@property
667-
def custom_entity_store_assignments(self):
668-
"""Instance depends on the API version:
669-
670-
* 2021-07-01-preview: :class:`CustomEntityStoreAssignmentsOperations<azure.mgmt.security.v2021_07_01_preview.aio.operations.CustomEntityStoreAssignmentsOperations>`
671-
"""
672-
api_version = self._get_api_version('custom_entity_store_assignments')
673-
if api_version == '2021-07-01-preview':
674-
from ..v2021_07_01_preview.aio.operations import CustomEntityStoreAssignmentsOperations as OperationClass
675-
else:
676-
raise ValueError("API version {} does not have operation group 'custom_entity_store_assignments'".format(api_version))
677-
self._config.api_version = api_version
678-
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
679-
680621
@property
681622
def defender_for_storage(self):
682623
"""Instance depends on the API version:

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from .v2020_01_01_preview.models import *
1515
from .v2021_05_01_preview.models import *
1616
from .v2021_06_01.models import *
17-
from .v2021_07_01_preview.models import *
1817
from .v2021_10_01_preview.models import *
1918
from .v2022_01_01.models import *
2019
from .v2022_01_01_preview.models import *

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"azure_arm": true,
1111
"has_public_lro_operations": false,
1212
"client_side_validation": false,
13-
"sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"SecurityCenterConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
14-
"async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"AsyncARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"SecurityCenterConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
13+
"sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"SecurityCenterConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
14+
"async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"AsyncARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"SecurityCenterConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
1515
},
1616
"global_parameters": {
1717
"sync": {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from copy import deepcopy
1010
from typing import Any, TYPE_CHECKING
11+
from typing_extensions import Self
1112

1213
from azure.core.pipeline import policies
1314
from azure.core.rest import HttpRequest, HttpResponse
@@ -111,7 +112,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
111112
def close(self) -> None:
112113
self._client.close()
113114

114-
def __enter__(self) -> "SecurityCenter":
115+
def __enter__(self) -> Self:
115116
self._client.__enter__()
116117
return self
117118

sdk/security/azure-mgmt-security/azure/mgmt/security/v2015_06_01_preview/_vendor.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

sdk/security/azure-mgmt-security/azure/mgmt/security/v2015_06_01_preview/_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 = "7.0.0"
9+
VERSION = "1.0.0b1"

0 commit comments

Comments
 (0)