diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/authorization_management_client.py b/azure-mgmt-authorization/azure/mgmt/authorization/authorization_management_client.py index f0593558014a..b87160eadd29 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/authorization_management_client.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/authorization_management_client.py @@ -16,8 +16,8 @@ from .operations.classic_administrators_operations import ClassicAdministratorsOperations from .operations.permissions_operations import PermissionsOperations from .operations.provider_operations_metadata_operations import ProviderOperationsMetadataOperations -from .operations.role_assignments_operations import RoleAssignmentsOperations from .operations.role_definitions_operations import RoleDefinitionsOperations +from .operations.role_assignments_operations import RoleAssignmentsOperations from . import models @@ -46,7 +46,7 @@ def __init__( super(AuthorizationManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('authorizationmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-authorization/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials @@ -65,10 +65,10 @@ class AuthorizationManagementClient(object): :vartype permissions: azure.mgmt.authorization.operations.PermissionsOperations :ivar provider_operations_metadata: ProviderOperationsMetadata operations :vartype provider_operations_metadata: azure.mgmt.authorization.operations.ProviderOperationsMetadataOperations - :ivar role_assignments: RoleAssignments operations - :vartype role_assignments: azure.mgmt.authorization.operations.RoleAssignmentsOperations :ivar role_definitions: RoleDefinitions operations :vartype role_definitions: azure.mgmt.authorization.operations.RoleDefinitionsOperations + :ivar role_assignments: RoleAssignments operations + :vartype role_assignments: azure.mgmt.authorization.operations.RoleAssignmentsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -85,7 +85,6 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-07-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -95,7 +94,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.provider_operations_metadata = ProviderOperationsMetadataOperations( self._client, self.config, self._serialize, self._deserialize) - self.role_assignments = RoleAssignmentsOperations( - self._client, self.config, self._serialize, self._deserialize) self.role_definitions = RoleDefinitionsOperations( self._client, self.config, self._serialize, self._deserialize) + self.role_assignments = RoleAssignmentsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/models/__init__.py b/azure-mgmt-authorization/azure/mgmt/authorization/models/__init__.py index d6929bc116e7..c5c241b0b54b 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/__init__.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/__init__.py @@ -9,44 +9,36 @@ # regenerated. # -------------------------------------------------------------------------- -from .role_assignment_filter import RoleAssignmentFilter from .role_definition_filter import RoleDefinitionFilter -from .classic_administrator_properties import ClassicAdministratorProperties from .classic_administrator import ClassicAdministrator from .permission import Permission from .provider_operation import ProviderOperation from .resource_type import ResourceType from .provider_operations_metadata import ProviderOperationsMetadata -from .role_assignment_properties_with_scope import RoleAssignmentPropertiesWithScope +from .role_definition import RoleDefinition +from .role_assignment_filter import RoleAssignmentFilter from .role_assignment import RoleAssignment -from .role_assignment_properties import RoleAssignmentProperties from .role_assignment_create_parameters import RoleAssignmentCreateParameters -from .role_definition_properties import RoleDefinitionProperties -from .role_definition import RoleDefinition from .classic_administrator_paged import ClassicAdministratorPaged from .permission_paged import PermissionPaged from .provider_operations_metadata_paged import ProviderOperationsMetadataPaged -from .role_assignment_paged import RoleAssignmentPaged from .role_definition_paged import RoleDefinitionPaged +from .role_assignment_paged import RoleAssignmentPaged __all__ = [ - 'RoleAssignmentFilter', 'RoleDefinitionFilter', - 'ClassicAdministratorProperties', 'ClassicAdministrator', 'Permission', 'ProviderOperation', 'ResourceType', 'ProviderOperationsMetadata', - 'RoleAssignmentPropertiesWithScope', + 'RoleDefinition', + 'RoleAssignmentFilter', 'RoleAssignment', - 'RoleAssignmentProperties', 'RoleAssignmentCreateParameters', - 'RoleDefinitionProperties', - 'RoleDefinition', 'ClassicAdministratorPaged', 'PermissionPaged', 'ProviderOperationsMetadataPaged', - 'RoleAssignmentPaged', 'RoleDefinitionPaged', + 'RoleAssignmentPaged', ] diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/models/classic_administrator.py b/azure-mgmt-authorization/azure/mgmt/authorization/models/classic_administrator.py index 25efd96c0bc4..8fce28f9dc4a 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/classic_administrator.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/classic_administrator.py @@ -21,20 +21,24 @@ class ClassicAdministrator(Model): :type name: str :param type: The type of the administrator. :type type: str - :param properties: Properties for the classic administrator. - :type properties: - ~azure.mgmt.authorization.models.ClassicAdministratorProperties + :param email_address: The email address of the administrator. + :type email_address: str + :param role: The role of the administrator. + :type role: str """ _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ClassicAdministratorProperties'}, + 'email_address': {'key': 'properties.emailAddress', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'str'}, } - def __init__(self, id=None, name=None, type=None, properties=None): + def __init__(self, id=None, name=None, type=None, email_address=None, role=None): + super(ClassicAdministrator, self).__init__() self.id = id self.name = name self.type = type - self.properties = properties + self.email_address = email_address + self.role = role diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/models/classic_administrator_properties.py b/azure-mgmt-authorization/azure/mgmt/authorization/models/classic_administrator_properties.py deleted file mode 100644 index b07e4e172d7b..000000000000 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/classic_administrator_properties.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClassicAdministratorProperties(Model): - """Classic Administrator properties. - - :param email_address: The email address of the administrator. - :type email_address: str - :param role: The role of the administrator. - :type role: str - """ - - _attribute_map = { - 'email_address': {'key': 'emailAddress', 'type': 'str'}, - 'role': {'key': 'role', 'type': 'str'}, - } - - def __init__(self, email_address=None, role=None): - self.email_address = email_address - self.role = role diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/models/permission.py b/azure-mgmt-authorization/azure/mgmt/authorization/models/permission.py index 7efd4cdc6b8e..92ce04b27f8b 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/permission.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/permission.py @@ -27,5 +27,6 @@ class Permission(Model): } def __init__(self, actions=None, not_actions=None): + super(Permission, self).__init__() self.actions = actions self.not_actions = not_actions diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/models/provider_operation.py b/azure-mgmt-authorization/azure/mgmt/authorization/models/provider_operation.py index 90fc912b059a..4d0cf351787f 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/provider_operation.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/provider_operation.py @@ -36,6 +36,7 @@ class ProviderOperation(Model): } def __init__(self, name=None, display_name=None, description=None, origin=None, properties=None): + super(ProviderOperation, self).__init__() self.name = name self.display_name = display_name self.description = description diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/models/provider_operations_metadata.py b/azure-mgmt-authorization/azure/mgmt/authorization/models/provider_operations_metadata.py index 44e25c5a7d19..24b752495034 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/provider_operations_metadata.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/provider_operations_metadata.py @@ -39,6 +39,7 @@ class ProviderOperationsMetadata(Model): } def __init__(self, id=None, name=None, type=None, display_name=None, resource_types=None, operations=None): + super(ProviderOperationsMetadata, self).__init__() self.id = id self.name = name self.type = type diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/models/resource_type.py b/azure-mgmt-authorization/azure/mgmt/authorization/models/resource_type.py index b5e89bef963a..7b14f1ab2dba 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/resource_type.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/resource_type.py @@ -30,6 +30,7 @@ class ResourceType(Model): } def __init__(self, name=None, display_name=None, operations=None): + super(ResourceType, self).__init__() self.name = name self.display_name = display_name self.operations = operations diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment.py b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment.py index f902eccea1a3..af2889bbd065 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment.py @@ -15,26 +15,47 @@ class RoleAssignment(Model): """Role Assignments. - :param id: The role assignment ID. - :type id: str - :param name: The role assignment name. - :type name: str - :param type: The role assignment type. - :type type: str - :param properties: Role assignment properties. - :type properties: - ~azure.mgmt.authorization.models.RoleAssignmentPropertiesWithScope + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The role assignment ID. + :vartype id: str + :ivar name: The role assignment name. + :vartype name: str + :ivar type: The role assignment type. + :vartype type: str + :param scope: The role assignment scope. + :type scope: str + :param role_definition_id: The role definition ID. + :type role_definition_id: str + :param principal_id: The principal ID. + :type principal_id: str + :param can_delegate: The Delegation flag for the roleassignment + :type can_delegate: bool """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'RoleAssignmentPropertiesWithScope'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'}, + 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, + 'can_delegate': {'key': 'properties.canDelegate', 'type': 'bool'}, } - def __init__(self, id=None, name=None, type=None, properties=None): - self.id = id - self.name = name - self.type = type - self.properties = properties + def __init__(self, scope=None, role_definition_id=None, principal_id=None, can_delegate=None): + super(RoleAssignment, self).__init__() + self.id = None + self.name = None + self.type = None + self.scope = scope + self.role_definition_id = role_definition_id + self.principal_id = principal_id + self.can_delegate = can_delegate diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment_create_parameters.py b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment_create_parameters.py index 758231145cbc..159a5b88b8fa 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment_create_parameters.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment_create_parameters.py @@ -15,14 +15,26 @@ class RoleAssignmentCreateParameters(Model): """Role assignment create parameters. - :param properties: Role assignment properties. - :type properties: - ~azure.mgmt.authorization.models.RoleAssignmentProperties + :param role_definition_id: The role definition ID used in the role + assignment. + :type role_definition_id: str + :param principal_id: The principal ID assigned to the role. This maps to + the ID inside the Active Directory. It can point to a user, service + principal, or security group. + :type principal_id: str + :param can_delegate: The delgation flag used for creating a role + assignment + :type can_delegate: bool """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RoleAssignmentProperties'}, + 'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'}, + 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, + 'can_delegate': {'key': 'properties.canDelegate', 'type': 'bool'}, } - def __init__(self, properties=None): - self.properties = properties + def __init__(self, role_definition_id=None, principal_id=None, can_delegate=None): + super(RoleAssignmentCreateParameters, self).__init__() + self.role_definition_id = role_definition_id + self.principal_id = principal_id + self.can_delegate = can_delegate diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment_filter.py b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment_filter.py index 9245c6be8bde..0c3d1d00755d 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment_filter.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment_filter.py @@ -17,11 +17,16 @@ class RoleAssignmentFilter(Model): :param principal_id: Returns role assignment of the specific principal. :type principal_id: str + :param can_delegate: The Delegation flag for the roleassignment + :type can_delegate: bool """ _attribute_map = { 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'can_delegate': {'key': 'canDelegate', 'type': 'bool'}, } - def __init__(self, principal_id=None): + def __init__(self, principal_id=None, can_delegate=None): + super(RoleAssignmentFilter, self).__init__() self.principal_id = principal_id + self.can_delegate = can_delegate diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment_properties.py b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment_properties.py deleted file mode 100644 index 1548fe078839..000000000000 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment_properties.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoleAssignmentProperties(Model): - """Role assignment properties. - - :param role_definition_id: The role definition ID used in the role - assignment. - :type role_definition_id: str - :param principal_id: The principal ID assigned to the role. This maps to - the ID inside the Active Directory. It can point to a user, service - principal, or security group. - :type principal_id: str - """ - - _attribute_map = { - 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - } - - def __init__(self, role_definition_id=None, principal_id=None): - self.role_definition_id = role_definition_id - self.principal_id = principal_id diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment_properties_with_scope.py b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment_properties_with_scope.py deleted file mode 100644 index 87a5240e9024..000000000000 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment_properties_with_scope.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoleAssignmentPropertiesWithScope(Model): - """Role assignment properties with scope. - - :param scope: The role assignment scope. - :type scope: str - :param role_definition_id: The role definition ID. - :type role_definition_id: str - :param principal_id: The principal ID. - :type principal_id: str - """ - - _attribute_map = { - 'scope': {'key': 'scope', 'type': 'str'}, - 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - } - - def __init__(self, scope=None, role_definition_id=None, principal_id=None): - self.scope = scope - self.role_definition_id = role_definition_id - self.principal_id = principal_id diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_definition.py b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_definition.py index a4a964be8195..86950ebb8b7b 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_definition.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_definition.py @@ -15,26 +15,51 @@ class RoleDefinition(Model): """Role definition. - :param id: The role definition ID. - :type id: str - :param name: The role definition name. - :type name: str - :param type: The role definition type. - :type type: str - :param properties: Role definition properties. - :type properties: - ~azure.mgmt.authorization.models.RoleDefinitionProperties + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The role definition ID. + :vartype id: str + :ivar name: The role definition name. + :vartype name: str + :ivar type: The role definition type. + :vartype type: str + :param role_name: The role name. + :type role_name: str + :param description: The role definition description. + :type description: str + :param role_type: The role type. + :type role_type: str + :param permissions: Role definition permissions. + :type permissions: list[~azure.mgmt.authorization.models.Permission] + :param assignable_scopes: Role definition assignable scopes. + :type assignable_scopes: list[str] """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'RoleDefinitionProperties'}, + 'role_name': {'key': 'properties.roleName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'role_type': {'key': 'properties.type', 'type': 'str'}, + 'permissions': {'key': 'properties.permissions', 'type': '[Permission]'}, + 'assignable_scopes': {'key': 'properties.assignableScopes', 'type': '[str]'}, } - def __init__(self, id=None, name=None, type=None, properties=None): - self.id = id - self.name = name - self.type = type - self.properties = properties + def __init__(self, role_name=None, description=None, role_type=None, permissions=None, assignable_scopes=None): + super(RoleDefinition, self).__init__() + self.id = None + self.name = None + self.type = None + self.role_name = role_name + self.description = description + self.role_type = role_type + self.permissions = permissions + self.assignable_scopes = assignable_scopes diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_definition_filter.py b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_definition_filter.py index 4a59d8828754..12ebc15ab56a 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_definition_filter.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_definition_filter.py @@ -24,4 +24,5 @@ class RoleDefinitionFilter(Model): } def __init__(self, role_name=None): + super(RoleDefinitionFilter, self).__init__() self.role_name = role_name diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_definition_properties.py b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_definition_properties.py deleted file mode 100644 index 9f6d8c4378a4..000000000000 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_definition_properties.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoleDefinitionProperties(Model): - """Role definition properties. - - :param role_name: The role name. - :type role_name: str - :param description: The role definition description. - :type description: str - :param type: The role type. - :type type: str - :param permissions: Role definition permissions. - :type permissions: list[~azure.mgmt.authorization.models.Permission] - :param assignable_scopes: Role definition assignable scopes. - :type assignable_scopes: list[str] - """ - - _attribute_map = { - 'role_name': {'key': 'roleName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'permissions': {'key': 'permissions', 'type': '[Permission]'}, - 'assignable_scopes': {'key': 'assignableScopes', 'type': '[str]'}, - } - - def __init__(self, role_name=None, description=None, type=None, permissions=None, assignable_scopes=None): - self.role_name = role_name - self.description = description - self.type = type - self.permissions = permissions - self.assignable_scopes = assignable_scopes diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/operations/__init__.py b/azure-mgmt-authorization/azure/mgmt/authorization/operations/__init__.py index d0f4cbe64419..ce96aa8fa186 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/operations/__init__.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/operations/__init__.py @@ -12,13 +12,13 @@ from .classic_administrators_operations import ClassicAdministratorsOperations from .permissions_operations import PermissionsOperations from .provider_operations_metadata_operations import ProviderOperationsMetadataOperations -from .role_assignments_operations import RoleAssignmentsOperations from .role_definitions_operations import RoleDefinitionsOperations +from .role_assignments_operations import RoleAssignmentsOperations __all__ = [ 'ClassicAdministratorsOperations', 'PermissionsOperations', 'ProviderOperationsMetadataOperations', - 'RoleAssignmentsOperations', 'RoleDefinitionsOperations', + 'RoleAssignmentsOperations', ] diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/operations/classic_administrators_operations.py b/azure-mgmt-authorization/azure/mgmt/authorization/operations/classic_administrators_operations.py index 881f1ca1466c..9dc4c1e64a36 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/operations/classic_administrators_operations.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/operations/classic_administrators_operations.py @@ -25,6 +25,8 @@ class ClassicAdministratorsOperations(object): :param deserializer: An objec model deserializer. """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -81,7 +83,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/operations/permissions_operations.py b/azure-mgmt-authorization/azure/mgmt/authorization/operations/permissions_operations.py index 9f3fff7f2d2c..7d0175ffbe2f 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/operations/permissions_operations.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/operations/permissions_operations.py @@ -26,6 +26,8 @@ class PermissionsOperations(object): :ivar api_version: The API version to use for this operation. Constant value: "2015-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -84,7 +86,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -166,7 +168,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/operations/provider_operations_metadata_operations.py b/azure-mgmt-authorization/azure/mgmt/authorization/operations/provider_operations_metadata_operations.py index e65699e3bc63..4357c206db33 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/operations/provider_operations_metadata_operations.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/operations/provider_operations_metadata_operations.py @@ -25,6 +25,8 @@ class ProviderOperationsMetadataOperations(object): :param deserializer: An objec model deserializer. """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -79,7 +81,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -144,7 +146,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/operations/role_assignments_operations.py b/azure-mgmt-authorization/azure/mgmt/authorization/operations/role_assignments_operations.py index df2216cd437c..dd961133cf56 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/operations/role_assignments_operations.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/operations/role_assignments_operations.py @@ -23,15 +23,17 @@ class RoleAssignmentsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An objec model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-07-01". + :ivar api_version: The API version to use for this operation. Constant value: "2017-10-01-preview". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-07-01" + self.api_version = "2017-10-01-preview" self.config = config @@ -104,7 +106,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -178,7 +180,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -240,7 +242,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -259,7 +261,7 @@ def delete( return deserialized def create( - self, scope, role_assignment_name, properties=None, custom_headers=None, raw=False, **operation_config): + self, scope, role_assignment_name, parameters, custom_headers=None, raw=False, **operation_config): """Creates a role assignment. :param scope: The scope of the role assignment to create. The scope @@ -273,9 +275,9 @@ def create( :param role_assignment_name: The name of the role assignment to create. It can be any valid GUID. :type role_assignment_name: str - :param properties: Role assignment properties. - :type properties: - ~azure.mgmt.authorization.models.RoleAssignmentProperties + :param parameters: Parameters for the role assignment. + :type parameters: + ~azure.mgmt.authorization.models.RoleAssignmentCreateParameters :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -286,8 +288,6 @@ def create( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - parameters = models.RoleAssignmentCreateParameters(properties=properties) - # Construct URL url = '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}' path_format_arguments = { @@ -316,7 +316,7 @@ def create( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [201]: exp = CloudError(response) @@ -376,7 +376,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -398,12 +398,7 @@ def delete_by_id( self, role_assignment_id, custom_headers=None, raw=False, **operation_config): """Deletes a role assignment. - :param role_assignment_id: The fully qualified ID of the role - assignment, including the scope, resource name and resource type. Use - the format, - /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. - Example: - /subscriptions/{subId}/resourcegroups/{rgname}//providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. + :param role_assignment_id: The ID of the role assignment to delete. :type role_assignment_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -438,7 +433,7 @@ def delete_by_id( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -457,19 +452,14 @@ def delete_by_id( return deserialized def create_by_id( - self, role_assignment_id, properties=None, custom_headers=None, raw=False, **operation_config): + self, role_assignment_id, parameters, custom_headers=None, raw=False, **operation_config): """Creates a role assignment by ID. - :param role_assignment_id: The fully qualified ID of the role - assignment, including the scope, resource name and resource type. Use - the format, - /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. - Example: - /subscriptions/{subId}/resourcegroups/{rgname}//providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. + :param role_assignment_id: The ID of the role assignment to create. :type role_assignment_id: str - :param properties: Role assignment properties. - :type properties: - ~azure.mgmt.authorization.models.RoleAssignmentProperties + :param parameters: Parameters for the role assignment. + :type parameters: + ~azure.mgmt.authorization.models.RoleAssignmentCreateParameters :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -480,8 +470,6 @@ def create_by_id( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - parameters = models.RoleAssignmentCreateParameters(properties=properties) - # Construct URL url = '/{roleAssignmentId}' path_format_arguments = { @@ -509,7 +497,7 @@ def create_by_id( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [201]: exp = CloudError(response) @@ -531,12 +519,7 @@ def get_by_id( self, role_assignment_id, custom_headers=None, raw=False, **operation_config): """Gets a role assignment by ID. - :param role_assignment_id: The fully qualified ID of the role - assignment, including the scope, resource name and resource type. Use - the format, - /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. - Example: - /subscriptions/{subId}/resourcegroups/{rgname}//providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. + :param role_assignment_id: The ID of the role assignment to get. :type role_assignment_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -571,7 +554,7 @@ def get_by_id( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -641,7 +624,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -714,7 +697,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/operations/role_definitions_operations.py b/azure-mgmt-authorization/azure/mgmt/authorization/operations/role_definitions_operations.py index f20886e85470..0cba87c1b59e 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/operations/role_definitions_operations.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/operations/role_definitions_operations.py @@ -26,6 +26,8 @@ class RoleDefinitionsOperations(object): :ivar api_version: The API version to use for this operation. Constant value: "2015-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -77,7 +79,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -137,7 +139,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -203,7 +205,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [201]: exp = CloudError(response) @@ -265,7 +267,7 @@ def get_by_id( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -335,7 +337,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/version.py b/azure-mgmt-authorization/azure/mgmt/authorization/version.py index b9a4e2bd3544..57866fdf17d0 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/version.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.30.0" +VERSION = "0.40.0" diff --git a/azure-mgmt-authorization/build.json b/azure-mgmt-authorization/build.json index 3141ecaf1a95..2cdf0104762f 100644 --- a/azure-mgmt-authorization/build.json +++ b/azure-mgmt-authorization/build.json @@ -65,6 +65,57 @@ }, "installationPath": "/root/.autorest" }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.0.21", + "dependencies": { + "dotnet-2.0.0": "^1.3.2" + }, + "optionalDependencies": {}, + "devDependencies": { + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.1.1", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.0.21", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, { "resolvedInfo": null, "packageMetadata": { @@ -120,13 +171,13 @@ "resolvedInfo": null, "packageMetadata": { "name": "@microsoft.azure/autorest.python", - "version": "2.0.17", + "version": "2.0.23", "dependencies": { "dotnet-2.0.0": "^1.4.4" }, "optionalDependencies": {}, "devDependencies": { - "@microsoft.azure/autorest.testserver": "^1.9.0", + "@microsoft.azure/autorest.testserver": "1.9.2", "autorest": "^2.0.0", "coffee-script": "^1.11.1", "dotnet-sdk-2.0.0": "^1.4.4", @@ -146,22 +197,22 @@ "bundleDependencies": false, "peerDependencies": {}, "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.0.17/node_modules/@microsoft.azure/autorest.python", - "_shasum": "84a951c19c502343726cfe33cf43cefa76219b39", + "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.0.23/node_modules/@microsoft.azure/autorest.python", + "_shasum": "3eb527ad41b3bf3c0447faa2e6c174460a3cd2a0", "_shrinkwrap": null, "bin": null, - "_id": "@microsoft.azure/autorest.python@2.0.17", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.17/node_modules/@microsoft.azure/autorest.python", + "_id": "@microsoft.azure/autorest.python@2.0.23", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.23/node_modules/@microsoft.azure/autorest.python", "_requested": { "type": "directory", "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.0.17/node_modules/@microsoft.azure/autorest.python", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.17/node_modules/@microsoft.azure/autorest.python", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.17/node_modules/@microsoft.azure/autorest.python", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.17/node_modules/@microsoft.azure/autorest.python" + "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.0.23/node_modules/@microsoft.azure/autorest.python", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.23/node_modules/@microsoft.azure/autorest.python", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.23/node_modules/@microsoft.azure/autorest.python", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.23/node_modules/@microsoft.azure/autorest.python" }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.17/node_modules/@microsoft.azure/autorest.python", - "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.0.17/node_modules/@microsoft.azure/autorest.python" + "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.23/node_modules/@microsoft.azure/autorest.python", + "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.0.23/node_modules/@microsoft.azure/autorest.python" }, "extensionManager": { "installationPath": "/root/.autorest", @@ -170,14 +221,5 @@ "installationPath": "/root/.autorest" } ], - "autorest_bootstrap": { - "dependencies": { - "autorest": { - "version": "2.0.4147", - "from": "autorest@latest", - "resolved": "https://registry.npmjs.org/autorest/-/autorest-2.0.4147.tgz" - } - } - }, - "date": "2017-10-17T19:17:51Z" + "autorest_bootstrap": {} } \ No newline at end of file