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

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

AWS Classic v6.2.1 published on Friday, Sep 22, 2023 by Pulumi

aws.sfn.Alias

Explore with Pulumi AI

aws logo

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

AWS Classic v6.2.1 published on Friday, Sep 22, 2023 by Pulumi

    Provides a Step Function State Machine Alias.

    Example Usage

    Basic Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var sfnAlias = new Aws.Sfn.Alias("sfnAlias", new()
        {
            RoutingConfigurations = new[]
            {
                new Aws.Sfn.Inputs.AliasRoutingConfigurationArgs
                {
                    StateMachineVersionArn = aws_sfn_state_machine.Sfn_test.State_machine_version_arn,
                    Weight = 100,
                },
            },
        });
    
        var mySfnAlias = new Aws.Sfn.Alias("mySfnAlias", new()
        {
            RoutingConfigurations = new[]
            {
                new Aws.Sfn.Inputs.AliasRoutingConfigurationArgs
                {
                    StateMachineVersionArn = "arn:aws:states:us-east-1:12345:stateMachine:demo:3",
                    Weight = 50,
                },
                new Aws.Sfn.Inputs.AliasRoutingConfigurationArgs
                {
                    StateMachineVersionArn = "arn:aws:states:us-east-1:12345:stateMachine:demo:2",
                    Weight = 50,
                },
            },
        });
    
    });
    
    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.NewAlias(ctx, "sfnAlias", &sfn.AliasArgs{
    			RoutingConfigurations: sfn.AliasRoutingConfigurationArray{
    				&sfn.AliasRoutingConfigurationArgs{
    					StateMachineVersionArn: pulumi.Any(aws_sfn_state_machine.Sfn_test.State_machine_version_arn),
    					Weight:                 pulumi.Int(100),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = sfn.NewAlias(ctx, "mySfnAlias", &sfn.AliasArgs{
    			RoutingConfigurations: sfn.AliasRoutingConfigurationArray{
    				&sfn.AliasRoutingConfigurationArgs{
    					StateMachineVersionArn: pulumi.String("arn:aws:states:us-east-1:12345:stateMachine:demo:3"),
    					Weight:                 pulumi.Int(50),
    				},
    				&sfn.AliasRoutingConfigurationArgs{
    					StateMachineVersionArn: pulumi.String("arn:aws:states:us-east-1:12345:stateMachine:demo:2"),
    					Weight:                 pulumi.Int(50),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.sfn.Alias;
    import com.pulumi.aws.sfn.AliasArgs;
    import com.pulumi.aws.sfn.inputs.AliasRoutingConfigurationArgs;
    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) {
            var sfnAlias = new Alias("sfnAlias", AliasArgs.builder()        
                .routingConfigurations(AliasRoutingConfigurationArgs.builder()
                    .stateMachineVersionArn(aws_sfn_state_machine.sfn_test().state_machine_version_arn())
                    .weight(100)
                    .build())
                .build());
    
            var mySfnAlias = new Alias("mySfnAlias", AliasArgs.builder()        
                .routingConfigurations(            
                    AliasRoutingConfigurationArgs.builder()
                        .stateMachineVersionArn("arn:aws:states:us-east-1:12345:stateMachine:demo:3")
                        .weight(50)
                        .build(),
                    AliasRoutingConfigurationArgs.builder()
                        .stateMachineVersionArn("arn:aws:states:us-east-1:12345:stateMachine:demo:2")
                        .weight(50)
                        .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    sfn_alias = aws.sfn.Alias("sfnAlias", routing_configurations=[aws.sfn.AliasRoutingConfigurationArgs(
        state_machine_version_arn=aws_sfn_state_machine["sfn_test"]["state_machine_version_arn"],
        weight=100,
    )])
    my_sfn_alias = aws.sfn.Alias("mySfnAlias", routing_configurations=[
        aws.sfn.AliasRoutingConfigurationArgs(
            state_machine_version_arn="arn:aws:states:us-east-1:12345:stateMachine:demo:3",
            weight=50,
        ),
        aws.sfn.AliasRoutingConfigurationArgs(
            state_machine_version_arn="arn:aws:states:us-east-1:12345:stateMachine:demo:2",
            weight=50,
        ),
    ])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const sfnAlias = new aws.sfn.Alias("sfnAlias", {routingConfigurations: [{
        stateMachineVersionArn: aws_sfn_state_machine.sfn_test.state_machine_version_arn,
        weight: 100,
    }]});
    const mySfnAlias = new aws.sfn.Alias("mySfnAlias", {routingConfigurations: [
        {
            stateMachineVersionArn: "arn:aws:states:us-east-1:12345:stateMachine:demo:3",
            weight: 50,
        },
        {
            stateMachineVersionArn: "arn:aws:states:us-east-1:12345:stateMachine:demo:2",
            weight: 50,
        },
    ]});
    
    resources:
      sfnAlias:
        type: aws:sfn:Alias
        properties:
          routingConfigurations:
            - stateMachineVersionArn: ${aws_sfn_state_machine.sfn_test.state_machine_version_arn}
              weight: 100
      mySfnAlias:
        type: aws:sfn:Alias
        properties:
          routingConfigurations:
            - stateMachineVersionArn: arn:aws:states:us-east-1:12345:stateMachine:demo:3
              weight: 50
            - stateMachineVersionArn: arn:aws:states:us-east-1:12345:stateMachine:demo:2
              weight: 50
    

    Create Alias Resource

    new Alias(name: string, args: AliasArgs, opts?: CustomResourceOptions);
    @overload
    def Alias(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              description: Optional[str] = None,
              name: Optional[str] = None,
              routing_configurations: Optional[Sequence[AliasRoutingConfigurationArgs]] = None)
    @overload
    def Alias(resource_name: str,
              args: AliasArgs,
              opts: Optional[ResourceOptions] = None)
    func NewAlias(ctx *Context, name string, args AliasArgs, opts ...ResourceOption) (*Alias, error)
    public Alias(string name, AliasArgs args, CustomResourceOptions? opts = null)
    public Alias(String name, AliasArgs args)
    public Alias(String name, AliasArgs args, CustomResourceOptions options)
    
    type: aws:sfn:Alias
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args AliasArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AliasArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AliasArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AliasArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AliasArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Alias Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Alias resource accepts the following input properties:

    RoutingConfigurations List<AliasRoutingConfiguration>

    The StateMachine alias' route configuration settings. Fields documented below

    Description string

    Description of the alias.

    Name string

    Name for the alias you are creating.

    RoutingConfigurations []AliasRoutingConfigurationArgs

    The StateMachine alias' route configuration settings. Fields documented below

    Description string

    Description of the alias.

    Name string

    Name for the alias you are creating.

    routingConfigurations List<AliasRoutingConfiguration>

    The StateMachine alias' route configuration settings. Fields documented below

    description String

    Description of the alias.

    name String

    Name for the alias you are creating.

    routingConfigurations AliasRoutingConfiguration[]

    The StateMachine alias' route configuration settings. Fields documented below

    description string

    Description of the alias.

    name string

    Name for the alias you are creating.

    routing_configurations Sequence[AliasRoutingConfigurationArgs]

    The StateMachine alias' route configuration settings. Fields documented below

    description str

    Description of the alias.

    name str

    Name for the alias you are creating.

    routingConfigurations List<Property Map>

    The StateMachine alias' route configuration settings. Fields documented below

    description String

    Description of the alias.

    name String

    Name for the alias you are creating.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Alias resource produces the following output properties:

    Arn string

    The Amazon Resource Name (ARN) identifying your state machine alias.

    CreationDate string

    The date the state machine alias was created.

    Id string

    The provider-assigned unique ID for this managed resource.

    Arn string

    The Amazon Resource Name (ARN) identifying your state machine alias.

    CreationDate string

    The date the state machine alias was created.

    Id string

    The provider-assigned unique ID for this managed resource.

    arn String

    The Amazon Resource Name (ARN) identifying your state machine alias.

    creationDate String

    The date the state machine alias was created.

    id String

    The provider-assigned unique ID for this managed resource.

    arn string

    The Amazon Resource Name (ARN) identifying your state machine alias.

    creationDate string

    The date the state machine alias was created.

    id string

    The provider-assigned unique ID for this managed resource.

    arn str

    The Amazon Resource Name (ARN) identifying your state machine alias.

    creation_date str

    The date the state machine alias was created.

    id str

    The provider-assigned unique ID for this managed resource.

    arn String

    The Amazon Resource Name (ARN) identifying your state machine alias.

    creationDate String

    The date the state machine alias was created.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing Alias Resource

    Get an existing Alias resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AliasState, opts?: CustomResourceOptions): Alias
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            creation_date: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            routing_configurations: Optional[Sequence[AliasRoutingConfigurationArgs]] = None) -> Alias
    func GetAlias(ctx *Context, name string, id IDInput, state *AliasState, opts ...ResourceOption) (*Alias, error)
    public static Alias Get(string name, Input<string> id, AliasState? state, CustomResourceOptions? opts = null)
    public static Alias get(String name, Output<String> id, AliasState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string

    The Amazon Resource Name (ARN) identifying your state machine alias.

    CreationDate string

    The date the state machine alias was created.

    Description string

    Description of the alias.

    Name string

    Name for the alias you are creating.

    RoutingConfigurations List<AliasRoutingConfiguration>

    The StateMachine alias' route configuration settings. Fields documented below

    Arn string

    The Amazon Resource Name (ARN) identifying your state machine alias.

    CreationDate string

    The date the state machine alias was created.

    Description string

    Description of the alias.

    Name string

    Name for the alias you are creating.

    RoutingConfigurations []AliasRoutingConfigurationArgs

    The StateMachine alias' route configuration settings. Fields documented below

    arn String

    The Amazon Resource Name (ARN) identifying your state machine alias.

    creationDate String

    The date the state machine alias was created.

    description String

    Description of the alias.

    name String

    Name for the alias you are creating.

    routingConfigurations List<AliasRoutingConfiguration>

    The StateMachine alias' route configuration settings. Fields documented below

    arn string

    The Amazon Resource Name (ARN) identifying your state machine alias.

    creationDate string

    The date the state machine alias was created.

    description string

    Description of the alias.

    name string

    Name for the alias you are creating.

    routingConfigurations AliasRoutingConfiguration[]

    The StateMachine alias' route configuration settings. Fields documented below

    arn str

    The Amazon Resource Name (ARN) identifying your state machine alias.

    creation_date str

    The date the state machine alias was created.

    description str

    Description of the alias.

    name str

    Name for the alias you are creating.

    routing_configurations Sequence[AliasRoutingConfigurationArgs]

    The StateMachine alias' route configuration settings. Fields documented below

    arn String

    The Amazon Resource Name (ARN) identifying your state machine alias.

    creationDate String

    The date the state machine alias was created.

    description String

    Description of the alias.

    name String

    Name for the alias you are creating.

    routingConfigurations List<Property Map>

    The StateMachine alias' route configuration settings. Fields documented below

    Supporting Types

    AliasRoutingConfiguration, AliasRoutingConfigurationArgs

    StateMachineVersionArn string

    A version of the state machine.

    Weight int

    Percentage of traffic routed to the state machine version.

    The following arguments are optional:

    StateMachineVersionArn string

    A version of the state machine.

    Weight int

    Percentage of traffic routed to the state machine version.

    The following arguments are optional:

    stateMachineVersionArn String

    A version of the state machine.

    weight Integer

    Percentage of traffic routed to the state machine version.

    The following arguments are optional:

    stateMachineVersionArn string

    A version of the state machine.

    weight number

    Percentage of traffic routed to the state machine version.

    The following arguments are optional:

    state_machine_version_arn str

    A version of the state machine.

    weight int

    Percentage of traffic routed to the state machine version.

    The following arguments are optional:

    stateMachineVersionArn String

    A version of the state machine.

    weight Number

    Percentage of traffic routed to the state machine version.

    The following arguments are optional:

    Import

    Using pulumi import, import SFN (Step Functions) Alias using the arn. For example:

     $ pulumi import aws:sfn/alias:Alias foo arn:aws:states:us-east-1:123456789098:stateMachine:myStateMachine:foo
    

    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.2.1 published on Friday, Sep 22, 2023 by Pulumi