AWS v7.11.0 published on Wednesday, Nov 5, 2025 by Pulumi
aws.sfn.getStateMachineVersions
Start a Neo task
Explain and create an aws.sfn.getStateMachineVersions resource
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/v7/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(region: Optional[str] = None,
statemachine_arn: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetStateMachineVersionsResult
def get_state_machine_versions_output(region: Optional[pulumi.Input[str]] = None,
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)
public static Output<GetStateMachineVersionsResult> getStateMachineVersions(GetStateMachineVersionsArgs args, InvokeOptions options)
fn::invoke:
function: aws:sfn/getStateMachineVersions:getStateMachineVersions
arguments:
# arguments dictionaryThe following arguments are supported:
- Statemachine
Arn string - ARN of the State Machine.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Statemachine
Arn string - ARN of the State Machine.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- statemachine
Arn String - ARN of the State Machine.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- statemachine
Arn string - ARN of the State Machine.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- statemachine_
arn str - ARN of the State Machine.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- statemachine
Arn String - ARN of the State Machine.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
getStateMachineVersions Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Region string
- Statemachine
Arn string - Statemachine
Versions List<string> - ARN List identifying the statemachine versions.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region string
- Statemachine
Arn string - Statemachine
Versions []string - ARN List identifying the statemachine versions.
- id String
- The provider-assigned unique ID for this managed resource.
- region String
- statemachine
Arn String - statemachine
Versions List<String> - ARN List identifying the statemachine versions.
- id string
- The provider-assigned unique ID for this managed resource.
- region string
- statemachine
Arn string - statemachine
Versions string[] - ARN List identifying the statemachine versions.
- id str
- The provider-assigned unique ID for this managed resource.
- region str
- statemachine_
arn str - statemachine_
versions Sequence[str] - ARN List identifying the statemachine versions.
- id String
- The provider-assigned unique ID for this managed resource.
- region String
- statemachine
Arn String - statemachine
Versions 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
awsTerraform Provider.
