1010# --------------------------------------------------------------------------
1111
1212from typing import Any , Optional , TYPE_CHECKING
13+ from typing_extensions import Self
1314
1415from azure .core .pipeline import policies
1516from 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 = [
@@ -158,7 +164,7 @@ def __init__(
158164 policies .SensitiveHeaderCleanupPolicy (** kwargs ) if self ._config .redirect_policy else None ,
159165 self ._config .http_logging_policy ,
160166 ]
161- self ._client = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
167+ self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
162168 super (SecurityCenter , self ).__init__ (
163169 api_version = api_version ,
164170 profile = profile
@@ -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:
0 commit comments