Skip to content

Commit

Permalink
[AutoPR authorization/resource-manager] Grlin/updatingReqsforRA (#3308)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
AutorestCI authored Sep 10, 2018
1 parent 5aabd35 commit 695db23
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 30 deletions.
2 changes: 1 addition & 1 deletion azure-mgmt-authorization/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions azure-mgmt-authorization/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

0 comments on commit 695db23

Please sign in to comment.