1. Packages
  2. StrongDM
  3. API Docs
  4. getWorkflowRole
StrongDM v1.21.0 published on Monday, Nov 4, 2024 by Piers Karsenbarg

sdm.getWorkflowRole

Explore with Pulumi AI

sdm logo
StrongDM v1.21.0 published on Monday, Nov 4, 2024 by Piers Karsenbarg

    WorkflowRole links a role to a workflow. The linked roles indicate which roles a user must be a part of to request access to a resource via the workflow.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sdm from "@pulumi/sdm";
    
    const workflowRoleQuery = sdm.getWorkflowRole({
        roleId: "r-9862923",
        workflowId: "aw-7935485",
    });
    
    import pulumi
    import pulumi_sdm as sdm
    
    workflow_role_query = sdm.get_workflow_role(role_id="r-9862923",
        workflow_id="aw-7935485")
    
    package main
    
    import (
    	"github.com/pierskarsenbarg/pulumi-sdm/sdk/go/sdm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sdm.LookupWorkflowRole(ctx, &sdm.LookupWorkflowRoleArgs{
    			RoleId:     pulumi.StringRef("r-9862923"),
    			WorkflowId: pulumi.StringRef("aw-7935485"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Sdm = Pulumi.Sdm;
    
    return await Deployment.RunAsync(() => 
    {
        var workflowRoleQuery = Sdm.GetWorkflowRole.Invoke(new()
        {
            RoleId = "r-9862923",
            WorkflowId = "aw-7935485",
        });
    
    });
    
    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.GetWorkflowRoleArgs;
    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 workflowRoleQuery = SdmFunctions.getWorkflowRole(GetWorkflowRoleArgs.builder()
                .roleId("r-9862923")
                .workflowId("aw-7935485")
                .build());
    
        }
    }
    
    variables:
      workflowRoleQuery:
        fn::invoke:
          Function: sdm:getWorkflowRole
          Arguments:
            roleId: r-9862923
            workflowId: aw-7935485
    

    Using getWorkflowRole

    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 getWorkflowRole(args: GetWorkflowRoleArgs, opts?: InvokeOptions): Promise<GetWorkflowRoleResult>
    function getWorkflowRoleOutput(args: GetWorkflowRoleOutputArgs, opts?: InvokeOptions): Output<GetWorkflowRoleResult>
    def get_workflow_role(id: Optional[str] = None,
                          role_id: Optional[str] = None,
                          workflow_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetWorkflowRoleResult
    def get_workflow_role_output(id: Optional[pulumi.Input[str]] = None,
                          role_id: Optional[pulumi.Input[str]] = None,
                          workflow_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetWorkflowRoleResult]
    func LookupWorkflowRole(ctx *Context, args *LookupWorkflowRoleArgs, opts ...InvokeOption) (*LookupWorkflowRoleResult, error)
    func LookupWorkflowRoleOutput(ctx *Context, args *LookupWorkflowRoleOutputArgs, opts ...InvokeOption) LookupWorkflowRoleResultOutput

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

    public static class GetWorkflowRole 
    {
        public static Task<GetWorkflowRoleResult> InvokeAsync(GetWorkflowRoleArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkflowRoleResult> Invoke(GetWorkflowRoleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWorkflowRoleResult> getWorkflowRole(GetWorkflowRoleArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: sdm:index/getWorkflowRole:getWorkflowRole
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    Unique identifier of the WorkflowRole.
    RoleId string
    The role id.
    WorkflowId string
    The workflow id.
    Id string
    Unique identifier of the WorkflowRole.
    RoleId string
    The role id.
    WorkflowId string
    The workflow id.
    id String
    Unique identifier of the WorkflowRole.
    roleId String
    The role id.
    workflowId String
    The workflow id.
    id string
    Unique identifier of the WorkflowRole.
    roleId string
    The role id.
    workflowId string
    The workflow id.
    id str
    Unique identifier of the WorkflowRole.
    role_id str
    The role id.
    workflow_id str
    The workflow id.
    id String
    Unique identifier of the WorkflowRole.
    roleId String
    The role id.
    workflowId String
    The workflow id.

    getWorkflowRole Result

    The following output properties are available:

    Ids List<string>
    a list of strings of ids of data sources that match the given arguments.
    WorkflowRoles List<PiersKarsenbarg.Sdm.Outputs.GetWorkflowRoleWorkflowRole>
    A list where each element has the following attributes:
    Id string
    Unique identifier of the WorkflowRole.
    RoleId string
    The role id.
    WorkflowId string
    The workflow id.
    Ids []string
    a list of strings of ids of data sources that match the given arguments.
    WorkflowRoles []GetWorkflowRoleWorkflowRole
    A list where each element has the following attributes:
    Id string
    Unique identifier of the WorkflowRole.
    RoleId string
    The role id.
    WorkflowId string
    The workflow id.
    ids List<String>
    a list of strings of ids of data sources that match the given arguments.
    workflowRoles List<GetWorkflowRoleWorkflowRole>
    A list where each element has the following attributes:
    id String
    Unique identifier of the WorkflowRole.
    roleId String
    The role id.
    workflowId String
    The workflow id.
    ids string[]
    a list of strings of ids of data sources that match the given arguments.
    workflowRoles GetWorkflowRoleWorkflowRole[]
    A list where each element has the following attributes:
    id string
    Unique identifier of the WorkflowRole.
    roleId string
    The role id.
    workflowId string
    The workflow id.
    ids Sequence[str]
    a list of strings of ids of data sources that match the given arguments.
    workflow_roles Sequence[GetWorkflowRoleWorkflowRole]
    A list where each element has the following attributes:
    id str
    Unique identifier of the WorkflowRole.
    role_id str
    The role id.
    workflow_id str
    The workflow id.
    ids List<String>
    a list of strings of ids of data sources that match the given arguments.
    workflowRoles List<Property Map>
    A list where each element has the following attributes:
    id String
    Unique identifier of the WorkflowRole.
    roleId String
    The role id.
    workflowId String
    The workflow id.

    Supporting Types

    GetWorkflowRoleWorkflowRole

    Id string
    Unique identifier of the WorkflowRole.
    RoleId string
    The role id.
    WorkflowId string
    The workflow id.
    Id string
    Unique identifier of the WorkflowRole.
    RoleId string
    The role id.
    WorkflowId string
    The workflow id.
    id String
    Unique identifier of the WorkflowRole.
    roleId String
    The role id.
    workflowId String
    The workflow id.
    id string
    Unique identifier of the WorkflowRole.
    roleId string
    The role id.
    workflowId string
    The workflow id.
    id str
    Unique identifier of the WorkflowRole.
    role_id str
    The role id.
    workflow_id str
    The workflow id.
    id String
    Unique identifier of the WorkflowRole.
    roleId String
    The role id.
    workflowId String
    The workflow id.

    Package Details

    Repository
    sdm pierskarsenbarg/pulumi-sdm
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the sdm Terraform Provider.
    sdm logo
    StrongDM v1.21.0 published on Monday, Nov 4, 2024 by Piers Karsenbarg