1. Packages
  2. AWS Classic
  3. API Docs
  4. sfn
  5. getStateMachineVersions

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.sfn.getStateMachineVersions

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Data source for managing an AWS SFN (Step Functions) State Machine Versions.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = aws.sfn.getStateMachineVersions({
        statemachineArn: testAwsSfnStateMachine.arn,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.sfn.get_state_machine_versions(statemachine_arn=test_aws_sfn_state_machine["arn"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sfn"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sfn.GetStateMachineVersions(ctx, &sfn.GetStateMachineVersionsArgs{
    			StatemachineArn: testAwsSfnStateMachine.Arn,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Aws.Sfn.GetStateMachineVersions.Invoke(new()
        {
            StatemachineArn = testAwsSfnStateMachine.Arn,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.sfn.SfnFunctions;
    import com.pulumi.aws.sfn.inputs.GetStateMachineVersionsArgs;
    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 test = SfnFunctions.getStateMachineVersions(GetStateMachineVersionsArgs.builder()
                .statemachineArn(testAwsSfnStateMachine.arn())
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          Function: aws:sfn:getStateMachineVersions
          Arguments:
            statemachineArn: ${testAwsSfnStateMachine.arn}
    

    Using getStateMachineVersions

    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 getStateMachineVersions(args: GetStateMachineVersionsArgs, opts?: InvokeOptions): Promise<GetStateMachineVersionsResult>
    function getStateMachineVersionsOutput(args: GetStateMachineVersionsOutputArgs, opts?: InvokeOptions): Output<GetStateMachineVersionsResult>
    def get_state_machine_versions(statemachine_arn: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetStateMachineVersionsResult
    def get_state_machine_versions_output(statemachine_arn: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetStateMachineVersionsResult]
    func GetStateMachineVersions(ctx *Context, args *GetStateMachineVersionsArgs, opts ...InvokeOption) (*GetStateMachineVersionsResult, error)
    func GetStateMachineVersionsOutput(ctx *Context, args *GetStateMachineVersionsOutputArgs, opts ...InvokeOption) GetStateMachineVersionsResultOutput

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

    public static class GetStateMachineVersions 
    {
        public static Task<GetStateMachineVersionsResult> InvokeAsync(GetStateMachineVersionsArgs args, InvokeOptions? opts = null)
        public static Output<GetStateMachineVersionsResult> Invoke(GetStateMachineVersionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStateMachineVersionsResult> getStateMachineVersions(GetStateMachineVersionsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:sfn/getStateMachineVersions:getStateMachineVersions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    StatemachineArn string
    ARN of the State Machine.
    StatemachineArn string
    ARN of the State Machine.
    statemachineArn String
    ARN of the State Machine.
    statemachineArn string
    ARN of the State Machine.
    statemachine_arn str
    ARN of the State Machine.
    statemachineArn String
    ARN of the State Machine.

    getStateMachineVersions Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    StatemachineArn string
    StatemachineVersions List<string>
    ARN List identifying the statemachine versions.
    Id string
    The provider-assigned unique ID for this managed resource.
    StatemachineArn string
    StatemachineVersions []string
    ARN List identifying the statemachine versions.
    id String
    The provider-assigned unique ID for this managed resource.
    statemachineArn String
    statemachineVersions List<String>
    ARN List identifying the statemachine versions.
    id string
    The provider-assigned unique ID for this managed resource.
    statemachineArn string
    statemachineVersions string[]
    ARN List identifying the statemachine versions.
    id str
    The provider-assigned unique ID for this managed resource.
    statemachine_arn str
    statemachine_versions Sequence[str]
    ARN List identifying the statemachine versions.
    id String
    The provider-assigned unique ID for this managed resource.
    statemachineArn String
    statemachineVersions List<String>
    ARN List identifying the statemachine versions.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi