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

sdm.getApprovalWorkflow

Explore with Pulumi AI

sdm logo
StrongDM v1.21.0 published on Monday, Nov 4, 2024 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,
                              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,
                              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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: sdm:index/getApprovalWorkflow:getApprovalWorkflow
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ApprovalMode string
    Approval mode of the ApprovalWorkflow
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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

    GetApprovalWorkflowApprovalWorkflow

    ApprovalMode string
    Approval mode of the ApprovalWorkflow
    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
    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
    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
    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
    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
    description String
    Optional description of the ApprovalWorkflow.
    id String
    Unique identifier of the ApprovalWorkflow.
    name String
    Unique human-readable name of the ApprovalWorkflow.

    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