Try AWS Native preview for resources not in the classic version.
aws.sfn.Alias
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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)
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:
- Routing
Configurations List<AliasRouting Configuration> 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 []AliasRouting Configuration Args 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 List<AliasRouting Configuration> 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 AliasRouting Configuration[] 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[AliasRouting Configuration Args] The StateMachine alias' route configuration settings. Fields documented below
- description str
Description of the alias.
- name str
Name for the alias you are creating.
- routing
Configurations 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.
- Creation
Date 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.
- Creation
Date 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.
- creation
Date 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.
- creation
Date 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.
- creation
Date 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.
- Arn string
The Amazon Resource Name (ARN) identifying your state machine alias.
- Creation
Date string The date the state machine alias was created.
- Description string
Description of the alias.
- Name string
Name for the alias you are creating.
- Routing
Configurations List<AliasRouting Configuration> The StateMachine alias' route configuration settings. Fields documented below
- Arn string
The Amazon Resource Name (ARN) identifying your state machine alias.
- Creation
Date string The date the state machine alias was created.
- Description string
Description of the alias.
- Name string
Name for the alias you are creating.
- Routing
Configurations []AliasRouting Configuration Args The StateMachine alias' route configuration settings. Fields documented below
- arn String
The Amazon Resource Name (ARN) identifying your state machine alias.
- creation
Date String The date the state machine alias was created.
- description String
Description of the alias.
- name String
Name for the alias you are creating.
- routing
Configurations List<AliasRouting Configuration> The StateMachine alias' route configuration settings. Fields documented below
- arn string
The Amazon Resource Name (ARN) identifying your state machine alias.
- creation
Date string The date the state machine alias was created.
- description string
Description of the alias.
- name string
Name for the alias you are creating.
- routing
Configurations AliasRouting Configuration[] 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[AliasRouting Configuration Args] The StateMachine alias' route configuration settings. Fields documented below
- arn String
The Amazon Resource Name (ARN) identifying your state machine alias.
- creation
Date String The date the state machine alias was created.
- description String
Description of the alias.
- name String
Name for the alias you are creating.
- routing
Configurations List<Property Map> The StateMachine alias' route configuration settings. Fields documented below
Supporting Types
AliasRoutingConfiguration, AliasRoutingConfigurationArgs
- State
Machine stringVersion Arn A version of the state machine.
- Weight int
Percentage of traffic routed to the state machine version.
The following arguments are optional:
- State
Machine stringVersion Arn A version of the state machine.
- Weight int
Percentage of traffic routed to the state machine version.
The following arguments are optional:
- state
Machine StringVersion Arn A version of the state machine.
- weight Integer
Percentage of traffic routed to the state machine version.
The following arguments are optional:
- state
Machine stringVersion Arn A version of the state machine.
- weight number
Percentage of traffic routed to the state machine version.
The following arguments are optional:
- state_
machine_ strversion_ arn A version of the state machine.
- weight int
Percentage of traffic routed to the state machine version.
The following arguments are optional:
- state
Machine StringVersion Arn 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.
Try AWS Native preview for resources not in the classic version.