StrongDM v1.27.0 published on Sunday, Apr 20, 2025 by Piers Karsenbarg
sdm.getApprovalWorkflow
Explore with Pulumi AI
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:
- Approval
Mode string - Approval mode of the ApprovalWorkflow
- Approval
Steps List<PiersKarsenbarg. Sdm. Inputs. Get Approval Workflow Approval Step> - 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 string - Approval mode of the ApprovalWorkflow
- Approval
Steps []GetApproval Workflow Approval Step - 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 String - Approval mode of the ApprovalWorkflow
- approval
Steps List<GetApproval Workflow Approval Step> - 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 string - Approval mode of the ApprovalWorkflow
- approval
Steps GetApproval Workflow Approval Step[] - 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[GetApproval Workflow Approval Step] - 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.
- approval
Mode String - Approval mode of the ApprovalWorkflow
- approval
Steps 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:
- Approval
Workflows List<PiersKarsenbarg. Sdm. Outputs. Get Approval Workflow Approval Workflow> - 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.
- Approval
Mode string - Approval mode of the ApprovalWorkflow
- Approval
Steps List<PiersKarsenbarg. Sdm. Outputs. Get Approval Workflow Approval Step> - 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 []GetApproval Workflow Approval Workflow - 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.
- Approval
Mode string - Approval mode of the ApprovalWorkflow
- Approval
Steps []GetApproval Workflow Approval Step - 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 List<GetApproval Workflow Approval Workflow> - 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.
- approval
Mode String - Approval mode of the ApprovalWorkflow
- approval
Steps List<GetApproval Workflow Approval Step> - 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 GetApproval Workflow Approval Workflow[] - 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.
- approval
Mode string - Approval mode of the ApprovalWorkflow
- approval
Steps GetApproval Workflow Approval Step[] - 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[GetApproval Workflow Approval Workflow] - 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[GetApproval Workflow Approval Step] - 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.
- approval
Workflows 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.
- approval
Mode String - Approval mode of the ApprovalWorkflow
- approval
Steps 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<Piers
Karsenbarg. Sdm. Inputs. Get Approval Workflow Approval Step Approver> - 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)
- Skip
After 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
[]Get
Approval Workflow Approval Step Approver - 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)
- Skip
After 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<Get
Approval Workflow Approval Step Approver> - 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)
- skip
After 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
Get
Approval Workflow Approval Step Approver[] - 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)
- skip
After 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[Get
Approval Workflow Approval Step Approver] - 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)
- skip
After 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
- 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)
GetApprovalWorkflowApprovalWorkflow
- Approval
Mode string - Approval mode of the ApprovalWorkflow
- Approval
Steps List<PiersKarsenbarg. Sdm. Inputs. Get Approval Workflow Approval Workflow Approval Step> - 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 string - Approval mode of the ApprovalWorkflow
- Approval
Steps []GetApproval Workflow Approval Workflow Approval Step - 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 String - Approval mode of the ApprovalWorkflow
- approval
Steps List<GetApproval Workflow Approval Workflow Approval Step> - 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 string - Approval mode of the ApprovalWorkflow
- approval
Steps GetApproval Workflow Approval Workflow Approval Step[] - 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[GetApproval Workflow Approval Workflow Approval Step] - 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.
- approval
Mode String - Approval mode of the ApprovalWorkflow
- approval
Steps 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<Piers
Karsenbarg. Sdm. Inputs. Get Approval Workflow Approval Workflow Approval Step Approver> - 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)
- Skip
After 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
[]Get
Approval Workflow Approval Workflow Approval Step Approver - 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)
- Skip
After 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<Get
Approval Workflow Approval Workflow Approval Step Approver> - 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)
- skip
After 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
Get
Approval Workflow Approval Workflow Approval Step Approver[] - 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)
- skip
After 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[Get
Approval Workflow Approval Workflow Approval Step Approver] - 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)
- skip
After 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
- 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)
Package Details
- Repository
- sdm pierskarsenbarg/pulumi-sdm
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
sdm
Terraform Provider.