Skip to content

Commit 06eb7c3

Browse files
author
SDKAuto
committed
CodeGen from PR 34531 in Azure/azure-rest-api-specs
Merge f8c188a1f8858abde5b8099558d3a90f14a4e5b7 into 477d250a0be7659d4c27a6f704b3216c7e549930
1 parent 9194780 commit 06eb7c3

File tree

831 files changed

+96140
-13491
lines changed

Some content is hidden

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

831 files changed

+96140
-13491
lines changed

sdk/security/azure-mgmt-security/CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Release History
22

3+
## 8.0.0 (2025-05-11)
4+
5+
### Features Added
6+
7+
- Added operation group CustomRecommendationsOperations
8+
- Added operation group SecurityStandardsOperations
9+
- Added operation group StandardAssignmentsOperations
10+
- Model DefenderForStorageSetting has a new parameter properties
11+
12+
### Breaking Changes
13+
14+
- Model DefenderForStorageSetting no longer has parameter cap_gb_per_month
15+
- Model DefenderForStorageSetting no longer has parameter is_enabled_properties_is_enabled
16+
- Model DefenderForStorageSetting no longer has parameter is_enabled_properties_malware_scanning_on_upload_is_enabled
17+
- Model DefenderForStorageSetting no longer has parameter is_enabled_properties_sensitive_data_discovery_is_enabled
18+
- Model DefenderForStorageSetting no longer has parameter operation_status_properties_malware_scanning_operation_status
19+
- Model DefenderForStorageSetting no longer has parameter operation_status_properties_sensitive_data_discovery_operation_status
20+
- Model DefenderForStorageSetting no longer has parameter override_subscription_level_settings
21+
- Model DefenderForStorageSetting no longer has parameter scan_results_event_grid_topic_resource_id
22+
- Removed operation group AdaptiveApplicationControlsOperations
23+
- Removed operation group AdaptiveNetworkHardeningsOperations
24+
325
## 7.0.0 (2024-05-20)
426

527
### Features Added

sdk/security/azure-mgmt-security/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Security Center Management Client Library.
4-
This package has been tested with Python 3.8+.
4+
This package has been tested with Python 3.9+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.8+ is required to use this package.
15+
- Python 3.9+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"commit": "5485fc4eb11debd9cc8d92ec156b573998aae977",
2+
"commit": "2020a7d34270e007485228625f214807cdbfb711",
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.34.1",
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.34.1 --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",

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: 71 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,27 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from typing import Any, Optional, TYPE_CHECKING
12+
from typing import Any, Optional, TYPE_CHECKING, cast
13+
from typing_extensions import Self
1314

1415
from azure.core.pipeline import policies
16+
from azure.core.settings import settings
1517
from azure.mgmt.core import ARMPipelineClient
1618
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
19+
from azure.mgmt.core.tools import get_arm_endpoints
1720
from azure.profiles import KnownProfiles, ProfileDefinition
1821
from azure.profiles.multiapiclient import MultiApiClientMixin
1922

2023
from ._configuration import SecurityCenterConfiguration
21-
from ._serialization import Deserializer, Serializer
24+
from ._utils.serialization import Deserializer, Serializer
2225

2326
if TYPE_CHECKING:
2427
# pylint: disable=unused-import,ungrouped-imports
2528
from azure.core.credentials import TokenCredential
2629

2730
class _SDKClient(object):
2831
def __init__(self, *args, **kwargs):
29-
"""This is a fake class to support current implemetation of MultiApiClientMixin."
32+
"""This is a fake class to support current implementation of MultiApiClientMixin."
3033
Will be removed in final version of multiapi azure-core based client
3134
"""
3235
pass
@@ -44,8 +47,6 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
4447
4548
:param credential: Credential needed for the client to connect to Azure. Required.
4649
:type credential: ~azure.core.credentials.TokenCredential
47-
:param subscription_id: The ID of the target subscription. Required.
48-
:type subscription_id: str
4950
:param api_version: API version to use if no profile is provided, or if missing in profile.
5051
:type api_version: str
5152
:param base_url: Service URL
@@ -55,13 +56,11 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
5556
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
5657
"""
5758

58-
DEFAULT_API_VERSION = '2024-04-01'
59+
DEFAULT_API_VERSION = '2024-08-01'
5960
_PROFILE_TAG = "azure.mgmt.security.SecurityCenter"
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',
@@ -76,15 +75,25 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
7675
'assessments_metadata': '2021-06-01',
7776
'auto_provisioning_settings': '2017-08-01-preview',
7877
'automations': '2019-01-01-preview',
78+
'azure_dev_ops_orgs': '2024-04-01',
79+
'azure_dev_ops_projects': '2024-04-01',
80+
'azure_dev_ops_repos': '2024-04-01',
7981
'compliance_results': '2017-08-01',
8082
'compliances': '2017-08-01-preview',
8183
'connectors': '2020-01-01-preview',
8284
'custom_assessment_automations': '2021-07-01-preview',
8385
'custom_entity_store_assignments': '2021-07-01-preview',
8486
'defender_for_storage': '2022-12-01-preview',
87+
'dev_ops_configurations': '2024-04-01',
88+
'dev_ops_operation_results': '2024-04-01',
8589
'device_security_groups': '2019-08-01',
8690
'discovered_security_solutions': '2020-01-01',
8791
'external_security_solutions': '2020-01-01',
92+
'git_hub_owners': '2024-04-01',
93+
'git_hub_repos': '2024-04-01',
94+
'git_lab_groups': '2024-04-01',
95+
'git_lab_projects': '2024-04-01',
96+
'git_lab_subgroups': '2024-04-01',
8897
'governance_assignments': '2022-01-01-preview',
8998
'governance_rules': '2022-01-01-preview',
9099
'health_report': '2023-02-01-preview',
@@ -131,15 +140,19 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
131140
def __init__(
132141
self,
133142
credential: "TokenCredential",
134-
subscription_id: str,
135143
api_version: Optional[str]=None,
136-
base_url: str = "https://management.azure.com",
144+
base_url: Optional[str] = None,
137145
profile: KnownProfiles=KnownProfiles.default,
138146
**kwargs: Any
139147
):
140148
if api_version:
141149
kwargs.setdefault('api_version', api_version)
142-
self._config = SecurityCenterConfiguration(credential, subscription_id, **kwargs)
150+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
151+
_endpoints = get_arm_endpoints(_cloud)
152+
if not base_url:
153+
base_url = _endpoints["resource_manager"]
154+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
155+
self._config = SecurityCenterConfiguration(credential, credential_scopes=credential_scopes, **kwargs)
143156
_policies = kwargs.pop("policies", None)
144157
if _policies is None:
145158
_policies = [
@@ -158,7 +171,7 @@ def __init__(
158171
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
159172
self._config.http_logging_policy,
160173
]
161-
self._client = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
174+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
162175
super(SecurityCenter, self).__init__(
163176
api_version=api_version,
164177
profile=profile
@@ -209,6 +222,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
209222
* 2023-11-15: :mod:`v2023_11_15.models<azure.mgmt.security.v2023_11_15.models>`
210223
* 2024-01-01: :mod:`v2024_01_01.models<azure.mgmt.security.v2024_01_01.models>`
211224
* 2024-04-01: :mod:`v2024_04_01.models<azure.mgmt.security.v2024_04_01.models>`
225+
* 2024-08-01: :mod:`v2024_08_01.models<azure.mgmt.security.v2024_08_01.models>`
212226
"""
213227
if api_version == '2015-06-01-preview':
214228
from .v2015_06_01_preview import models
@@ -321,36 +335,11 @@ def models(cls, api_version=DEFAULT_API_VERSION):
321335
elif api_version == '2024-04-01':
322336
from .v2024_04_01 import models
323337
return models
338+
elif api_version == '2024-08-01':
339+
from .v2024_08_01 import models
340+
return models
324341
raise ValueError("API version {} is not available".format(api_version))
325342

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-
354343
@property
355344
def advanced_threat_protection(self):
356345
"""Instance depends on the API version:
@@ -677,6 +666,20 @@ def custom_entity_store_assignments(self):
677666
self._config.api_version = api_version
678667
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
679668

669+
@property
670+
def custom_recommendations(self):
671+
"""Instance depends on the API version:
672+
673+
* 2024-08-01: :class:`CustomRecommendationsOperations<azure.mgmt.security.v2024_08_01.operations.CustomRecommendationsOperations>`
674+
"""
675+
api_version = self._get_api_version('custom_recommendations')
676+
if api_version == '2024-08-01':
677+
from .v2024_08_01.operations import CustomRecommendationsOperations as OperationClass
678+
else:
679+
raise ValueError("API version {} does not have operation group 'custom_recommendations'".format(api_version))
680+
self._config.api_version = api_version
681+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
682+
680683
@property
681684
def defender_for_storage(self):
682685
"""Instance depends on the API version:
@@ -1257,6 +1260,20 @@ def security_solutions_reference_data(self):
12571260
self._config.api_version = api_version
12581261
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
12591262

1263+
@property
1264+
def security_standards(self):
1265+
"""Instance depends on the API version:
1266+
1267+
* 2024-08-01: :class:`SecurityStandardsOperations<azure.mgmt.security.v2024_08_01.operations.SecurityStandardsOperations>`
1268+
"""
1269+
api_version = self._get_api_version('security_standards')
1270+
if api_version == '2024-08-01':
1271+
from .v2024_08_01.operations import SecurityStandardsOperations as OperationClass
1272+
else:
1273+
raise ValueError("API version {} does not have operation group 'security_standards'".format(api_version))
1274+
self._config.api_version = api_version
1275+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
1276+
12601277
@property
12611278
def sensitivity_settings(self):
12621279
"""Instance depends on the API version:
@@ -1384,6 +1401,20 @@ def sql_vulnerability_assessment_scans(self):
13841401
self._config.api_version = api_version
13851402
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
13861403

1404+
@property
1405+
def standard_assignments(self):
1406+
"""Instance depends on the API version:
1407+
1408+
* 2024-08-01: :class:`StandardAssignmentsOperations<azure.mgmt.security.v2024_08_01.operations.StandardAssignmentsOperations>`
1409+
"""
1410+
api_version = self._get_api_version('standard_assignments')
1411+
if api_version == '2024-08-01':
1412+
from .v2024_08_01.operations import StandardAssignmentsOperations as OperationClass
1413+
else:
1414+
raise ValueError("API version {} does not have operation group 'standard_assignments'".format(api_version))
1415+
self._config.api_version = api_version
1416+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
1417+
13871418
@property
13881419
def sub_assessments(self):
13891420
"""Instance depends on the API version:
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)