Skip to content

Commit cd94ec0

Browse files
author
SDKAuto
committed
CodeGen from PR 17107 in Azure/azure-rest-api-specs
Merge 2a975203b1a7773d746f9aef6ba180e6d1378110 into fc59c63
1 parent 86f6dc0 commit cd94ec0

File tree

116 files changed

+27355
-12633
lines changed

Some content is hidden

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

116 files changed

+27355
-12633
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.4.5",
2+
"autorest": "3.7.2",
33
"use": [
4-
"@autorest/python@5.8.4",
5-
"@autorest/[email protected].2"
4+
"@autorest/python@5.12.0",
5+
"@autorest/[email protected].3"
66
],
7-
"commit": "a8719243647b7c6d06ed287483d788808de7ecab",
7+
"commit": "51b79f2ef3955a693c0c3924c5440fcb7b74cb55",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/security/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/[email protected].2 --version=3.4.5",
9+
"autorest_command": "autorest specification/security/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.12.0 --use=@autorest/[email protected].3 --version=3.7.2",
1010
"readme": "specification/security/resource-manager/readme.md"
1111
}

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
__version__ = VERSION
1313
__all__ = ['SecurityCenter']
1414

15-
try:
16-
from ._patch import patch_sdk # type: ignore
17-
patch_sdk()
18-
except ImportError:
19-
pass
15+
# `._patch.py` is used for handwritten extensions to the generated code
16+
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
17+
from ._patch import patch_sdk
18+
patch_sdk()

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from azure.core.configuration import Configuration
1212
from azure.core.pipeline import policies
13-
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
13+
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1414

1515
from ._version import VERSION
1616

@@ -43,13 +43,13 @@ def __init__(
4343
**kwargs # type: Any
4444
):
4545
# type: (...) -> None
46+
super(SecurityCenterConfiguration, self).__init__(**kwargs)
4647
if credential is None:
4748
raise ValueError("Parameter 'credential' must not be None.")
4849
if subscription_id is None:
4950
raise ValueError("Parameter 'subscription_id' must not be None.")
5051
if asc_location is None:
5152
raise ValueError("Parameter 'asc_location' must not be None.")
52-
super(SecurityCenterConfiguration, self).__init__(**kwargs)
5353

5454
self.credential = credential
5555
self.subscription_id = subscription_id
@@ -73,4 +73,4 @@ def _configure(
7373
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
7474
self.authentication_policy = kwargs.get('authentication_policy')
7575
if self.credential and not self.authentication_policy:
76-
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
76+
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)

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

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"chosen_version": "",
3-
"total_api_version_list": ["2015-06-01-preview", "2017-08-01", "2017-08-01-preview", "2018-06-01", "2019-01-01", "2019-01-01-preview", "2019-08-01", "2020-01-01", "2020-01-01-preview", "2020-07-01-preview", "2021-01-01", "2021-01-15-preview", "2021-05-01-preview", "2021-07-01"],
3+
"total_api_version_list": ["2015-06-01-preview", "2017-08-01", "2017-08-01-preview", "2018-06-01", "2019-01-01", "2019-01-01-preview", "2019-08-01", "2020-01-01", "2020-01-01-preview", "2020-07-01-preview", "2021-01-01", "2021-01-15-preview", "2021-05-01-preview", "2021-06-01", "2021-07-01", "2021-07-01-preview", "2021-10-01-preview"],
44
"client": {
55
"name": "SecurityCenter",
66
"filename": "_security_center",
77
"description": "API spec for Microsoft.Security (Azure Security Center) resource provider.",
8-
"base_url": "\u0027https://management.azure.com\u0027",
9-
"custom_base_url": null,
8+
"host_value": "\"https://management.azure.com\"",
9+
"parameterized_host_template": null,
1010
"azure_arm": true,
1111
"has_lro_operations": true,
1212
"client_side_validation": false,
13-
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SecurityCenterConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
14-
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SecurityCenterConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SecurityCenterConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SecurityCenterConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
1515
},
1616
"global_parameters": {
1717
"sync": {
@@ -66,7 +66,7 @@
6666
"required": false
6767
},
6868
"base_url": {
69-
"signature": "base_url=None, # type: Optional[str]",
69+
"signature": "base_url=\"https://management.azure.com\", # type: str",
7070
"description": "Service URL",
7171
"docstring_type": "str",
7272
"required": false
@@ -86,7 +86,7 @@
8686
"required": false
8787
},
8888
"base_url": {
89-
"signature": "base_url: Optional[str] = None,",
89+
"signature": "base_url: str = \"https://management.azure.com\",",
9090
"description": "Service URL",
9191
"docstring_type": "str",
9292
"required": false
@@ -103,13 +103,15 @@
103103
"config": {
104104
"credential": true,
105105
"credential_scopes": ["https://management.azure.com/.default"],
106-
"credential_default_policy_type": "BearerTokenCredentialPolicy",
107-
"credential_default_policy_type_has_async_version": true,
108-
"credential_key_header_name": null,
109-
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
110-
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
106+
"credential_call_sync": "ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)",
107+
"credential_call_async": "AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)",
108+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMChallengeAuthenticationPolicy\", \"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
109+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
111110
},
112111
"operation_groups": {
112+
"mde_onboardings": "MdeOnboardingsOperations",
113+
"custom_assessment_automations": "CustomAssessmentAutomationsOperations",
114+
"custom_entity_store_assignments": "CustomEntityStoreAssignmentsOperations",
113115
"compliance_results": "ComplianceResultsOperations",
114116
"pricings": "PricingsOperations",
115117
"advanced_threat_protection": "AdvancedThreatProtectionOperations",
@@ -154,6 +156,7 @@
154156
"alerts": "AlertsOperations",
155157
"settings": "SettingsOperations",
156158
"ingestion_settings": "IngestionSettingsOperations",
157-
"software_inventories": "SoftwareInventoriesOperations"
159+
"software_inventories": "SoftwareInventoriesOperations",
160+
"security_connectors": "SecurityConnectorsOperations"
158161
}
159162
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
#
4+
# Copyright (c) Microsoft Corporation. All rights reserved.
5+
#
6+
# The MIT License (MIT)
7+
#
8+
# Permission is hereby granted, free of charge, to any person obtaining a copy
9+
# of this software and associated documentation files (the ""Software""), to
10+
# deal in the Software without restriction, including without limitation the
11+
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12+
# sell copies of the Software, and to permit persons to whom the Software is
13+
# furnished to do so, subject to the following conditions:
14+
#
15+
# The above copyright notice and this permission notice shall be included in
16+
# all copies or substantial portions of the Software.
17+
#
18+
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24+
# IN THE SOFTWARE.
25+
#
26+
# --------------------------------------------------------------------------
27+
28+
# This file is used for handwritten extensions to the generated code. Example:
29+
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
30+
def patch_sdk():
31+
pass

0 commit comments

Comments
 (0)