1. Packages
  2. Azure Native
  3. API Docs
  4. cosmosdb
  5. getSqlResourceSqlRoleDefinition
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.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

azure-native.cosmosdb.getSqlResourceSqlRoleDefinition

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.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id.

Uses Azure REST API version 2024-11-15.

Other available API versions: 2020-06-01-preview, 2021-03-01-preview, 2021-04-01-preview, 2021-04-15, 2021-05-15, 2021-06-15, 2021-07-01-preview, 2021-10-15, 2021-10-15-preview, 2021-11-15-preview, 2022-02-15-preview, 2022-05-15, 2022-05-15-preview, 2022-08-15, 2022-08-15-preview, 2022-11-15, 2022-11-15-preview, 2023-03-01-preview, 2023-03-15, 2023-03-15-preview, 2023-04-15, 2023-09-15, 2023-09-15-preview, 2023-11-15, 2023-11-15-preview, 2024-02-15-preview, 2024-05-15, 2024-05-15-preview, 2024-08-15, 2024-09-01-preview, 2024-12-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native cosmosdb [ApiVersion]. See the version guide for details.

Using getSqlResourceSqlRoleDefinition

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 getSqlResourceSqlRoleDefinition(args: GetSqlResourceSqlRoleDefinitionArgs, opts?: InvokeOptions): Promise<GetSqlResourceSqlRoleDefinitionResult>
function getSqlResourceSqlRoleDefinitionOutput(args: GetSqlResourceSqlRoleDefinitionOutputArgs, opts?: InvokeOptions): Output<GetSqlResourceSqlRoleDefinitionResult>
Copy
def get_sql_resource_sql_role_definition(account_name: Optional[str] = None,
                                         resource_group_name: Optional[str] = None,
                                         role_definition_id: Optional[str] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetSqlResourceSqlRoleDefinitionResult
def get_sql_resource_sql_role_definition_output(account_name: Optional[pulumi.Input[str]] = None,
                                         resource_group_name: Optional[pulumi.Input[str]] = None,
                                         role_definition_id: Optional[pulumi.Input[str]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetSqlResourceSqlRoleDefinitionResult]
Copy
func LookupSqlResourceSqlRoleDefinition(ctx *Context, args *LookupSqlResourceSqlRoleDefinitionArgs, opts ...InvokeOption) (*LookupSqlResourceSqlRoleDefinitionResult, error)
func LookupSqlResourceSqlRoleDefinitionOutput(ctx *Context, args *LookupSqlResourceSqlRoleDefinitionOutputArgs, opts ...InvokeOption) LookupSqlResourceSqlRoleDefinitionResultOutput
Copy

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

public static class GetSqlResourceSqlRoleDefinition 
{
    public static Task<GetSqlResourceSqlRoleDefinitionResult> InvokeAsync(GetSqlResourceSqlRoleDefinitionArgs args, InvokeOptions? opts = null)
    public static Output<GetSqlResourceSqlRoleDefinitionResult> Invoke(GetSqlResourceSqlRoleDefinitionInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSqlResourceSqlRoleDefinitionResult> getSqlResourceSqlRoleDefinition(GetSqlResourceSqlRoleDefinitionArgs args, InvokeOptions options)
public static Output<GetSqlResourceSqlRoleDefinitionResult> getSqlResourceSqlRoleDefinition(GetSqlResourceSqlRoleDefinitionArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure-native:cosmosdb:getSqlResourceSqlRoleDefinition
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AccountName
This property is required.
Changes to this property will trigger replacement.
string
Cosmos DB database account name.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
RoleDefinitionId
This property is required.
Changes to this property will trigger replacement.
string
The GUID for the Role Definition.
AccountName
This property is required.
Changes to this property will trigger replacement.
string
Cosmos DB database account name.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
RoleDefinitionId
This property is required.
Changes to this property will trigger replacement.
string
The GUID for the Role Definition.
accountName
This property is required.
Changes to this property will trigger replacement.
String
Cosmos DB database account name.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
roleDefinitionId
This property is required.
Changes to this property will trigger replacement.
String
The GUID for the Role Definition.
accountName
This property is required.
Changes to this property will trigger replacement.
string
Cosmos DB database account name.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
roleDefinitionId
This property is required.
Changes to this property will trigger replacement.
string
The GUID for the Role Definition.
account_name
This property is required.
Changes to this property will trigger replacement.
str
Cosmos DB database account name.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group. The name is case insensitive.
role_definition_id
This property is required.
Changes to this property will trigger replacement.
str
The GUID for the Role Definition.
accountName
This property is required.
Changes to this property will trigger replacement.
String
Cosmos DB database account name.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
roleDefinitionId
This property is required.
Changes to this property will trigger replacement.
String
The GUID for the Role Definition.

getSqlResourceSqlRoleDefinition Result

The following output properties are available:

AzureApiVersion string
The Azure API version of the resource.
Id string
The unique resource identifier of the database account.
Name string
The name of the database account.
Type string
The type of Azure resource.
AssignableScopes List<string>
A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist.
Permissions List<Pulumi.AzureNative.CosmosDB.Outputs.PermissionResponse>
The set of operations allowed through this Role Definition.
RoleName string
A user-friendly name for the Role Definition. Must be unique for the database account.
AzureApiVersion string
The Azure API version of the resource.
Id string
The unique resource identifier of the database account.
Name string
The name of the database account.
Type string
The type of Azure resource.
AssignableScopes []string
A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist.
Permissions []PermissionResponse
The set of operations allowed through this Role Definition.
RoleName string
A user-friendly name for the Role Definition. Must be unique for the database account.
azureApiVersion String
The Azure API version of the resource.
id String
The unique resource identifier of the database account.
name String
The name of the database account.
type String
The type of Azure resource.
assignableScopes List<String>
A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist.
permissions List<PermissionResponse>
The set of operations allowed through this Role Definition.
roleName String
A user-friendly name for the Role Definition. Must be unique for the database account.
azureApiVersion string
The Azure API version of the resource.
id string
The unique resource identifier of the database account.
name string
The name of the database account.
type string
The type of Azure resource.
assignableScopes string[]
A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist.
permissions PermissionResponse[]
The set of operations allowed through this Role Definition.
roleName string
A user-friendly name for the Role Definition. Must be unique for the database account.
azure_api_version str
The Azure API version of the resource.
id str
The unique resource identifier of the database account.
name str
The name of the database account.
type str
The type of Azure resource.
assignable_scopes Sequence[str]
A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist.
permissions Sequence[PermissionResponse]
The set of operations allowed through this Role Definition.
role_name str
A user-friendly name for the Role Definition. Must be unique for the database account.
azureApiVersion String
The Azure API version of the resource.
id String
The unique resource identifier of the database account.
name String
The name of the database account.
type String
The type of Azure resource.
assignableScopes List<String>
A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist.
permissions List<Property Map>
The set of operations allowed through this Role Definition.
roleName String
A user-friendly name for the Role Definition. Must be unique for the database account.

Supporting Types

PermissionResponse

DataActions List<string>
An array of data actions that are allowed.
Id string
The id for the permission.
NotDataActions List<string>
An array of data actions that are denied.
DataActions []string
An array of data actions that are allowed.
Id string
The id for the permission.
NotDataActions []string
An array of data actions that are denied.
dataActions List<String>
An array of data actions that are allowed.
id String
The id for the permission.
notDataActions List<String>
An array of data actions that are denied.
dataActions string[]
An array of data actions that are allowed.
id string
The id for the permission.
notDataActions string[]
An array of data actions that are denied.
data_actions Sequence[str]
An array of data actions that are allowed.
id str
The id for the permission.
not_data_actions Sequence[str]
An array of data actions that are denied.
dataActions List<String>
An array of data actions that are allowed.
id String
The id for the permission.
notDataActions List<String>
An array of data actions that are denied.

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.1.0 published on Tuesday, Apr 8, 2025 by Pulumi