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 a0f4385db46a..941f11f4e03b 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/authorization_management_client.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/authorization_management_client.py @@ -29,11 +29,9 @@ class AuthorizationManagementClientConfiguration(AzureConfiguration): :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param subscription_id: Gets subscription credentials which uniquely - identify Microsoft Azure subscription. The subscription ID forms part of - the URI for every service call. + :param subscription_id: The ID of the target subscription. :type subscription_id: str - :param api_version: Client Api Version. + :param api_version: The API version to use for this operation. :type api_version: str :param accept_language: Gets or sets the preferred language for the response. @@ -79,7 +77,7 @@ def __init__( class AuthorizationManagementClient(object): - """AuthorizationManagementClient + """Role based access control provides you a way to apply granular level policy administration down to individual resources or resource groups. These operations enable you to manage role definitions and role assignments. A role definition describes the set of actions that can be performed on resources. A role assignment grants access to Azure Active Directory users. :ivar config: Configuration for client. :vartype config: AuthorizationManagementClientConfiguration @@ -98,11 +96,9 @@ class AuthorizationManagementClient(object): :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param subscription_id: Gets subscription credentials which uniquely - identify Microsoft Azure subscription. The subscription ID forms part of - the URI for every service call. + :param subscription_id: The ID of the target subscription. :type subscription_id: str - :param api_version: Client Api Version. + :param api_version: The API version to use for this operation. :type api_version: str :param accept_language: Gets or sets the preferred language for the response. 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 0c87b7d9b558..fb80767e1fc7 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/classic_administrator.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/classic_administrator.py @@ -15,13 +15,13 @@ class ClassicAdministrator(Model): """Classic Administrators. - :param id: Gets or sets the classic administrator id. + :param id: The ID of the administrator. :type id: str - :param name: Gets or sets the classic administrator name. + :param name: The name of the administrator. :type name: str - :param type: Gets or sets the classic administrator type. + :param type: The type of the administrator. :type type: str - :param properties: Gets or sets the classic administrator properties. + :param properties: Properties for the classic administrator. :type properties: :class:`ClassicAdministratorProperties ` """ 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 index f458c20324dc..67980b657505 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/classic_administrator_properties.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/classic_administrator_properties.py @@ -15,9 +15,9 @@ class ClassicAdministratorProperties(Model): """Classic Administrator properties. - :param email_address: Gets or sets the email address + :param email_address: The email address of the administrator. :type email_address: str - :param role: Gets or sets the role + :param role: The role of the administrator. :type role: str """ diff --git a/azure-mgmt-authorization/azure/mgmt/authorization/models/permission.py b/azure-mgmt-authorization/azure/mgmt/authorization/models/permission.py index 96dbca87571f..bafacff98b6b 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/permission.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/permission.py @@ -15,9 +15,9 @@ class Permission(Model): """Role definition permissions. - :param actions: Role definition allowed actions. + :param actions: Allowed actions. :type actions: list of str - :param not_actions: Role definition denied actions. + :param not_actions: Denied actions. :type not_actions: list of str """ 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 0def51340105..acfc11b41500 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/provider_operation.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/provider_operation.py @@ -15,15 +15,15 @@ class ProviderOperation(Model): """Operation. - :param name: Gets or sets the operation name + :param name: The operation name. :type name: str - :param display_name: Gets or sets the operation display name + :param display_name: The operation display name. :type display_name: str - :param description: Gets or sets the operation description + :param description: The operation description. :type description: str - :param origin: Gets or sets the operation origin + :param origin: The operation origin. :type origin: str - :param properties: Gets or sets the operation properties + :param properties: The operation properties. :type properties: object """ 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 381ce8bfb011..c60d870d6170 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 @@ -15,18 +15,18 @@ class ProviderOperationsMetadata(Model): """Provider Operations metadata. - :param id: Gets or sets the provider id. + :param id: The provider id. :type id: str - :param name: Gets or sets the provider name + :param name: The provider name. :type name: str - :param type: Gets or sets the provider type + :param type: The provider type. :type type: str - :param display_name: Gets or sets the provider display name + :param display_name: The provider display name. :type display_name: str - :param resource_types: Gets or sets the provider resource types + :param resource_types: The provider resource types :type resource_types: list of :class:`ResourceType ` - :param operations: Gets or sets the provider operations + :param operations: The provider operations. :type operations: list of :class:`ProviderOperation ` """ 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 8fb5816b2e31..e6450e59a1e8 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/resource_type.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/resource_type.py @@ -15,11 +15,11 @@ class ResourceType(Model): """Resource Type. - :param name: Gets or sets the resource type name + :param name: The resource type name. :type name: str - :param display_name: Gets or sets the resource type display name + :param display_name: The resource type display name. :type display_name: str - :param operations: Gets or sets the resource type operations + :param operations: The resource type operations. :type operations: list of :class:`ProviderOperation ` """ 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 8383a9bb84ec..3e9a55158231 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment.py @@ -15,13 +15,13 @@ class RoleAssignment(Model): """Role Assignments. - :param id: Gets or sets role assignment id. + :param id: The role assignment ID. :type id: str - :param name: Gets or sets role assignment name. + :param name: The role assignment name. :type name: str - :param type: Gets or sets role assignment type. + :param type: The role assignment type. :type type: str - :param properties: Gets or sets role assignment properties. + :param properties: Role assignment properties. :type properties: :class:`RoleAssignmentPropertiesWithScope ` """ 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 346b05b2a07e..ea3a96d00461 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,7 +15,7 @@ class RoleAssignmentCreateParameters(Model): """Role assignment create parameters. - :param properties: Gets or sets role assignment properties. + :param properties: Role assignment properties. :type properties: :class:`RoleAssignmentProperties ` """ 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 index 3d44f71ee5ec..53fa825d2aa9 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment_properties.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_assignment_properties.py @@ -15,9 +15,12 @@ class RoleAssignmentProperties(Model): """Role assignment properties. - :param role_definition_id: Gets or sets role definition id. + :param role_definition_id: The role definition ID used in the role + assignment. :type role_definition_id: str - :param principal_id: Gets or sets principal Id. + :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 """ 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 index 834db2a3cd03..b0571c0778af 100644 --- 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 @@ -15,11 +15,11 @@ class RoleAssignmentPropertiesWithScope(Model): """Role assignment properties with scope. - :param scope: Gets or sets role assignment scope. + :param scope: The role assignment scope. :type scope: str - :param role_definition_id: Gets or sets role definition id. + :param role_definition_id: The role definition ID. :type role_definition_id: str - :param principal_id: Gets or sets principal Id. + :param principal_id: The principal ID. :type principal_id: str """ 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 2359639df477..daf63b523b18 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_definition.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_definition.py @@ -15,13 +15,13 @@ class RoleDefinition(Model): """Role definition. - :param id: Gets or sets role definition id. + :param id: The role definition ID. :type id: str - :param name: Gets or sets role definition name. + :param name: The role definition name. :type name: str - :param type: Gets or sets role definition type. + :param type: The role definition type. :type type: str - :param properties: Gets or sets role definition properties. + :param properties: Role definition properties. :type properties: :class:`RoleDefinitionProperties ` """ 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 index 817817de5ce7..9265805b525f 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/models/role_definition_properties.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/models/role_definition_properties.py @@ -15,16 +15,16 @@ class RoleDefinitionProperties(Model): """Role definition properties. - :param role_name: Gets or sets role name. + :param role_name: The role name. :type role_name: str - :param description: Gets or sets role definition description. + :param description: The role definition description. :type description: str - :param type: Gets or sets role type. + :param type: The role type. :type type: str - :param permissions: Gets or sets role definition permissions. + :param permissions: Role definition permissions. :type permissions: list of :class:`Permission ` - :param assignable_scopes: Gets or sets role definition assignable scopes. + :param assignable_scopes: Role definition assignable scopes. :type assignable_scopes: list of str """ 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 1ea39d95ced7..e5c1c51d534c 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 @@ -35,9 +35,10 @@ def __init__(self, client, config, serializer, deserializer): def list( self, api_version, custom_headers=None, raw=False, **operation_config): - """Gets a list of classic administrators for the subscription. + """Gets service administrator, account administrator, and + co-administrators for the subscription. - :param api_version: + :param api_version: The API version to use for this operation. :type api_version: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -46,6 +47,7 @@ def list( overrides`. :rtype: :class:`ClassicAdministratorPaged ` + :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): 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 e5ca22202697..735dd1457d33 100644 --- a/azure-mgmt-authorization/azure/mgmt/authorization/operations/permissions_operations.py +++ b/azure-mgmt-authorization/azure/mgmt/authorization/operations/permissions_operations.py @@ -35,10 +35,10 @@ def __init__(self, client, config, serializer, deserializer): def list_for_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a resource group permissions. + """Gets all permissions the caller has for a resource group. - :param resource_group_name: Name of the resource group to get the - permissions for.The name is case insensitive. + :param resource_group_name: The name of the resource group to get the + permissions for. The name is case insensitive. :type resource_group_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -47,6 +47,7 @@ def list_for_resource_group( overrides`. :rtype: :class:`PermissionPaged ` + :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -101,18 +102,20 @@ def internal_paging(next_link=None, raw=False): def list_for_resource( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a resource permissions. + """Gets all permissions the caller has for a resource. - :param resource_group_name: The name of the resource group. The name - is case insensitive. + :param resource_group_name: The name of the resource group containing + the resource. The name is case insensitive. :type resource_group_name: str - :param resource_provider_namespace: Resource + :param resource_provider_namespace: The namespace of the resource + provider. :type resource_provider_namespace: str - :param parent_resource_path: Resource + :param parent_resource_path: The parent resource identity. :type parent_resource_path: str - :param resource_type: Resource + :param resource_type: The resource type of the resource. :type resource_type: str - :param resource_name: Resource + :param resource_name: The name of the resource to get the permissions + for. :type resource_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -121,6 +124,7 @@ def list_for_resource( overrides`. :rtype: :class:`PermissionPaged ` + :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): 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 691f3c550782..a50bbb5293b1 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 @@ -35,14 +35,14 @@ def __init__(self, client, config, serializer, deserializer): def get( self, resource_provider_namespace, api_version, expand="resourceTypes", custom_headers=None, raw=False, **operation_config): - """Gets provider operations metadata. + """Gets provider operations metadata for the specified resource provider. - :param resource_provider_namespace: Namespace of the resource + :param resource_provider_namespace: The namespace of the resource provider. :type resource_provider_namespace: str - :param api_version: + :param api_version: The API version to use for the operation. :type api_version: str - :param expand: + :param expand: Specifies whether to expand the values. :type expand: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -53,6 +53,7 @@ def get( ` :rtype: :class:`ClientRawResponse` if raw=true + :raises: :class:`CloudError` """ # Construct URL url = '/providers/Microsoft.Authorization/providerOperations/{resourceProviderNamespace}' @@ -99,11 +100,11 @@ def get( def list( self, api_version, expand="resourceTypes", custom_headers=None, raw=False, **operation_config): - """Gets provider operations metadata list. + """Gets provider operations metadata for all resource providers. - :param api_version: + :param api_version: The API version to use for this operation. :type api_version: str - :param expand: + :param expand: Specifies whether to expand the values. :type expand: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -112,6 +113,7 @@ def list( overrides`. :rtype: :class:`ProviderOperationsMetadataPaged ` + :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): 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 ec81489984c4..29316c12de8f 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 @@ -35,19 +35,24 @@ def __init__(self, client, config, serializer, deserializer): def list_for_resource( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets role assignments of the resource. + """Gets role assignments for a resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param resource_provider_namespace: Resource identity. + :param resource_provider_namespace: The namespace of the resource + provider. :type resource_provider_namespace: str - :param parent_resource_path: Resource identity. + :param parent_resource_path: The parent resource identity. :type parent_resource_path: str - :param resource_type: Resource identity. + :param resource_type: The resource type of the resource. :type resource_type: str - :param resource_name: Resource identity. + :param resource_name: The name of the resource to get role + assignments for. :type resource_name: str - :param filter: The filter to apply on the operation. + :param filter: The filter to apply on the operation. Use + $filter=atScope() to return all role assignments at or above the + scope. Use $filter=principalId eq {id} to return all role + assignments at, above or below the scope for the specified principal. :type filter: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -56,6 +61,7 @@ def list_for_resource( overrides`. :rtype: :class:`RoleAssignmentPaged ` + :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -116,11 +122,14 @@ def internal_paging(next_link=None, raw=False): def list_for_resource_group( self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets role assignments of the resource group. + """Gets role assignments for a resource group. - :param resource_group_name: Resource group name. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param filter: The filter to apply on the operation. + :param filter: The filter to apply on the operation. Use + $filter=atScope() to return all role assignments at or above the + scope. Use $filter=principalId eq {id} to return all role + assignments at, above or below the scope for the specified principal. :type filter: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -129,6 +138,7 @@ def list_for_resource_group( overrides`. :rtype: :class:`RoleAssignmentPaged ` + :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -185,11 +195,12 @@ def internal_paging(next_link=None, raw=False): def delete( self, scope, role_assignment_name, custom_headers=None, raw=False, **operation_config): - """Delete role assignment. + """Deletes a role assignment. - :param scope: Scope. + :param scope: The scope of the role assignment to delete. :type scope: str - :param role_assignment_name: Role assignment name. + :param role_assignment_name: The name of the role assignment to + delete. :type role_assignment_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -200,6 +211,7 @@ def delete( ` :rtype: :class:`ClientRawResponse` if raw=true + :raises: :class:`CloudError` """ # Construct URL url = '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}' @@ -245,13 +257,20 @@ def delete( def create( self, scope, role_assignment_name, properties=None, custom_headers=None, raw=False, **operation_config): - """Create role assignment. - - :param scope: Scope. + """Creates a role assignment. + + :param scope: The scope of the role assignment to create. The scope + can be any REST resource instance. For example, use + '/subscriptions/{subscription-id}/' for a subscription, + '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' + for a resource group, and + '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' + for a resource. :type scope: str - :param role_assignment_name: Role assignment name. + :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: Gets or sets role assignment properties. + :param properties: Role assignment properties. :type properties: :class:`RoleAssignmentProperties ` :param dict custom_headers: headers that will be added to the request @@ -263,6 +282,7 @@ def create( ` :rtype: :class:`ClientRawResponse` if raw=true + :raises: :class:`CloudError` """ parameters = models.RoleAssignmentCreateParameters(properties=properties) @@ -314,11 +334,11 @@ def create( def get( self, scope, role_assignment_name, custom_headers=None, raw=False, **operation_config): - """Get single role assignment. + """Get the specified role assignment. - :param scope: Scope. + :param scope: The scope of the role assignment. :type scope: str - :param role_assignment_name: Role assignment name. + :param role_assignment_name: The name of the role assignment to get. :type role_assignment_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -329,6 +349,7 @@ def get( ` :rtype: :class:`ClientRawResponse` if raw=true + :raises: :class:`CloudError` """ # Construct URL url = '/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}' @@ -374,9 +395,9 @@ def get( def delete_by_id( self, role_assignment_id, custom_headers=None, raw=False, **operation_config): - """Delete role assignment. + """Deletes a role assignment. - :param role_assignment_id: Role assignment Id + :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 @@ -387,6 +408,7 @@ def delete_by_id( ` :rtype: :class:`ClientRawResponse` if raw=true + :raises: :class:`CloudError` """ # Construct URL url = '/{roleAssignmentId}' @@ -431,11 +453,11 @@ def delete_by_id( def create_by_id( self, role_assignment_id, properties=None, custom_headers=None, raw=False, **operation_config): - """Create role assignment by Id. + """Creates a role assignment by ID. - :param role_assignment_id: Role assignment Id + :param role_assignment_id: The ID of the role assignment to create. :type role_assignment_id: str - :param properties: Gets or sets role assignment properties. + :param properties: Role assignment properties. :type properties: :class:`RoleAssignmentProperties ` :param dict custom_headers: headers that will be added to the request @@ -447,6 +469,7 @@ def create_by_id( ` :rtype: :class:`ClientRawResponse` if raw=true + :raises: :class:`CloudError` """ parameters = models.RoleAssignmentCreateParameters(properties=properties) @@ -497,9 +520,9 @@ def create_by_id( def get_by_id( self, role_assignment_id, custom_headers=None, raw=False, **operation_config): - """Get single role assignment. + """Gets a role assignment by ID. - :param role_assignment_id: Role assignment Id + :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 @@ -510,6 +533,7 @@ def get_by_id( ` :rtype: :class:`ClientRawResponse` if raw=true + :raises: :class:`CloudError` """ # Construct URL url = '/{roleAssignmentId}' @@ -554,9 +578,12 @@ def get_by_id( def list( self, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets role assignments of the subscription. + """Gets all role assignments for the subscription. - :param filter: The filter to apply on the operation. + :param filter: The filter to apply on the operation. Use + $filter=atScope() to return all role assignments at or above the + scope. Use $filter=principalId eq {id} to return all role + assignments at, above or below the scope for the specified principal. :type filter: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -565,6 +592,7 @@ def list( overrides`. :rtype: :class:`RoleAssignmentPaged ` + :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -620,11 +648,14 @@ def internal_paging(next_link=None, raw=False): def list_for_scope( self, scope, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets role assignments of the scope. + """Gets role assignments for a scope. - :param scope: Scope. + :param scope: The scope of the role assignments. :type scope: str - :param filter: The filter to apply on the operation. + :param filter: The filter to apply on the operation. Use + $filter=atScope() to return all role assignments at or above the + scope. Use $filter=principalId eq {id} to return all role + assignments at, above or below the scope for the specified principal. :type filter: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -633,6 +664,7 @@ def list_for_scope( overrides`. :rtype: :class:`RoleAssignmentPaged ` + :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): 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 a357d44c872a..f88a61acd654 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 @@ -35,11 +35,11 @@ def __init__(self, client, config, serializer, deserializer): def delete( self, scope, role_definition_id, custom_headers=None, raw=False, **operation_config): - """Deletes the role definition. + """Deletes a role definition. - :param scope: Scope + :param scope: The scope of the role definition. :type scope: str - :param role_definition_id: Role definition id. + :param role_definition_id: The ID of the role definition to delete. :type role_definition_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -50,6 +50,7 @@ def delete( ` :rtype: :class:`ClientRawResponse` if raw=true + :raises: :class:`CloudError` """ # Construct URL url = '/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}' @@ -97,9 +98,9 @@ def get( self, scope, role_definition_id, custom_headers=None, raw=False, **operation_config): """Get role definition by name (GUID). - :param scope: Scope + :param scope: The scope of the role definition. :type scope: str - :param role_definition_id: Role definition Id + :param role_definition_id: The ID of the role definition. :type role_definition_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -110,6 +111,7 @@ def get( ` :rtype: :class:`ClientRawResponse` if raw=true + :raises: :class:`CloudError` """ # Construct URL url = '/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}' @@ -157,11 +159,11 @@ def create_or_update( self, scope, role_definition_id, role_definition, custom_headers=None, raw=False, **operation_config): """Creates or updates a role definition. - :param scope: Scope + :param scope: The scope of the role definition. :type scope: str - :param role_definition_id: Role definition id. + :param role_definition_id: The ID of the role definition. :type role_definition_id: str - :param role_definition: Role definition. + :param role_definition: The values for the role definition. :type role_definition: :class:`RoleDefinition ` :param dict custom_headers: headers that will be added to the request @@ -173,6 +175,7 @@ def create_or_update( ` :rtype: :class:`ClientRawResponse` if raw=true + :raises: :class:`CloudError` """ # Construct URL url = '/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}' @@ -222,9 +225,10 @@ def create_or_update( def get_by_id( self, role_definition_id, custom_headers=None, raw=False, **operation_config): - """Get role definition by name (GUID). + """Gets a role definition by ID. - :param role_definition_id: Fully qualified role definition Id + :param role_definition_id: The fully qualified role definition ID to + get. :type role_definition_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -235,6 +239,7 @@ def get_by_id( ` :rtype: :class:`ClientRawResponse` if raw=true + :raises: :class:`CloudError` """ # Construct URL url = '/{roleDefinitionId}' @@ -279,12 +284,12 @@ def get_by_id( def list( self, scope, filter=None, custom_headers=None, raw=False, **operation_config): - """Get all role definitions that are applicable at scope and above. Use - atScopeAndBelow filter to search below the given scope as well. + """Get all role definitions that are applicable at scope and above. - :param scope: Scope + :param scope: The scope of the role definition. :type scope: str - :param filter: The filter to apply on the operation. + :param filter: The filter to apply on the operation. Use + atScopeAndBelow filter to search below the given scope as well. :type filter: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -293,6 +298,7 @@ def list( overrides`. :rtype: :class:`RoleDefinitionPaged ` + :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False):