1. Packages
  2. StrongDM
  3. API Docs
  4. getRole
StrongDM v1.26.0 published on Friday, Mar 21, 2025 by Piers Karsenbarg

sdm.getRole

Explore with Pulumi AI

StrongDM v1.26.0 published on Friday, Mar 21, 2025 by Piers Karsenbarg

A Role has a list of access rules which determine which Resources the members of the Role have access to. An Account can be a member of multiple Roles via AccountAttachments.

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sdm.SdmFunctions;
import com.pulumi.sdm.inputs.GetRoleArgs;
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 compositeRoleQuery = SdmFunctions.getRole(GetRoleArgs.builder()
            .composite(true)
            .tags(Map.ofEntries(
                Map.entry("env", "dev"),
                Map.entry("region", "us-west")
            ))
            .build());

    }
}
Copy
variables:
  compositeRoleQuery:
    fn::invoke:
      function: sdm:getRole
      arguments:
        composite: true
        tags:
          env: dev
          region: us-west
Copy

Using getRole

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 getRole(args: GetRoleArgs, opts?: InvokeOptions): Promise<GetRoleResult>
function getRoleOutput(args: GetRoleOutputArgs, opts?: InvokeOptions): Output<GetRoleResult>
Copy
def get_role(id: Optional[str] = None,
             name: Optional[str] = None,
             tags: Optional[Mapping[str, str]] = None,
             opts: Optional[InvokeOptions] = None) -> GetRoleResult
def get_role_output(id: Optional[pulumi.Input[str]] = None,
             name: Optional[pulumi.Input[str]] = None,
             tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetRoleResult]
Copy
func LookupRole(ctx *Context, args *LookupRoleArgs, opts ...InvokeOption) (*LookupRoleResult, error)
func LookupRoleOutput(ctx *Context, args *LookupRoleOutputArgs, opts ...InvokeOption) LookupRoleResultOutput
Copy

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

public static class GetRole 
{
    public static Task<GetRoleResult> InvokeAsync(GetRoleArgs args, InvokeOptions? opts = null)
    public static Output<GetRoleResult> Invoke(GetRoleInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetRoleResult> getRole(GetRoleArgs args, InvokeOptions options)
public static Output<GetRoleResult> getRole(GetRoleArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: sdm:index/getRole:getRole
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id string
Unique identifier of the Role.
Name string
Unique human-readable name of the Role.
Tags Dictionary<string, string>
Tags is a map of key, value pairs.
Id string
Unique identifier of the Role.
Name string
Unique human-readable name of the Role.
Tags map[string]string
Tags is a map of key, value pairs.
id String
Unique identifier of the Role.
name String
Unique human-readable name of the Role.
tags Map<String,String>
Tags is a map of key, value pairs.
id string
Unique identifier of the Role.
name string
Unique human-readable name of the Role.
tags {[key: string]: string}
Tags is a map of key, value pairs.
id str
Unique identifier of the Role.
name str
Unique human-readable name of the Role.
tags Mapping[str, str]
Tags is a map of key, value pairs.
id String
Unique identifier of the Role.
name String
Unique human-readable name of the Role.
tags Map<String>
Tags is a map of key, value pairs.

getRole Result

The following output properties are available:

Ids List<string>
a list of strings of ids of data sources that match the given arguments.
ManagedBy string
Managed By is a read only field for what service manages this role, e.g. StrongDM, Okta, Azure.
Roles List<PiersKarsenbarg.Sdm.Outputs.GetRoleRole>
A list where each element has the following attributes:
Id string
Unique identifier of the Role.
Name string
Unique human-readable name of the Role.
Tags Dictionary<string, string>
Tags is a map of key, value pairs.
Ids []string
a list of strings of ids of data sources that match the given arguments.
ManagedBy string
Managed By is a read only field for what service manages this role, e.g. StrongDM, Okta, Azure.
Roles []GetRoleRole
A list where each element has the following attributes:
Id string
Unique identifier of the Role.
Name string
Unique human-readable name of the Role.
Tags map[string]string
Tags is a map of key, value pairs.
ids List<String>
a list of strings of ids of data sources that match the given arguments.
managedBy String
Managed By is a read only field for what service manages this role, e.g. StrongDM, Okta, Azure.
roles List<GetRoleRole>
A list where each element has the following attributes:
id String
Unique identifier of the Role.
name String
Unique human-readable name of the Role.
tags Map<String,String>
Tags is a map of key, value pairs.
ids string[]
a list of strings of ids of data sources that match the given arguments.
managedBy string
Managed By is a read only field for what service manages this role, e.g. StrongDM, Okta, Azure.
roles GetRoleRole[]
A list where each element has the following attributes:
id string
Unique identifier of the Role.
name string
Unique human-readable name of the Role.
tags {[key: string]: string}
Tags is a map of key, value pairs.
ids Sequence[str]
a list of strings of ids of data sources that match the given arguments.
managed_by str
Managed By is a read only field for what service manages this role, e.g. StrongDM, Okta, Azure.
roles Sequence[GetRoleRole]
A list where each element has the following attributes:
id str
Unique identifier of the Role.
name str
Unique human-readable name of the Role.
tags Mapping[str, str]
Tags is a map of key, value pairs.
ids List<String>
a list of strings of ids of data sources that match the given arguments.
managedBy String
Managed By is a read only field for what service manages this role, e.g. StrongDM, Okta, Azure.
roles List<Property Map>
A list where each element has the following attributes:
id String
Unique identifier of the Role.
name String
Unique human-readable name of the Role.
tags Map<String>
Tags is a map of key, value pairs.

Supporting Types

GetRoleRole

ManagedBy This property is required. string
Managed By is a read only field for what service manages this role, e.g. StrongDM, Okta, Azure.
AccessRules string
AccessRules is a list of access rules defining the resources this Role has access to.
Id string
Unique identifier of the Role.
Name string
Unique human-readable name of the Role.
Tags Dictionary<string, string>
Tags is a map of key, value pairs.
ManagedBy This property is required. string
Managed By is a read only field for what service manages this role, e.g. StrongDM, Okta, Azure.
AccessRules string
AccessRules is a list of access rules defining the resources this Role has access to.
Id string
Unique identifier of the Role.
Name string
Unique human-readable name of the Role.
Tags map[string]string
Tags is a map of key, value pairs.
managedBy This property is required. String
Managed By is a read only field for what service manages this role, e.g. StrongDM, Okta, Azure.
accessRules String
AccessRules is a list of access rules defining the resources this Role has access to.
id String
Unique identifier of the Role.
name String
Unique human-readable name of the Role.
tags Map<String,String>
Tags is a map of key, value pairs.
managedBy This property is required. string
Managed By is a read only field for what service manages this role, e.g. StrongDM, Okta, Azure.
accessRules string
AccessRules is a list of access rules defining the resources this Role has access to.
id string
Unique identifier of the Role.
name string
Unique human-readable name of the Role.
tags {[key: string]: string}
Tags is a map of key, value pairs.
managed_by This property is required. str
Managed By is a read only field for what service manages this role, e.g. StrongDM, Okta, Azure.
access_rules str
AccessRules is a list of access rules defining the resources this Role has access to.
id str
Unique identifier of the Role.
name str
Unique human-readable name of the Role.
tags Mapping[str, str]
Tags is a map of key, value pairs.
managedBy This property is required. String
Managed By is a read only field for what service manages this role, e.g. StrongDM, Okta, Azure.
accessRules String
AccessRules is a list of access rules defining the resources this Role has access to.
id String
Unique identifier of the Role.
name String
Unique human-readable name of the Role.
tags Map<String>
Tags is a map of key, value pairs.

Package Details

Repository
sdm pierskarsenbarg/pulumi-sdm
License
Apache-2.0
Notes
This Pulumi package is based on the sdm Terraform Provider.
StrongDM v1.26.0 published on Friday, Mar 21, 2025 by Piers Karsenbarg