1. Packages
  2. StrongDM
  3. API Docs
  4. getApprovalWorkflow
StrongDM v1.27.0 published on Sunday, Apr 20, 2025 by Piers Karsenbarg

sdm.getApprovalWorkflow

Explore with Pulumi AI

sdm logo
StrongDM v1.27.0 published on Sunday, Apr 20, 2025 by Piers Karsenbarg

    ApprovalWorkflows are the mechanism by which requests for access can be viewed by authorized approvers and be approved or denied.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sdm from "@pulumi/sdm";
    
    const manualApprovalWorkflowQuery = sdm.getApprovalWorkflow({
        approvalMode: "manual",
        name: "approval workflow manual",
    });
    const autoGrantApprovalWorkflowQuery = sdm.getApprovalWorkflow({
        approvalMode: "automatic",
        name: "approval workflow auto",
    });
    
    import pulumi
    import pulumi_sdm as sdm
    
    manual_approval_workflow_query = sdm.get_approval_workflow(approval_mode="manual",
        name="approval workflow manual")
    auto_grant_approval_workflow_query = sdm.get_approval_workflow(approval_mode="automatic",
        name="approval workflow auto")
    
    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.LookupApprovalWorkflow(ctx, &sdm.LookupApprovalWorkflowArgs{
    			ApprovalMode: pulumi.StringRef("manual"),
    			Name:         pulumi.StringRef("approval workflow manual"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = sdm.LookupApprovalWorkflow(ctx, &sdm.LookupApprovalWorkflowArgs{
    			ApprovalMode: pulumi.StringRef("automatic"),
    			Name:         pulumi.StringRef("approval workflow auto"),
    		}, 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 manualApprovalWorkflowQuery = Sdm.GetApprovalWorkflow.Invoke(new()
        {
            ApprovalMode = "manual",
            Name = "approval workflow manual",
        });
    
        var autoGrantApprovalWorkflowQuery = Sdm.GetApprovalWorkflow.Invoke(new()
        {
            ApprovalMode = "automatic",
            Name = "approval workflow auto",
        });
    
    });
    
    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.GetApprovalWorkflowArgs;
    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 manualApprovalWorkflowQuery = SdmFunctions.getApprovalWorkflow(GetApprovalWorkflowArgs.builder()
                .approvalMode("manual")
                .name("approval workflow manual")
                .build());
    
            final var autoGrantApprovalWorkflowQuery = SdmFunctions.getApprovalWorkflow(GetApprovalWorkflowArgs.builder()
                .approvalMode("automatic")
                .name("approval workflow auto")
                .build());
    
        }
    }
    
    variables:
      manualApprovalWorkflowQuery:
        fn::invoke:
          function: sdm:getApprovalWorkflow
          arguments:
            approvalMode: manual
            name: approval workflow manual
      autoGrantApprovalWorkflowQuery:
        fn::invoke:
          function: sdm:getApprovalWorkflow
          arguments:
            approvalMode: automatic
            name: approval workflow auto
    

    Using getApprovalWorkflow

    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 getApprovalWorkflow(args: GetApprovalWorkflowArgs, opts?: InvokeOptions): Promise<GetApprovalWorkflowResult>
    function getApprovalWorkflowOutput(args: GetApprovalWorkflowOutputArgs, opts?: InvokeOptions): Output<GetApprovalWorkflowResult>
    def get_approval_workflow(approval_mode: Optional[str] = None,
                              approval_steps: Optional[Sequence[GetApprovalWorkflowApprovalStep]] = None,
                              description: Optional[str] = None,
                              id: Optional[str] = None,
                              name: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetApprovalWorkflowResult
    def get_approval_workflow_output(approval_mode: Optional[pulumi.Input[str]] = None,
                              approval_steps: Optional[pulumi.Input[Sequence[pulumi.Input[GetApprovalWorkflowApprovalStepArgs]]]] = None,
                              description: Optional[pulumi.Input[str]] = None,
                              id: Optional[pulumi.Input[str]] = None,
                              name: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetApprovalWorkflowResult]
    func LookupApprovalWorkflow(ctx *Context, args *LookupApprovalWorkflowArgs, opts ...InvokeOption) (*LookupApprovalWorkflowResult, error)
    func LookupApprovalWorkflowOutput(ctx *Context, args *LookupApprovalWorkflowOutputArgs, opts ...InvokeOption) LookupApprovalWorkflowResultOutput

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

    public static class GetApprovalWorkflow 
    {
        public static Task<GetApprovalWorkflowResult> InvokeAsync(GetApprovalWorkflowArgs args, InvokeOptions? opts = null)
        public static Output<GetApprovalWorkflowResult> Invoke(GetApprovalWorkflowInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetApprovalWorkflowResult> getApprovalWorkflow(GetApprovalWorkflowArgs args, InvokeOptions options)
    public static Output<GetApprovalWorkflowResult> getApprovalWorkflow(GetApprovalWorkflowArgs args, InvokeOptions options)
    
    fn::invoke:
      function: sdm:index/getApprovalWorkflow:getApprovalWorkflow
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ApprovalMode string
    Approval mode of the ApprovalWorkflow
    ApprovalSteps List<PiersKarsenbarg.Sdm.Inputs.GetApprovalWorkflowApprovalStep>
    The approval steps of this approval workflow
    Description string
    Optional description of the ApprovalWorkflow.
    Id string
    Unique identifier of the ApprovalWorkflow.
    Name string
    Unique human-readable name of the ApprovalWorkflow.
    ApprovalMode string
    Approval mode of the ApprovalWorkflow
    ApprovalSteps []GetApprovalWorkflowApprovalStep
    The approval steps of this approval workflow
    Description string
    Optional description of the ApprovalWorkflow.
    Id string
    Unique identifier of the ApprovalWorkflow.
    Name string
    Unique human-readable name of the ApprovalWorkflow.
    approvalMode String
    Approval mode of the ApprovalWorkflow
    approvalSteps List<GetApprovalWorkflowApprovalStep>
    The approval steps of this approval workflow
    description String
    Optional description of the ApprovalWorkflow.
    id String
    Unique identifier of the ApprovalWorkflow.
    name String
    Unique human-readable name of the ApprovalWorkflow.
    approvalMode string
    Approval mode of the ApprovalWorkflow
    approvalSteps GetApprovalWorkflowApprovalStep[]
    The approval steps of this approval workflow
    description string
    Optional description of the ApprovalWorkflow.
    id string
    Unique identifier of the ApprovalWorkflow.
    name string
    Unique human-readable name of the ApprovalWorkflow.
    approval_mode str
    Approval mode of the ApprovalWorkflow
    approval_steps Sequence[GetApprovalWorkflowApprovalStep]
    The approval steps of this approval workflow
    description str
    Optional description of the ApprovalWorkflow.
    id str
    Unique identifier of the ApprovalWorkflow.
    name str
    Unique human-readable name of the ApprovalWorkflow.
    approvalMode String
    Approval mode of the ApprovalWorkflow
    approvalSteps List<Property Map>
    The approval steps of this approval workflow
    description String
    Optional description of the ApprovalWorkflow.
    id String
    Unique identifier of the ApprovalWorkflow.
    name String
    Unique human-readable name of the ApprovalWorkflow.

    getApprovalWorkflow Result

    The following output properties are available:

    ApprovalWorkflows List<PiersKarsenbarg.Sdm.Outputs.GetApprovalWorkflowApprovalWorkflow>
    A list where each element has the following attributes:
    Ids List<string>
    a list of strings of ids of data sources that match the given arguments.
    ApprovalMode string
    Approval mode of the ApprovalWorkflow
    ApprovalSteps List<PiersKarsenbarg.Sdm.Outputs.GetApprovalWorkflowApprovalStep>
    The approval steps of this approval workflow
    Description string
    Optional description of the ApprovalWorkflow.
    Id string
    Unique identifier of the ApprovalWorkflow.
    Name string
    Unique human-readable name of the ApprovalWorkflow.
    ApprovalWorkflows []GetApprovalWorkflowApprovalWorkflow
    A list where each element has the following attributes:
    Ids []string
    a list of strings of ids of data sources that match the given arguments.
    ApprovalMode string
    Approval mode of the ApprovalWorkflow
    ApprovalSteps []GetApprovalWorkflowApprovalStep
    The approval steps of this approval workflow
    Description string
    Optional description of the ApprovalWorkflow.
    Id string
    Unique identifier of the ApprovalWorkflow.
    Name string
    Unique human-readable name of the ApprovalWorkflow.
    approvalWorkflows List<GetApprovalWorkflowApprovalWorkflow>
    A list where each element has the following attributes:
    ids List<String>
    a list of strings of ids of data sources that match the given arguments.
    approvalMode String
    Approval mode of the ApprovalWorkflow
    approvalSteps List<GetApprovalWorkflowApprovalStep>
    The approval steps of this approval workflow
    description String
    Optional description of the ApprovalWorkflow.
    id String
    Unique identifier of the ApprovalWorkflow.
    name String
    Unique human-readable name of the ApprovalWorkflow.
    approvalWorkflows GetApprovalWorkflowApprovalWorkflow[]
    A list where each element has the following attributes:
    ids string[]
    a list of strings of ids of data sources that match the given arguments.
    approvalMode string
    Approval mode of the ApprovalWorkflow
    approvalSteps GetApprovalWorkflowApprovalStep[]
    The approval steps of this approval workflow
    description string
    Optional description of the ApprovalWorkflow.
    id string
    Unique identifier of the ApprovalWorkflow.
    name string
    Unique human-readable name of the ApprovalWorkflow.
    approval_workflows Sequence[GetApprovalWorkflowApprovalWorkflow]
    A list where each element has the following attributes:
    ids Sequence[str]
    a list of strings of ids of data sources that match the given arguments.
    approval_mode str
    Approval mode of the ApprovalWorkflow
    approval_steps Sequence[GetApprovalWorkflowApprovalStep]
    The approval steps of this approval workflow
    description str
    Optional description of the ApprovalWorkflow.
    id str
    Unique identifier of the ApprovalWorkflow.
    name str
    Unique human-readable name of the ApprovalWorkflow.
    approvalWorkflows List<Property Map>
    A list where each element has the following attributes:
    ids List<String>
    a list of strings of ids of data sources that match the given arguments.
    approvalMode String
    Approval mode of the ApprovalWorkflow
    approvalSteps List<Property Map>
    The approval steps of this approval workflow
    description String
    Optional description of the ApprovalWorkflow.
    id String
    Unique identifier of the ApprovalWorkflow.
    name String
    Unique human-readable name of the ApprovalWorkflow.

    Supporting Types

    GetApprovalWorkflowApprovalStep

    Approvers List<PiersKarsenbarg.Sdm.Inputs.GetApprovalWorkflowApprovalStepApprover>
    The approvers for this approval step
    Quantifier string
    Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
    SkipAfter string
    Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)
    Approvers []GetApprovalWorkflowApprovalStepApprover
    The approvers for this approval step
    Quantifier string
    Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
    SkipAfter string
    Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)
    approvers List<GetApprovalWorkflowApprovalStepApprover>
    The approvers for this approval step
    quantifier String
    Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
    skipAfter String
    Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)
    approvers GetApprovalWorkflowApprovalStepApprover[]
    The approvers for this approval step
    quantifier string
    Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
    skipAfter string
    Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)
    approvers Sequence[GetApprovalWorkflowApprovalStepApprover]
    The approvers for this approval step
    quantifier str
    Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
    skip_after str
    Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)
    approvers List<Property Map>
    The approvers for this approval step
    quantifier String
    Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
    skipAfter String
    Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)

    GetApprovalWorkflowApprovalStepApprover

    AccountId string
    The account id of the approver (only an account_id OR a role_id may be present for one approver)
    RoleId string
    The role id of the approver (only an account_id OR a role_id may be present for one approver)
    AccountId string
    The account id of the approver (only an account_id OR a role_id may be present for one approver)
    RoleId string
    The role id of the approver (only an account_id OR a role_id may be present for one approver)
    accountId String
    The account id of the approver (only an account_id OR a role_id may be present for one approver)
    roleId String
    The role id of the approver (only an account_id OR a role_id may be present for one approver)
    accountId string
    The account id of the approver (only an account_id OR a role_id may be present for one approver)
    roleId string
    The role id of the approver (only an account_id OR a role_id may be present for one approver)
    account_id str
    The account id of the approver (only an account_id OR a role_id may be present for one approver)
    role_id str
    The role id of the approver (only an account_id OR a role_id may be present for one approver)
    accountId String
    The account id of the approver (only an account_id OR a role_id may be present for one approver)
    roleId String
    The role id of the approver (only an account_id OR a role_id may be present for one approver)

    GetApprovalWorkflowApprovalWorkflow

    ApprovalMode string
    Approval mode of the ApprovalWorkflow
    ApprovalSteps List<PiersKarsenbarg.Sdm.Inputs.GetApprovalWorkflowApprovalWorkflowApprovalStep>
    The approval steps of this approval workflow
    Description string
    Optional description of the ApprovalWorkflow.
    Id string
    Unique identifier of the ApprovalWorkflow.
    Name string
    Unique human-readable name of the ApprovalWorkflow.
    ApprovalMode string
    Approval mode of the ApprovalWorkflow
    ApprovalSteps []GetApprovalWorkflowApprovalWorkflowApprovalStep
    The approval steps of this approval workflow
    Description string
    Optional description of the ApprovalWorkflow.
    Id string
    Unique identifier of the ApprovalWorkflow.
    Name string
    Unique human-readable name of the ApprovalWorkflow.
    approvalMode String
    Approval mode of the ApprovalWorkflow
    approvalSteps List<GetApprovalWorkflowApprovalWorkflowApprovalStep>
    The approval steps of this approval workflow
    description String
    Optional description of the ApprovalWorkflow.
    id String
    Unique identifier of the ApprovalWorkflow.
    name String
    Unique human-readable name of the ApprovalWorkflow.
    approvalMode string
    Approval mode of the ApprovalWorkflow
    approvalSteps GetApprovalWorkflowApprovalWorkflowApprovalStep[]
    The approval steps of this approval workflow
    description string
    Optional description of the ApprovalWorkflow.
    id string
    Unique identifier of the ApprovalWorkflow.
    name string
    Unique human-readable name of the ApprovalWorkflow.
    approval_mode str
    Approval mode of the ApprovalWorkflow
    approval_steps Sequence[GetApprovalWorkflowApprovalWorkflowApprovalStep]
    The approval steps of this approval workflow
    description str
    Optional description of the ApprovalWorkflow.
    id str
    Unique identifier of the ApprovalWorkflow.
    name str
    Unique human-readable name of the ApprovalWorkflow.
    approvalMode String
    Approval mode of the ApprovalWorkflow
    approvalSteps List<Property Map>
    The approval steps of this approval workflow
    description String
    Optional description of the ApprovalWorkflow.
    id String
    Unique identifier of the ApprovalWorkflow.
    name String
    Unique human-readable name of the ApprovalWorkflow.

    GetApprovalWorkflowApprovalWorkflowApprovalStep

    Approvers List<PiersKarsenbarg.Sdm.Inputs.GetApprovalWorkflowApprovalWorkflowApprovalStepApprover>
    The approvers for this approval step
    Quantifier string
    Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
    SkipAfter string
    Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)
    Approvers []GetApprovalWorkflowApprovalWorkflowApprovalStepApprover
    The approvers for this approval step
    Quantifier string
    Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
    SkipAfter string
    Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)
    approvers List<GetApprovalWorkflowApprovalWorkflowApprovalStepApprover>
    The approvers for this approval step
    quantifier String
    Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
    skipAfter String
    Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)
    approvers GetApprovalWorkflowApprovalWorkflowApprovalStepApprover[]
    The approvers for this approval step
    quantifier string
    Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
    skipAfter string
    Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)
    approvers Sequence[GetApprovalWorkflowApprovalWorkflowApprovalStepApprover]
    The approvers for this approval step
    quantifier str
    Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
    skip_after str
    Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)
    approvers List<Property Map>
    The approvers for this approval step
    quantifier String
    Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
    skipAfter String
    Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)

    GetApprovalWorkflowApprovalWorkflowApprovalStepApprover

    AccountId string
    The account id of the approver (only an account_id OR a role_id may be present for one approver)
    RoleId string
    The role id of the approver (only an account_id OR a role_id may be present for one approver)
    AccountId string
    The account id of the approver (only an account_id OR a role_id may be present for one approver)
    RoleId string
    The role id of the approver (only an account_id OR a role_id may be present for one approver)
    accountId String
    The account id of the approver (only an account_id OR a role_id may be present for one approver)
    roleId String
    The role id of the approver (only an account_id OR a role_id may be present for one approver)
    accountId string
    The account id of the approver (only an account_id OR a role_id may be present for one approver)
    roleId string
    The role id of the approver (only an account_id OR a role_id may be present for one approver)
    account_id str
    The account id of the approver (only an account_id OR a role_id may be present for one approver)
    role_id str
    The role id of the approver (only an account_id OR a role_id may be present for one approver)
    accountId String
    The account id of the approver (only an account_id OR a role_id may be present for one approver)
    roleId String
    The role id of the approver (only an account_id OR a role_id may be present for one approver)

    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.27.0 published on Sunday, Apr 20, 2025 by Piers Karsenbarg