1. Packages
  2. Azure Native
  3. API Docs
  4. authorization
  5. getRoleAssignment
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.44.1 published on Thursday, Jun 6, 2024 by Pulumi

azure-native.authorization.getRoleAssignment

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.44.1 published on Thursday, Jun 6, 2024 by Pulumi

    Get a role assignment by scope and name. Azure REST API version: 2022-04-01.

    Other available API versions: 2015-07-01, 2017-10-01-preview, 2020-03-01-preview, 2020-04-01-preview.

    Using getRoleAssignment

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getRoleAssignment(args: GetRoleAssignmentArgs, opts?: InvokeOptions): Promise<GetRoleAssignmentResult>
    function getRoleAssignmentOutput(args: GetRoleAssignmentOutputArgs, opts?: InvokeOptions): Output<GetRoleAssignmentResult>
    def get_role_assignment(role_assignment_name: Optional[str] = None,
                            scope: Optional[str] = None,
                            tenant_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetRoleAssignmentResult
    def get_role_assignment_output(role_assignment_name: Optional[pulumi.Input[str]] = None,
                            scope: Optional[pulumi.Input[str]] = None,
                            tenant_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetRoleAssignmentResult]
    func LookupRoleAssignment(ctx *Context, args *LookupRoleAssignmentArgs, opts ...InvokeOption) (*LookupRoleAssignmentResult, error)
    func LookupRoleAssignmentOutput(ctx *Context, args *LookupRoleAssignmentOutputArgs, opts ...InvokeOption) LookupRoleAssignmentResultOutput

    > Note: This function is named LookupRoleAssignment in the Go SDK.

    public static class GetRoleAssignment 
    {
        public static Task<GetRoleAssignmentResult> InvokeAsync(GetRoleAssignmentArgs args, InvokeOptions? opts = null)
        public static Output<GetRoleAssignmentResult> Invoke(GetRoleAssignmentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRoleAssignmentResult> getRoleAssignment(GetRoleAssignmentArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure-native:authorization:getRoleAssignment
      arguments:
        # arguments dictionary

    The following arguments are supported:

    RoleAssignmentName string
    The name of the role assignment. It can be any valid GUID.
    Scope string
    The scope of the operation or resource. Valid scopes are: subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
    TenantId string
    Tenant ID for cross-tenant request
    RoleAssignmentName string
    The name of the role assignment. It can be any valid GUID.
    Scope string
    The scope of the operation or resource. Valid scopes are: subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
    TenantId string
    Tenant ID for cross-tenant request
    roleAssignmentName String
    The name of the role assignment. It can be any valid GUID.
    scope String
    The scope of the operation or resource. Valid scopes are: subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
    tenantId String
    Tenant ID for cross-tenant request
    roleAssignmentName string
    The name of the role assignment. It can be any valid GUID.
    scope string
    The scope of the operation or resource. Valid scopes are: subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
    tenantId string
    Tenant ID for cross-tenant request
    role_assignment_name str
    The name of the role assignment. It can be any valid GUID.
    scope str
    The scope of the operation or resource. Valid scopes are: subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
    tenant_id str
    Tenant ID for cross-tenant request
    roleAssignmentName String
    The name of the role assignment. It can be any valid GUID.
    scope String
    The scope of the operation or resource. Valid scopes are: subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
    tenantId String
    Tenant ID for cross-tenant request

    getRoleAssignment Result

    The following output properties are available:

    CreatedBy string
    Id of the user who created the assignment
    CreatedOn string
    Time it was created
    Id string
    The role assignment ID.
    Name string
    The role assignment name.
    PrincipalId string
    The principal ID.
    RoleDefinitionId string
    The role definition ID.
    Scope string
    The role assignment scope.
    Type string
    The role assignment type.
    UpdatedBy string
    Id of the user who updated the assignment
    UpdatedOn string
    Time it was updated
    Condition string
    The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
    ConditionVersion string
    Version of the condition. Currently the only accepted value is '2.0'
    DelegatedManagedIdentityResourceId string
    Id of the delegated managed identity resource
    Description string
    Description of role assignment
    PrincipalType string
    The principal type of the assigned principal ID.
    CreatedBy string
    Id of the user who created the assignment
    CreatedOn string
    Time it was created
    Id string
    The role assignment ID.
    Name string
    The role assignment name.
    PrincipalId string
    The principal ID.
    RoleDefinitionId string
    The role definition ID.
    Scope string
    The role assignment scope.
    Type string
    The role assignment type.
    UpdatedBy string
    Id of the user who updated the assignment
    UpdatedOn string
    Time it was updated
    Condition string
    The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
    ConditionVersion string
    Version of the condition. Currently the only accepted value is '2.0'
    DelegatedManagedIdentityResourceId string
    Id of the delegated managed identity resource
    Description string
    Description of role assignment
    PrincipalType string
    The principal type of the assigned principal ID.
    createdBy String
    Id of the user who created the assignment
    createdOn String
    Time it was created
    id String
    The role assignment ID.
    name String
    The role assignment name.
    principalId String
    The principal ID.
    roleDefinitionId String
    The role definition ID.
    scope String
    The role assignment scope.
    type String
    The role assignment type.
    updatedBy String
    Id of the user who updated the assignment
    updatedOn String
    Time it was updated
    condition String
    The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
    conditionVersion String
    Version of the condition. Currently the only accepted value is '2.0'
    delegatedManagedIdentityResourceId String
    Id of the delegated managed identity resource
    description String
    Description of role assignment
    principalType String
    The principal type of the assigned principal ID.
    createdBy string
    Id of the user who created the assignment
    createdOn string
    Time it was created
    id string
    The role assignment ID.
    name string
    The role assignment name.
    principalId string
    The principal ID.
    roleDefinitionId string
    The role definition ID.
    scope string
    The role assignment scope.
    type string
    The role assignment type.
    updatedBy string
    Id of the user who updated the assignment
    updatedOn string
    Time it was updated
    condition string
    The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
    conditionVersion string
    Version of the condition. Currently the only accepted value is '2.0'
    delegatedManagedIdentityResourceId string
    Id of the delegated managed identity resource
    description string
    Description of role assignment
    principalType string
    The principal type of the assigned principal ID.
    created_by str
    Id of the user who created the assignment
    created_on str
    Time it was created
    id str
    The role assignment ID.
    name str
    The role assignment name.
    principal_id str
    The principal ID.
    role_definition_id str
    The role definition ID.
    scope str
    The role assignment scope.
    type str
    The role assignment type.
    updated_by str
    Id of the user who updated the assignment
    updated_on str
    Time it was updated
    condition str
    The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
    condition_version str
    Version of the condition. Currently the only accepted value is '2.0'
    delegated_managed_identity_resource_id str
    Id of the delegated managed identity resource
    description str
    Description of role assignment
    principal_type str
    The principal type of the assigned principal ID.
    createdBy String
    Id of the user who created the assignment
    createdOn String
    Time it was created
    id String
    The role assignment ID.
    name String
    The role assignment name.
    principalId String
    The principal ID.
    roleDefinitionId String
    The role definition ID.
    scope String
    The role assignment scope.
    type String
    The role assignment type.
    updatedBy String
    Id of the user who updated the assignment
    updatedOn String
    Time it was updated
    condition String
    The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
    conditionVersion String
    Version of the condition. Currently the only accepted value is '2.0'
    delegatedManagedIdentityResourceId String
    Id of the delegated managed identity resource
    description String
    Description of role assignment
    principalType String
    The principal type of the assigned principal ID.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.44.1 published on Thursday, Jun 6, 2024 by Pulumi