Skip to content

Commit dad5ef0

Browse files
authored
Generated from d9b85a4cf98f355219b4d4d3faf53bafcefb3c3a (#4199)
typo: blueprint/resource-manager/Microsoft.Blueprint - fullfillment -> fulfillment - deinition -> definition - policyAssginment -> policyAssignment
1 parent 582ef5a commit dad5ef0

14 files changed

+240
-207
lines changed

azure-mgmt-blueprint/azure/mgmt/blueprint/blueprint_management_client.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from .operations.artifacts_operations import ArtifactsOperations
1818
from .operations.published_blueprints_operations import PublishedBlueprintsOperations
1919
from .operations.published_artifacts_operations import PublishedArtifactsOperations
20-
from .operations.operations import Operations
2120
from .operations.assignments_operations import AssignmentsOperations
2221
from .operations.assignment_operations import AssignmentOperations
2322
from . import models
@@ -64,8 +63,6 @@ class BlueprintManagementClient(SDKClient):
6463
:vartype published_blueprints: azure.mgmt.blueprint.operations.PublishedBlueprintsOperations
6564
:ivar published_artifacts: PublishedArtifacts operations
6665
:vartype published_artifacts: azure.mgmt.blueprint.operations.PublishedArtifactsOperations
67-
:ivar operations: Operations operations
68-
:vartype operations: azure.mgmt.blueprint.operations.Operations
6966
:ivar assignments: Assignments operations
7067
:vartype assignments: azure.mgmt.blueprint.operations.AssignmentsOperations
7168
:ivar assignment_operations: AssignmentOperations operations
@@ -84,6 +81,7 @@ def __init__(
8481
super(BlueprintManagementClient, self).__init__(self.config.credentials, self.config)
8582

8683
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
84+
self.api_version = '2018-11-01-preview'
8785
self._serialize = Serializer(client_models)
8886
self._deserialize = Deserializer(client_models)
8987

@@ -95,8 +93,6 @@ def __init__(
9593
self._client, self.config, self._serialize, self._deserialize)
9694
self.published_artifacts = PublishedArtifactsOperations(
9795
self._client, self.config, self._serialize, self._deserialize)
98-
self.operations = Operations(
99-
self._client, self.config, self._serialize, self._deserialize)
10096
self.assignments = AssignmentsOperations(
10197
self._client, self.config, self._serialize, self._deserialize)
10298
self.assignment_operations = AssignmentOperations(

azure-mgmt-blueprint/azure/mgmt/blueprint/models/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from .resource_group_value_py3 import ResourceGroupValue
3131
from .azure_resource_base_py3 import AzureResourceBase
3232
from .blueprint_resource_status_base_py3 import BlueprintResourceStatusBase
33+
from .user_assigned_identity_py3 import UserAssignedIdentity
3334
from .managed_service_identity_py3 import ManagedServiceIdentity
3435
from .assignment_status_py3 import AssignmentStatus
3536
from .assignment_lock_settings_py3 import AssignmentLockSettings
@@ -61,6 +62,7 @@
6162
from .resource_group_value import ResourceGroupValue
6263
from .azure_resource_base import AzureResourceBase
6364
from .blueprint_resource_status_base import BlueprintResourceStatusBase
65+
from .user_assigned_identity import UserAssignedIdentity
6466
from .managed_service_identity import ManagedServiceIdentity
6567
from .assignment_status import AssignmentStatus
6668
from .assignment_lock_settings import AssignmentLockSettings
@@ -105,6 +107,7 @@
105107
'ResourceGroupValue',
106108
'AzureResourceBase',
107109
'BlueprintResourceStatusBase',
110+
'UserAssignedIdentity',
108111
'ManagedServiceIdentity',
109112
'AssignmentStatus',
110113
'AssignmentLockSettings',

azure-mgmt-blueprint/azure/mgmt/blueprint/models/managed_service_identity.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ class ManagedServiceIdentity(Model):
2525
:type principal_id: str
2626
:param tenant_id: ID of the Azure Active Directory.
2727
:type tenant_id: str
28+
:param user_assigned_identities: The list of user identities associated
29+
with the resource, key will be Azure resource Id of the ManagedIdentity.
30+
:type user_assigned_identities: dict[str,
31+
~azure.mgmt.blueprint.models.UserAssignedIdentity]
2832
"""
2933

3034
_validation = {
@@ -35,10 +39,12 @@ class ManagedServiceIdentity(Model):
3539
'type': {'key': 'type', 'type': 'str'},
3640
'principal_id': {'key': 'principalId', 'type': 'str'},
3741
'tenant_id': {'key': 'tenantId', 'type': 'str'},
42+
'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'},
3843
}
3944

4045
def __init__(self, **kwargs):
4146
super(ManagedServiceIdentity, self).__init__(**kwargs)
4247
self.type = kwargs.get('type', None)
4348
self.principal_id = kwargs.get('principal_id', None)
4449
self.tenant_id = kwargs.get('tenant_id', None)
50+
self.user_assigned_identities = kwargs.get('user_assigned_identities', None)

azure-mgmt-blueprint/azure/mgmt/blueprint/models/managed_service_identity_py3.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ class ManagedServiceIdentity(Model):
2525
:type principal_id: str
2626
:param tenant_id: ID of the Azure Active Directory.
2727
:type tenant_id: str
28+
:param user_assigned_identities: The list of user identities associated
29+
with the resource, key will be Azure resource Id of the ManagedIdentity.
30+
:type user_assigned_identities: dict[str,
31+
~azure.mgmt.blueprint.models.UserAssignedIdentity]
2832
"""
2933

3034
_validation = {
@@ -35,10 +39,12 @@ class ManagedServiceIdentity(Model):
3539
'type': {'key': 'type', 'type': 'str'},
3640
'principal_id': {'key': 'principalId', 'type': 'str'},
3741
'tenant_id': {'key': 'tenantId', 'type': 'str'},
42+
'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'},
3843
}
3944

40-
def __init__(self, *, type, principal_id: str=None, tenant_id: str=None, **kwargs) -> None:
45+
def __init__(self, *, type, principal_id: str=None, tenant_id: str=None, user_assigned_identities=None, **kwargs) -> None:
4146
super(ManagedServiceIdentity, self).__init__(**kwargs)
4247
self.type = type
4348
self.principal_id = principal_id
4449
self.tenant_id = tenant_id
50+
self.user_assigned_identities = user_assigned_identities
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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.serialization import Model
13+
14+
15+
class UserAssignedIdentity(Model):
16+
"""User assigned Identity.
17+
18+
:param principal_id: Azure Active Directory principal ID associated with
19+
this Identity.
20+
:type principal_id: str
21+
:param client_id: Client App Id associated with this identity.
22+
:type client_id: str
23+
"""
24+
25+
_attribute_map = {
26+
'principal_id': {'key': 'principalId', 'type': 'str'},
27+
'client_id': {'key': 'clientId', 'type': 'str'},
28+
}
29+
30+
def __init__(self, **kwargs):
31+
super(UserAssignedIdentity, self).__init__(**kwargs)
32+
self.principal_id = kwargs.get('principal_id', None)
33+
self.client_id = kwargs.get('client_id', None)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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.serialization import Model
13+
14+
15+
class UserAssignedIdentity(Model):
16+
"""User assigned Identity.
17+
18+
:param principal_id: Azure Active Directory principal ID associated with
19+
this Identity.
20+
:type principal_id: str
21+
:param client_id: Client App Id associated with this identity.
22+
:type client_id: str
23+
"""
24+
25+
_attribute_map = {
26+
'principal_id': {'key': 'principalId', 'type': 'str'},
27+
'client_id': {'key': 'clientId', 'type': 'str'},
28+
}
29+
30+
def __init__(self, *, principal_id: str=None, client_id: str=None, **kwargs) -> None:
31+
super(UserAssignedIdentity, self).__init__(**kwargs)
32+
self.principal_id = principal_id
33+
self.client_id = client_id

azure-mgmt-blueprint/azure/mgmt/blueprint/operations/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from .artifacts_operations import ArtifactsOperations
1414
from .published_blueprints_operations import PublishedBlueprintsOperations
1515
from .published_artifacts_operations import PublishedArtifactsOperations
16-
from .operations import Operations
1716
from .assignments_operations import AssignmentsOperations
1817
from .assignment_operations import AssignmentOperations
1918

@@ -22,7 +21,6 @@
2221
'ArtifactsOperations',
2322
'PublishedBlueprintsOperations',
2423
'PublishedArtifactsOperations',
25-
'Operations',
2624
'AssignmentsOperations',
2725
'AssignmentOperations',
2826
]

azure-mgmt-blueprint/azure/mgmt/blueprint/operations/artifacts_operations.py

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ArtifactsOperations(object):
2323
:param config: Configuration of service client.
2424
:param serializer: An object model serializer.
2525
:param deserializer: An object model deserializer.
26-
:ivar api_version: Client Api Version. Constant value: "2017-11-11-preview".
26+
:ivar api_version: Client Api Version. Constant value: "2018-11-01-preview".
2727
"""
2828

2929
models = models
@@ -33,16 +33,19 @@ def __init__(self, client, config, serializer, deserializer):
3333
self._client = client
3434
self._serialize = serializer
3535
self._deserialize = deserializer
36-
self.api_version = "2017-11-11-preview"
36+
self.api_version = "2018-11-01-preview"
3737

3838
self.config = config
3939

4040
def create_or_update(
41-
self, management_group_name, blueprint_name, artifact_name, artifact, custom_headers=None, raw=False, **operation_config):
41+
self, scope, blueprint_name, artifact_name, artifact, custom_headers=None, raw=False, **operation_config):
4242
"""Create or update Blueprint artifact.
4343
44-
:param management_group_name: ManagementGroup where blueprint stores.
45-
:type management_group_name: str
44+
:param scope: The scope of the resource. Valid scopes are: management
45+
group (format:
46+
'/providers/Microsoft.Management/managementGroups/{managementGroup}'),
47+
subscription (format: '/subscriptions/{subscriptionId}').
48+
:type scope: str
4649
:param blueprint_name: name of the blueprint.
4750
:type blueprint_name: str
4851
:param artifact_name: name of the artifact.
@@ -62,7 +65,7 @@ def create_or_update(
6265
# Construct URL
6366
url = self.create_or_update.metadata['url']
6467
path_format_arguments = {
65-
'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'),
68+
'scope': self._serialize.url("scope", scope, 'str', skip_quote=True),
6669
'blueprintName': self._serialize.url("blueprint_name", blueprint_name, 'str'),
6770
'artifactName': self._serialize.url("artifact_name", artifact_name, 'str')
6871
}
@@ -105,14 +108,17 @@ def create_or_update(
105108
return client_raw_response
106109

107110
return deserialized
108-
create_or_update.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}'}
111+
create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}'}
109112

110113
def get(
111-
self, management_group_name, blueprint_name, artifact_name, custom_headers=None, raw=False, **operation_config):
114+
self, scope, blueprint_name, artifact_name, custom_headers=None, raw=False, **operation_config):
112115
"""Get a Blueprint artifact.
113116
114-
:param management_group_name: ManagementGroup where blueprint stores.
115-
:type management_group_name: str
117+
:param scope: The scope of the resource. Valid scopes are: management
118+
group (format:
119+
'/providers/Microsoft.Management/managementGroups/{managementGroup}'),
120+
subscription (format: '/subscriptions/{subscriptionId}').
121+
:type scope: str
116122
:param blueprint_name: name of the blueprint.
117123
:type blueprint_name: str
118124
:param artifact_name: name of the artifact.
@@ -130,7 +136,7 @@ def get(
130136
# Construct URL
131137
url = self.get.metadata['url']
132138
path_format_arguments = {
133-
'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'),
139+
'scope': self._serialize.url("scope", scope, 'str', skip_quote=True),
134140
'blueprintName': self._serialize.url("blueprint_name", blueprint_name, 'str'),
135141
'artifactName': self._serialize.url("artifact_name", artifact_name, 'str')
136142
}
@@ -169,14 +175,17 @@ def get(
169175
return client_raw_response
170176

171177
return deserialized
172-
get.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}'}
178+
get.metadata = {'url': '/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}'}
173179

174180
def delete(
175-
self, management_group_name, blueprint_name, artifact_name, custom_headers=None, raw=False, **operation_config):
181+
self, scope, blueprint_name, artifact_name, custom_headers=None, raw=False, **operation_config):
176182
"""Delete a Blueprint artifact.
177183
178-
:param management_group_name: ManagementGroup where blueprint stores.
179-
:type management_group_name: str
184+
:param scope: The scope of the resource. Valid scopes are: management
185+
group (format:
186+
'/providers/Microsoft.Management/managementGroups/{managementGroup}'),
187+
subscription (format: '/subscriptions/{subscriptionId}').
188+
:type scope: str
180189
:param blueprint_name: name of the blueprint.
181190
:type blueprint_name: str
182191
:param artifact_name: name of the artifact.
@@ -194,7 +203,7 @@ def delete(
194203
# Construct URL
195204
url = self.delete.metadata['url']
196205
path_format_arguments = {
197-
'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'),
206+
'scope': self._serialize.url("scope", scope, 'str', skip_quote=True),
198207
'blueprintName': self._serialize.url("blueprint_name", blueprint_name, 'str'),
199208
'artifactName': self._serialize.url("artifact_name", artifact_name, 'str')
200209
}
@@ -233,14 +242,17 @@ def delete(
233242
return client_raw_response
234243

235244
return deserialized
236-
delete.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}'}
245+
delete.metadata = {'url': '/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}'}
237246

238247
def list(
239-
self, management_group_name, blueprint_name, custom_headers=None, raw=False, **operation_config):
248+
self, scope, blueprint_name, custom_headers=None, raw=False, **operation_config):
240249
"""List artifacts for a given Blueprint.
241250
242-
:param management_group_name: ManagementGroup where blueprint stores.
243-
:type management_group_name: str
251+
:param scope: The scope of the resource. Valid scopes are: management
252+
group (format:
253+
'/providers/Microsoft.Management/managementGroups/{managementGroup}'),
254+
subscription (format: '/subscriptions/{subscriptionId}').
255+
:type scope: str
244256
:param blueprint_name: name of the blueprint.
245257
:type blueprint_name: str
246258
:param dict custom_headers: headers that will be added to the request
@@ -259,7 +271,7 @@ def internal_paging(next_link=None, raw=False):
259271
# Construct URL
260272
url = self.list.metadata['url']
261273
path_format_arguments = {
262-
'managementGroupName': self._serialize.url("management_group_name", management_group_name, 'str'),
274+
'scope': self._serialize.url("scope", scope, 'str', skip_quote=True),
263275
'blueprintName': self._serialize.url("blueprint_name", blueprint_name, 'str')
264276
}
265277
url = self._client.format_url(url, **path_format_arguments)
@@ -302,4 +314,4 @@ def internal_paging(next_link=None, raw=False):
302314
return client_raw_response
303315

304316
return deserialized
305-
list.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts'}
317+
list.metadata = {'url': '/{scope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts'}

0 commit comments

Comments
 (0)