StrongDM v1.12.0 published on Sunday, Apr 28, 2024 by Piers Karsenbarg
sdm.getWorkflow
Explore with Pulumi AI
Workflows are the collection of rules that define the resources to which access can be requested, the users that can request that access, and the mechanism for approving those requests which can either but automatic approval or a set of users authorized to approve the requests.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sdm from "@pulumi/sdm";
const workflowQuery = sdm.getWorkflow({
    autoGrant: true,
    name: "workflow example",
});
import pulumi
import pulumi_sdm as sdm
workflow_query = sdm.get_workflow(auto_grant=True,
    name="workflow example")
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.LookupWorkflow(ctx, &sdm.LookupWorkflowArgs{
			AutoGrant: pulumi.BoolRef(true),
			Name:      pulumi.StringRef("workflow example"),
		}, 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 workflowQuery = Sdm.GetWorkflow.Invoke(new()
    {
        AutoGrant = true,
        Name = "workflow example",
    });
});
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.GetWorkflowArgs;
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 workflowQuery = SdmFunctions.getWorkflow(GetWorkflowArgs.builder()
            .autoGrant(true)
            .name("workflow example")
            .build());
    }
}
variables:
  workflowQuery:
    fn::invoke:
      Function: sdm:getWorkflow
      Arguments:
        autoGrant: true
        name: workflow example
Using getWorkflow
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 getWorkflow(args: GetWorkflowArgs, opts?: InvokeOptions): Promise<GetWorkflowResult>
function getWorkflowOutput(args: GetWorkflowOutputArgs, opts?: InvokeOptions): Output<GetWorkflowResult>def get_workflow(approval_flow_id: Optional[str] = None,
                 auto_grant: Optional[bool] = None,
                 description: Optional[str] = None,
                 enabled: Optional[bool] = None,
                 id: Optional[str] = None,
                 name: Optional[str] = None,
                 weight: Optional[int] = None,
                 opts: Optional[InvokeOptions] = None) -> GetWorkflowResult
def get_workflow_output(approval_flow_id: Optional[pulumi.Input[str]] = None,
                 auto_grant: Optional[pulumi.Input[bool]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 enabled: Optional[pulumi.Input[bool]] = None,
                 id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 weight: Optional[pulumi.Input[int]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetWorkflowResult]func LookupWorkflow(ctx *Context, args *LookupWorkflowArgs, opts ...InvokeOption) (*LookupWorkflowResult, error)
func LookupWorkflowOutput(ctx *Context, args *LookupWorkflowOutputArgs, opts ...InvokeOption) LookupWorkflowResultOutput> Note: This function is named LookupWorkflow in the Go SDK.
public static class GetWorkflow 
{
    public static Task<GetWorkflowResult> InvokeAsync(GetWorkflowArgs args, InvokeOptions? opts = null)
    public static Output<GetWorkflowResult> Invoke(GetWorkflowInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetWorkflowResult> getWorkflow(GetWorkflowArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: sdm:index/getWorkflow:getWorkflow
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ApprovalFlow stringId 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- AutoGrant bool
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- Description string
- Optional description of the Workflow.
- Enabled bool
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- Id string
- Unique identifier of the Workflow.
- Name string
- Unique human-readable name of the Workflow.
- Weight int
- Optional weight for workflow to specify it's priority in matching a request.
- ApprovalFlow stringId 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- AutoGrant bool
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- Description string
- Optional description of the Workflow.
- Enabled bool
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- Id string
- Unique identifier of the Workflow.
- Name string
- Unique human-readable name of the Workflow.
- Weight int
- Optional weight for workflow to specify it's priority in matching a request.
- approvalFlow StringId 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- autoGrant Boolean
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- description String
- Optional description of the Workflow.
- enabled Boolean
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- id String
- Unique identifier of the Workflow.
- name String
- Unique human-readable name of the Workflow.
- weight Integer
- Optional weight for workflow to specify it's priority in matching a request.
- approvalFlow stringId 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- autoGrant boolean
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- description string
- Optional description of the Workflow.
- enabled boolean
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- id string
- Unique identifier of the Workflow.
- name string
- Unique human-readable name of the Workflow.
- weight number
- Optional weight for workflow to specify it's priority in matching a request.
- approval_flow_ strid 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- auto_grant bool
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- description str
- Optional description of the Workflow.
- enabled bool
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- id str
- Unique identifier of the Workflow.
- name str
- Unique human-readable name of the Workflow.
- weight int
- Optional weight for workflow to specify it's priority in matching a request.
- approvalFlow StringId 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- autoGrant Boolean
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- description String
- Optional description of the Workflow.
- enabled Boolean
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- id String
- Unique identifier of the Workflow.
- name String
- Unique human-readable name of the Workflow.
- weight Number
- Optional weight for workflow to specify it's priority in matching a request.
getWorkflow Result
The following output properties are available:
- Ids List<string>
- a list of strings of ids of data sources that match the given arguments.
- Workflows
List<PiersKarsenbarg. Sdm. Outputs. Get Workflow Workflow> 
- A list where each element has the following attributes:
- ApprovalFlow stringId 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- AutoGrant bool
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- Description string
- Optional description of the Workflow.
- Enabled bool
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- Id string
- Unique identifier of the Workflow.
- Name string
- Unique human-readable name of the Workflow.
- Weight int
- Optional weight for workflow to specify it's priority in matching a request.
- Ids []string
- a list of strings of ids of data sources that match the given arguments.
- Workflows
[]GetWorkflow Workflow 
- A list where each element has the following attributes:
- ApprovalFlow stringId 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- AutoGrant bool
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- Description string
- Optional description of the Workflow.
- Enabled bool
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- Id string
- Unique identifier of the Workflow.
- Name string
- Unique human-readable name of the Workflow.
- Weight int
- Optional weight for workflow to specify it's priority in matching a request.
- ids List<String>
- a list of strings of ids of data sources that match the given arguments.
- workflows
List<GetWorkflow Workflow> 
- A list where each element has the following attributes:
- approvalFlow StringId 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- autoGrant Boolean
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- description String
- Optional description of the Workflow.
- enabled Boolean
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- id String
- Unique identifier of the Workflow.
- name String
- Unique human-readable name of the Workflow.
- weight Integer
- Optional weight for workflow to specify it's priority in matching a request.
- ids string[]
- a list of strings of ids of data sources that match the given arguments.
- workflows
GetWorkflow Workflow[] 
- A list where each element has the following attributes:
- approvalFlow stringId 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- autoGrant boolean
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- description string
- Optional description of the Workflow.
- enabled boolean
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- id string
- Unique identifier of the Workflow.
- name string
- Unique human-readable name of the Workflow.
- weight number
- Optional weight for workflow to specify it's priority in matching a request.
- ids Sequence[str]
- a list of strings of ids of data sources that match the given arguments.
- workflows
Sequence[GetWorkflow Workflow] 
- A list where each element has the following attributes:
- approval_flow_ strid 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- auto_grant bool
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- description str
- Optional description of the Workflow.
- enabled bool
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- id str
- Unique identifier of the Workflow.
- name str
- Unique human-readable name of the Workflow.
- weight int
- Optional weight for workflow to specify it's priority in matching a request.
- ids List<String>
- a list of strings of ids of data sources that match the given arguments.
- workflows List<Property Map>
- A list where each element has the following attributes:
- approvalFlow StringId 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- autoGrant Boolean
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- description String
- Optional description of the Workflow.
- enabled Boolean
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- id String
- Unique identifier of the Workflow.
- name String
- Unique human-readable name of the Workflow.
- weight Number
- Optional weight for workflow to specify it's priority in matching a request.
Supporting Types
GetWorkflowWorkflow  
- AccessRules string
- AccessRules is a list of access rules defining the resources this Workflow provides access to.
- ApprovalFlow stringId 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- AutoGrant bool
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- Description string
- Optional description of the Workflow.
- Enabled bool
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- Id string
- Unique identifier of the Workflow.
- Name string
- Unique human-readable name of the Workflow.
- Weight int
- Optional weight for workflow to specify it's priority in matching a request.
- AccessRules string
- AccessRules is a list of access rules defining the resources this Workflow provides access to.
- ApprovalFlow stringId 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- AutoGrant bool
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- Description string
- Optional description of the Workflow.
- Enabled bool
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- Id string
- Unique identifier of the Workflow.
- Name string
- Unique human-readable name of the Workflow.
- Weight int
- Optional weight for workflow to specify it's priority in matching a request.
- accessRules String
- AccessRules is a list of access rules defining the resources this Workflow provides access to.
- approvalFlow StringId 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- autoGrant Boolean
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- description String
- Optional description of the Workflow.
- enabled Boolean
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- id String
- Unique identifier of the Workflow.
- name String
- Unique human-readable name of the Workflow.
- weight Integer
- Optional weight for workflow to specify it's priority in matching a request.
- accessRules string
- AccessRules is a list of access rules defining the resources this Workflow provides access to.
- approvalFlow stringId 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- autoGrant boolean
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- description string
- Optional description of the Workflow.
- enabled boolean
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- id string
- Unique identifier of the Workflow.
- name string
- Unique human-readable name of the Workflow.
- weight number
- Optional weight for workflow to specify it's priority in matching a request.
- access_rules str
- AccessRules is a list of access rules defining the resources this Workflow provides access to.
- approval_flow_ strid 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- auto_grant bool
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- description str
- Optional description of the Workflow.
- enabled bool
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- id str
- Unique identifier of the Workflow.
- name str
- Unique human-readable name of the Workflow.
- weight int
- Optional weight for workflow to specify it's priority in matching a request.
- accessRules String
- AccessRules is a list of access rules defining the resources this Workflow provides access to.
- approvalFlow StringId 
- Optional approval flow ID identifies an approval flow that linked to the workflow
- autoGrant Boolean
- Optional auto grant setting to automatically approve requests or not, defaults to false.
- description String
- Optional description of the Workflow.
- enabled Boolean
- Optional enabled state for workflow. This setting may be overridden by the system if the workflow doesn't meet the requirements to be enabled or if other conditions prevent enabling the workflow. The requirements to enable a workflow are that the workflow must be either set up for with auto grant enabled or have one or more WorkflowApprovers created for the workflow.
- id String
- Unique identifier of the Workflow.
- name String
- Unique human-readable name of the Workflow.
- weight Number
- Optional weight for workflow to specify it's priority in matching a request.
Package Details
- Repository
- sdm pierskarsenbarg/pulumi-sdm
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the sdmTerraform Provider.
