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.42.0 published on Wednesday, Jun 26, 2024 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.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides a Step Function State Machine Alias.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const sfnAlias = new aws.sfn.Alias("sfn_alias", {
        name: "my_sfn_alias",
        routingConfigurations: [{
            stateMachineVersionArn: sfnTest.stateMachineVersionArn,
            weight: 100,
        }],
    });
    const mySfnAlias = new aws.sfn.Alias("my_sfn_alias", {
        name: "my_sfn_alias",
        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,
            },
        ],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    sfn_alias = aws.sfn.Alias("sfn_alias",
        name="my_sfn_alias",
        routing_configurations=[{
            "stateMachineVersionArn": sfn_test["stateMachineVersionArn"],
            "weight": 100,
        }])
    my_sfn_alias = aws.sfn.Alias("my_sfn_alias",
        name="my_sfn_alias",
        routing_configurations=[
            {
                "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,
            },
        ])
    
    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, "sfn_alias", &sfn.AliasArgs{
    			Name: pulumi.String("my_sfn_alias"),
    			RoutingConfigurations: sfn.AliasRoutingConfigurationArray{
    				&sfn.AliasRoutingConfigurationArgs{
    					StateMachineVersionArn: pulumi.Any(sfnTest.StateMachineVersionArn),
    					Weight:                 pulumi.Int(100),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = sfn.NewAlias(ctx, "my_sfn_alias", &sfn.AliasArgs{
    			Name: pulumi.String("my_sfn_alias"),
    			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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var sfnAlias = new Aws.Sfn.Alias("sfn_alias", new()
        {
            Name = "my_sfn_alias",
            RoutingConfigurations = new[]
            {
                new Aws.Sfn.Inputs.AliasRoutingConfigurationArgs
                {
                    StateMachineVersionArn = sfnTest.StateMachineVersionArn,
                    Weight = 100,
                },
            },
        });
    
        var mySfnAlias = new Aws.Sfn.Alias("my_sfn_alias", new()
        {
            Name = "my_sfn_alias",
            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 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()
                .name("my_sfn_alias")
                .routingConfigurations(AliasRoutingConfigurationArgs.builder()
                    .stateMachineVersionArn(sfnTest.stateMachineVersionArn())
                    .weight(100)
                    .build())
                .build());
    
            var mySfnAlias = new Alias("mySfnAlias", AliasArgs.builder()
                .name("my_sfn_alias")
                .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());
    
        }
    }
    
    resources:
      sfnAlias:
        type: aws:sfn:Alias
        name: sfn_alias
        properties:
          name: my_sfn_alias
          routingConfigurations:
            - stateMachineVersionArn: ${sfnTest.stateMachineVersionArn}
              weight: 100
      mySfnAlias:
        type: aws:sfn:Alias
        name: my_sfn_alias
        properties:
          name: my_sfn_alias
          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

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Alias(name: string, args: AliasArgs, opts?: CustomResourceOptions);
    @overload
    def Alias(resource_name: str,
              args: AliasArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Alias(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              routing_configurations: Optional[Sequence[AliasRoutingConfigurationArgs]] = None,
              description: Optional[str] = None,
              name: Optional[str] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var examplealiasResourceResourceFromSfnalias = new Aws.Sfn.Alias("examplealiasResourceResourceFromSfnalias", new()
    {
        RoutingConfigurations = new[]
        {
            new Aws.Sfn.Inputs.AliasRoutingConfigurationArgs
            {
                StateMachineVersionArn = "string",
                Weight = 0,
            },
        },
        Description = "string",
        Name = "string",
    });
    
    example, err := sfn.NewAlias(ctx, "examplealiasResourceResourceFromSfnalias", &sfn.AliasArgs{
    	RoutingConfigurations: sfn.AliasRoutingConfigurationArray{
    		&sfn.AliasRoutingConfigurationArgs{
    			StateMachineVersionArn: pulumi.String("string"),
    			Weight:                 pulumi.Int(0),
    		},
    	},
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    })
    
    var examplealiasResourceResourceFromSfnalias = new Alias("examplealiasResourceResourceFromSfnalias", AliasArgs.builder()
        .routingConfigurations(AliasRoutingConfigurationArgs.builder()
            .stateMachineVersionArn("string")
            .weight(0)
            .build())
        .description("string")
        .name("string")
        .build());
    
    examplealias_resource_resource_from_sfnalias = aws.sfn.Alias("examplealiasResourceResourceFromSfnalias",
        routing_configurations=[{
            "stateMachineVersionArn": "string",
            "weight": 0,
        }],
        description="string",
        name="string")
    
    const examplealiasResourceResourceFromSfnalias = new aws.sfn.Alias("examplealiasResourceResourceFromSfnalias", {
        routingConfigurations: [{
            stateMachineVersionArn: "string",
            weight: 0,
        }],
        description: "string",
        name: "string",
    });
    
    type: aws:sfn:Alias
    properties:
        description: string
        name: string
        routingConfigurations:
            - stateMachineVersionArn: string
              weight: 0
    

    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
    The Amazon Resource Name (ARN) of the state machine version.
    Weight int
    Percentage of traffic routed to the state machine version.
    StateMachineVersionArn string
    The Amazon Resource Name (ARN) of the state machine version.
    Weight int
    Percentage of traffic routed to the state machine version.
    stateMachineVersionArn String
    The Amazon Resource Name (ARN) of the state machine version.
    weight Integer
    Percentage of traffic routed to the state machine version.
    stateMachineVersionArn string
    The Amazon Resource Name (ARN) of the state machine version.
    weight number
    Percentage of traffic routed to the state machine version.
    state_machine_version_arn str
    The Amazon Resource Name (ARN) of the state machine version.
    weight int
    Percentage of traffic routed to the state machine version.
    stateMachineVersionArn String
    The Amazon Resource Name (ARN) of the state machine version.
    weight Number
    Percentage of traffic routed to the state machine version.

    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
    

    To learn more about importing existing cloud resources, see Importing resources.

    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