1. Packages
  2. Azure Native
  3. API Docs
  4. authorization
  5. getRoleDefinition
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

azure-native.authorization.getRoleDefinition

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

Get role definition by ID (GUID).

Uses Azure REST API version 2022-05-01-preview.

Other available API versions: 2022-04-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native authorization [ApiVersion]. See the version guide for details.

Using getRoleDefinition

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 getRoleDefinition(args: GetRoleDefinitionArgs, opts?: InvokeOptions): Promise<GetRoleDefinitionResult>
function getRoleDefinitionOutput(args: GetRoleDefinitionOutputArgs, opts?: InvokeOptions): Output<GetRoleDefinitionResult>
Copy
def get_role_definition(role_definition_id: Optional[str] = None,
                        scope: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetRoleDefinitionResult
def get_role_definition_output(role_definition_id: Optional[pulumi.Input[str]] = None,
                        scope: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetRoleDefinitionResult]
Copy
func LookupRoleDefinition(ctx *Context, args *LookupRoleDefinitionArgs, opts ...InvokeOption) (*LookupRoleDefinitionResult, error)
func LookupRoleDefinitionOutput(ctx *Context, args *LookupRoleDefinitionOutputArgs, opts ...InvokeOption) LookupRoleDefinitionResultOutput
Copy

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

public static class GetRoleDefinition 
{
    public static Task<GetRoleDefinitionResult> InvokeAsync(GetRoleDefinitionArgs args, InvokeOptions? opts = null)
    public static Output<GetRoleDefinitionResult> Invoke(GetRoleDefinitionInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetRoleDefinitionResult> getRoleDefinition(GetRoleDefinitionArgs args, InvokeOptions options)
public static Output<GetRoleDefinitionResult> getRoleDefinition(GetRoleDefinitionArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure-native:authorization:getRoleDefinition
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

RoleDefinitionId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the role definition.
Scope
This property is required.
Changes to this property will trigger replacement.
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}'
RoleDefinitionId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the role definition.
Scope
This property is required.
Changes to this property will trigger replacement.
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}'
roleDefinitionId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the role definition.
scope
This property is required.
Changes to this property will trigger replacement.
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}'
roleDefinitionId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the role definition.
scope
This property is required.
Changes to this property will trigger replacement.
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}'
role_definition_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the role definition.
scope
This property is required.
Changes to this property will trigger replacement.
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}'
roleDefinitionId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the role definition.
scope
This property is required.
Changes to this property will trigger replacement.
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}'

getRoleDefinition Result

The following output properties are available:

AzureApiVersion string
The Azure API version of the resource.
CreatedBy string
Id of the user who created the assignment
CreatedOn string
Time it was created
Id string
The role definition ID.
Name string
The role definition name.
Type string
The role definition type.
UpdatedBy string
Id of the user who updated the assignment
UpdatedOn string
Time it was updated
AssignableScopes List<string>
Role definition assignable scopes.
Description string
The role definition description.
Permissions List<Pulumi.AzureNative.Authorization.Outputs.PermissionResponse>
Role definition permissions.
RoleName string
The role name.
RoleType string
The role type.
AzureApiVersion string
The Azure API version of the resource.
CreatedBy string
Id of the user who created the assignment
CreatedOn string
Time it was created
Id string
The role definition ID.
Name string
The role definition name.
Type string
The role definition type.
UpdatedBy string
Id of the user who updated the assignment
UpdatedOn string
Time it was updated
AssignableScopes []string
Role definition assignable scopes.
Description string
The role definition description.
Permissions []PermissionResponse
Role definition permissions.
RoleName string
The role name.
RoleType string
The role type.
azureApiVersion String
The Azure API version of the resource.
createdBy String
Id of the user who created the assignment
createdOn String
Time it was created
id String
The role definition ID.
name String
The role definition name.
type String
The role definition type.
updatedBy String
Id of the user who updated the assignment
updatedOn String
Time it was updated
assignableScopes List<String>
Role definition assignable scopes.
description String
The role definition description.
permissions List<PermissionResponse>
Role definition permissions.
roleName String
The role name.
roleType String
The role type.
azureApiVersion string
The Azure API version of the resource.
createdBy string
Id of the user who created the assignment
createdOn string
Time it was created
id string
The role definition ID.
name string
The role definition name.
type string
The role definition type.
updatedBy string
Id of the user who updated the assignment
updatedOn string
Time it was updated
assignableScopes string[]
Role definition assignable scopes.
description string
The role definition description.
permissions PermissionResponse[]
Role definition permissions.
roleName string
The role name.
roleType string
The role type.
azure_api_version str
The Azure API version of the resource.
created_by str
Id of the user who created the assignment
created_on str
Time it was created
id str
The role definition ID.
name str
The role definition name.
type str
The role definition type.
updated_by str
Id of the user who updated the assignment
updated_on str
Time it was updated
assignable_scopes Sequence[str]
Role definition assignable scopes.
description str
The role definition description.
permissions Sequence[PermissionResponse]
Role definition permissions.
role_name str
The role name.
role_type str
The role type.
azureApiVersion String
The Azure API version of the resource.
createdBy String
Id of the user who created the assignment
createdOn String
Time it was created
id String
The role definition ID.
name String
The role definition name.
type String
The role definition type.
updatedBy String
Id of the user who updated the assignment
updatedOn String
Time it was updated
assignableScopes List<String>
Role definition assignable scopes.
description String
The role definition description.
permissions List<Property Map>
Role definition permissions.
roleName String
The role name.
roleType String
The role type.

Supporting Types

PermissionResponse

Condition This property is required. string
The conditions on the role definition. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
ConditionVersion This property is required. string
Version of the condition. Currently the only accepted value is '2.0'
Actions List<string>
Allowed actions.
DataActions List<string>
Allowed Data actions.
NotActions List<string>
Denied actions.
NotDataActions List<string>
Denied Data actions.
Condition This property is required. string
The conditions on the role definition. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
ConditionVersion This property is required. string
Version of the condition. Currently the only accepted value is '2.0'
Actions []string
Allowed actions.
DataActions []string
Allowed Data actions.
NotActions []string
Denied actions.
NotDataActions []string
Denied Data actions.
condition This property is required. String
The conditions on the role definition. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
conditionVersion This property is required. String
Version of the condition. Currently the only accepted value is '2.0'
actions List<String>
Allowed actions.
dataActions List<String>
Allowed Data actions.
notActions List<String>
Denied actions.
notDataActions List<String>
Denied Data actions.
condition This property is required. string
The conditions on the role definition. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
conditionVersion This property is required. string
Version of the condition. Currently the only accepted value is '2.0'
actions string[]
Allowed actions.
dataActions string[]
Allowed Data actions.
notActions string[]
Denied actions.
notDataActions string[]
Denied Data actions.
condition This property is required. str
The conditions on the role definition. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
condition_version This property is required. str
Version of the condition. Currently the only accepted value is '2.0'
actions Sequence[str]
Allowed actions.
data_actions Sequence[str]
Allowed Data actions.
not_actions Sequence[str]
Denied actions.
not_data_actions Sequence[str]
Denied Data actions.
condition This property is required. String
The conditions on the role definition. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
conditionVersion This property is required. String
Version of the condition. Currently the only accepted value is '2.0'
actions List<String>
Allowed actions.
dataActions List<String>
Allowed Data actions.
notActions List<String>
Denied actions.
notDataActions List<String>
Denied Data actions.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi