GetStateMachine

Use this data source to get the ARN of a State Machine in AWS Step Function (SFN). By using this data source, you can reference a state machine without having to hard code the ARNs as input.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Sfn.GetStateMachine.InvokeAsync(new Aws.Sfn.GetStateMachineArgs
        {
            Name = "an_example_sfn_name",
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/sfn"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := sfn.LookupStateMachine(ctx, &sfn.LookupStateMachineArgs{
            Name: "an_example_sfn_name",
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.sfn.get_state_machine(name="an_example_sfn_name")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.sfn.getStateMachine({
    name: "an_example_sfn_name",
}, { async: true }));

Using GetStateMachine

function getStateMachine(args: GetStateMachineArgs, opts?: InvokeOptions): Promise<GetStateMachineResult>
function  get_state_machine(name=None, opts=None)
func LookupStateMachine(ctx *Context, args *LookupStateMachineArgs, opts ...InvokeOption) (*LookupStateMachineResult, error)

Note: This function is named LookupStateMachine in the Go SDK.

public static class GetStateMachine {
    public static Task<GetStateMachineResult> InvokeAsync(GetStateMachineArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The friendly name of the state machine to match.

Name string

The friendly name of the state machine to match.

name string

The friendly name of the state machine to match.

name str

The friendly name of the state machine to match.

GetStateMachine Result

The following output properties are available:

Arn string

Set to the arn of the state function.

CreationDate string

The date the state machine was created.

Definition string

Set to the state machine definition.

Id string

The provider-assigned unique ID for this managed resource.

Name string
RoleArn string

Set to the role_arn used by the state function.

Status string

Set to the current status of the state machine.

Arn string

Set to the arn of the state function.

CreationDate string

The date the state machine was created.

Definition string

Set to the state machine definition.

Id string

The provider-assigned unique ID for this managed resource.

Name string
RoleArn string

Set to the role_arn used by the state function.

Status string

Set to the current status of the state machine.

arn string

Set to the arn of the state function.

creationDate string

The date the state machine was created.

definition string

Set to the state machine definition.

id string

The provider-assigned unique ID for this managed resource.

name string
roleArn string

Set to the role_arn used by the state function.

status string

Set to the current status of the state machine.

arn str

Set to the arn of the state function.

creation_date str

The date the state machine was created.

definition str

Set to the state machine definition.

id str

The provider-assigned unique ID for this managed resource.

name str
role_arn str

Set to the role_arn used by the state function.

status str

Set to the current status of the state machine.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.