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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions sdk/security/azure-mgmt-security/_meta.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"commit": "5485fc4eb11debd9cc8d92ec156b573998aae977",
"commit": "7b8651bc7a030e18731309e2a691dba20e2d9c63",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.13.16",
"@autorest/python@6.19.0",
"@autorest/[email protected]"
],
"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",
"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",
"readme": "specification/security/resource-manager/readme.md",
"package-2023-11-15": "2023-09-12 12:04:57 -0700 32c178f2467f792a322f56174be244135d2c907f Microsoft.Security/stable/2023-11-15/apiCollections.json",
"package-preview-2023-03-only": "2023-03-23 11:34:42 +0200 2db2beee2fed67b08d273fdac7a51aba02ac2f80 Microsoft.Security/preview/2023-03-01-preview/securityConnectors.json",
"package-preview-2023-02-only": "2023-03-10 09:31:28 +0200 a2e2617050e68ae1c445db565076c5a7f42ebad4 Microsoft.Security/preview/2023-02-01-preview/healthReports.json",
"package-preview-2023-01-only": "2023-03-28 11:35:29 +0300 0e2c3d175e126284c5db1d3099b61e46e462fb74 Microsoft.Security/preview/2023-01-01-preview/securityOperators.json",
"package-2023-01": "2023-03-27 17:16:35 +0300 efd2b52bcf2b06e174f7008b2728f70ee7f972bd Microsoft.Security/stable/2023-01-01/pricings.json",
"package-preview-2022-12": "2023-09-12 22:01:54 +0300 b09b155f738b4178bcfe820f54f8702a94eb9d90 Microsoft.Security/preview/2022-12-01-preview/defenderForStorageSettings.json",
"package-preview-2022-12": "2024-07-01 22:47:55 +0300 be978e57137bfd799e350575c0fdd53511f0e4a8 Microsoft.Security/preview/2022-12-01-preview/defenderForStorageSettings.json",
"package-preview-2022-08": "2022-09-20 03:45:43 +0300 9000eea3aa90071c2814f663dd763d7fc1668bed Microsoft.Security/preview/2022-08-01-preview/securityConnectors.json",
"package-preview-2022-07": "2022-11-01 04:47:16 +0200 312544c27464f61bf9639924099d4238bdfa1d71 Microsoft.Security/preview/2022-07-01-preview/applications.json",
"package-2022-05": "2022-06-09 12:47:24 +0300 d006e1d15d8fe19a6c558861dd5bba6b7baa8dd8 Microsoft.Security/stable/2022-05-01/settings.json",
Expand All @@ -23,7 +23,7 @@
"package-2022-01-only": "2023-03-02 10:05:39 +0800 c287c0fb1c00df4bb1812acec050d178fa969cb6 Microsoft.Security/stable/2022-01-01/alerts.json",
"package-2022-01-preview-only": "2023-01-24 09:46:27 +0200 9eb9c45842ba2932eee57326189019adc3018397 Microsoft.Security/preview/2022-01-01-preview/governanceRules.json",
"package-2021-10-preview-only": "2021-10-22 08:18:20 +0300 32652d34b63d39b2c9ca52cf97e2f805b881dd4a Microsoft.Security/preview/2021-10-01-preview/mdeOnboardings.json",
"package-2021-07-preview-only": "2022-02-16 05:25:20 +0200 72808f0e1bef87104ed97735158547422acb3d17 Microsoft.Security/preview/2021-07-01-preview/customAssessmentAutomation.json",
"package-2021-07-preview-only": "2022-02-08 09:36:53 +0200 0b40a820afcd4b8796d27f0d0ac29098804855e5 Microsoft.Security/preview/2021-07-01-preview/securityConnectors.json",
"package-2021-07-only": "2022-04-13 06:23:26 +0300 880394b28e0f4e7925f4ecb3edc46b651ab58129 Microsoft.Security/stable/2021-07-01/settings.json",
"package-2021-06-only": "2022-04-13 06:23:26 +0300 880394b28e0f4e7925f4ecb3edc46b651ab58129 Microsoft.Security/stable/2021-06-01/settings.json",
"package-2021-05-preview-only": "2021-05-20 10:54:13 +0300 5fcc6854765009e891052653b304cfe80353430a Microsoft.Security/preview/2021-05-01-preview/softwareInventories.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# --------------------------------------------------------------------------

from typing import Any, Optional, TYPE_CHECKING
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.mgmt.core import ARMPipelineClient
Expand Down Expand Up @@ -60,8 +61,6 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
None: DEFAULT_API_VERSION,
'adaptive_application_controls': '2020-01-01',
'adaptive_network_hardenings': '2020-01-01',
'advanced_threat_protection': '2019-01-01',
'alerts': '2022-01-01',
'alerts_suppression_rules': '2019-01-01-preview',
Expand All @@ -79,8 +78,6 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
'compliance_results': '2017-08-01',
'compliances': '2017-08-01-preview',
'connectors': '2020-01-01-preview',
'custom_assessment_automations': '2021-07-01-preview',
'custom_entity_store_assignments': '2021-07-01-preview',
'defender_for_storage': '2022-12-01-preview',
'device_security_groups': '2019-08-01',
'discovered_security_solutions': '2020-01-01',
Expand Down Expand Up @@ -323,34 +320,6 @@ def models(cls, api_version=DEFAULT_API_VERSION):
return models
raise ValueError("API version {} is not available".format(api_version))

@property
def adaptive_application_controls(self):
"""Instance depends on the API version:

* 2020-01-01: :class:`AdaptiveApplicationControlsOperations<azure.mgmt.security.v2020_01_01.operations.AdaptiveApplicationControlsOperations>`
"""
api_version = self._get_api_version('adaptive_application_controls')
if api_version == '2020-01-01':
from .v2020_01_01.operations import AdaptiveApplicationControlsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'adaptive_application_controls'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def adaptive_network_hardenings(self):
"""Instance depends on the API version:

* 2020-01-01: :class:`AdaptiveNetworkHardeningsOperations<azure.mgmt.security.v2020_01_01.operations.AdaptiveNetworkHardeningsOperations>`
"""
api_version = self._get_api_version('adaptive_network_hardenings')
if api_version == '2020-01-01':
from .v2020_01_01.operations import AdaptiveNetworkHardeningsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'adaptive_network_hardenings'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def advanced_threat_protection(self):
"""Instance depends on the API version:
Expand Down Expand Up @@ -649,34 +618,6 @@ def connectors(self):
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def custom_assessment_automations(self):
"""Instance depends on the API version:

* 2021-07-01-preview: :class:`CustomAssessmentAutomationsOperations<azure.mgmt.security.v2021_07_01_preview.operations.CustomAssessmentAutomationsOperations>`
"""
api_version = self._get_api_version('custom_assessment_automations')
if api_version == '2021-07-01-preview':
from .v2021_07_01_preview.operations import CustomAssessmentAutomationsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'custom_assessment_automations'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def custom_entity_store_assignments(self):
"""Instance depends on the API version:

* 2021-07-01-preview: :class:`CustomEntityStoreAssignmentsOperations<azure.mgmt.security.v2021_07_01_preview.operations.CustomEntityStoreAssignmentsOperations>`
"""
api_version = self._get_api_version('custom_entity_store_assignments')
if api_version == '2021-07-01-preview':
from .v2021_07_01_preview.operations import CustomEntityStoreAssignmentsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'custom_entity_store_assignments'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def defender_for_storage(self):
"""Instance depends on the API version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ def _json_attemp(data):
# context otherwise.
_LOGGER.critical("Wasn't XML not JSON, failing")
raise DeserializationError("XML is invalid") from err
elif content_type.startswith("text/"):
return data_as_str
raise DeserializationError("Cannot deserialize content-type: {}".format(content_type))

@classmethod
Expand Down Expand Up @@ -1447,7 +1449,7 @@ def _deserialize(self, target_obj, data):
elif isinstance(response, type) and issubclass(response, Enum):
return self.deserialize_enum(data, response)

if data is None:
if data is None or data is CoreNull:
return data
try:
attributes = response._attribute_map # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# --------------------------------------------------------------------------

from typing import Any, Optional, TYPE_CHECKING
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.mgmt.core import AsyncARMPipelineClient
Expand Down Expand Up @@ -60,8 +61,6 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
None: DEFAULT_API_VERSION,
'adaptive_application_controls': '2020-01-01',
'adaptive_network_hardenings': '2020-01-01',
'advanced_threat_protection': '2019-01-01',
'alerts': '2022-01-01',
'alerts_suppression_rules': '2019-01-01-preview',
Expand All @@ -79,8 +78,6 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
'compliance_results': '2017-08-01',
'compliances': '2017-08-01-preview',
'connectors': '2020-01-01-preview',
'custom_assessment_automations': '2021-07-01-preview',
'custom_entity_store_assignments': '2021-07-01-preview',
'defender_for_storage': '2022-12-01-preview',
'device_security_groups': '2019-08-01',
'discovered_security_solutions': '2020-01-01',
Expand Down Expand Up @@ -323,34 +320,6 @@ def models(cls, api_version=DEFAULT_API_VERSION):
return models
raise ValueError("API version {} is not available".format(api_version))

@property
def adaptive_application_controls(self):
"""Instance depends on the API version:

* 2020-01-01: :class:`AdaptiveApplicationControlsOperations<azure.mgmt.security.v2020_01_01.aio.operations.AdaptiveApplicationControlsOperations>`
"""
api_version = self._get_api_version('adaptive_application_controls')
if api_version == '2020-01-01':
from ..v2020_01_01.aio.operations import AdaptiveApplicationControlsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'adaptive_application_controls'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def adaptive_network_hardenings(self):
"""Instance depends on the API version:

* 2020-01-01: :class:`AdaptiveNetworkHardeningsOperations<azure.mgmt.security.v2020_01_01.aio.operations.AdaptiveNetworkHardeningsOperations>`
"""
api_version = self._get_api_version('adaptive_network_hardenings')
if api_version == '2020-01-01':
from ..v2020_01_01.aio.operations import AdaptiveNetworkHardeningsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'adaptive_network_hardenings'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def advanced_threat_protection(self):
"""Instance depends on the API version:
Expand Down Expand Up @@ -649,34 +618,6 @@ def connectors(self):
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def custom_assessment_automations(self):
"""Instance depends on the API version:

* 2021-07-01-preview: :class:`CustomAssessmentAutomationsOperations<azure.mgmt.security.v2021_07_01_preview.aio.operations.CustomAssessmentAutomationsOperations>`
"""
api_version = self._get_api_version('custom_assessment_automations')
if api_version == '2021-07-01-preview':
from ..v2021_07_01_preview.aio.operations import CustomAssessmentAutomationsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'custom_assessment_automations'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def custom_entity_store_assignments(self):
"""Instance depends on the API version:

* 2021-07-01-preview: :class:`CustomEntityStoreAssignmentsOperations<azure.mgmt.security.v2021_07_01_preview.aio.operations.CustomEntityStoreAssignmentsOperations>`
"""
api_version = self._get_api_version('custom_entity_store_assignments')
if api_version == '2021-07-01-preview':
from ..v2021_07_01_preview.aio.operations import CustomEntityStoreAssignmentsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'custom_entity_store_assignments'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def defender_for_storage(self):
"""Instance depends on the API version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from .v2020_01_01_preview.models import *
from .v2021_05_01_preview.models import *
from .v2021_06_01.models import *
from .v2021_07_01_preview.models import *
from .v2021_10_01_preview.models import *
from .v2022_01_01.models import *
from .v2022_01_01_preview.models import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"azure_arm": true,
"has_public_lro_operations": false,
"client_side_validation": false,
"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\"]}}}",
"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\"]}}}"
"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\"]}}}",
"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\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from copy import deepcopy
from typing import Any, TYPE_CHECKING
from typing_extensions import Self

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

def __enter__(self) -> "SecurityCenter":
def __enter__(self) -> Self:
self._client.__enter__()
return self

Expand Down

This file was deleted.

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 = "7.0.0"
VERSION = "1.0.0b1"
Loading