We recommend using Azure Native.
Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi
azure.cosmosdb.getSqlRoleDefinition
Explore with Pulumi AI
Use this data source to access information about an existing Cosmos DB SQL Role Definition.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.cosmosdb.getSqlRoleDefinition({
resourceGroupName: "tfex-cosmosdb-sql-role-definition-rg",
accountName: "tfex-cosmosdb-sql-role-definition-account-name",
roleDefinitionId: "00000000-0000-0000-0000-000000000000",
});
import pulumi
import pulumi_azure as azure
example = azure.cosmosdb.get_sql_role_definition(resource_group_name="tfex-cosmosdb-sql-role-definition-rg",
account_name="tfex-cosmosdb-sql-role-definition-account-name",
role_definition_id="00000000-0000-0000-0000-000000000000")
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cosmosdb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cosmosdb.LookupSqlRoleDefinition(ctx, &cosmosdb.LookupSqlRoleDefinitionArgs{
ResourceGroupName: "tfex-cosmosdb-sql-role-definition-rg",
AccountName: "tfex-cosmosdb-sql-role-definition-account-name",
RoleDefinitionId: "00000000-0000-0000-0000-000000000000",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.CosmosDB.GetSqlRoleDefinition.Invoke(new()
{
ResourceGroupName = "tfex-cosmosdb-sql-role-definition-rg",
AccountName = "tfex-cosmosdb-sql-role-definition-account-name",
RoleDefinitionId = "00000000-0000-0000-0000-000000000000",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.cosmosdb.CosmosdbFunctions;
import com.pulumi.azure.cosmosdb.inputs.GetSqlRoleDefinitionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = CosmosdbFunctions.getSqlRoleDefinition(GetSqlRoleDefinitionArgs.builder()
.resourceGroupName("tfex-cosmosdb-sql-role-definition-rg")
.accountName("tfex-cosmosdb-sql-role-definition-account-name")
.roleDefinitionId("00000000-0000-0000-0000-000000000000")
.build());
}
}
variables:
example:
fn::invoke:
Function: azure:cosmosdb:getSqlRoleDefinition
Arguments:
resourceGroupName: tfex-cosmosdb-sql-role-definition-rg
accountName: tfex-cosmosdb-sql-role-definition-account-name
roleDefinitionId: 00000000-0000-0000-0000-000000000000
Using getSqlRoleDefinition
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 getSqlRoleDefinition(args: GetSqlRoleDefinitionArgs, opts?: InvokeOptions): Promise<GetSqlRoleDefinitionResult>
function getSqlRoleDefinitionOutput(args: GetSqlRoleDefinitionOutputArgs, opts?: InvokeOptions): Output<GetSqlRoleDefinitionResult>
def get_sql_role_definition(account_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
role_definition_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSqlRoleDefinitionResult
def get_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[GetSqlRoleDefinitionResult]
func LookupSqlRoleDefinition(ctx *Context, args *LookupSqlRoleDefinitionArgs, opts ...InvokeOption) (*LookupSqlRoleDefinitionResult, error)
func LookupSqlRoleDefinitionOutput(ctx *Context, args *LookupSqlRoleDefinitionOutputArgs, opts ...InvokeOption) LookupSqlRoleDefinitionResultOutput
> Note: This function is named LookupSqlRoleDefinition
in the Go SDK.
public static class GetSqlRoleDefinition
{
public static Task<GetSqlRoleDefinitionResult> InvokeAsync(GetSqlRoleDefinitionArgs args, InvokeOptions? opts = null)
public static Output<GetSqlRoleDefinitionResult> Invoke(GetSqlRoleDefinitionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSqlRoleDefinitionResult> getSqlRoleDefinition(GetSqlRoleDefinitionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:cosmosdb/getSqlRoleDefinition:getSqlRoleDefinition
arguments:
# arguments dictionary
The following arguments are supported:
- Account
Name string - The name of the Cosmos DB Account.
- Resource
Group stringName - The name of the Resource Group in which the Cosmos DB SQL Role Definition is created.
- Role
Definition stringId - The GUID as the name of the Cosmos DB SQL Role Definition.
- Account
Name string - The name of the Cosmos DB Account.
- Resource
Group stringName - The name of the Resource Group in which the Cosmos DB SQL Role Definition is created.
- Role
Definition stringId - The GUID as the name of the Cosmos DB SQL Role Definition.
- account
Name String - The name of the Cosmos DB Account.
- resource
Group StringName - The name of the Resource Group in which the Cosmos DB SQL Role Definition is created.
- role
Definition StringId - The GUID as the name of the Cosmos DB SQL Role Definition.
- account
Name string - The name of the Cosmos DB Account.
- resource
Group stringName - The name of the Resource Group in which the Cosmos DB SQL Role Definition is created.
- role
Definition stringId - The GUID as the name of the Cosmos DB SQL Role Definition.
- account_
name str - The name of the Cosmos DB Account.
- resource_
group_ strname - The name of the Resource Group in which the Cosmos DB SQL Role Definition is created.
- role_
definition_ strid - The GUID as the name of the Cosmos DB SQL Role Definition.
- account
Name String - The name of the Cosmos DB Account.
- resource
Group StringName - The name of the Resource Group in which the Cosmos DB SQL Role Definition is created.
- role
Definition StringId - The GUID as the name of the Cosmos DB SQL Role Definition.
getSqlRoleDefinition Result
The following output properties are available:
- Account
Name string - Assignable
Scopes List<string> - A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The role name of the Cosmos DB SQL Role Definition.
- Permissions
List<Get
Sql Role Definition Permission> - A
permissions
block as defined below. - Resource
Group stringName - Role
Definition stringId - Type string
- The type of the Cosmos DB SQL Role Definition.
- Account
Name string - Assignable
Scopes []string - A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The role name of the Cosmos DB SQL Role Definition.
- Permissions
[]Get
Sql Role Definition Permission - A
permissions
block as defined below. - Resource
Group stringName - Role
Definition stringId - Type string
- The type of the Cosmos DB SQL Role Definition.
- account
Name String - assignable
Scopes List<String> - A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The role name of the Cosmos DB SQL Role Definition.
- permissions
List<Get
Sql Role Definition Permission> - A
permissions
block as defined below. - resource
Group StringName - role
Definition StringId - type String
- The type of the Cosmos DB SQL Role Definition.
- account
Name string - assignable
Scopes string[] - A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The role name of the Cosmos DB SQL Role Definition.
- permissions
Get
Sql Role Definition Permission[] - A
permissions
block as defined below. - resource
Group stringName - role
Definition stringId - type string
- The type of the Cosmos DB SQL Role Definition.
- account_
name str - assignable_
scopes Sequence[str] - A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The role name of the Cosmos DB SQL Role Definition.
- permissions
Sequence[Get
Sql Role Definition Permission] - A
permissions
block as defined below. - resource_
group_ strname - role_
definition_ strid - type str
- The type of the Cosmos DB SQL Role Definition.
- account
Name String - assignable
Scopes List<String> - A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The role name of the Cosmos DB SQL Role Definition.
- permissions List<Property Map>
- A
permissions
block as defined below. - resource
Group StringName - role
Definition StringId - type String
- The type of the Cosmos DB SQL Role Definition.
Supporting Types
GetSqlRoleDefinitionPermission
- Data
Actions List<string> - A list of data actions that are allowed for the Cosmos DB SQL Role Definition.
- Data
Actions []string - A list of data actions that are allowed for the Cosmos DB SQL Role Definition.
- data
Actions List<String> - A list of data actions that are allowed for the Cosmos DB SQL Role Definition.
- data
Actions string[] - A list of data actions that are allowed for the Cosmos DB SQL Role Definition.
- data_
actions Sequence[str] - A list of data actions that are allowed for the Cosmos DB SQL Role Definition.
- data
Actions List<String> - A list of data actions that are allowed for the Cosmos DB SQL Role Definition.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.