Skip to content

Commit 6533738

Browse files
msyycSDKAuto
andauthored
[T1] resource 2020 12 04 (Azure#15649)
* CodeGen from PR 11921 in Azure/azure-rest-api-specs add api-version of 2020-10-01 for resources (Azure#11921) * test,version,CHANGELOG Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
1 parent 1e7fea6 commit 6533738

File tree

81 files changed

+19798
-1150
lines changed

Some content is hidden

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

81 files changed

+19798
-1150
lines changed

sdk/resources/azure-mgmt-resource/CHANGELOG.md

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

3+
## 11.0.0 (2020-12-04)
4+
5+
**Features**
6+
7+
- Model PolicyAssignment has a new parameter non_compliance_messages
8+
- Model ProviderResourceType has a new parameter location_mappings
9+
- Model ParameterDefinitionsValueMetadata has a new parameter strong_type
10+
- Model ParameterDefinitionsValueMetadata has a new parameter assign_permissions
11+
- Model TemplateLink has a new parameter query_string
12+
- Added operation PolicySetDefinitionsOperations.list_by_management_group
13+
- Added operation PolicyDefinitionsOperations.list_by_management_group
14+
- Added operation group DataPolicyManifestsOperations
15+
- Added operation group ProviderResourceTypesOperations
16+
17+
**Breaking changes**
18+
19+
- Operation PolicyAssignmentsOperations.list has a new signature
20+
- Operation PolicyAssignmentsOperations.list_for_management_group has a new signature
21+
- Operation PolicyAssignmentsOperations.list_for_resource has a new signature
22+
- Operation PolicyAssignmentsOperations.list_for_resource_group has a new signature
23+
- Operation PolicySetDefinitionsOperations.list_built_in has a new signature
24+
- Operation PolicySetDefinitionsOperations.list has a new signature
25+
- Operation PolicyDefinitionsOperations.list_built_in has a new signature
26+
- Operation PolicyDefinitionsOperations.list has a new signature
27+
- Model PolicyAssignment no longer has parameter sku
28+
329
## 10.3.0 (2020-11-02)
430
**Features**
531

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/models/_models.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,11 @@ def __init__(self, **kwargs):
612612

613613

614614
class ErrorResponse(Model):
615-
"""The resource management error response.
615+
"""Error Response.
616+
617+
Common error response for all Azure Resource Manager APIs to return error
618+
details for failed operations. (This also follows the OData error response
619+
format.).
616620
617621
Variables are only populated by the server, and will be ignored when
618622
sending a request.

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/models/_models_py3.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,11 @@ def __init__(self, **kwargs) -> None:
612612

613613

614614
class ErrorResponse(Model):
615-
"""The resource management error response.
615+
"""Error Response.
616+
617+
Common error response for all Azure Resource Manager APIs to return error
618+
details for failed operations. (This also follows the OData error response
619+
format.).
616620
617621
Variables are only populated by the server, and will be ignored when
618622
sending a request.

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/models/_models.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,11 @@ def __init__(self, **kwargs):
609609

610610

611611
class ErrorResponse(Model):
612-
"""The resource management error response.
612+
"""Error Response.
613+
614+
Common error response for all Azure Resource Manager APIs to return error
615+
details for failed operations. (This also follows the OData error response
616+
format.).
613617
614618
Variables are only populated by the server, and will be ignored when
615619
sending a request.

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/models/_models_py3.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,11 @@ def __init__(self, **kwargs) -> None:
609609

610610

611611
class ErrorResponse(Model):
612-
"""The resource management error response.
612+
"""Error Response.
613+
614+
Common error response for all Azure Resource Manager APIs to return error
615+
details for failed operations. (This also follows the OData error response
616+
format.).
613617
614618
Variables are only populated by the server, and will be ignored when
615619
sending a request.

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/models/_models.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ def __init__(self, **kwargs):
7070

7171

7272
class ErrorResponse(Model):
73-
"""The resource management error response.
73+
"""Error Response.
74+
75+
Common error response for all Azure Resource Manager APIs to return error
76+
details for failed operations. (This also follows the OData error response
77+
format.).
7478
7579
Variables are only populated by the server, and will be ignored when
7680
sending a request.

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/models/_models_py3.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ def __init__(self, **kwargs) -> None:
7070

7171

7272
class ErrorResponse(Model):
73-
"""The resource management error response.
73+
"""Error Response.
74+
75+
Common error response for all Azure Resource Manager APIs to return error
76+
details for failed operations. (This also follows the OData error response
77+
format.).
7478
7579
Variables are only populated by the server, and will be ignored when
7680
sending a request.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
# --------------------------------------------------------------------------
11+
12+
from ._configuration import PolicyClientConfiguration
13+
from ._policy_client import PolicyClient
14+
__all__ = ['PolicyClient', 'PolicyClientConfiguration']
15+
16+
from .version import VERSION
17+
18+
__version__ = VERSION
19+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
# --------------------------------------------------------------------------
11+
from msrestazure import AzureConfiguration
12+
13+
from .version import VERSION
14+
15+
16+
class PolicyClientConfiguration(AzureConfiguration):
17+
"""Configuration for PolicyClient
18+
Note that all parameters used to create this instance are saved as instance
19+
attributes.
20+
21+
:param credentials: Credentials needed for the client to connect to Azure.
22+
:type credentials: :mod:`A msrestazure Credentials
23+
object<msrestazure.azure_active_directory>`
24+
:param subscription_id: The ID of the target subscription.
25+
:type subscription_id: str
26+
:param str base_url: Service URL
27+
"""
28+
29+
def __init__(
30+
self, credentials, subscription_id, base_url=None):
31+
32+
if credentials is None:
33+
raise ValueError("Parameter 'credentials' must not be None.")
34+
if subscription_id is None:
35+
raise ValueError("Parameter 'subscription_id' must not be None.")
36+
if not base_url:
37+
base_url = 'https://management.azure.com'
38+
39+
super(PolicyClientConfiguration, self).__init__(base_url)
40+
41+
# Starting Autorest.Python 4.0.64, make connection pool activated by default
42+
self.keep_alive = True
43+
44+
self.add_user_agent('azure-mgmt-resource/{}'.format(VERSION))
45+
self.add_user_agent('Azure-SDK-For-Python')
46+
47+
self.credentials = credentials
48+
self.subscription_id = subscription_id
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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+
# --------------------------------------------------------------------------
11+
12+
from msrest.service_client import SDKClient
13+
from msrest import Serializer, Deserializer
14+
15+
from ._configuration import PolicyClientConfiguration
16+
from .operations import DataPolicyManifestsOperations
17+
from .operations import PolicyAssignmentsOperations
18+
from .operations import PolicyDefinitionsOperations
19+
from .operations import PolicySetDefinitionsOperations
20+
from . import models
21+
22+
23+
class PolicyClient(SDKClient):
24+
"""To manage and control access to your resources, you can define customized policies and assign them at a scope.
25+
26+
:ivar config: Configuration for client.
27+
:vartype config: PolicyClientConfiguration
28+
29+
:ivar data_policy_manifests: DataPolicyManifests operations
30+
:vartype data_policy_manifests: azure.mgmt.resource.policy.v2020_09_01.operations.DataPolicyManifestsOperations
31+
:ivar policy_assignments: PolicyAssignments operations
32+
:vartype policy_assignments: azure.mgmt.resource.policy.v2020_09_01.operations.PolicyAssignmentsOperations
33+
:ivar policy_definitions: PolicyDefinitions operations
34+
:vartype policy_definitions: azure.mgmt.resource.policy.v2020_09_01.operations.PolicyDefinitionsOperations
35+
:ivar policy_set_definitions: PolicySetDefinitions operations
36+
:vartype policy_set_definitions: azure.mgmt.resource.policy.v2020_09_01.operations.PolicySetDefinitionsOperations
37+
38+
:param credentials: Credentials needed for the client to connect to Azure.
39+
:type credentials: :mod:`A msrestazure Credentials
40+
object<msrestazure.azure_active_directory>`
41+
:param subscription_id: The ID of the target subscription.
42+
:type subscription_id: str
43+
:param str base_url: Service URL
44+
"""
45+
46+
def __init__(
47+
self, credentials, subscription_id, base_url=None):
48+
49+
self.config = PolicyClientConfiguration(credentials, subscription_id, base_url)
50+
super(PolicyClient, self).__init__(self.config.credentials, self.config)
51+
52+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
53+
self.api_version = '2020-09-01'
54+
self._serialize = Serializer(client_models)
55+
self._deserialize = Deserializer(client_models)
56+
57+
self.data_policy_manifests = DataPolicyManifestsOperations(
58+
self._client, self.config, self._serialize, self._deserialize)
59+
self.policy_assignments = PolicyAssignmentsOperations(
60+
self._client, self.config, self._serialize, self._deserialize)
61+
self.policy_definitions = PolicyDefinitionsOperations(
62+
self._client, self.config, self._serialize, self._deserialize)
63+
self.policy_set_definitions = PolicySetDefinitionsOperations(
64+
self._client, self.config, self._serialize, self._deserialize)

0 commit comments

Comments
 (0)