From 695db236121e5b5216e0fde2f442ada75bb0307c Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 10 Sep 2018 12:30:39 -0700 Subject: [PATCH] [AutoPR authorization/resource-manager] Grlin/updatingReqsforRA (#3308) * Generated from a0fcdf6dd585c7663d3d5bf86941f129a799eaf0 Updating 'required' fields in RA request body to match existing stable API requirements * Generated from 113db2d02162a7f11bddeb53673483347e2b3715 Merge branch 'master' into grlin/updatingReqsforRA * Packaging update of azure-mgmt-authorization --- azure-mgmt-authorization/README.rst | 2 +- .../role_assignment_create_parameters.py | 8 +++++++- .../role_assignment_create_parameters_py3.py | 10 ++++++++-- .../models/role_assignment_properties.py | 17 ++++++++++++----- .../models/role_assignment_properties_py3.py | 19 +++++++++++++------ .../operations/role_assignments_operations.py | 4 ++-- .../role_assignment_create_parameters.py | 17 ++++++++++++----- .../role_assignment_create_parameters_py3.py | 19 +++++++++++++------ azure-mgmt-authorization/setup.py | 6 ++++-- 9 files changed, 72 insertions(+), 30 deletions(-) diff --git a/azure-mgmt-authorization/README.rst b/azure-mgmt-authorization/README.rst index efa1778dcf2c..8c6bb060adbc 100644 --- a/azure-mgmt-authorization/README.rst +++ b/azure-mgmt-authorization/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Authorization Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_create_parameters.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_create_parameters.py index 38e1fa3dec04..07b42c6b97c2 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_create_parameters.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_create_parameters.py @@ -15,11 +15,17 @@ class RoleAssignmentCreateParameters(Model): """Role assignment create parameters. - :param properties: Role assignment properties. + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Role assignment properties. :type properties: ~azure.mgmt.authorization.v2015_07_01.models.RoleAssignmentProperties """ + _validation = { + 'properties': {'required': True}, + } + _attribute_map = { 'properties': {'key': 'properties', 'type': 'RoleAssignmentProperties'}, } diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_create_parameters_py3.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_create_parameters_py3.py index 7c284acd5581..827b88f9bf88 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_create_parameters_py3.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_create_parameters_py3.py @@ -15,15 +15,21 @@ class RoleAssignmentCreateParameters(Model): """Role assignment create parameters. - :param properties: Role assignment properties. + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Role assignment properties. :type properties: ~azure.mgmt.authorization.v2015_07_01.models.RoleAssignmentProperties """ + _validation = { + 'properties': {'required': True}, + } + _attribute_map = { 'properties': {'key': 'properties', 'type': 'RoleAssignmentProperties'}, } - def __init__(self, *, properties=None, **kwargs) -> None: + def __init__(self, *, properties, **kwargs) -> None: super(RoleAssignmentCreateParameters, self).__init__(**kwargs) self.properties = properties diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_properties.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_properties.py index 4f50e37e25a4..a8aa4eaefd5e 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_properties.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_properties.py @@ -15,15 +15,22 @@ class RoleAssignmentProperties(Model): """Role assignment properties. - :param role_definition_id: The role definition ID used in the role - assignment. + All required parameters must be populated in order to send to Azure. + + :param role_definition_id: Required. 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. + :param principal_id: Required. 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 """ + _validation = { + 'role_definition_id': {'required': True}, + 'principal_id': {'required': True}, + } + _attribute_map = { 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, 'principal_id': {'key': 'principalId', 'type': 'str'}, diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_properties_py3.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_properties_py3.py index 06c65c31878a..b64107791b2c 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_properties_py3.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_properties_py3.py @@ -15,21 +15,28 @@ class RoleAssignmentProperties(Model): """Role assignment properties. - :param role_definition_id: The role definition ID used in the role - assignment. + All required parameters must be populated in order to send to Azure. + + :param role_definition_id: Required. 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. + :param principal_id: Required. 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 """ + _validation = { + 'role_definition_id': {'required': True}, + 'principal_id': {'required': True}, + } + _attribute_map = { 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, 'principal_id': {'key': 'principalId', 'type': 'str'}, } - def __init__(self, *, role_definition_id: str=None, principal_id: str=None, **kwargs) -> None: + def __init__(self, *, role_definition_id: str, principal_id: str, **kwargs) -> None: super(RoleAssignmentProperties, self).__init__(**kwargs) self.role_definition_id = role_definition_id self.principal_id = principal_id diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/operations/role_assignments_operations.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/operations/role_assignments_operations.py index 61fe76fbbbb4..f9e6785b6c9b 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/operations/role_assignments_operations.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/operations/role_assignments_operations.py @@ -262,7 +262,7 @@ def delete( delete.metadata = {'url': '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'} def create( - self, scope, role_assignment_name, properties=None, custom_headers=None, raw=False, **operation_config): + self, scope, role_assignment_name, properties, custom_headers=None, raw=False, **operation_config): """Creates a role assignment. :param scope: The scope of the role assignment to create. The scope @@ -463,7 +463,7 @@ def delete_by_id( delete_by_id.metadata = {'url': '/{roleAssignmentId}'} def create_by_id( - self, role_assignment_id, properties=None, custom_headers=None, raw=False, **operation_config): + self, role_assignment_id, properties, custom_headers=None, raw=False, **operation_config): """Creates a role assignment by ID. :param role_assignment_id: The fully qualified ID of the role diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview/models/role_assignment_create_parameters.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview/models/role_assignment_create_parameters.py index 5da7259a980e..4405dc8ba3c6 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview/models/role_assignment_create_parameters.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview/models/role_assignment_create_parameters.py @@ -15,18 +15,25 @@ class RoleAssignmentCreateParameters(Model): """Role assignment create parameters. - :param role_definition_id: The role definition ID used in the role - assignment. + All required parameters must be populated in order to send to Azure. + + :param role_definition_id: Required. 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. + :param principal_id: Required. 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 """ + _validation = { + 'role_definition_id': {'required': True}, + 'principal_id': {'required': True}, + } + _attribute_map = { 'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'}, 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview/models/role_assignment_create_parameters_py3.py b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview/models/role_assignment_create_parameters_py3.py index 7570e2aa0234..ebeeef9c1063 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview/models/role_assignment_create_parameters_py3.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview/models/role_assignment_create_parameters_py3.py @@ -15,25 +15,32 @@ class RoleAssignmentCreateParameters(Model): """Role assignment create parameters. - :param role_definition_id: The role definition ID used in the role - assignment. + All required parameters must be populated in order to send to Azure. + + :param role_definition_id: Required. 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. + :param principal_id: Required. 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 """ + _validation = { + 'role_definition_id': {'required': True}, + 'principal_id': {'required': True}, + } + _attribute_map = { '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, *, role_definition_id: str=None, principal_id: str=None, can_delegate: bool=None, **kwargs) -> None: + def __init__(self, *, role_definition_id: str, principal_id: str, can_delegate: bool=None, **kwargs) -> None: super(RoleAssignmentCreateParameters, self).__init__(**kwargs) self.role_definition_id = role_definition_id self.principal_id = principal_id diff --git a/azure-mgmt-authorization/setup.py b/azure-mgmt-authorization/setup.py index a53daab9138c..cf9a3444c247 100644 --- a/azure-mgmt-authorization/setup.py +++ b/azure-mgmt-authorization/setup.py @@ -72,13 +72,15 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'License :: OSI Approved :: MIT License', ], zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure>=0.4.27,<2.0.0', - 'azure-common~=1.1,>=1.1.12', + 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', + 'azure-common~=1.1', ], cmdclass=cmdclass )