awsstepfunctions

package
v2.155.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 12 Imported by: 33

README

AWS Step Functions Construct Library

The aws-cdk-lib/aws-stepfunctions package contains constructs for building serverless workflows using objects. Use this in conjunction with the aws-cdk-lib/aws-stepfunctions-tasks package, which contains classes used to call other AWS services.

Defining a workflow looks like this (for the Step Functions Job Poller example):

Example

import lambda "github.com/aws/aws-cdk-go/awscdk"

var submitLambda function
var getStatusLambda function


submitJob := tasks.NewLambdaInvoke(this, jsii.String("Submit Job"), &LambdaInvokeProps{
	LambdaFunction: submitLambda,
	// Lambda's result is in the attribute `guid`
	OutputPath: jsii.String("$.guid"),
})

waitX := sfn.NewWait(this, jsii.String("Wait X Seconds"), &WaitProps{
	Time: sfn.WaitTime_SecondsPath(jsii.String("$.waitSeconds")),
})

getStatus := tasks.NewLambdaInvoke(this, jsii.String("Get Job Status"), &LambdaInvokeProps{
	LambdaFunction: getStatusLambda,
	// Pass just the field named "guid" into the Lambda, put the
	// Lambda's result in a field called "status" in the response
	InputPath: jsii.String("$.guid"),
	OutputPath: jsii.String("$.status"),
})

jobFailed := sfn.NewFail(this, jsii.String("Job Failed"), &FailProps{
	Cause: jsii.String("AWS Batch Job Failed"),
	Error: jsii.String("DescribeJob returned FAILED"),
})

finalStatus := tasks.NewLambdaInvoke(this, jsii.String("Get Final Job Status"), &LambdaInvokeProps{
	LambdaFunction: getStatusLambda,
	// Use "guid" field as input
	InputPath: jsii.String("$.guid"),
	OutputPath: jsii.String("$.Payload"),
})

definition := submitJob.Next(waitX).Next(getStatus).Next(sfn.NewChoice(this, jsii.String("Job Complete?")).When(sfn.Condition_StringEquals(jsii.String("$.status"), jsii.String("FAILED")), jobFailed).When(sfn.Condition_StringEquals(jsii.String("$.status"), jsii.String("SUCCEEDED")), finalStatus).Otherwise(waitX))

sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromChainable(definition),
	Timeout: awscdk.Duration_Minutes(jsii.Number(5)),
	Comment: jsii.String("a super cool state machine"),
})

You can find more sample snippets and learn more about the service integrations in the aws-cdk-lib/aws-stepfunctions-tasks package.

State Machine

A stepfunctions.StateMachine is a resource that takes a state machine definition. The definition is specified by its start state, and encompasses all states reachable from the start state:

startState := sfn.NewPass(this, jsii.String("StartState"))

sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromChainable(startState),
})

State machines are made up of a sequence of Steps, which represent different actions taken in sequence. Some of these steps represent control flow (like Choice, Map and Wait) while others represent calls made against other AWS services (like LambdaInvoke). The second category are called Tasks and they can all be found in the module aws-stepfunctions-tasks.

State machines execute using an IAM Role, which will automatically have all permissions added that are required to make all state machine tasks execute properly (for example, permissions to invoke any Lambda functions you add to your workflow). A role will be created by default, but you can supply an existing one as well.

Set the removalPolicy prop to RemovalPolicy.RETAIN if you want to retain the execution history when CloudFormation deletes your state machine.

Alternatively you can specify an existing step functions definition by providing a string or a file that contains the ASL JSON.

sfn.NewStateMachine(this, jsii.String("StateMachineFromString"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromString(jsii.String("{\"StartAt\":\"Pass\",\"States\":{\"Pass\":{\"Type\":\"Pass\",\"End\":true}}}")),
})

sfn.NewStateMachine(this, jsii.String("StateMachineFromFile"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromFile(jsii.String("./asl.json")),
})

State Machine Data

An Execution represents each time the State Machine is run. Every Execution has State Machine Data: a JSON document containing keys and values that is fed into the state machine, gets modified by individual steps as the state machine progresses, and finally is produced as output.

By default, the entire Data object is passed into every state, and the return data of the step becomes new the new Data object. This behavior can be modified by supplying values for inputPath, resultSelector, resultPath and outputPath.

Manipulating state machine data using inputPath, resultSelector, resultPath and outputPath

These properties impact how each individual step interacts with the state machine data:

  • stateName: the name of the state in the state machine definition. If not supplied, defaults to the construct id.
  • inputPath: the part of the data object that gets passed to the step (itemsPath for Map states)
  • resultSelector: the part of the step result that should be added to the state machine data
  • resultPath: where in the state machine data the step result should be inserted
  • outputPath: what part of the state machine data should be retained
  • errorPath: the part of the data object that gets returned as the step error
  • causePath: the part of the data object that gets returned as the step cause

Their values should be a string indicating a JSON path into the State Machine Data object (like "$.MyKey"). If absent, the values are treated as if they were "$", which means the entire object.

The following pseudocode shows how AWS Step Functions uses these parameters when executing a step:

// Schematically show how Step Functions evaluates functions.
// [] represents indexing into an object by a using JSON path.

input = state[inputPath]

result = invoke_step(select_parameters(input))

state[resultPath] = result[resultSelector]

state = state[outputPath]

Instead of a JSON path string, each of these paths can also have the special value JsonPath.DISCARD, which causes the corresponding indexing expression to return an empty object ({}). Effectively, that means there will be an empty input object, an empty result object, no effect on the state, or an empty state, respectively.

Some steps (mostly Tasks) have Parameters, which are selected differently. See the next section.

See the official documentation on input and output processing in Step Functions.

Passing Parameters to Tasks

Tasks take parameters, whose values can be taken from the State Machine Data object. For example, your workflow may want to start a CodeBuild with an environment variable that is taken from the State Machine data, or pass part of the State Machine Data into an AWS Lambda Function.

In the original JSON-based states language used by AWS Step Functions, you would add .$ to the end of a key to indicate that a value needs to be interpreted as a JSON path. In the CDK API you do not change the names of any keys. Instead, you pass special values. There are 3 types of task inputs to consider:

  • Tasks that accept a "payload" type of input (like AWS Lambda invocations, or posting messages to SNS topics or SQS queues), will take an object of type TaskInput, like TaskInput.fromObject() or TaskInput.fromJsonPathAt().
  • When tasks expect individual string or number values to customize their behavior, you can also pass a value constructed by JsonPath.stringAt() or JsonPath.numberAt().
  • When tasks expect strongly-typed resources and you want to vary the resource that is referenced based on a name from the State Machine Data, reference the resource as if it was external (using JsonPath.stringAt()). For example, for a Lambda function: Function.fromFunctionName(this, 'ReferencedFunction', JsonPath.stringAt('$.MyFunctionName')).

For example, to pass the value that's in the data key of OrderId to a Lambda function as you invoke it, use JsonPath.stringAt('$.OrderId'), like so:

import lambda "github.com/aws/aws-cdk-go/awscdk"

var orderFn function


submitJob := tasks.NewLambdaInvoke(this, jsii.String("InvokeOrderProcessor"), &LambdaInvokeProps{
	LambdaFunction: orderFn,
	Payload: sfn.TaskInput_FromObject(map[string]interface{}{
		"OrderId": sfn.JsonPath_stringAt(jsii.String("$.OrderId")),
	}),
})

The following methods are available:

Method Purpose
JsonPath.stringAt('$.Field') reference a field, return the type as a string.
JsonPath.listAt('$.Field') reference a field, return the type as a list of strings.
JsonPath.numberAt('$.Field') reference a field, return the type as a number. Use this for functions that expect a number argument.
JsonPath.objectAt('$.Field') reference a field, return the type as an IResolvable. Use this for functions that expect an object argument.
JsonPath.entirePayload reference the entire data object (equivalent to a path of $).
JsonPath.taskToken reference the Task Token, used for integration patterns that need to run for a long time.
JsonPath.executionId reference the Execution Id field of the context object.
JsonPath.executionInput reference the Execution Input object of the context object.
JsonPath.executionName reference the Execution Name field of the context object.
JsonPath.executionRoleArn reference the Execution RoleArn field of the context object.
JsonPath.executionStartTime reference the Execution StartTime field of the context object.
JsonPath.stateEnteredTime reference the State EnteredTime field of the context object.
JsonPath.stateName reference the State Name field of the context object.
JsonPath.stateRetryCount reference the State RetryCount field of the context object.
JsonPath.stateMachineId reference the StateMachine Id field of the context object.
JsonPath.stateMachineName reference the StateMachine Name field of the context object.

You can also call intrinsic functions using the methods on JsonPath:

Method Purpose
JsonPath.array(JsonPath.stringAt('$.Field'), ...) make an array from other elements.
JsonPath.arrayPartition(JsonPath.listAt('$.inputArray'), 4) partition an array.
JsonPath.arrayContains(JsonPath.listAt('$.inputArray'), 5) determine if a specific value is present in an array.
JsonPath.arrayRange(1, 9, 2) create a new array containing a specific range of elements.
JsonPath.arrayGetItem(JsonPath.listAt('$.inputArray'), 5) get a specified index's value in an array.
JsonPath.arrayLength(JsonPath.listAt('$.inputArray')) get the length of an array.
JsonPath.arrayUnique(JsonPath.listAt('$.inputArray')) remove duplicate values from an array.
JsonPath.base64Encode(JsonPath.stringAt('$.input')) encode data based on MIME Base64 encoding scheme.
JsonPath.base64Decode(JsonPath.stringAt('$.base64')) decode data based on MIME Base64 decoding scheme.
JsonPath.hash(JsonPath.objectAt('$.Data'), JsonPath.stringAt('$.Algorithm')) calculate the hash value of a given input.
JsonPath.jsonMerge(JsonPath.objectAt('$.Obj1'), JsonPath.objectAt('$.Obj2')) merge two JSON objects into a single object.
JsonPath.stringToJson(JsonPath.stringAt('$.ObjStr')) parse a JSON string to an object
JsonPath.jsonToString(JsonPath.objectAt('$.Obj')) stringify an object to a JSON string
JsonPath.mathRandom(1, 999) return a random number.
JsonPath.mathAdd(JsonPath.numberAt('$.value1'), JsonPath.numberAt('$.step')) return the sum of two numbers.
JsonPath.stringSplit(JsonPath.stringAt('$.inputString'), JsonPath.stringAt('$.splitter')) split a string into an array of values.
JsonPath.uuid() return a version 4 universally unique identifier (v4 UUID).
JsonPath.format('The value is {}.', JsonPath.stringAt('$.Value')) insert elements into a format string.

Amazon States Language

This library comes with a set of classes that model the Amazon States Language. The following State classes are supported:

An arbitrary JSON object (specified at execution start) is passed from state to state and transformed during the execution of the workflow. For more information, see the States Language spec.

Task

A Task represents some work that needs to be done. Do not use the Task class directly.

Instead, use one of the classes in the aws-cdk-lib/aws-stepfunctions-tasks module, which provide a much more ergonomic way to integrate with various AWS services.

Pass

A Pass state passes its input to its output, without performing work. Pass states are useful when constructing and debugging state machines.

The following example injects some fixed data into the state machine through the result field. The result field will be added to the input and the result will be passed as the state's output.

// Makes the current JSON state { ..., "subObject": { "hello": "world" } }
pass := sfn.NewPass(this, jsii.String("Add Hello World"), &PassProps{
	Result: sfn.Result_FromObject(map[string]interface{}{
		"hello": jsii.String("world"),
	}),
	ResultPath: jsii.String("$.subObject"),
})

// Set the next state
nextState := sfn.NewPass(this, jsii.String("NextState"))
pass.Next(nextState)

The Pass state also supports passing key-value pairs as input. Values can be static, or selected from the input with a path.

The following example filters the greeting field from the state input and also injects a field called otherData.

pass := sfn.NewPass(this, jsii.String("Filter input and inject data"), &PassProps{
	StateName: jsii.String("my-pass-state"),
	 // the custom state name for the Pass state, defaults to 'Filter input and inject data' as the state name
	Parameters: map[string]interface{}{
		 // input to the pass state
		"input": sfn.JsonPath_stringAt(jsii.String("$.input.greeting")),
		"otherData": jsii.String("some-extra-stuff"),
	},
})

The object specified in parameters will be the input of the Pass state. Since neither Result nor ResultPath are supplied, the Pass state copies its input through to its output.

Learn more about the Pass state

Wait

A Wait state waits for a given number of seconds, or until the current time hits a particular time. The time to wait may be taken from the execution's JSON state.

// Wait until it's the time mentioned in the the state object's "triggerTime"
// field.
wait := sfn.NewWait(this, jsii.String("Wait For Trigger Time"), &WaitProps{
	Time: sfn.WaitTime_TimestampPath(jsii.String("$.triggerTime")),
})

// Set the next state
startTheWork := sfn.NewPass(this, jsii.String("StartTheWork"))
wait.Next(startTheWork)
Choice

A Choice state can take a different path through the workflow based on the values in the execution's JSON state:

choice := sfn.NewChoice(this, jsii.String("Did it work?"))

// Add conditions with .when()
successState := sfn.NewPass(this, jsii.String("SuccessState"))
failureState := sfn.NewPass(this, jsii.String("FailureState"))
choice.When(sfn.Condition_StringEquals(jsii.String("$.status"), jsii.String("SUCCESS")), successState)
choice.When(sfn.Condition_NumberGreaterThan(jsii.String("$.attempts"), jsii.Number(5)), failureState)

// Use .otherwise() to indicate what should be done if none of the conditions match
tryAgainState := sfn.NewPass(this, jsii.String("TryAgainState"))
choice.Otherwise(tryAgainState)

If you want to temporarily branch your workflow based on a condition, but have all branches come together and continuing as one (similar to how an if ... then ... else works in a programming language), use the .afterwards() method:

choice := sfn.NewChoice(this, jsii.String("What color is it?"))
handleBlueItem := sfn.NewPass(this, jsii.String("HandleBlueItem"))
handleRedItem := sfn.NewPass(this, jsii.String("HandleRedItem"))
handleOtherItemColor := sfn.NewPass(this, jsii.String("HanldeOtherItemColor"))
choice.When(sfn.Condition_StringEquals(jsii.String("$.color"), jsii.String("BLUE")), handleBlueItem)
choice.When(sfn.Condition_StringEquals(jsii.String("$.color"), jsii.String("RED")), handleRedItem)
choice.Otherwise(handleOtherItemColor)

// Use .afterwards() to join all possible paths back together and continue
shipTheItem := sfn.NewPass(this, jsii.String("ShipTheItem"))
choice.Afterwards().Next(shipTheItem)

You can add comments to Choice states as well as conditions that use choice.when.

choice := sfn.NewChoice(this, jsii.String("What color is it?"), &ChoiceProps{
	Comment: jsii.String("color comment"),
})
handleBlueItem := sfn.NewPass(this, jsii.String("HandleBlueItem"))
handleOtherItemColor := sfn.NewPass(this, jsii.String("HanldeOtherItemColor"))
choice.When(sfn.Condition_StringEquals(jsii.String("$.color"), jsii.String("BLUE")), handleBlueItem, &ChoiceTransitionOptions{
	Comment: jsii.String("blue item comment"),
})
choice.Otherwise(handleOtherItemColor)

If your Choice doesn't have an otherwise() and none of the conditions match the JSON state, a NoChoiceMatched error will be thrown. Wrap the state machine in a Parallel state if you want to catch and recover from this.

Available Conditions

see step function comparison operators

  • Condition.isPresent - matches if a json path is present
  • Condition.isNotPresent - matches if a json path is not present
  • Condition.isString - matches if a json path contains a string
  • Condition.isNotString - matches if a json path is not a string
  • Condition.isNumeric - matches if a json path is numeric
  • Condition.isNotNumeric - matches if a json path is not numeric
  • Condition.isBoolean - matches if a json path is boolean
  • Condition.isNotBoolean - matches if a json path is not boolean
  • Condition.isTimestamp - matches if a json path is a timestamp
  • Condition.isNotTimestamp - matches if a json path is not a timestamp
  • Condition.isNotNull - matches if a json path is not null
  • Condition.isNull - matches if a json path is null
  • Condition.booleanEquals - matches if a boolean field has a given value
  • Condition.booleanEqualsJsonPath - matches if a boolean field equals a value in a given mapping path
  • Condition.stringEqualsJsonPath - matches if a string field equals a given mapping path
  • Condition.stringEquals - matches if a field equals a string value
  • Condition.stringLessThan - matches if a string field sorts before a given value
  • Condition.stringLessThanJsonPath - matches if a string field sorts before a value at given mapping path
  • Condition.stringLessThanEquals - matches if a string field sorts equal to or before a given value
  • Condition.stringLessThanEqualsJsonPath - matches if a string field sorts equal to or before a given mapping
  • Condition.stringGreaterThan - matches if a string field sorts after a given value
  • Condition.stringGreaterThanJsonPath - matches if a string field sorts after a value at a given mapping path
  • Condition.stringGreaterThanEqualsJsonPath - matches if a string field sorts after or equal to value at a given mapping path
  • Condition.stringGreaterThanEquals - matches if a string field sorts after or equal to a given value
  • Condition.numberEquals - matches if a numeric field has the given value
  • Condition.numberEqualsJsonPath - matches if a numeric field has the value in a given mapping path
  • Condition.numberLessThan - matches if a numeric field is less than the given value
  • Condition.numberLessThanJsonPath - matches if a numeric field is less than the value at the given mapping path
  • Condition.numberLessThanEquals - matches if a numeric field is less than or equal to the given value
  • Condition.numberLessThanEqualsJsonPath - matches if a numeric field is less than or equal to the numeric value at given mapping path
  • Condition.numberGreaterThan - matches if a numeric field is greater than the given value
  • Condition.numberGreaterThanJsonPath - matches if a numeric field is greater than the value at a given mapping path
  • Condition.numberGreaterThanEquals - matches if a numeric field is greater than or equal to the given value
  • Condition.numberGreaterThanEqualsJsonPath - matches if a numeric field is greater than or equal to the value at a given mapping path
  • Condition.timestampEquals - matches if a timestamp field is the same time as the given timestamp
  • Condition.timestampEqualsJsonPath - matches if a timestamp field is the same time as the timestamp at a given mapping path
  • Condition.timestampLessThan - matches if a timestamp field is before the given timestamp
  • Condition.timestampLessThanJsonPath - matches if a timestamp field is before the timestamp at a given mapping path
  • Condition.timestampLessThanEquals - matches if a timestamp field is before or equal to the given timestamp
  • Condition.timestampLessThanEqualsJsonPath - matches if a timestamp field is before or equal to the timestamp at a given mapping path
  • Condition.timestampGreaterThan - matches if a timestamp field is after the timestamp at a given mapping path
  • Condition.timestampGreaterThanJsonPath - matches if a timestamp field is after the timestamp at a given mapping path
  • Condition.timestampGreaterThanEquals - matches if a timestamp field is after or equal to the given timestamp
  • Condition.timestampGreaterThanEqualsJsonPath - matches if a timestamp field is after or equal to the timestamp at a given mapping path
  • Condition.stringMatches - matches if a field matches a string pattern that can contain a wild card () e.g: log-.txt or LATEST. No other characters other than "" have any special meaning - * can be escaped: \
Parallel

A Parallel state executes one or more subworkflows in parallel. It can also be used to catch and recover from errors in subworkflows.

parallel := sfn.NewParallel(this, jsii.String("Do the work in parallel"))

// Add branches to be executed in parallel
shipItem := sfn.NewPass(this, jsii.String("ShipItem"))
sendInvoice := sfn.NewPass(this, jsii.String("SendInvoice"))
restock := sfn.NewPass(this, jsii.String("Restock"))
parallel.Branch(shipItem)
parallel.Branch(sendInvoice)
parallel.Branch(restock)

// Retry the whole workflow if something goes wrong with exponential backoff
parallel.AddRetry(&RetryProps{
	MaxAttempts: jsii.Number(1),
	MaxDelay: awscdk.Duration_Seconds(jsii.Number(5)),
	JitterStrategy: sfn.JitterType_FULL,
})

// How to recover from errors
sendFailureNotification := sfn.NewPass(this, jsii.String("SendFailureNotification"))
parallel.AddCatch(sendFailureNotification)

// What to do in case everything succeeded
closeOrder := sfn.NewPass(this, jsii.String("CloseOrder"))
parallel.Next(closeOrder)
Succeed

Reaching a Succeed state terminates the state machine execution with a successful status.

success := sfn.NewSucceed(this, jsii.String("We did it!"))
Fail

Reaching a Fail state terminates the state machine execution with a failure status. The fail state should report the reason for the failure. Failures can be caught by encompassing Parallel states.

fail := sfn.NewFail(this, jsii.String("Fail"), &FailProps{
	Error: jsii.String("WorkflowFailure"),
	Cause: jsii.String("Something went wrong"),
})

The Fail state also supports returning dynamic values as the error and cause that are selected from the input with a path.

fail := sfn.NewFail(this, jsii.String("Fail"), &FailProps{
	ErrorPath: sfn.JsonPath_StringAt(jsii.String("$.someError")),
	CausePath: sfn.JsonPath_*StringAt(jsii.String("$.someCause")),
})

You can also use an intrinsic function that returns a string to specify CausePath and ErrorPath. The available functions include States.Format, States.JsonToString, States.ArrayGetItem, States.Base64Encode, States.Base64Decode, States.Hash, and States.UUID.

fail := sfn.NewFail(this, jsii.String("Fail"), &FailProps{
	ErrorPath: sfn.JsonPath_Format(jsii.String("error: {}."), sfn.JsonPath_StringAt(jsii.String("$.someError"))),
	CausePath: jsii.String("States.Format('cause: {}.', $.someCause)"),
})
Map

A Map state can be used to run a set of steps for each element of an input array. A Map state will execute the same steps for multiple entries of an array in the state input.

While the Parallel state executes multiple branches of steps using the same input, a Map state will execute the same steps for multiple entries of an array in the state input.

map := sfn.NewMap(this, jsii.String("Map State"), &MapProps{
	MaxConcurrency: jsii.Number(1),
	ItemsPath: sfn.JsonPath_StringAt(jsii.String("$.inputForMap")),
	ItemSelector: map[string]interface{}{
		"item": sfn.JsonPath_*StringAt(jsii.String("$.Map.Item.Value")),
	},
	ResultPath: jsii.String("$.mapOutput"),
})

// The Map iterator can contain a IChainable, which can be an individual or multiple steps chained together.
// Below example is with a Choice and Pass step
choice := sfn.NewChoice(this, jsii.String("Choice"))
condition1 := sfn.Condition_StringEquals(jsii.String("$.item.status"), jsii.String("SUCCESS"))
step1 := sfn.NewPass(this, jsii.String("Step1"))
step2 := sfn.NewPass(this, jsii.String("Step2"))
finish := sfn.NewPass(this, jsii.String("Finish"))

definition := choice.When(condition1, step1).Otherwise(step2).Afterwards().Next(finish)

map.ItemProcessor(definition)

To define a distributed Map state set itemProcessors mode to ProcessorMode.DISTRIBUTED. An executionType must be specified for the distributed Map workflow.

map := sfn.NewMap(this, jsii.String("Map State"), &MapProps{
	MaxConcurrency: jsii.Number(1),
	ItemsPath: sfn.JsonPath_StringAt(jsii.String("$.inputForMap")),
	ItemSelector: map[string]interface{}{
		"item": sfn.JsonPath_*StringAt(jsii.String("$.Map.Item.Value")),
	},
	ResultPath: jsii.String("$.mapOutput"),
})

map.ItemProcessor(sfn.NewPass(this, jsii.String("Pass State")), &ProcessorConfig{
	Mode: sfn.ProcessorMode_DISTRIBUTED,
	ExecutionType: sfn.ProcessorType_STANDARD,
})

Visit Using Map state in Distributed mode to orchestrate large-scale parallel workloads for more details.

Distributed Map

Step Functions provides a high-concurrency mode for the Map state known as Distributed mode. In this mode, the Map state can accept input from large-scale Amazon S3 data sources. For example, your input can be a JSON or CSV file stored in an Amazon S3 bucket, or a JSON array passed from a previous step in the workflow. A Map state set to Distributed is known as a Distributed Map state. In this mode, the Map state runs each iteration as a child workflow execution, which enables high concurrency of up to 10,000 parallel child workflow executions. Each child workflow execution has its own, separate execution history from that of the parent workflow.

Use the Map state in Distributed mode when you need to orchestrate large-scale parallel workloads that meet any combination of the following conditions:

  • The size of your dataset exceeds 256 KB.
  • The workflow's execution event history exceeds 25,000 entries.
  • You need a concurrency of more than 40 parallel iterations.

A DistributedMap state can be used to run a set of steps for each element of an input array with high concurrency. A DistributedMap state will execute the same steps for multiple entries of an array in the state input or from S3 objects.

distributedMap := sfn.NewDistributedMap(this, jsii.String("Distributed Map State"), &DistributedMapProps{
	MaxConcurrency: jsii.Number(1),
	ItemsPath: sfn.JsonPath_StringAt(jsii.String("$.inputForMap")),
})
distributedMap.ItemProcessor(sfn.NewPass(this, jsii.String("Pass State")))

Map states in Distributed mode support multiple sources for an array to iterate:

  • JSON array from the state input payload
  • objects in an S3 bucket and optional prefix
  • JSON array in a JSON file stored in S3
  • CSV file stored in S3
  • S3 inventory manifest stored in S3

There are multiple classes that implement IItemReader that can be used to configure the iterator source. These can be provided via the optional itemReader property. The default behavior if itemReader is omitted is to use the input payload.

Map states in Distributed mode also support writing results of the iterator to an S3 bucket and optional prefix. Use a ResultWriter object provided via the optional resultWriter property to configure which S3 location iterator results will be written. The default behavior id resultWriter is omitted is to use the state output payload. However, if the iterator results are larger than the 256 kb limit for Step Functions payloads then the State Machine will fail.

import s3 "github.com/aws/aws-cdk-go/awscdk"


// create a bucket
bucket := s3.NewBucket(this, jsii.String("Bucket"))

distributedMap := sfn.NewDistributedMap(this, jsii.String("Distributed Map State"), &DistributedMapProps{
	ItemReader: sfn.NewS3JsonItemReader(&S3FileItemReaderProps{
		Bucket: bucket,
		Key: jsii.String("my-key.json"),
	}),
	ResultWriter: sfn.NewResultWriter(&ResultWriterProps{
		Bucket: bucket,
		Prefix: jsii.String("my-prefix"),
	}),
})
distributedMap.ItemProcessor(sfn.NewPass(this, jsii.String("Pass State")))

If you want to specify the execution type for the ItemProcessor in the DistributedMap, you must set the mapExecutionType property in the DistributedMap class. When using the DistributedMap class, the ProcessorConfig.executionType property is ignored.

In the following example, the execution type for the ItemProcessor in the DistributedMap is set to EXPRESS based on the value specified for mapExecutionType.

distributedMap := sfn.NewDistributedMap(this, jsii.String("DistributedMap"), &DistributedMapProps{
	MapExecutionType: sfn.StateMachineType_EXPRESS,
})

distributedMap.ItemProcessor(sfn.NewPass(this, jsii.String("Pass")), &ProcessorConfig{
	Mode: sfn.ProcessorMode_DISTRIBUTED,
	ExecutionType: sfn.ProcessorType_STANDARD,
})
Custom State

It's possible that the high-level constructs for the states or stepfunctions-tasks do not have the states or service integrations you are looking for. The primary reasons for this lack of functionality are:

  • A service integration is available through Amazon States Language, but not available as construct classes in the CDK.
  • The state or state properties are available through Step Functions, but are not configurable through constructs

If a feature is not available, a CustomState can be used to supply any Amazon States Language JSON-based object as the state definition.

Code Snippets are available and can be plugged in as the state definition.

Custom states can be chained together with any of the other states to create your state machine definition. You will also need to provide any permissions that are required to the role that the State Machine uses.

The Retry and Catch fields are available for error handling. You can configure the Retry field by defining it in the JSON object or by adding it using the addRetry method. However, the Catch field cannot be configured by defining it in the JSON object, so it must be added using the addCatch method.

The following example uses the DynamoDB service integration to insert data into a DynamoDB table.

import "github.com/aws/aws-cdk-go/awscdk"


// create a table
table := dynamodb.NewTable(this, jsii.String("montable"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
})

finalStatus := sfn.NewPass(this, jsii.String("final step"))

// States language JSON to put an item into DynamoDB
// snippet generated from https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-code-snippet.html#tutorial-code-snippet-1
stateJson := map[string]interface{}{
	"Type": jsii.String("Task"),
	"Resource": jsii.String("arn:aws:states:::dynamodb:putItem"),
	"Parameters": map[string]interface{}{
		"TableName": table.tableName,
		"Item": map[string]map[string]*string{
			"id": map[string]*string{
				"S": jsii.String("MyEntry"),
			},
		},
	},
	"ResultPath": nil,
}

// custom state which represents a task to insert data into DynamoDB
custom := sfn.NewCustomState(this, jsii.String("my custom task"), &CustomStateProps{
	StateJson: StateJson,
})

// catch errors with addCatch
errorHandler := sfn.NewPass(this, jsii.String("handle failure"))
custom.AddCatch(errorHandler)

// retry the task if something goes wrong
custom.AddRetry(&RetryProps{
	Errors: []*string{
		sfn.Errors_ALL(),
	},
	Interval: awscdk.Duration_Seconds(jsii.Number(10)),
	MaxAttempts: jsii.Number(5),
})

chain := sfn.Chain_Start(custom).Next(finalStatus)

sm := sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromChainable(chain),
	Timeout: awscdk.Duration_*Seconds(jsii.Number(30)),
	Comment: jsii.String("a super cool state machine"),
})

// don't forget permissions. You need to assign them
table.GrantWriteData(sm)

Task Chaining

To make defining work flows as convenient (and readable in a top-to-bottom way) as writing regular programs, it is possible to chain most methods invocations. In particular, the .next() method can be repeated. The result of a series of .next() calls is called a Chain, and can be used when defining the jump targets of Choice.on or Parallel.branch:

step1 := sfn.NewPass(this, jsii.String("Step1"))
step2 := sfn.NewPass(this, jsii.String("Step2"))
step3 := sfn.NewPass(this, jsii.String("Step3"))
step4 := sfn.NewPass(this, jsii.String("Step4"))
step5 := sfn.NewPass(this, jsii.String("Step5"))
step6 := sfn.NewPass(this, jsii.String("Step6"))
step7 := sfn.NewPass(this, jsii.String("Step7"))
step8 := sfn.NewPass(this, jsii.String("Step8"))
step9 := sfn.NewPass(this, jsii.String("Step9"))
step10 := sfn.NewPass(this, jsii.String("Step10"))
choice := sfn.NewChoice(this, jsii.String("Choice"))
condition1 := sfn.Condition_StringEquals(jsii.String("$.status"), jsii.String("SUCCESS"))
parallel := sfn.NewParallel(this, jsii.String("Parallel"))
finish := sfn.NewPass(this, jsii.String("Finish"))

definition := step1.Next(step2).Next(choice.When(condition1, step3.Next(step4).Next(step5)).Otherwise(step6).Afterwards()).Next(parallel.Branch(step7.Next(step8)).Branch(step9.Next(step10))).Next(finish)

sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromChainable(definition),
})

If you don't like the visual look of starting a chain directly off the first step, you can use Chain.start:

step1 := sfn.NewPass(this, jsii.String("Step1"))
step2 := sfn.NewPass(this, jsii.String("Step2"))
step3 := sfn.NewPass(this, jsii.String("Step3"))

definition := sfn.Chain_Start(step1).Next(step2).Next(step3)

Task Credentials

Tasks are executed using the State Machine's execution role. In some cases, e.g. cross-account access, an IAM role can be assumed by the State Machine's execution role to provide access to the resource. This can be achieved by providing the optional credentials property which allows using a fixed role or a json expression to resolve the role at runtime from the task's inputs.

import lambda "github.com/aws/aws-cdk-go/awscdk"

var submitLambda function
var iamRole role


// use a fixed role for all task invocations
role := sfn.TaskRole_FromRole(iamRole)
// or use a json expression to resolve the role at runtime based on task inputs
//const role = sfn.TaskRole.fromRoleArnJsonPath('$.RoleArn');

submitJob := tasks.NewLambdaInvoke(this, jsii.String("Submit Job"), &LambdaInvokeProps{
	LambdaFunction: submitLambda,
	OutputPath: jsii.String("$.Payload"),
	// use credentials
	Credentials: &Credentials{
		Role: *Role,
	},
})

See the AWS documentation to learn more about AWS Step Functions support for accessing resources in other AWS accounts.

Service Integration Patterns

AWS Step functions integrate directly with other services, either through an optimised integration pattern, or through the AWS SDK. Therefore, it is possible to change the integrationPattern of services, to enable additional functionality of the said AWS Service:

import glue "github.com/aws/aws-cdk-go/awscdkgluealpha"

var submitGlue job


submitJob := tasks.NewGlueStartJobRun(this, jsii.String("Submit Job"), &GlueStartJobRunProps{
	GlueJobName: submitGlue.JobName,
	IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
})

State Machine Fragments

It is possible to define reusable (or abstracted) mini-state machines by defining a construct that implements IChainable, which requires you to define two fields:

  • startState: State, representing the entry point into this state machine.
  • endStates: INextable[], representing the (one or more) states that outgoing transitions will be added to if you chain onto the fragment.

Since states will be named after their construct IDs, you may need to prefix the IDs of states if you plan to instantiate the same state machine fragment multiples times (otherwise all states in every instantiation would have the same name).

The class StateMachineFragment contains some helper functions (like prefixStates()) to make it easier for you to do this. If you define your state machine as a subclass of this, it will be convenient to use:

import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/constructs-go/constructs"
import "github.com/aws/aws-cdk-go/awscdk"

type myJobProps struct {
	jobFlavor *string
}

type myJob struct {
	stateMachineFragment
	startState state
	endStates []iNextable
}

func newMyJob(parent construct, id *string, props myJobProps) *myJob {
	this := &myJob{}
	sfn.NewStateMachineFragment_Override(this, parent, id)

	choice := sfn.NewChoice(this, jsii.String("Choice")).When(sfn.Condition_StringEquals(jsii.String("$.branch"), jsii.String("left")), sfn.NewPass(this, jsii.String("Left Branch"))).When(sfn.Condition_StringEquals(jsii.String("$.branch"), jsii.String("right")), sfn.NewPass(this, jsii.String("Right Branch")))

	// ...

	this.startState = choice
	this.endStates = choice.Afterwards().EndStates
	return this
}

type myStack struct {
	stack
}

func newMyStack(scope construct, id *string) *myStack {
	this := &myStack{}
	newStack_Override(this, scope, id)
	// Do 3 different variants of MyJob in parallel
	parallel := sfn.NewParallel(this, jsii.String("All jobs")).Branch(NewMyJob(this, jsii.String("Quick"), &myJobProps{
		jobFlavor: jsii.String("quick"),
	}).PrefixStates()).Branch(NewMyJob(this, jsii.String("Medium"), &myJobProps{
		jobFlavor: jsii.String("medium"),
	}).PrefixStates()).Branch(NewMyJob(this, jsii.String("Slow"), &myJobProps{
		jobFlavor: jsii.String("slow"),
	}).PrefixStates())

	sfn.NewStateMachine(this, jsii.String("MyStateMachine"), &StateMachineProps{
		DefinitionBody: sfn.DefinitionBody_FromChainable(parallel),
	})
	return this
}

A few utility functions are available to parse state machine fragments.

  • State.findReachableStates: Retrieve the list of states reachable from a given state.
  • State.findReachableEndStates: Retrieve the list of end or terminal states reachable from a given state.

Activity

Activities represent work that is done on some non-Lambda worker pool. The Step Functions workflow will submit work to this Activity, and a worker pool that you run yourself, probably on EC2, will pull jobs from the Activity and submit the results of individual jobs back.

You need the ARN to do so, so if you use Activities be sure to pass the Activity ARN into your worker pool:

activity := sfn.NewActivity(this, jsii.String("Activity"))

// Read this CloudFormation Output from your application and use it to poll for work on
// the activity.
// Read this CloudFormation Output from your application and use it to poll for work on
// the activity.
awscdk.NewCfnOutput(this, jsii.String("ActivityArn"), &CfnOutputProps{
	Value: activity.ActivityArn,
})
Activity-Level Permissions

Granting IAM permissions to an activity can be achieved by calling the grant(principal, actions) API:

activity := sfn.NewActivity(this, jsii.String("Activity"))

role := iam.NewRole(this, jsii.String("Role"), &RoleProps{
	AssumedBy: iam.NewServicePrincipal(jsii.String("lambda.amazonaws.com")),
})

activity.Grant(role, jsii.String("states:SendTaskSuccess"))

This will grant the IAM principal the specified actions onto the activity.

Metrics

Task object expose various metrics on the execution of that particular task. For example, to create an alarm on a particular task failing:

var task task

cloudwatch.NewAlarm(this, jsii.String("TaskAlarm"), &AlarmProps{
	Metric: task.metricFailed(),
	Threshold: jsii.Number(1),
	EvaluationPeriods: jsii.Number(1),
})

There are also metrics on the complete state machine:

var stateMachine stateMachine

cloudwatch.NewAlarm(this, jsii.String("StateMachineAlarm"), &AlarmProps{
	Metric: stateMachine.metricFailed(),
	Threshold: jsii.Number(1),
	EvaluationPeriods: jsii.Number(1),
})

And there are metrics on the capacity of all state machines in your account:

cloudwatch.NewAlarm(this, jsii.String("ThrottledAlarm"), &AlarmProps{
	Metric: sfn.StateTransitionMetric_MetricThrottledEvents(),
	Threshold: jsii.Number(10),
	EvaluationPeriods: jsii.Number(2),
})

Error names

Step Functions identifies errors in the Amazon States Language using case-sensitive strings, known as error names. The Amazon States Language defines a set of built-in strings that name well-known errors, all beginning with the States. prefix.

  • States.ALL - A wildcard that matches any known error name.

  • States.Runtime - An execution failed due to some exception that could not be processed. Often these are caused by errors at runtime, such as attempting to apply InputPath or OutputPath on a null JSON payload. A States.Runtime error is not retriable, and will always cause the execution to fail. A retry or catch on States.ALL will NOT catch States.Runtime errors.

  • States.DataLimitExceeded - A States.DataLimitExceeded exception will be thrown for the following:

    • When the output of a connector is larger than payload size quota.
    • When the output of a state is larger than payload size quota.
    • When, after Parameters processing, the input of a state is larger than the payload size quota.
    • See the AWS documentation to learn more about AWS Step Functions Quotas.
  • States.HeartbeatTimeout - A Task state failed to send a heartbeat for a period longer than the HeartbeatSeconds value.

  • States.Timeout - A Task state either ran longer than the TimeoutSeconds value, or failed to send a heartbeat for a period longer than the HeartbeatSeconds value.

  • States.TaskFailed- A Task state failed during the execution. When used in a retry or catch, States.TaskFailed acts as a wildcard that matches any known error name except for States.Timeout.

Logging

Enable logging to CloudWatch by passing a logging configuration with a destination LogGroup:

import logs "github.com/aws/aws-cdk-go/awscdk"


logGroup := logs.NewLogGroup(this, jsii.String("MyLogGroup"))

definition := sfn.Chain_Start(sfn.NewPass(this, jsii.String("Pass")))

sfn.NewStateMachine(this, jsii.String("MyStateMachine"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromChainable(definition),
	Logs: &LogOptions{
		Destination: logGroup,
		Level: sfn.LogLevel_ALL,
	},
})

X-Ray tracing

Enable X-Ray tracing for StateMachine:

definition := sfn.Chain_Start(sfn.NewPass(this, jsii.String("Pass")))

sfn.NewStateMachine(this, jsii.String("MyStateMachine"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromChainable(definition),
	TracingEnabled: jsii.Boolean(true),
})

See the AWS documentation to learn more about AWS Step Functions's X-Ray support.

State Machine Permission Grants

IAM roles, users, or groups which need to be able to work with a State Machine should be granted IAM permissions.

Any object that implements the IGrantable interface (has an associated principal) can be granted permissions by calling:

  • stateMachine.grantStartExecution(principal) - grants the principal the ability to execute the state machine
  • stateMachine.grantRead(principal) - grants the principal read access
  • stateMachine.grantTaskResponse(principal) - grants the principal the ability to send task tokens to the state machine
  • stateMachine.grantExecution(principal, actions) - grants the principal execution-level permissions for the IAM actions specified
  • stateMachine.grant(principal, actions) - grants the principal state-machine-level permissions for the IAM actions specified
Start Execution Permission

Grant permission to start an execution of a state machine by calling the grantStartExecution() API.

var definition iChainable
role := iam.NewRole(this, jsii.String("Role"), &RoleProps{
	AssumedBy: iam.NewServicePrincipal(jsii.String("lambda.amazonaws.com")),
})
stateMachine := sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromChainable(definition),
})

// Give role permission to start execution of state machine
stateMachine.grantStartExecution(role)

The following permission is provided to a service principal by the grantStartExecution() API:

  • states:StartExecution - to state machine
Read Permissions

Grant read access to a state machine by calling the grantRead() API.

var definition iChainable
role := iam.NewRole(this, jsii.String("Role"), &RoleProps{
	AssumedBy: iam.NewServicePrincipal(jsii.String("lambda.amazonaws.com")),
})
stateMachine := sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromChainable(definition),
})

// Give role read access to state machine
stateMachine.grantRead(role)

The following read permissions are provided to a service principal by the grantRead() API:

  • states:ListExecutions - to state machine
  • states:ListStateMachines - to state machine
  • states:DescribeExecution - to executions
  • states:DescribeStateMachineForExecution - to executions
  • states:GetExecutionHistory - to executions
  • states:ListActivities - to *
  • states:DescribeStateMachine - to *
  • states:DescribeActivity - to *
Task Response Permissions

Grant permission to allow task responses to a state machine by calling the grantTaskResponse() API:

var definition iChainable
role := iam.NewRole(this, jsii.String("Role"), &RoleProps{
	AssumedBy: iam.NewServicePrincipal(jsii.String("lambda.amazonaws.com")),
})
stateMachine := sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromChainable(definition),
})

// Give role task response permissions to the state machine
stateMachine.grantTaskResponse(role)

The following read permissions are provided to a service principal by the grantRead() API:

  • states:SendTaskSuccess - to state machine
  • states:SendTaskFailure - to state machine
  • states:SendTaskHeartbeat - to state machine
Execution-level Permissions

Grant execution-level permissions to a state machine by calling the grantExecution() API:

var definition iChainable
role := iam.NewRole(this, jsii.String("Role"), &RoleProps{
	AssumedBy: iam.NewServicePrincipal(jsii.String("lambda.amazonaws.com")),
})
stateMachine := sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromChainable(definition),
})

// Give role permission to get execution history of ALL executions for the state machine
stateMachine.grantExecution(role, jsii.String("states:GetExecutionHistory"))
Custom Permissions

You can add any set of permissions to a state machine by calling the grant() API.

var definition iChainable
user := iam.NewUser(this, jsii.String("MyUser"))
stateMachine := sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromChainable(definition),
})

//give user permission to send task success to the state machine
stateMachine.grant(user, jsii.String("states:SendTaskSuccess"))

Import

Any Step Functions state machine that has been created outside the stack can be imported into your CDK stack.

State machines can be imported by their ARN via the StateMachine.fromStateMachineArn() API. In addition, the StateMachine can be imported via the StateMachine.fromStateMachineName() method, as long as they are in the same account/region as the current construct.

app := awscdk.NewApp()
stack := awscdk.Newstack(app, jsii.String("MyStack"))
sfn.StateMachine_FromStateMachineArn(this, jsii.String("ViaArnImportedStateMachine"), jsii.String("arn:aws:states:us-east-1:123456789012:stateMachine:StateMachine2E01A3A5-N5TJppzoevKQ"))

sfn.StateMachine_FromStateMachineName(this, jsii.String("ViaResourceNameImportedStateMachine"), jsii.String("StateMachine2E01A3A5-N5TJppzoevKQ"))

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Activity_IsConstruct

func Activity_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func Activity_IsOwnedResource added in v2.32.0

func Activity_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise.

func Activity_IsResource

func Activity_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource.

func CfnActivity_CFN_RESOURCE_TYPE_NAME

func CfnActivity_CFN_RESOURCE_TYPE_NAME() *string

func CfnActivity_IsCfnElement

func CfnActivity_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element.

func CfnActivity_IsCfnResource

func CfnActivity_IsCfnResource(x interface{}) *bool

Check whether the given object is a CfnResource.

func CfnActivity_IsConstruct

func CfnActivity_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func CfnStateMachineAlias_CFN_RESOURCE_TYPE_NAME added in v2.86.0

func CfnStateMachineAlias_CFN_RESOURCE_TYPE_NAME() *string

func CfnStateMachineAlias_IsCfnElement added in v2.86.0

func CfnStateMachineAlias_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element.

func CfnStateMachineAlias_IsCfnResource added in v2.86.0

func CfnStateMachineAlias_IsCfnResource(x interface{}) *bool

Check whether the given object is a CfnResource.

func CfnStateMachineAlias_IsConstruct added in v2.86.0

func CfnStateMachineAlias_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func CfnStateMachineVersion_CFN_RESOURCE_TYPE_NAME added in v2.86.0

func CfnStateMachineVersion_CFN_RESOURCE_TYPE_NAME() *string

func CfnStateMachineVersion_IsCfnElement added in v2.86.0

func CfnStateMachineVersion_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element.

func CfnStateMachineVersion_IsCfnResource added in v2.86.0

func CfnStateMachineVersion_IsCfnResource(x interface{}) *bool

Check whether the given object is a CfnResource.

func CfnStateMachineVersion_IsConstruct added in v2.86.0

func CfnStateMachineVersion_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func CfnStateMachine_CFN_RESOURCE_TYPE_NAME

func CfnStateMachine_CFN_RESOURCE_TYPE_NAME() *string

func CfnStateMachine_IsCfnElement

func CfnStateMachine_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element.

func CfnStateMachine_IsCfnResource

func CfnStateMachine_IsCfnResource(x interface{}) *bool

Check whether the given object is a CfnResource.

func CfnStateMachine_IsConstruct

func CfnStateMachine_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func Choice_FilterNextables

func Choice_FilterNextables(states *[]State) *[]INextable

Return only the states that allow chaining from an array of states.

func Choice_FindReachableEndStates

func Choice_FindReachableEndStates(start State, options *FindStateOptions) *[]State

Find the set of end states states reachable through transitions from the given start state.

func Choice_FindReachableStates

func Choice_FindReachableStates(start State, options *FindStateOptions) *[]State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func Choice_IsConstruct

func Choice_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func Choice_PrefixStates

func Choice_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func CustomState_FilterNextables

func CustomState_FilterNextables(states *[]State) *[]INextable

Return only the states that allow chaining from an array of states.

func CustomState_FindReachableEndStates

func CustomState_FindReachableEndStates(start State, options *FindStateOptions) *[]State

Find the set of end states states reachable through transitions from the given start state.

func CustomState_FindReachableStates

func CustomState_FindReachableStates(start State, options *FindStateOptions) *[]State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func CustomState_IsConstruct

func CustomState_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func CustomState_PrefixStates

func CustomState_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func DistributedMap_FilterNextables added in v2.127.0

func DistributedMap_FilterNextables(states *[]State) *[]INextable

Return only the states that allow chaining from an array of states.

func DistributedMap_FindReachableEndStates added in v2.127.0

func DistributedMap_FindReachableEndStates(start State, options *FindStateOptions) *[]State

Find the set of end states states reachable through transitions from the given start state.

func DistributedMap_FindReachableStates added in v2.127.0

func DistributedMap_FindReachableStates(start State, options *FindStateOptions) *[]State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func DistributedMap_IsConstruct added in v2.127.0

func DistributedMap_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func DistributedMap_IsDistributedMap added in v2.127.0

func DistributedMap_IsDistributedMap(x interface{}) *bool

Return whether the given object is a DistributedMap.

func DistributedMap_PrefixStates added in v2.127.0

func DistributedMap_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func Errors_ALL

func Errors_ALL() *string

func Errors_BRANCH_FAILED

func Errors_BRANCH_FAILED() *string

func Errors_HEARTBEAT_TIMEOUT

func Errors_HEARTBEAT_TIMEOUT() *string

func Errors_NO_CHOICE_MATCHED

func Errors_NO_CHOICE_MATCHED() *string

func Errors_PARAMETER_PATH_FAILURE

func Errors_PARAMETER_PATH_FAILURE() *string

func Errors_PERMISSIONS

func Errors_PERMISSIONS() *string

func Errors_RESULT_PATH_MATCH_FAILURE

func Errors_RESULT_PATH_MATCH_FAILURE() *string

func Errors_TASKS_FAILED

func Errors_TASKS_FAILED() *string

func Errors_TIMEOUT

func Errors_TIMEOUT() *string

func Fail_FilterNextables

func Fail_FilterNextables(states *[]State) *[]INextable

Return only the states that allow chaining from an array of states.

func Fail_FindReachableEndStates

func Fail_FindReachableEndStates(start State, options *FindStateOptions) *[]State

Find the set of end states states reachable through transitions from the given start state.

func Fail_FindReachableStates

func Fail_FindReachableStates(start State, options *FindStateOptions) *[]State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func Fail_IsConstruct

func Fail_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func Fail_PrefixStates

func Fail_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func FieldUtils_ContainsTaskToken

func FieldUtils_ContainsTaskToken(obj *map[string]interface{}) *bool

Returns whether the given task structure contains the TaskToken field anywhere.

The field is considered included if the field itself or one of its containing fields occurs anywhere in the payload.

func FieldUtils_FindReferencedPaths

func FieldUtils_FindReferencedPaths(obj *map[string]interface{}) *[]*string

Return all JSON paths used in the given structure.

func FieldUtils_RenderObject

func FieldUtils_RenderObject(obj *map[string]interface{}) *map[string]interface{}

Render a JSON structure containing fields to the right StepFunctions structure.

func JsonPath_Array added in v2.10.0

func JsonPath_Array(values ...*string) *string

Make an intrinsic States.Array expression.

Combine any number of string literals or JsonPath expressions into an array.

Use this function if the value of an array element directly has to come from a JSON Path expression (either the State object or the Context object).

If the array contains object literals whose values come from a JSON path expression, you do not need to use this function. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_ArrayContains added in v2.50.0

func JsonPath_ArrayContains(array interface{}, value interface{}) *string

Make an intrinsic States.ArrayContains expression.

Use this function to determine if a specific value is present in an array. For example, you can use this function to detect if there was an error in a Map state iteration. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_ArrayGetItem added in v2.50.0

func JsonPath_ArrayGetItem(array interface{}, index *float64) *string

Make an intrinsic States.ArrayGetItem expression.

Use this function to get a specified index's value in an array. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_ArrayLength added in v2.50.0

func JsonPath_ArrayLength(array interface{}) *string

Make an intrinsic States.ArrayLength expression.

Use this function to get the length of an array. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_ArrayPartition added in v2.50.0

func JsonPath_ArrayPartition(array interface{}, chunkSize *float64) *string

Make an intrinsic States.ArrayPartition expression.

Use this function to partition a large array. You can also use this intrinsic to slice the data and then send the payload in smaller chunks. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_ArrayRange added in v2.50.0

func JsonPath_ArrayRange(start *float64, end *float64, step *float64) *string

Make an intrinsic States.ArrayRange expression.

Use this function to create a new array containing a specific range of elements. The new array can contain up to 1000 elements. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_ArrayUnique added in v2.50.0

func JsonPath_ArrayUnique(array interface{}) *string

Make an intrinsic States.ArrayUnique expression.

Use this function to get the length of an array. Use this function to remove duplicate values from an array and returns an array containing only unique elements. This function takes an array, which can be unsorted, as its sole argument. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_Base64Decode added in v2.50.0

func JsonPath_Base64Decode(base64 *string) *string

Make an intrinsic States.Base64Decode expression.

Use this function to decode data based on MIME Base64 decoding scheme. You can use this function to pass data to other AWS services without using a Lambda function. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_Base64Encode added in v2.50.0

func JsonPath_Base64Encode(input *string) *string

Make an intrinsic States.Base64Encode expression.

Use this function to encode data based on MIME Base64 encoding scheme. You can use this function to pass data to other AWS services without using an AWS Lambda function. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_DISCARD

func JsonPath_DISCARD() *string

func JsonPath_EntireContext

func JsonPath_EntireContext() *string

func JsonPath_EntirePayload

func JsonPath_EntirePayload() *string

func JsonPath_ExecutionId added in v2.82.0

func JsonPath_ExecutionId() *string

func JsonPath_ExecutionInput added in v2.82.0

func JsonPath_ExecutionInput() *string

func JsonPath_ExecutionName added in v2.82.0

func JsonPath_ExecutionName() *string

func JsonPath_ExecutionRoleArn added in v2.82.0

func JsonPath_ExecutionRoleArn() *string

func JsonPath_ExecutionStartTime added in v2.82.0

func JsonPath_ExecutionStartTime() *string

func JsonPath_Format added in v2.10.0

func JsonPath_Format(formatString *string, values ...*string) *string

Make an intrinsic States.Format expression.

This can be used to embed JSON Path variables inside a format string.

For example:

```ts sfn.JsonPath.format('Hello, my name is {}.', sfn.JsonPath.stringAt('$.name')) ```. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_Hash added in v2.50.0

func JsonPath_Hash(data interface{}, algorithm *string) *string

Make an intrinsic States.Hash expression.

Use this function to calculate the hash value of a given input. You can use this function to pass data to other AWS services without using a Lambda function. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_IsEncodedJsonPath

func JsonPath_IsEncodedJsonPath(value *string) *bool

Determines if the indicated string is an encoded JSON path.

func JsonPath_JsonMerge added in v2.50.0

func JsonPath_JsonMerge(value1 interface{}, value2 interface{}) *string

Make an intrinsic States.JsonMerge expression.

Use this function to merge two JSON objects into a single object. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_JsonToString added in v2.10.0

func JsonPath_JsonToString(value interface{}) *string

Make an intrinsic States.JsonToString expression.

During the execution of the Step Functions state machine, encode the given object into a JSON string.

For example:

```ts sfn.JsonPath.jsonToString(sfn.JsonPath.objectAt('$.someObject')) ```. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_ListAt

func JsonPath_ListAt(path *string) *[]*string

Instead of using a literal string list, get the value from a JSON path.

func JsonPath_MathAdd added in v2.50.0

func JsonPath_MathAdd(num1 *float64, num2 *float64) *string

Make an intrinsic States.MathAdd expression.

Use this function to return the sum of two numbers. For example, you can use this function to increment values inside a loop without invoking a Lambda function. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_MathRandom added in v2.50.0

func JsonPath_MathRandom(start *float64, end *float64) *string

Make an intrinsic States.MathRandom expression.

Use this function to return a random number between the specified start and end number. For example, you can use this function to distribute a specific task between two or more resources. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_NumberAt

func JsonPath_NumberAt(path *string) *float64

Instead of using a literal number, get the value from a JSON path.

func JsonPath_ObjectAt added in v2.10.0

func JsonPath_ObjectAt(path *string) awscdk.IResolvable

Reference a complete (complex) object in a JSON path location.

func JsonPath_StateEnteredTime added in v2.82.0

func JsonPath_StateEnteredTime() *string

func JsonPath_StateMachineId added in v2.82.0

func JsonPath_StateMachineId() *string

func JsonPath_StateMachineName added in v2.82.0

func JsonPath_StateMachineName() *string

func JsonPath_StateName added in v2.82.0

func JsonPath_StateName() *string

func JsonPath_StateRetryCount added in v2.82.0

func JsonPath_StateRetryCount() *string

func JsonPath_StringAt

func JsonPath_StringAt(path *string) *string

Instead of using a literal string, get the value from a JSON path.

func JsonPath_StringSplit added in v2.50.0

func JsonPath_StringSplit(inputString *string, splitter *string) *string

Make an intrinsic States.StringSplit expression.

Use this function to split a string into an array of values. This function takes two arguments.The first argument is a string and the second argument is the delimiting character that the function will use to divide the string. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_StringToJson added in v2.10.0

func JsonPath_StringToJson(jsonString *string) awscdk.IResolvable

Make an intrinsic States.StringToJson expression.

During the execution of the Step Functions state machine, parse the given argument as JSON into its object form.

For example:

```ts sfn.JsonPath.stringToJson(sfn.JsonPath.stringAt('$.someJsonBody')) ```. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func JsonPath_TaskToken

func JsonPath_TaskToken() *string

func JsonPath_Uuid added in v2.50.0

func JsonPath_Uuid() *string

Make an intrinsic States.UUID expression.

Use this function to return a version 4 universally unique identifier (v4 UUID) generated using random numbers. For example, you can use this function to call other AWS services or resources that need a UUID parameter or insert items in a DynamoDB table. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html

func MapBase_FilterNextables added in v2.127.0

func MapBase_FilterNextables(states *[]State) *[]INextable

Return only the states that allow chaining from an array of states.

func MapBase_FindReachableEndStates added in v2.127.0

func MapBase_FindReachableEndStates(start State, options *FindStateOptions) *[]State

Find the set of end states states reachable through transitions from the given start state.

func MapBase_FindReachableStates added in v2.127.0

func MapBase_FindReachableStates(start State, options *FindStateOptions) *[]State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func MapBase_IsConstruct added in v2.127.0

func MapBase_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func MapBase_PrefixStates added in v2.127.0

func MapBase_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func Map_FilterNextables

func Map_FilterNextables(states *[]State) *[]INextable

Return only the states that allow chaining from an array of states.

func Map_FindReachableEndStates

func Map_FindReachableEndStates(start State, options *FindStateOptions) *[]State

Find the set of end states states reachable through transitions from the given start state.

func Map_FindReachableStates

func Map_FindReachableStates(start State, options *FindStateOptions) *[]State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func Map_IsConstruct

func Map_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func Map_PrefixStates

func Map_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func NewActivity_Override

func NewActivity_Override(a Activity, scope constructs.Construct, id *string, props *ActivityProps)

func NewCfnActivity_Override

func NewCfnActivity_Override(c CfnActivity, scope constructs.Construct, id *string, props *CfnActivityProps)

func NewCfnStateMachineAlias_Override added in v2.86.0

func NewCfnStateMachineAlias_Override(c CfnStateMachineAlias, scope constructs.Construct, id *string, props *CfnStateMachineAliasProps)

func NewCfnStateMachineVersion_Override added in v2.86.0

func NewCfnStateMachineVersion_Override(c CfnStateMachineVersion, scope constructs.Construct, id *string, props *CfnStateMachineVersionProps)

func NewCfnStateMachine_Override

func NewCfnStateMachine_Override(c CfnStateMachine, scope constructs.Construct, id *string, props *CfnStateMachineProps)

func NewChainDefinitionBody_Override added in v2.85.0

func NewChainDefinitionBody_Override(c ChainDefinitionBody, chainable IChainable)

func NewChoice_Override

func NewChoice_Override(c Choice, scope constructs.Construct, id *string, props *ChoiceProps)

func NewCondition_Override

func NewCondition_Override(c Condition)

func NewCustomState_Override

func NewCustomState_Override(c CustomState, scope constructs.Construct, id *string, props *CustomStateProps)

func NewDefinitionBody_Override added in v2.85.0

func NewDefinitionBody_Override(d DefinitionBody)

func NewDistributedMap_Override added in v2.127.0

func NewDistributedMap_Override(d DistributedMap, scope constructs.Construct, id *string, props *DistributedMapProps)

func NewErrors_Override

func NewErrors_Override(e Errors)

func NewFail_Override

func NewFail_Override(f Fail, scope constructs.Construct, id *string, props *FailProps)

func NewFileDefinitionBody_Override added in v2.85.0

func NewFileDefinitionBody_Override(f FileDefinitionBody, path *string, options *awss3assets.AssetOptions)

func NewItemBatcher_Override added in v2.127.0

func NewItemBatcher_Override(i ItemBatcher, props *ItemBatcherProps)

func NewMapBase_Override added in v2.127.0

func NewMapBase_Override(m MapBase, scope constructs.Construct, id *string, props *MapBaseProps)

func NewMap_Override

func NewMap_Override(m Map, scope constructs.Construct, id *string, props *MapProps)

func NewParallel_Override

func NewParallel_Override(p Parallel, scope constructs.Construct, id *string, props *ParallelProps)

func NewPass_Override

func NewPass_Override(p Pass, scope constructs.Construct, id *string, props *PassProps)

func NewResultWriter_Override added in v2.127.0

func NewResultWriter_Override(r ResultWriter, props *ResultWriterProps)

func NewResult_Override

func NewResult_Override(r Result, value interface{})

func NewS3CsvItemReader_Override added in v2.127.0

func NewS3CsvItemReader_Override(s S3CsvItemReader, props *S3CsvItemReaderProps)

func NewS3JsonItemReader_Override added in v2.127.0

func NewS3JsonItemReader_Override(s S3JsonItemReader, props *S3FileItemReaderProps)

func NewS3ManifestItemReader_Override added in v2.127.0

func NewS3ManifestItemReader_Override(s S3ManifestItemReader, props *S3FileItemReaderProps)

func NewS3ObjectsItemReader_Override added in v2.127.0

func NewS3ObjectsItemReader_Override(s S3ObjectsItemReader, props *S3ObjectsItemReaderProps)

func NewStateGraph_Override

func NewStateGraph_Override(s StateGraph, startState State, graphDescription *string)

func NewStateMachineFragment_Override

func NewStateMachineFragment_Override(s StateMachineFragment, scope constructs.Construct, id *string)

Creates a new construct node.

func NewStateMachine_Override

func NewStateMachine_Override(s StateMachine, scope constructs.Construct, id *string, props *StateMachineProps)

func NewStateTransitionMetric_Override

func NewStateTransitionMetric_Override(s StateTransitionMetric)

func NewState_Override

func NewState_Override(s State, scope constructs.Construct, id *string, props *StateProps)

func NewStringDefinitionBody_Override added in v2.85.0

func NewStringDefinitionBody_Override(s StringDefinitionBody, body *string)

func NewSucceed_Override

func NewSucceed_Override(s Succeed, scope constructs.Construct, id *string, props *SucceedProps)

func NewTaskRole_Override added in v2.54.0

func NewTaskRole_Override(t TaskRole)

func NewTaskStateBase_Override

func NewTaskStateBase_Override(t TaskStateBase, scope constructs.Construct, id *string, props *TaskStateBaseProps)

func NewTimeout_Override added in v2.63.0

func NewTimeout_Override(t Timeout)

func NewWait_Override

func NewWait_Override(w Wait, scope constructs.Construct, id *string, props *WaitProps)

func Parallel_FilterNextables

func Parallel_FilterNextables(states *[]State) *[]INextable

Return only the states that allow chaining from an array of states.

func Parallel_FindReachableEndStates

func Parallel_FindReachableEndStates(start State, options *FindStateOptions) *[]State

Find the set of end states states reachable through transitions from the given start state.

func Parallel_FindReachableStates

func Parallel_FindReachableStates(start State, options *FindStateOptions) *[]State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func Parallel_IsConstruct

func Parallel_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func Parallel_PrefixStates

func Parallel_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func Pass_FilterNextables

func Pass_FilterNextables(states *[]State) *[]INextable

Return only the states that allow chaining from an array of states.

func Pass_FindReachableEndStates

func Pass_FindReachableEndStates(start State, options *FindStateOptions) *[]State

Find the set of end states states reachable through transitions from the given start state.

func Pass_FindReachableStates

func Pass_FindReachableStates(start State, options *FindStateOptions) *[]State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func Pass_IsConstruct

func Pass_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func Pass_PrefixStates

func Pass_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func StateMachineFragment_IsConstruct

func StateMachineFragment_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func StateMachine_IsConstruct

func StateMachine_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func StateMachine_IsOwnedResource added in v2.32.0

func StateMachine_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise.

func StateMachine_IsResource

func StateMachine_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource.

func StateTransitionMetric_Metric

func StateTransitionMetric_Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric

Return the given named metric for the service's state transition metrics. Default: average over 5 minutes.

func StateTransitionMetric_MetricConsumedCapacity

func StateTransitionMetric_MetricConsumedCapacity(props *awscloudwatch.MetricOptions) awscloudwatch.Metric

Metric for the number of available state transitions per second. Default: average over 5 minutes.

func StateTransitionMetric_MetricProvisionedBucketSize

func StateTransitionMetric_MetricProvisionedBucketSize(props *awscloudwatch.MetricOptions) awscloudwatch.Metric

Metric for the number of available state transitions. Default: average over 5 minutes.

func StateTransitionMetric_MetricProvisionedRefillRate

func StateTransitionMetric_MetricProvisionedRefillRate(props *awscloudwatch.MetricOptions) awscloudwatch.Metric

Metric for the provisioned steady-state execution rate. Default: average over 5 minutes.

func StateTransitionMetric_MetricThrottledEvents

func StateTransitionMetric_MetricThrottledEvents(props *awscloudwatch.MetricOptions) awscloudwatch.Metric

Metric for the number of throttled state transitions. Default: sum over 5 minutes.

func State_FilterNextables

func State_FilterNextables(states *[]State) *[]INextable

Return only the states that allow chaining from an array of states.

func State_FindReachableEndStates

func State_FindReachableEndStates(start State, options *FindStateOptions) *[]State

Find the set of end states states reachable through transitions from the given start state.

func State_FindReachableStates

func State_FindReachableStates(start State, options *FindStateOptions) *[]State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func State_IsConstruct

func State_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func State_PrefixStates

func State_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func Succeed_FilterNextables

func Succeed_FilterNextables(states *[]State) *[]INextable

Return only the states that allow chaining from an array of states.

func Succeed_FindReachableEndStates

func Succeed_FindReachableEndStates(start State, options *FindStateOptions) *[]State

Find the set of end states states reachable through transitions from the given start state.

func Succeed_FindReachableStates

func Succeed_FindReachableStates(start State, options *FindStateOptions) *[]State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func Succeed_IsConstruct

func Succeed_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func Succeed_PrefixStates

func Succeed_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func TaskStateBase_FilterNextables

func TaskStateBase_FilterNextables(states *[]State) *[]INextable

Return only the states that allow chaining from an array of states.

func TaskStateBase_FindReachableEndStates

func TaskStateBase_FindReachableEndStates(start State, options *FindStateOptions) *[]State

Find the set of end states states reachable through transitions from the given start state.

func TaskStateBase_FindReachableStates

func TaskStateBase_FindReachableStates(start State, options *FindStateOptions) *[]State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func TaskStateBase_IsConstruct

func TaskStateBase_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func TaskStateBase_PrefixStates

func TaskStateBase_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func Wait_FilterNextables

func Wait_FilterNextables(states *[]State) *[]INextable

Return only the states that allow chaining from an array of states.

func Wait_FindReachableEndStates

func Wait_FindReachableEndStates(start State, options *FindStateOptions) *[]State

Find the set of end states states reachable through transitions from the given start state.

func Wait_FindReachableStates

func Wait_FindReachableStates(start State, options *FindStateOptions) *[]State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func Wait_IsConstruct

func Wait_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func Wait_PrefixStates

func Wait_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

Types

type Activity

type Activity interface {
	awscdk.Resource
	IActivity
	// The ARN of the activity.
	ActivityArn() *string
	// The name of the activity.
	ActivityName() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	Env() *awscdk.ResourceEnvironment
	// The tree node.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	PhysicalName() *string
	// The stack in which this resource is defined.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	GetResourceNameAttribute(nameAttr *string) *string
	// Grant the given identity permissions on this Activity.
	Grant(identity awsiam.IGrantable, actions ...*string) awsiam.Grant
	// Return the given named metric for this Activity.
	// Default: sum over 5 minutes.
	//
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of times this activity fails.
	// Default: sum over 5 minutes.
	//
	MetricFailed(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of times the heartbeat times out for this activity.
	// Default: sum over 5 minutes.
	//
	MetricHeartbeatTimedOut(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The interval, in milliseconds, between the time the activity starts and the time it closes.
	// Default: average over 5 minutes.
	//
	MetricRunTime(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of times this activity is scheduled.
	// Default: sum over 5 minutes.
	//
	MetricScheduled(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The interval, in milliseconds, for which the activity stays in the schedule state.
	// Default: average over 5 minutes.
	//
	MetricScheduleTime(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of times this activity is started.
	// Default: sum over 5 minutes.
	//
	MetricStarted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of times this activity succeeds.
	// Default: sum over 5 minutes.
	//
	MetricSucceeded(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The interval, in milliseconds, between the time the activity is scheduled and the time it closes.
	// Default: average over 5 minutes.
	//
	MetricTime(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of times this activity times out.
	// Default: sum over 5 minutes.
	//
	MetricTimedOut(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Returns a string representation of this construct.
	ToString() *string
}

Define a new Step Functions Activity.

Example:

activity := sfn.NewActivity(this, jsii.String("Activity"))

role := iam.NewRole(this, jsii.String("Role"), &RoleProps{
	AssumedBy: iam.NewServicePrincipal(jsii.String("lambda.amazonaws.com")),
})

activity.Grant(role, jsii.String("states:SendTaskSuccess"))

func NewActivity

func NewActivity(scope constructs.Construct, id *string, props *ActivityProps) Activity

type ActivityProps

type ActivityProps struct {
	// The name for this activity.
	// Default: - If not supplied, a name is generated.
	//
	ActivityName *string `field:"optional" json:"activityName" yaml:"activityName"`
}

Properties for defining a new Step Functions Activity.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

activityProps := &ActivityProps{
	ActivityName: jsii.String("activityName"),
}

type AfterwardsOptions

type AfterwardsOptions struct {
	// Whether to include error handling states.
	//
	// If this is true, all states which are error handlers (added through 'onError')
	// and states reachable via error handlers will be included as well.
	// Default: false.
	//
	IncludeErrorHandlers *bool `field:"optional" json:"includeErrorHandlers" yaml:"includeErrorHandlers"`
	// Whether to include the default/otherwise transition for the current Choice state.
	//
	// If this is true and the current Choice does not have a default outgoing
	// transition, one will be added included when .next() is called on the chain.
	// Default: false.
	//
	IncludeOtherwise *bool `field:"optional" json:"includeOtherwise" yaml:"includeOtherwise"`
}

Options for selecting the choice paths.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

afterwardsOptions := &AfterwardsOptions{
	IncludeErrorHandlers: jsii.Boolean(false),
	IncludeOtherwise: jsii.Boolean(false),
}

type CatchProps

type CatchProps struct {
	// Errors to recover from by going to the given state.
	//
	// A list of error strings to retry, which can be either predefined errors
	// (for example Errors.NoChoiceMatched) or a self-defined error.
	// Default: All errors.
	//
	Errors *[]*string `field:"optional" json:"errors" yaml:"errors"`
	// JSONPath expression to indicate where to inject the error data.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the error
	// data to be discarded.
	// Default: $.
	//
	ResultPath *string `field:"optional" json:"resultPath" yaml:"resultPath"`
}

Error handler details.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

catchProps := &CatchProps{
	Errors: []*string{
		jsii.String("errors"),
	},
	ResultPath: jsii.String("resultPath"),
}

type CfnActivity

type CfnActivity interface {
	awscdk.CfnResource
	awscdk.IInspectable
	awscdk.ITaggable
	// Returns the ARN of the resource.
	AttrArn() *string
	// Returns the name of the activity. For example:.
	//
	// `{ "Fn::GetAtt": ["MyActivity", "Name"] }`
	//
	// Returns a value similar to the following:
	//
	// `myActivity`
	//
	// For more information about using `Fn::GetAtt` , see [Fn::GetAtt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html) .
	AttrName() *string
	// Options for this resource, such as condition, update policy etc.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// Encryption configuration for the activity.
	EncryptionConfiguration() interface{}
	SetEncryptionConfiguration(val interface{})
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The name of the activity.
	Name() *string
	SetName(val *string)
	// The tree node.
	Node() constructs.Node
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() awscdk.Stack
	// Tag Manager which manages the tags for this resource.
	Tags() awscdk.TagManager
	// The list of tags to add to a resource.
	TagsRaw() *[]*CfnActivity_TagsEntryProperty
	SetTagsRaw(val *[]*CfnActivity_TagsEntryProperty)
	// Deprecated.
	// Deprecated: use `updatedProperties`
	//
	// Return properties modified after initiation
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperites() *map[string]interface{}
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperties() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	AddDependency(target awscdk.CfnResource)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	// Deprecated: use addDependency.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//   "GlobalSecondaryIndexes": [
	//     {
	//       "Projection": {
	//         "NonKeyAttributes": [ "myattribute" ]
	//         ...
	//       }
	//       ...
	//     },
	//     {
	//       "ProjectionType": "INCLUDE"
	//       ...
	//     },
	//   ]
	//   ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some
	// cases, a snapshot can be taken of the resource prior to deletion
	// (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
	// can be found in the following link:.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options
	//
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Retrieves an array of resources this resource depends on.
	//
	// This assembles dependencies on resources across stacks (including nested stacks)
	// automatically.
	ObtainDependencies() *[]interface{}
	// Get a shallow copy of dependencies between this resource and other resources in the same stack.
	ObtainResourceDependencies() *[]awscdk.CfnResource
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Indicates that this resource no longer depends on another resource.
	//
	// This can be used for resources across stacks (including nested stacks)
	// and the dependency will automatically be removed from the relevant scope.
	RemoveDependency(target awscdk.CfnResource)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Replaces one dependency with another.
	ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource)
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	ShouldSynthesize() *bool
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	ToString() *string
	ValidateProperties(_properties interface{})
}

An activity is a task that you write in any programming language and host on any machine that has access to AWS Step Functions .

Activities must poll Step Functions using the `GetActivityTask` API action and respond using `SendTask*` API actions. This function makes Step Functions aware of your activity and returns an identifier for use in a state machine and when polling from the activity.

For information about creating an activity, see [Creating an Activity State Machine](https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-creating-activity-state-machine.html) in the *AWS Step Functions Developer Guide* and [CreateActivity](https://docs.aws.amazon.com/step-functions/latest/apireference/API_CreateActivity.html) in the *AWS Step Functions API Reference* .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnActivity := awscdk.Aws_stepfunctions.NewCfnActivity(this, jsii.String("MyCfnActivity"), &CfnActivityProps{
	Name: jsii.String("name"),

	// the properties below are optional
	EncryptionConfiguration: &EncryptionConfigurationProperty{
		Type: jsii.String("type"),

		// the properties below are optional
		KmsDataKeyReusePeriodSeconds: jsii.Number(123),
		KmsKeyId: jsii.String("kmsKeyId"),
	},
	Tags: []tagsEntryProperty{
		&tagsEntryProperty{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-activity.html

func NewCfnActivity

func NewCfnActivity(scope constructs.Construct, id *string, props *CfnActivityProps) CfnActivity

type CfnActivityProps

type CfnActivityProps struct {
	// The name of the activity.
	//
	// A name must *not* contain:
	//
	// - white space
	// - brackets `< > { } [ ]`
	// - wildcard characters `? *`
	// - special characters `" # % \ ^ | ~ ` $ & , ; : /`
	// - control characters ( `U+0000-001F` , `U+007F-009F` )
	//
	// To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-activity.html#cfn-stepfunctions-activity-name
	//
	Name *string `field:"required" json:"name" yaml:"name"`
	// Encryption configuration for the activity.
	//
	// Activity configuration is immutable, and resource names must be unique. To set customer managed keys for encryption, you must create a *new Activity* . If you attempt to change the configuration in your CFN template for an existing activity, you will receive an `ActivityAlreadyExists` exception.
	//
	// To update your activity to include customer managed keys, set a new activity name within your AWS CloudFormation template.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-activity.html#cfn-stepfunctions-activity-encryptionconfiguration
	//
	EncryptionConfiguration interface{} `field:"optional" json:"encryptionConfiguration" yaml:"encryptionConfiguration"`
	// The list of tags to add to a resource.
	//
	// Tags may only contain Unicode letters, digits, white space, or these symbols: `_ . : / = + -
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-activity.html#cfn-stepfunctions-activity-tags
	//
	Tags *[]*CfnActivity_TagsEntryProperty `field:"optional" json:"tags" yaml:"tags"`
}

Properties for defining a `CfnActivity`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnActivityProps := &CfnActivityProps{
	Name: jsii.String("name"),

	// the properties below are optional
	EncryptionConfiguration: &EncryptionConfigurationProperty{
		Type: jsii.String("type"),

		// the properties below are optional
		KmsDataKeyReusePeriodSeconds: jsii.Number(123),
		KmsKeyId: jsii.String("kmsKeyId"),
	},
	Tags: []tagsEntryProperty{
		&tagsEntryProperty{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-activity.html

type CfnActivity_EncryptionConfigurationProperty added in v2.154.0

type CfnActivity_EncryptionConfigurationProperty struct {
	// Encryption option for an activity.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-activity-encryptionconfiguration.html#cfn-stepfunctions-activity-encryptionconfiguration-type
	//
	Type *string `field:"required" json:"type" yaml:"type"`
	// Maximum duration that Step Functions will reuse data keys.
	//
	// When the period expires, Step Functions will call `GenerateDataKey` . Only applies to customer managed keys.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-activity-encryptionconfiguration.html#cfn-stepfunctions-activity-encryptionconfiguration-kmsdatakeyreuseperiodseconds
	//
	KmsDataKeyReusePeriodSeconds *float64 `field:"optional" json:"kmsDataKeyReusePeriodSeconds" yaml:"kmsDataKeyReusePeriodSeconds"`
	// An alias, alias ARN, key ID, or key ARN of a symmetric encryption AWS KMS key to encrypt data.
	//
	// To specify a AWS KMS key in a different AWS account, you must use the key ARN or alias ARN.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-activity-encryptionconfiguration.html#cfn-stepfunctions-activity-encryptionconfiguration-kmskeyid
	//
	KmsKeyId *string `field:"optional" json:"kmsKeyId" yaml:"kmsKeyId"`
}

Settings to configure server-side encryption for an activity.

By default, Step Functions provides transparent server-side encryption. With this configuration, you can specify a customer managed AWS KMS key for encryption.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

encryptionConfigurationProperty := &EncryptionConfigurationProperty{
	Type: jsii.String("type"),

	// the properties below are optional
	KmsDataKeyReusePeriodSeconds: jsii.Number(123),
	KmsKeyId: jsii.String("kmsKeyId"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-activity-encryptionconfiguration.html

type CfnActivity_TagsEntryProperty

type CfnActivity_TagsEntryProperty struct {
	// The `key` for a key-value pair in a tag entry.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-activity-tagsentry.html#cfn-stepfunctions-activity-tagsentry-key
	//
	Key *string `field:"required" json:"key" yaml:"key"`
	// The `value` for a key-value pair in a tag entry.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-activity-tagsentry.html#cfn-stepfunctions-activity-tagsentry-value
	//
	Value *string `field:"required" json:"value" yaml:"value"`
}

The `TagsEntry` property specifies *tags* to identify an activity.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

tagsEntryProperty := &TagsEntryProperty{
	Key: jsii.String("key"),
	Value: jsii.String("value"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-activity-tagsentry.html

type CfnStateMachine

type CfnStateMachine interface {
	awscdk.CfnResource
	awscdk.IInspectable
	awscdk.ITaggable
	// Returns the ARN of the resource.
	AttrArn() *string
	// Returns the name of the state machine. For example:.
	//
	// `{ "Fn::GetAtt": ["MyStateMachine", "Name"] }`
	//
	// Returns the name of your state machine:
	//
	// `HelloWorld-StateMachine`
	//
	// If you did not specify the name it will be similar to the following:
	//
	// `MyStateMachine-1234abcdefgh`
	//
	// For more information about using `Fn::GetAtt` , see [Fn::GetAtt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html) .
	AttrName() *string
	// Identifier for a state machine revision, which is an immutable, read-only snapshot of a state machine’s definition and configuration.
	AttrStateMachineRevisionId() *string
	// Options for this resource, such as condition, update policy etc.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// The Amazon States Language definition of the state machine.
	Definition() interface{}
	SetDefinition(val interface{})
	// The name of the S3 bucket where the state machine definition is stored.
	DefinitionS3Location() interface{}
	SetDefinitionS3Location(val interface{})
	// The Amazon States Language definition of the state machine.
	DefinitionString() *string
	SetDefinitionString(val *string)
	// A map (string to string) that specifies the mappings for placeholder variables in the state machine definition.
	DefinitionSubstitutions() interface{}
	SetDefinitionSubstitutions(val interface{})
	// Encryption configuration for the state machine.
	EncryptionConfiguration() interface{}
	SetEncryptionConfiguration(val interface{})
	// Defines what execution history events are logged and where they are logged.
	LoggingConfiguration() interface{}
	SetLoggingConfiguration(val interface{})
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The tree node.
	Node() constructs.Node
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	Ref() *string
	// The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
	RoleArn() *string
	SetRoleArn(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() awscdk.Stack
	// The name of the state machine.
	StateMachineName() *string
	SetStateMachineName(val *string)
	// Determines whether a `STANDARD` or `EXPRESS` state machine is created.
	StateMachineType() *string
	SetStateMachineType(val *string)
	// Tag Manager which manages the tags for this resource.
	Tags() awscdk.TagManager
	// The list of tags to add to a resource.
	TagsRaw() *[]*CfnStateMachine_TagsEntryProperty
	SetTagsRaw(val *[]*CfnStateMachine_TagsEntryProperty)
	// Selects whether or not the state machine's AWS X-Ray tracing is enabled.
	TracingConfiguration() interface{}
	SetTracingConfiguration(val interface{})
	// Deprecated.
	// Deprecated: use `updatedProperties`
	//
	// Return properties modified after initiation
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperites() *map[string]interface{}
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperties() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	AddDependency(target awscdk.CfnResource)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	// Deprecated: use addDependency.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//   "GlobalSecondaryIndexes": [
	//     {
	//       "Projection": {
	//         "NonKeyAttributes": [ "myattribute" ]
	//         ...
	//       }
	//       ...
	//     },
	//     {
	//       "ProjectionType": "INCLUDE"
	//       ...
	//     },
	//   ]
	//   ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some
	// cases, a snapshot can be taken of the resource prior to deletion
	// (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
	// can be found in the following link:.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options
	//
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Retrieves an array of resources this resource depends on.
	//
	// This assembles dependencies on resources across stacks (including nested stacks)
	// automatically.
	ObtainDependencies() *[]interface{}
	// Get a shallow copy of dependencies between this resource and other resources in the same stack.
	ObtainResourceDependencies() *[]awscdk.CfnResource
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Indicates that this resource no longer depends on another resource.
	//
	// This can be used for resources across stacks (including nested stacks)
	// and the dependency will automatically be removed from the relevant scope.
	RemoveDependency(target awscdk.CfnResource)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Replaces one dependency with another.
	ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource)
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	ShouldSynthesize() *bool
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	ToString() *string
	ValidateProperties(_properties interface{})
}

Provisions a state machine.

A state machine consists of a collection of states that can do work ( `Task` states), determine to which states to transition next ( `Choice` states), stop an execution with an error ( `Fail` states), and so on. State machines are specified using a JSON-based, structured language.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var definition interface{}

cfnStateMachine := awscdk.Aws_stepfunctions.NewCfnStateMachine(this, jsii.String("MyCfnStateMachine"), &CfnStateMachineProps{
	RoleArn: jsii.String("roleArn"),

	// the properties below are optional
	Definition: definition,
	DefinitionS3Location: &S3LocationProperty{
		Bucket: jsii.String("bucket"),
		Key: jsii.String("key"),

		// the properties below are optional
		Version: jsii.String("version"),
	},
	DefinitionString: jsii.String("definitionString"),
	DefinitionSubstitutions: map[string]*string{
		"definitionSubstitutionsKey": jsii.String("definitionSubstitutions"),
	},
	EncryptionConfiguration: &EncryptionConfigurationProperty{
		Type: jsii.String("type"),

		// the properties below are optional
		KmsDataKeyReusePeriodSeconds: jsii.Number(123),
		KmsKeyId: jsii.String("kmsKeyId"),
	},
	LoggingConfiguration: &LoggingConfigurationProperty{
		Destinations: []interface{}{
			&LogDestinationProperty{
				CloudWatchLogsLogGroup: &CloudWatchLogsLogGroupProperty{
					LogGroupArn: jsii.String("logGroupArn"),
				},
			},
		},
		IncludeExecutionData: jsii.Boolean(false),
		Level: jsii.String("level"),
	},
	StateMachineName: jsii.String("stateMachineName"),
	StateMachineType: jsii.String("stateMachineType"),
	Tags: []tagsEntryProperty{
		&tagsEntryProperty{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TracingConfiguration: &TracingConfigurationProperty{
		Enabled: jsii.Boolean(false),
	},
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html

func NewCfnStateMachine

func NewCfnStateMachine(scope constructs.Construct, id *string, props *CfnStateMachineProps) CfnStateMachine

type CfnStateMachineAlias added in v2.86.0

type CfnStateMachineAlias interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// Returns the ARN of the state machine alias.
	//
	// For example, `arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:PROD` .
	AttrArn() *string
	// Options for this resource, such as condition, update policy etc.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// The settings that enable gradual state machine deployments.
	DeploymentPreference() interface{}
	SetDeploymentPreference(val interface{})
	// An optional description of the state machine alias.
	Description() *string
	SetDescription(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The name of the state machine alias.
	Name() *string
	SetName(val *string)
	// The tree node.
	Node() constructs.Node
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	Ref() *string
	// The routing configuration of an alias.
	RoutingConfiguration() interface{}
	SetRoutingConfiguration(val interface{})
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() awscdk.Stack
	// Deprecated.
	// Deprecated: use `updatedProperties`
	//
	// Return properties modified after initiation
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperites() *map[string]interface{}
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperties() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	AddDependency(target awscdk.CfnResource)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	// Deprecated: use addDependency.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//   "GlobalSecondaryIndexes": [
	//     {
	//       "Projection": {
	//         "NonKeyAttributes": [ "myattribute" ]
	//         ...
	//       }
	//       ...
	//     },
	//     {
	//       "ProjectionType": "INCLUDE"
	//       ...
	//     },
	//   ]
	//   ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some
	// cases, a snapshot can be taken of the resource prior to deletion
	// (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
	// can be found in the following link:.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options
	//
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Retrieves an array of resources this resource depends on.
	//
	// This assembles dependencies on resources across stacks (including nested stacks)
	// automatically.
	ObtainDependencies() *[]interface{}
	// Get a shallow copy of dependencies between this resource and other resources in the same stack.
	ObtainResourceDependencies() *[]awscdk.CfnResource
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Indicates that this resource no longer depends on another resource.
	//
	// This can be used for resources across stacks (including nested stacks)
	// and the dependency will automatically be removed from the relevant scope.
	RemoveDependency(target awscdk.CfnResource)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Replaces one dependency with another.
	ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource)
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	ShouldSynthesize() *bool
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	ToString() *string
	ValidateProperties(_properties interface{})
}

Represents a state machine [alias](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-state-machine-alias.html) . An alias routes traffic to one or two versions of the same state machine.

You can create up to 100 aliases for each state machine.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnStateMachineAlias := awscdk.Aws_stepfunctions.NewCfnStateMachineAlias(this, jsii.String("MyCfnStateMachineAlias"), &CfnStateMachineAliasProps{
	DeploymentPreference: &DeploymentPreferenceProperty{
		StateMachineVersionArn: jsii.String("stateMachineVersionArn"),
		Type: jsii.String("type"),

		// the properties below are optional
		Alarms: []*string{
			jsii.String("alarms"),
		},
		Interval: jsii.Number(123),
		Percentage: jsii.Number(123),
	},
	Description: jsii.String("description"),
	Name: jsii.String("name"),
	RoutingConfiguration: []interface{}{
		&RoutingConfigurationVersionProperty{
			StateMachineVersionArn: jsii.String("stateMachineVersionArn"),
			Weight: jsii.Number(123),
		},
	},
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachinealias.html

func NewCfnStateMachineAlias added in v2.86.0

func NewCfnStateMachineAlias(scope constructs.Construct, id *string, props *CfnStateMachineAliasProps) CfnStateMachineAlias

type CfnStateMachineAliasProps added in v2.86.0

type CfnStateMachineAliasProps struct {
	// The settings that enable gradual state machine deployments.
	//
	// These settings include [Alarms](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-deploymentpreference.html#cfn-stepfunctions-statemachinealias-deploymentpreference-alarms) , [Interval](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-deploymentpreference.html#cfn-stepfunctions-statemachinealias-deploymentpreference-interval) , [Percentage](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-deploymentpreference.html#cfn-stepfunctions-statemachinealias-deploymentpreference-percentage) , [StateMachineVersionArn](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-deploymentpreference.html#cfn-stepfunctions-statemachinealias-deploymentpreference-statemachineversionarn) , and [Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-deploymentpreference.html#cfn-stepfunctions-statemachinealias-deploymentpreference-type) .
	//
	// CloudFormation automatically shifts traffic from the version an alias currently points to, to a new state machine version that you specify.
	//
	// > `RoutingConfiguration` and `DeploymentPreference` are mutually exclusive properties. You must define only one of these properties.
	//
	// Based on the type of deployment you want to perform, you can specify one of the following settings:
	//
	// - `LINEAR` - Shifts traffic to the new version in equal increments with an equal number of minutes between each increment.
	//
	// For example, if you specify the increment percent as `20` with an interval of `600` minutes, this deployment increases traffic by 20 percent every 600 minutes until the new version receives 100 percent of the traffic. This deployment immediately rolls back the new version if any Amazon CloudWatch alarms are triggered.
	// - `ALL_AT_ONCE` - Shifts 100 percent of traffic to the new version immediately. CloudFormation monitors the new version and rolls it back automatically to the previous version if any CloudWatch alarms are triggered.
	// - `CANARY` - Shifts traffic in two increments.
	//
	// In the first increment, a small percentage of traffic, for example, 10 percent is shifted to the new version. In the second increment, before a specified time interval in seconds gets over, the remaining traffic is shifted to the new version. The shift to the new version for the remaining traffic takes place only if no CloudWatch alarms are triggered during the specified time interval.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachinealias.html#cfn-stepfunctions-statemachinealias-deploymentpreference
	//
	DeploymentPreference interface{} `field:"optional" json:"deploymentPreference" yaml:"deploymentPreference"`
	// An optional description of the state machine alias.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachinealias.html#cfn-stepfunctions-statemachinealias-description
	//
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The name of the state machine alias.
	//
	// If you don't provide a name, it uses an automatically generated name based on the logical ID.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachinealias.html#cfn-stepfunctions-statemachinealias-name
	//
	Name *string `field:"optional" json:"name" yaml:"name"`
	// The routing configuration of an alias.
	//
	// Routing configuration splits [StartExecution](https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html) requests between one or two versions of the same state machine.
	//
	// Use `RoutingConfiguration` if you want to explicitly set the alias [weights](https://docs.aws.amazon.com/step-functions/latest/apireference/API_RoutingConfigurationListItem.html#StepFunctions-Type-RoutingConfigurationListItem-weight) . Weight is the percentage of traffic you want to route to a state machine version.
	//
	// > `RoutingConfiguration` and `DeploymentPreference` are mutually exclusive properties. You must define only one of these properties.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachinealias.html#cfn-stepfunctions-statemachinealias-routingconfiguration
	//
	RoutingConfiguration interface{} `field:"optional" json:"routingConfiguration" yaml:"routingConfiguration"`
}

Properties for defining a `CfnStateMachineAlias`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnStateMachineAliasProps := &CfnStateMachineAliasProps{
	DeploymentPreference: &DeploymentPreferenceProperty{
		StateMachineVersionArn: jsii.String("stateMachineVersionArn"),
		Type: jsii.String("type"),

		// the properties below are optional
		Alarms: []*string{
			jsii.String("alarms"),
		},
		Interval: jsii.Number(123),
		Percentage: jsii.Number(123),
	},
	Description: jsii.String("description"),
	Name: jsii.String("name"),
	RoutingConfiguration: []interface{}{
		&RoutingConfigurationVersionProperty{
			StateMachineVersionArn: jsii.String("stateMachineVersionArn"),
			Weight: jsii.Number(123),
		},
	},
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachinealias.html

type CfnStateMachineAlias_DeploymentPreferenceProperty added in v2.86.0

type CfnStateMachineAlias_DeploymentPreferenceProperty struct {
	// The Amazon Resource Name (ARN) of the [`AWS::StepFunctions::StateMachineVersion`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachineversion.html) resource that will be the final version to which the alias points to when the traffic shifting is complete.
	//
	// While performing gradual deployments, you can only provide a single state machine version ARN. To explicitly set version weights in a CloudFormation template, use `RoutingConfiguration` instead.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-deploymentpreference.html#cfn-stepfunctions-statemachinealias-deploymentpreference-statemachineversionarn
	//
	StateMachineVersionArn *string `field:"required" json:"stateMachineVersionArn" yaml:"stateMachineVersionArn"`
	// The type of deployment you want to perform. You can specify one of the following types:.
	//
	// - `LINEAR` - Shifts traffic to the new version in equal increments with an equal number of minutes between each increment.
	//
	// For example, if you specify the increment percent as `20` with an interval of `600` minutes, this deployment increases traffic by 20 percent every 600 minutes until the new version receives 100 percent of the traffic. This deployment immediately rolls back the new version if any CloudWatch alarms are triggered.
	// - `ALL_AT_ONCE` - Shifts 100 percent of traffic to the new version immediately. CloudFormation monitors the new version and rolls it back automatically to the previous version if any CloudWatch alarms are triggered.
	// - `CANARY` - Shifts traffic in two increments.
	//
	// In the first increment, a small percentage of traffic, for example, 10 percent is shifted to the new version. In the second increment, before a specified time interval in seconds gets over, the remaining traffic is shifted to the new version. The shift to the new version for the remaining traffic takes place only if no CloudWatch alarms are triggered during the specified time interval.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-deploymentpreference.html#cfn-stepfunctions-statemachinealias-deploymentpreference-type
	//
	Type *string `field:"required" json:"type" yaml:"type"`
	// A list of Amazon CloudWatch alarm names to be monitored during the deployment.
	//
	// The deployment fails and rolls back if any of these alarms go into the `ALARM` state.
	//
	// > Amazon CloudWatch considers nonexistent alarms to have an `OK` state. If you provide an invalid alarm name or provide the ARN of an alarm instead of its name, your deployment may not roll back correctly.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-deploymentpreference.html#cfn-stepfunctions-statemachinealias-deploymentpreference-alarms
	//
	Alarms *[]*string `field:"optional" json:"alarms" yaml:"alarms"`
	// The time in minutes between each traffic shifting increment.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-deploymentpreference.html#cfn-stepfunctions-statemachinealias-deploymentpreference-interval
	//
	Interval *float64 `field:"optional" json:"interval" yaml:"interval"`
	// The percentage of traffic to shift to the new version in each increment.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-deploymentpreference.html#cfn-stepfunctions-statemachinealias-deploymentpreference-percentage
	//
	Percentage *float64 `field:"optional" json:"percentage" yaml:"percentage"`
}

Enables gradual state machine deployments.

CloudFormation automatically shifts traffic from the version the alias currently points to, to a new state machine version that you specify.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

deploymentPreferenceProperty := &DeploymentPreferenceProperty{
	StateMachineVersionArn: jsii.String("stateMachineVersionArn"),
	Type: jsii.String("type"),

	// the properties below are optional
	Alarms: []*string{
		jsii.String("alarms"),
	},
	Interval: jsii.Number(123),
	Percentage: jsii.Number(123),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-deploymentpreference.html

type CfnStateMachineAlias_RoutingConfigurationVersionProperty added in v2.86.0

type CfnStateMachineAlias_RoutingConfigurationVersionProperty struct {
	// The Amazon Resource Name (ARN) that identifies one or two state machine versions defined in the routing configuration.
	//
	// If you specify the ARN of a second version, it must belong to the same state machine as the first version.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-routingconfigurationversion.html#cfn-stepfunctions-statemachinealias-routingconfigurationversion-statemachineversionarn
	//
	StateMachineVersionArn *string `field:"required" json:"stateMachineVersionArn" yaml:"stateMachineVersionArn"`
	// The percentage of traffic you want to route to the state machine version.
	//
	// The sum of the weights in the routing configuration must be equal to 100.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-routingconfigurationversion.html#cfn-stepfunctions-statemachinealias-routingconfigurationversion-weight
	//
	Weight *float64 `field:"required" json:"weight" yaml:"weight"`
}

The state machine version to which you want to route the execution traffic.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

routingConfigurationVersionProperty := &RoutingConfigurationVersionProperty{
	StateMachineVersionArn: jsii.String("stateMachineVersionArn"),
	Weight: jsii.Number(123),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-routingconfigurationversion.html

type CfnStateMachineProps

type CfnStateMachineProps struct {
	// The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-rolearn
	//
	RoleArn *string `field:"required" json:"roleArn" yaml:"roleArn"`
	// The Amazon States Language definition of the state machine.
	//
	// The state machine definition must be in JSON or YAML, and the format of the object must match the format of your CloudFormation template file. See [Amazon States Language](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-definition
	//
	Definition interface{} `field:"optional" json:"definition" yaml:"definition"`
	// The name of the S3 bucket where the state machine definition is stored.
	//
	// The state machine definition must be a JSON or YAML file.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-definitions3location
	//
	DefinitionS3Location interface{} `field:"optional" json:"definitionS3Location" yaml:"definitionS3Location"`
	// The Amazon States Language definition of the state machine.
	//
	// The state machine definition must be in JSON. See [Amazon States Language](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-definitionstring
	//
	DefinitionString *string `field:"optional" json:"definitionString" yaml:"definitionString"`
	// A map (string to string) that specifies the mappings for placeholder variables in the state machine definition.
	//
	// This enables the customer to inject values obtained at runtime, for example from intrinsic functions, in the state machine definition. Variables can be template parameter names, resource logical IDs, resource attributes, or a variable in a key-value map.
	//
	// Substitutions must follow the syntax: `${key_name}` or `${variable_1,variable_2,...}` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-definitionsubstitutions
	//
	DefinitionSubstitutions interface{} `field:"optional" json:"definitionSubstitutions" yaml:"definitionSubstitutions"`
	// Encryption configuration for the state machine.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-encryptionconfiguration
	//
	EncryptionConfiguration interface{} `field:"optional" json:"encryptionConfiguration" yaml:"encryptionConfiguration"`
	// Defines what execution history events are logged and where they are logged.
	//
	// > By default, the `level` is set to `OFF` . For more information see [Log Levels](https://docs.aws.amazon.com/step-functions/latest/dg/cloudwatch-log-level.html) in the AWS Step Functions User Guide.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-loggingconfiguration
	//
	LoggingConfiguration interface{} `field:"optional" json:"loggingConfiguration" yaml:"loggingConfiguration"`
	// The name of the state machine.
	//
	// A name must *not* contain:
	//
	// - white space
	// - brackets `< > { } [ ]`
	// - wildcard characters `? *`
	// - special characters `" # % \ ^ | ~ ` $ & , ; : /`
	// - control characters ( `U+0000-001F` , `U+007F-009F` )
	//
	// > If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-statemachinename
	//
	StateMachineName *string `field:"optional" json:"stateMachineName" yaml:"stateMachineName"`
	// Determines whether a `STANDARD` or `EXPRESS` state machine is created.
	//
	// The default is `STANDARD` . You cannot update the `type` of a state machine once it has been created. For more information on `STANDARD` and `EXPRESS` workflows, see [Standard Versus Express Workflows](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-standard-vs-express.html) in the AWS Step Functions Developer Guide.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-statemachinetype
	//
	StateMachineType *string `field:"optional" json:"stateMachineType" yaml:"stateMachineType"`
	// The list of tags to add to a resource.
	//
	// Tags may only contain Unicode letters, digits, white space, or these symbols: `_ . : / = + -
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-tags
	//
	Tags *[]*CfnStateMachine_TagsEntryProperty `field:"optional" json:"tags" yaml:"tags"`
	// Selects whether or not the state machine's AWS X-Ray tracing is enabled.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-tracingconfiguration
	//
	TracingConfiguration interface{} `field:"optional" json:"tracingConfiguration" yaml:"tracingConfiguration"`
}

Properties for defining a `CfnStateMachine`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var definition interface{}

cfnStateMachineProps := &CfnStateMachineProps{
	RoleArn: jsii.String("roleArn"),

	// the properties below are optional
	Definition: definition,
	DefinitionS3Location: &S3LocationProperty{
		Bucket: jsii.String("bucket"),
		Key: jsii.String("key"),

		// the properties below are optional
		Version: jsii.String("version"),
	},
	DefinitionString: jsii.String("definitionString"),
	DefinitionSubstitutions: map[string]*string{
		"definitionSubstitutionsKey": jsii.String("definitionSubstitutions"),
	},
	EncryptionConfiguration: &EncryptionConfigurationProperty{
		Type: jsii.String("type"),

		// the properties below are optional
		KmsDataKeyReusePeriodSeconds: jsii.Number(123),
		KmsKeyId: jsii.String("kmsKeyId"),
	},
	LoggingConfiguration: &LoggingConfigurationProperty{
		Destinations: []interface{}{
			&LogDestinationProperty{
				CloudWatchLogsLogGroup: &CloudWatchLogsLogGroupProperty{
					LogGroupArn: jsii.String("logGroupArn"),
				},
			},
		},
		IncludeExecutionData: jsii.Boolean(false),
		Level: jsii.String("level"),
	},
	StateMachineName: jsii.String("stateMachineName"),
	StateMachineType: jsii.String("stateMachineType"),
	Tags: []tagsEntryProperty{
		&tagsEntryProperty{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TracingConfiguration: &TracingConfigurationProperty{
		Enabled: jsii.Boolean(false),
	},
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html

type CfnStateMachineVersion added in v2.86.0

type CfnStateMachineVersion interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// Returns the ARN of the state machine version.
	//
	// For example, `arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1` .
	AttrArn() *string
	// Options for this resource, such as condition, update policy etc.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// An optional description of the state machine version.
	Description() *string
	SetDescription(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The tree node.
	Node() constructs.Node
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() awscdk.Stack
	// The Amazon Resource Name (ARN) of the state machine.
	StateMachineArn() *string
	SetStateMachineArn(val *string)
	// Identifier for a state machine revision, which is an immutable, read-only snapshot of a state machine’s definition and configuration.
	StateMachineRevisionId() *string
	SetStateMachineRevisionId(val *string)
	// Deprecated.
	// Deprecated: use `updatedProperties`
	//
	// Return properties modified after initiation
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperites() *map[string]interface{}
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperties() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	AddDependency(target awscdk.CfnResource)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	// Deprecated: use addDependency.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//   "GlobalSecondaryIndexes": [
	//     {
	//       "Projection": {
	//         "NonKeyAttributes": [ "myattribute" ]
	//         ...
	//       }
	//       ...
	//     },
	//     {
	//       "ProjectionType": "INCLUDE"
	//       ...
	//     },
	//   ]
	//   ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some
	// cases, a snapshot can be taken of the resource prior to deletion
	// (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
	// can be found in the following link:.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options
	//
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Retrieves an array of resources this resource depends on.
	//
	// This assembles dependencies on resources across stacks (including nested stacks)
	// automatically.
	ObtainDependencies() *[]interface{}
	// Get a shallow copy of dependencies between this resource and other resources in the same stack.
	ObtainResourceDependencies() *[]awscdk.CfnResource
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Indicates that this resource no longer depends on another resource.
	//
	// This can be used for resources across stacks (including nested stacks)
	// and the dependency will automatically be removed from the relevant scope.
	RemoveDependency(target awscdk.CfnResource)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Replaces one dependency with another.
	ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource)
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	ShouldSynthesize() *bool
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	ToString() *string
	ValidateProperties(_properties interface{})
}

Represents a state machine [version](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-state-machine-version.html) . A published version uses the latest state machine [*revision*](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-state-machine-version.html) . A revision is an immutable, read-only snapshot of a state machine’s definition and configuration.

You can publish up to 1000 versions for each state machine.

> Before you delete a version, make sure that version's ARN isn't being referenced in any long-running workflows or application code outside of the stack.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnStateMachineVersion := awscdk.Aws_stepfunctions.NewCfnStateMachineVersion(this, jsii.String("MyCfnStateMachineVersion"), &CfnStateMachineVersionProps{
	StateMachineArn: jsii.String("stateMachineArn"),

	// the properties below are optional
	Description: jsii.String("description"),
	StateMachineRevisionId: jsii.String("stateMachineRevisionId"),
})

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachineversion.html

func NewCfnStateMachineVersion added in v2.86.0

func NewCfnStateMachineVersion(scope constructs.Construct, id *string, props *CfnStateMachineVersionProps) CfnStateMachineVersion

type CfnStateMachineVersionProps added in v2.86.0

type CfnStateMachineVersionProps struct {
	// The Amazon Resource Name (ARN) of the state machine.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachineversion.html#cfn-stepfunctions-statemachineversion-statemachinearn
	//
	StateMachineArn *string `field:"required" json:"stateMachineArn" yaml:"stateMachineArn"`
	// An optional description of the state machine version.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachineversion.html#cfn-stepfunctions-statemachineversion-description
	//
	Description *string `field:"optional" json:"description" yaml:"description"`
	// Identifier for a state machine revision, which is an immutable, read-only snapshot of a state machine’s definition and configuration.
	//
	// Only publish the state machine version if the current state machine's revision ID matches the specified ID. Use this option to avoid publishing a version if the state machine has changed since you last updated it.
	//
	// To specify the initial state machine revision, set the value as `INITIAL` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachineversion.html#cfn-stepfunctions-statemachineversion-statemachinerevisionid
	//
	StateMachineRevisionId *string `field:"optional" json:"stateMachineRevisionId" yaml:"stateMachineRevisionId"`
}

Properties for defining a `CfnStateMachineVersion`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnStateMachineVersionProps := &CfnStateMachineVersionProps{
	StateMachineArn: jsii.String("stateMachineArn"),

	// the properties below are optional
	Description: jsii.String("description"),
	StateMachineRevisionId: jsii.String("stateMachineRevisionId"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachineversion.html

type CfnStateMachine_CloudWatchLogsLogGroupProperty

type CfnStateMachine_CloudWatchLogsLogGroupProperty struct {
	// The ARN of the the CloudWatch log group to which you want your logs emitted to.
	//
	// The ARN must end with `:*`.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-cloudwatchlogsloggroup.html#cfn-stepfunctions-statemachine-cloudwatchlogsloggroup-loggrouparn
	//
	LogGroupArn *string `field:"optional" json:"logGroupArn" yaml:"logGroupArn"`
}

Defines a CloudWatch log group.

> For more information see [Standard Versus Express Workflows](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-standard-vs-express.html) in the AWS Step Functions Developer Guide.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cloudWatchLogsLogGroupProperty := &CloudWatchLogsLogGroupProperty{
	LogGroupArn: jsii.String("logGroupArn"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-cloudwatchlogsloggroup.html

type CfnStateMachine_EncryptionConfigurationProperty added in v2.154.0

type CfnStateMachine_EncryptionConfigurationProperty struct {
	// Encryption option for a state machine.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-encryptionconfiguration.html#cfn-stepfunctions-statemachine-encryptionconfiguration-type
	//
	Type *string `field:"required" json:"type" yaml:"type"`
	// Maximum duration that Step Functions will reuse data keys.
	//
	// When the period expires, Step Functions will call `GenerateDataKey` . Only applies to customer managed keys.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-encryptionconfiguration.html#cfn-stepfunctions-statemachine-encryptionconfiguration-kmsdatakeyreuseperiodseconds
	//
	KmsDataKeyReusePeriodSeconds *float64 `field:"optional" json:"kmsDataKeyReusePeriodSeconds" yaml:"kmsDataKeyReusePeriodSeconds"`
	// An alias, alias ARN, key ID, or key ARN of a symmetric encryption AWS KMS key to encrypt data.
	//
	// To specify a AWS KMS key in a different AWS account, you must use the key ARN or alias ARN.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-encryptionconfiguration.html#cfn-stepfunctions-statemachine-encryptionconfiguration-kmskeyid
	//
	KmsKeyId *string `field:"optional" json:"kmsKeyId" yaml:"kmsKeyId"`
}

Settings to configure server-side encryption for a state machine.

By default, Step Functions provides transparent server-side encryption. With this configuration, you can specify a customer managed AWS KMS key for encryption.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

encryptionConfigurationProperty := &EncryptionConfigurationProperty{
	Type: jsii.String("type"),

	// the properties below are optional
	KmsDataKeyReusePeriodSeconds: jsii.Number(123),
	KmsKeyId: jsii.String("kmsKeyId"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-encryptionconfiguration.html

type CfnStateMachine_LogDestinationProperty

type CfnStateMachine_LogDestinationProperty struct {
	// An object describing a CloudWatch log group.
	//
	// For more information, see [AWS::Logs::LogGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html) in the AWS CloudFormation User Guide.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-logdestination.html#cfn-stepfunctions-statemachine-logdestination-cloudwatchlogsloggroup
	//
	CloudWatchLogsLogGroup interface{} `field:"optional" json:"cloudWatchLogsLogGroup" yaml:"cloudWatchLogsLogGroup"`
}

Defines a destination for `LoggingConfiguration` .

> For more information on logging with `EXPRESS` workflows, see [Logging Express Workflows Using CloudWatch Logs](https://docs.aws.amazon.com/step-functions/latest/dg/cw-logs.html) .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

logDestinationProperty := &LogDestinationProperty{
	CloudWatchLogsLogGroup: &CloudWatchLogsLogGroupProperty{
		LogGroupArn: jsii.String("logGroupArn"),
	},
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-logdestination.html

type CfnStateMachine_LoggingConfigurationProperty

type CfnStateMachine_LoggingConfigurationProperty struct {
	// An array of objects that describes where your execution history events will be logged.
	//
	// Limited to size 1. Required, if your log level is not set to `OFF` .
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-loggingconfiguration.html#cfn-stepfunctions-statemachine-loggingconfiguration-destinations
	//
	Destinations interface{} `field:"optional" json:"destinations" yaml:"destinations"`
	// Determines whether execution data is included in your log.
	//
	// When set to `false` , data is excluded.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-loggingconfiguration.html#cfn-stepfunctions-statemachine-loggingconfiguration-includeexecutiondata
	//
	IncludeExecutionData interface{} `field:"optional" json:"includeExecutionData" yaml:"includeExecutionData"`
	// Defines which category of execution history events are logged.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-loggingconfiguration.html#cfn-stepfunctions-statemachine-loggingconfiguration-level
	//
	Level *string `field:"optional" json:"level" yaml:"level"`
}

Defines what execution history events are logged and where they are logged.

Step Functions provides the log levels — `OFF` , `ALL` , `ERROR` , and `FATAL` . No event types log when set to `OFF` and all event types do when set to `ALL` .

> By default, the `level` is set to `OFF` . For more information see [Log Levels](https://docs.aws.amazon.com/step-functions/latest/dg/cloudwatch-log-level.html) in the AWS Step Functions User Guide.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

loggingConfigurationProperty := &LoggingConfigurationProperty{
	Destinations: []interface{}{
		&LogDestinationProperty{
			CloudWatchLogsLogGroup: &CloudWatchLogsLogGroupProperty{
				LogGroupArn: jsii.String("logGroupArn"),
			},
		},
	},
	IncludeExecutionData: jsii.Boolean(false),
	Level: jsii.String("level"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-loggingconfiguration.html

type CfnStateMachine_S3LocationProperty

type CfnStateMachine_S3LocationProperty struct {
	// The name of the S3 bucket where the state machine definition JSON or YAML file is stored.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-s3location.html#cfn-stepfunctions-statemachine-s3location-bucket
	//
	Bucket *string `field:"required" json:"bucket" yaml:"bucket"`
	// The name of the state machine definition file (Amazon S3 object name).
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-s3location.html#cfn-stepfunctions-statemachine-s3location-key
	//
	Key *string `field:"required" json:"key" yaml:"key"`
	// For versioning-enabled buckets, a specific version of the state machine definition.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-s3location.html#cfn-stepfunctions-statemachine-s3location-version
	//
	Version *string `field:"optional" json:"version" yaml:"version"`
}

Defines the S3 bucket location where a state machine definition is stored.

The state machine definition must be a JSON or YAML file.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

s3LocationProperty := &S3LocationProperty{
	Bucket: jsii.String("bucket"),
	Key: jsii.String("key"),

	// the properties below are optional
	Version: jsii.String("version"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-s3location.html

type CfnStateMachine_TagsEntryProperty

type CfnStateMachine_TagsEntryProperty struct {
	// The `key` for a key-value pair in a tag entry.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-tagsentry.html#cfn-stepfunctions-statemachine-tagsentry-key
	//
	Key *string `field:"required" json:"key" yaml:"key"`
	// The `value` for a key-value pair in a tag entry.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-tagsentry.html#cfn-stepfunctions-statemachine-tagsentry-value
	//
	Value *string `field:"required" json:"value" yaml:"value"`
}

The `TagsEntry` property specifies *tags* to identify a state machine.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

tagsEntryProperty := &TagsEntryProperty{
	Key: jsii.String("key"),
	Value: jsii.String("value"),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-tagsentry.html

type CfnStateMachine_TracingConfigurationProperty

type CfnStateMachine_TracingConfigurationProperty struct {
	// When set to `true` , X-Ray tracing is enabled.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-tracingconfiguration.html#cfn-stepfunctions-statemachine-tracingconfiguration-enabled
	//
	Enabled interface{} `field:"optional" json:"enabled" yaml:"enabled"`
}

Selects whether or not the state machine's AWS X-Ray tracing is enabled.

To configure your state machine to send trace data to X-Ray, set `Enabled` to `true` .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

tracingConfigurationProperty := &TracingConfigurationProperty{
	Enabled: jsii.Boolean(false),
}

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-tracingconfiguration.html

type Chain

type Chain interface {
	IChainable
	// The chainable end state(s) of this chain.
	EndStates() *[]INextable
	// Identify this Chain.
	Id() *string
	// The start state of this chain.
	StartState() State
	// Continue normal execution with the given state.
	Next(next IChainable) Chain
	// Return a single state that encompasses all states in the chain.
	//
	// This can be used to add error handling to a sequence of states.
	//
	// Be aware that this changes the result of the inner state machine
	// to be an array with the result of the state machine in it. Adjust
	// your paths accordingly. For example, change 'outputPath' to
	// '$[0]'.
	ToSingleState(id *string, props *ParallelProps) Parallel
}

A collection of states to chain onto.

A Chain has a start and zero or more chainable ends. If there are zero ends, calling next() on the Chain will fail.

Example:

map := sfn.NewMap(this, jsii.String("Map State"), &MapProps{
	MaxConcurrency: jsii.Number(1),
	ItemsPath: sfn.JsonPath_StringAt(jsii.String("$.inputForMap")),
	ItemSelector: map[string]interface{}{
		"item": sfn.JsonPath_*StringAt(jsii.String("$.Map.Item.Value")),
	},
	ResultPath: jsii.String("$.mapOutput"),
})

// The Map iterator can contain a IChainable, which can be an individual or multiple steps chained together.
// Below example is with a Choice and Pass step
choice := sfn.NewChoice(this, jsii.String("Choice"))
condition1 := sfn.Condition_StringEquals(jsii.String("$.item.status"), jsii.String("SUCCESS"))
step1 := sfn.NewPass(this, jsii.String("Step1"))
step2 := sfn.NewPass(this, jsii.String("Step2"))
finish := sfn.NewPass(this, jsii.String("Finish"))

definition := choice.When(condition1, step1).Otherwise(step2).Afterwards().Next(finish)

map.ItemProcessor(definition)

func Chain_Custom

func Chain_Custom(startState State, endStates *[]INextable, lastAdded IChainable) Chain

Make a Chain with specific start and end states, and a last-added Chainable.

func Chain_Sequence

func Chain_Sequence(start IChainable, next IChainable) Chain

Make a Chain with the start from one chain and the ends from another.

func Chain_Start

func Chain_Start(state IChainable) Chain

Begin a new Chain from one chainable.

type ChainDefinitionBody added in v2.85.0

type ChainDefinitionBody interface {
	DefinitionBody
	Chainable() IChainable
	Bind(scope constructs.Construct, _sfnPrincipal awsiam.IPrincipal, sfnProps *StateMachineProps, graph StateGraph) *DefinitionConfig
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var chainable iChainable

chainDefinitionBody := awscdk.Aws_stepfunctions.ChainDefinitionBody_FromChainable(chainable)

func NewChainDefinitionBody added in v2.85.0

func NewChainDefinitionBody(chainable IChainable) ChainDefinitionBody

type Choice

type Choice interface {
	State
	Branches() *[]StateGraph
	Comment() *string
	DefaultChoice() State
	SetDefaultChoice(val State)
	// Continuable states of this Chainable.
	EndStates() *[]INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() StateGraph
	SetIteration(val StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	Processor() StateGraph
	SetProcessor(val StateGraph)
	ProcessorConfig() *ProcessorConfig
	SetProcessorConfig(val *ProcessorConfig)
	ProcessorMode() ProcessorMode
	SetProcessorMode(val ProcessorMode)
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	StateName() *string
	// Add a parallel branch to this state.
	AddBranch(branch StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition Condition, next State, options *ChoiceTransitionOptions)
	// Add a item processor to this state.
	AddItemProcessor(processor StateGraph, config *ProcessorConfig)
	// Add a map iterator to this state.
	AddIterator(iteration StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Return a Chain that contains all reachable end states from this Choice.
	//
	// Use this to combine all possible choice paths back.
	Afterwards(options *AfterwardsOptions) Chain
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph StateGraph)
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def State)
	// Make the indicated state the default transition of this state.
	MakeNext(next State)
	// If none of the given conditions match, continue execution with the given state.
	//
	// If no conditions match and no otherwise() has been given, an execution
	// error will be raised.
	Otherwise(def IChainable) Choice
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render ItemProcessor in ASL JSON format.
	RenderItemProcessor() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Return the Amazon States Language object for this state.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// If the given condition matches, continue execution with the given state.
	When(condition Condition, next IChainable, options *ChoiceTransitionOptions) Choice
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph StateGraph)
}

Define a Choice in the state machine.

A choice state can be used to make decisions based on the execution state.

Example:

map := sfn.NewMap(this, jsii.String("Map State"), &MapProps{
	MaxConcurrency: jsii.Number(1),
	ItemsPath: sfn.JsonPath_StringAt(jsii.String("$.inputForMap")),
	ItemSelector: map[string]interface{}{
		"item": sfn.JsonPath_*StringAt(jsii.String("$.Map.Item.Value")),
	},
	ResultPath: jsii.String("$.mapOutput"),
})

// The Map iterator can contain a IChainable, which can be an individual or multiple steps chained together.
// Below example is with a Choice and Pass step
choice := sfn.NewChoice(this, jsii.String("Choice"))
condition1 := sfn.Condition_StringEquals(jsii.String("$.item.status"), jsii.String("SUCCESS"))
step1 := sfn.NewPass(this, jsii.String("Step1"))
step2 := sfn.NewPass(this, jsii.String("Step2"))
finish := sfn.NewPass(this, jsii.String("Finish"))

definition := choice.When(condition1, step1).Otherwise(step2).Afterwards().Next(finish)

map.ItemProcessor(definition)

func NewChoice

func NewChoice(scope constructs.Construct, id *string, props *ChoiceProps) Choice

type ChoiceProps

type ChoiceProps struct {
	// An optional description for this state.
	// Default: No comment.
	//
	Comment *string `field:"optional" json:"comment" yaml:"comment"`
	// JSONPath expression to select part of the state to be the input to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// input to be the empty object {}.
	// Default: $.
	//
	InputPath *string `field:"optional" json:"inputPath" yaml:"inputPath"`
	// JSONPath expression to select part of the state to be the output to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// output to be the empty object {}.
	// Default: $.
	//
	OutputPath *string `field:"optional" json:"outputPath" yaml:"outputPath"`
	// Optional name for this state.
	// Default: - The construct ID will be used as state name.
	//
	StateName *string `field:"optional" json:"stateName" yaml:"stateName"`
}

Properties for defining a Choice state.

Example:

choice := sfn.NewChoice(this, jsii.String("What color is it?"), &ChoiceProps{
	Comment: jsii.String("color comment"),
})
handleBlueItem := sfn.NewPass(this, jsii.String("HandleBlueItem"))
handleOtherItemColor := sfn.NewPass(this, jsii.String("HanldeOtherItemColor"))
choice.When(sfn.Condition_StringEquals(jsii.String("$.color"), jsii.String("BLUE")), handleBlueItem, &ChoiceTransitionOptions{
	Comment: jsii.String("blue item comment"),
})
choice.Otherwise(handleOtherItemColor)

type ChoiceTransitionOptions added in v2.97.0

type ChoiceTransitionOptions struct {
	// An optional description for the choice transition.
	// Default: No comment.
	//
	Comment *string `field:"optional" json:"comment" yaml:"comment"`
}

Options for Choice Transition.

Example:

choice := sfn.NewChoice(this, jsii.String("What color is it?"), &ChoiceProps{
	Comment: jsii.String("color comment"),
})
handleBlueItem := sfn.NewPass(this, jsii.String("HandleBlueItem"))
handleOtherItemColor := sfn.NewPass(this, jsii.String("HanldeOtherItemColor"))
choice.When(sfn.Condition_StringEquals(jsii.String("$.color"), jsii.String("BLUE")), handleBlueItem, &ChoiceTransitionOptions{
	Comment: jsii.String("blue item comment"),
})
choice.Otherwise(handleOtherItemColor)

type Condition

type Condition interface {
	// Render Amazon States Language JSON for the condition.
	RenderCondition() interface{}
}

A Condition for use in a Choice state branch.

Example:

map := sfn.NewMap(this, jsii.String("Map State"), &MapProps{
	MaxConcurrency: jsii.Number(1),
	ItemsPath: sfn.JsonPath_StringAt(jsii.String("$.inputForMap")),
	ItemSelector: map[string]interface{}{
		"item": sfn.JsonPath_*StringAt(jsii.String("$.Map.Item.Value")),
	},
	ResultPath: jsii.String("$.mapOutput"),
})

// The Map iterator can contain a IChainable, which can be an individual or multiple steps chained together.
// Below example is with a Choice and Pass step
choice := sfn.NewChoice(this, jsii.String("Choice"))
condition1 := sfn.Condition_StringEquals(jsii.String("$.item.status"), jsii.String("SUCCESS"))
step1 := sfn.NewPass(this, jsii.String("Step1"))
step2 := sfn.NewPass(this, jsii.String("Step2"))
finish := sfn.NewPass(this, jsii.String("Finish"))

definition := choice.When(condition1, step1).Otherwise(step2).Afterwards().Next(finish)

map.ItemProcessor(definition)

func Condition_And

func Condition_And(conditions ...Condition) Condition

Combine two or more conditions with a logical AND.

func Condition_BooleanEquals

func Condition_BooleanEquals(variable *string, value *bool) Condition

Matches if a boolean field has the given value.

func Condition_BooleanEqualsJsonPath

func Condition_BooleanEqualsJsonPath(variable *string, value *string) Condition

Matches if a boolean field equals to a value at a given mapping path.

func Condition_IsBoolean

func Condition_IsBoolean(variable *string) Condition

Matches if variable is boolean.

func Condition_IsNotBoolean

func Condition_IsNotBoolean(variable *string) Condition

Matches if variable is not boolean.

func Condition_IsNotNull

func Condition_IsNotNull(variable *string) Condition

Matches if variable is not null.

func Condition_IsNotNumeric

func Condition_IsNotNumeric(variable *string) Condition

Matches if variable is not numeric.

func Condition_IsNotPresent

func Condition_IsNotPresent(variable *string) Condition

Matches if variable is not present.

func Condition_IsNotString

func Condition_IsNotString(variable *string) Condition

Matches if variable is not a string.

func Condition_IsNotTimestamp

func Condition_IsNotTimestamp(variable *string) Condition

Matches if variable is not a timestamp.

func Condition_IsNull

func Condition_IsNull(variable *string) Condition

Matches if variable is Null.

func Condition_IsNumeric

func Condition_IsNumeric(variable *string) Condition

Matches if variable is numeric.

func Condition_IsPresent

func Condition_IsPresent(variable *string) Condition

Matches if variable is present.

func Condition_IsString

func Condition_IsString(variable *string) Condition

Matches if variable is a string.

func Condition_IsTimestamp

func Condition_IsTimestamp(variable *string) Condition

Matches if variable is a timestamp.

func Condition_Not

func Condition_Not(condition Condition) Condition

Negate a condition.

func Condition_NumberEquals

func Condition_NumberEquals(variable *string, value *float64) Condition

Matches if a numeric field has the given value.

func Condition_NumberEqualsJsonPath

func Condition_NumberEqualsJsonPath(variable *string, value *string) Condition

Matches if a numeric field has the value in a given mapping path.

func Condition_NumberGreaterThan

func Condition_NumberGreaterThan(variable *string, value *float64) Condition

Matches if a numeric field is greater than the given value.

func Condition_NumberGreaterThanEquals

func Condition_NumberGreaterThanEquals(variable *string, value *float64) Condition

Matches if a numeric field is greater than or equal to the given value.

func Condition_NumberGreaterThanEqualsJsonPath

func Condition_NumberGreaterThanEqualsJsonPath(variable *string, value *string) Condition

Matches if a numeric field is greater than or equal to the value at a given mapping path.

func Condition_NumberGreaterThanJsonPath

func Condition_NumberGreaterThanJsonPath(variable *string, value *string) Condition

Matches if a numeric field is greater than the value at a given mapping path.

func Condition_NumberLessThan

func Condition_NumberLessThan(variable *string, value *float64) Condition

Matches if a numeric field is less than the given value.

func Condition_NumberLessThanEquals

func Condition_NumberLessThanEquals(variable *string, value *float64) Condition

Matches if a numeric field is less than or equal to the given value.

func Condition_NumberLessThanEqualsJsonPath

func Condition_NumberLessThanEqualsJsonPath(variable *string, value *string) Condition

Matches if a numeric field is less than or equal to the numeric value at given mapping path.

func Condition_NumberLessThanJsonPath

func Condition_NumberLessThanJsonPath(variable *string, value *string) Condition

Matches if a numeric field is less than the value at the given mapping path.

func Condition_Or

func Condition_Or(conditions ...Condition) Condition

Combine two or more conditions with a logical OR.

func Condition_StringEquals

func Condition_StringEquals(variable *string, value *string) Condition

Matches if a string field has the given value.

func Condition_StringEqualsJsonPath

func Condition_StringEqualsJsonPath(variable *string, value *string) Condition

Matches if a string field equals to a value at a given mapping path.

func Condition_StringGreaterThan

func Condition_StringGreaterThan(variable *string, value *string) Condition

Matches if a string field sorts after a given value.

func Condition_StringGreaterThanEquals

func Condition_StringGreaterThanEquals(variable *string, value *string) Condition

Matches if a string field sorts after or equal to a given value.

func Condition_StringGreaterThanEqualsJsonPath

func Condition_StringGreaterThanEqualsJsonPath(variable *string, value *string) Condition

Matches if a string field sorts after or equal to value at a given mapping path.

func Condition_StringGreaterThanJsonPath

func Condition_StringGreaterThanJsonPath(variable *string, value *string) Condition

Matches if a string field sorts after a value at a given mapping path.

func Condition_StringLessThan

func Condition_StringLessThan(variable *string, value *string) Condition

Matches if a string field sorts before a given value.

func Condition_StringLessThanEquals

func Condition_StringLessThanEquals(variable *string, value *string) Condition

Matches if a string field sorts equal to or before a given value.

func Condition_StringLessThanEqualsJsonPath

func Condition_StringLessThanEqualsJsonPath(variable *string, value *string) Condition

Matches if a string field sorts equal to or before a given mapping.

func Condition_StringLessThanJsonPath

func Condition_StringLessThanJsonPath(variable *string, value *string) Condition

Matches if a string field sorts before a given value at a particular mapping.

func Condition_StringMatches

func Condition_StringMatches(variable *string, value *string) Condition

Matches if a field matches a string pattern that can contain a wild card (*) e.g: log-*.txt or *LATEST*. No other characters other than "*" have any special meaning - * can be escaped: \\*.

func Condition_TimestampEquals

func Condition_TimestampEquals(variable *string, value *string) Condition

Matches if a timestamp field is the same time as the given timestamp.

func Condition_TimestampEqualsJsonPath

func Condition_TimestampEqualsJsonPath(variable *string, value *string) Condition

Matches if a timestamp field is the same time as the timestamp at a given mapping path.

func Condition_TimestampGreaterThan

func Condition_TimestampGreaterThan(variable *string, value *string) Condition

Matches if a timestamp field is after the given timestamp.

func Condition_TimestampGreaterThanEquals

func Condition_TimestampGreaterThanEquals(variable *string, value *string) Condition

Matches if a timestamp field is after or equal to the given timestamp.

func Condition_TimestampGreaterThanEqualsJsonPath

func Condition_TimestampGreaterThanEqualsJsonPath(variable *string, value *string) Condition

Matches if a timestamp field is after or equal to the timestamp at a given mapping path.

func Condition_TimestampGreaterThanJsonPath

func Condition_TimestampGreaterThanJsonPath(variable *string, value *string) Condition

Matches if a timestamp field is after the timestamp at a given mapping path.

func Condition_TimestampLessThan

func Condition_TimestampLessThan(variable *string, value *string) Condition

Matches if a timestamp field is before the given timestamp.

func Condition_TimestampLessThanEquals

func Condition_TimestampLessThanEquals(variable *string, value *string) Condition

Matches if a timestamp field is before or equal to the given timestamp.

func Condition_TimestampLessThanEqualsJsonPath

func Condition_TimestampLessThanEqualsJsonPath(variable *string, value *string) Condition

Matches if a timestamp field is before or equal to the timestamp at a given mapping path.

func Condition_TimestampLessThanJsonPath

func Condition_TimestampLessThanJsonPath(variable *string, value *string) Condition

Matches if a timestamp field is before the timestamp at a given mapping path.

type Credentials added in v2.54.0

type Credentials struct {
	// The role to be assumed for executing the Task.
	Role TaskRole `field:"required" json:"role" yaml:"role"`
}

Specifies a target role assumed by the State Machine's execution role for invoking the task's resource.

Example:

import lambda "github.com/aws/aws-cdk-go/awscdk"

var submitLambda function
var iamRole role

// use a fixed role for all task invocations
role := sfn.TaskRole_FromRole(iamRole)
// or use a json expression to resolve the role at runtime based on task inputs
//const role = sfn.TaskRole.fromRoleArnJsonPath('$.RoleArn');

submitJob := tasks.NewLambdaInvoke(this, jsii.String("Submit Job"), &LambdaInvokeProps{
	LambdaFunction: submitLambda,
	OutputPath: jsii.String("$.Payload"),
	// use credentials
	Credentials: &Credentials{
		Role: *Role,
	},
})

See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-task-state.html#task-state-fields

type CsvHeaderLocation added in v2.127.0

type CsvHeaderLocation string

CSV header location options.

const (
	// Headers will be read from first row of CSV file.
	CsvHeaderLocation_FIRST_ROW CsvHeaderLocation = "FIRST_ROW"
	// Headers are provided in CSVHeaders property.
	CsvHeaderLocation_GIVEN CsvHeaderLocation = "GIVEN"
)

type CsvHeaders added in v2.127.0

type CsvHeaders interface {
	// Location of headers in CSV file.
	HeaderLocation() CsvHeaderLocation
	// List of headers if `headerLocation` is `GIVEN`.
	Headers() *[]*string
}

Configuration for CSV header options for a CSV Item Reader.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

csvHeaders := awscdk.Aws_stepfunctions.CsvHeaders_Use([]*string{
	jsii.String("headers"),
})

func CsvHeaders_Use added in v2.127.0

func CsvHeaders_Use(headers *[]*string) CsvHeaders

Configures S3CsvItemReader to use the headers provided in the `headers` parameter.

Returns: - CsvHeaders.

func CsvHeaders_UseFirstRow added in v2.127.0

func CsvHeaders_UseFirstRow() CsvHeaders

Configures S3CsvItemReader to read headers from the first row of the CSV file.

Returns: - CsvHeaders.

type CustomState

type CustomState interface {
	State
	IChainable
	INextable
	Branches() *[]StateGraph
	Comment() *string
	DefaultChoice() State
	SetDefaultChoice(val State)
	// Continuable states of this Chainable.
	EndStates() *[]INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() StateGraph
	SetIteration(val StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	Processor() StateGraph
	SetProcessor(val StateGraph)
	ProcessorConfig() *ProcessorConfig
	SetProcessorConfig(val *ProcessorConfig)
	ProcessorMode() ProcessorMode
	SetProcessorMode(val ProcessorMode)
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	StateName() *string
	// Add a parallel branch to this state.
	AddBranch(branch StateGraph)
	// Add a recovery handler for this state.
	//
	// When a particular error occurs, execution will continue at the error
	// handler instead of failing the state machine execution.
	AddCatch(handler IChainable, props *CatchProps) CustomState
	// Add a choice branch to this state.
	AddChoice(condition Condition, next State, options *ChoiceTransitionOptions)
	// Add a item processor to this state.
	AddItemProcessor(processor StateGraph, config *ProcessorConfig)
	// Add a map iterator to this state.
	AddIterator(iteration StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Add retry configuration for this state.
	//
	// This controls if and how the execution will be retried if a particular
	// error occurs.
	AddRetry(props *RetryProps) CustomState
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph StateGraph)
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def State)
	// Make the indicated state the default transition of this state.
	MakeNext(next State)
	// Continue normal execution with the given state.
	Next(next IChainable) Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render ItemProcessor in ASL JSON format.
	RenderItemProcessor() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Returns the Amazon States Language object for this state.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph StateGraph)
}

State defined by supplying Amazon States Language (ASL) in the state machine.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

// create a table
table := dynamodb.NewTable(this, jsii.String("montable"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
})

finalStatus := sfn.NewPass(this, jsii.String("final step"))

// States language JSON to put an item into DynamoDB
// snippet generated from https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-code-snippet.html#tutorial-code-snippet-1
stateJson := map[string]interface{}{
	"Type": jsii.String("Task"),
	"Resource": jsii.String("arn:aws:states:::dynamodb:putItem"),
	"Parameters": map[string]interface{}{
		"TableName": table.tableName,
		"Item": map[string]map[string]*string{
			"id": map[string]*string{
				"S": jsii.String("MyEntry"),
			},
		},
	},
	"ResultPath": nil,
}

// custom state which represents a task to insert data into DynamoDB
custom := sfn.NewCustomState(this, jsii.String("my custom task"), &CustomStateProps{
	StateJson: StateJson,
})

// catch errors with addCatch
errorHandler := sfn.NewPass(this, jsii.String("handle failure"))
custom.AddCatch(errorHandler)

// retry the task if something goes wrong
custom.AddRetry(&RetryProps{
	Errors: []*string{
		sfn.Errors_ALL(),
	},
	Interval: awscdk.Duration_Seconds(jsii.Number(10)),
	MaxAttempts: jsii.Number(5),
})

chain := sfn.Chain_Start(custom).Next(finalStatus)

sm := sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromChainable(chain),
	Timeout: awscdk.Duration_*Seconds(jsii.Number(30)),
	Comment: jsii.String("a super cool state machine"),
})

// don't forget permissions. You need to assign them
table.GrantWriteData(sm)

func NewCustomState

func NewCustomState(scope constructs.Construct, id *string, props *CustomStateProps) CustomState

type CustomStateProps

type CustomStateProps struct {
	// Amazon States Language (JSON-based) definition of the state.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html
	//
	StateJson *map[string]interface{} `field:"required" json:"stateJson" yaml:"stateJson"`
}

Properties for defining a custom state definition.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

// create a table
table := dynamodb.NewTable(this, jsii.String("montable"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
})

finalStatus := sfn.NewPass(this, jsii.String("final step"))

// States language JSON to put an item into DynamoDB
// snippet generated from https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-code-snippet.html#tutorial-code-snippet-1
stateJson := map[string]interface{}{
	"Type": jsii.String("Task"),
	"Resource": jsii.String("arn:aws:states:::dynamodb:putItem"),
	"Parameters": map[string]interface{}{
		"TableName": table.tableName,
		"Item": map[string]map[string]*string{
			"id": map[string]*string{
				"S": jsii.String("MyEntry"),
			},
		},
	},
	"ResultPath": nil,
}

// custom state which represents a task to insert data into DynamoDB
custom := sfn.NewCustomState(this, jsii.String("my custom task"), &CustomStateProps{
	StateJson: StateJson,
})

// catch errors with addCatch
errorHandler := sfn.NewPass(this, jsii.String("handle failure"))
custom.AddCatch(errorHandler)

// retry the task if something goes wrong
custom.AddRetry(&RetryProps{
	Errors: []*string{
		sfn.Errors_ALL(),
	},
	Interval: awscdk.Duration_Seconds(jsii.Number(10)),
	MaxAttempts: jsii.Number(5),
})

chain := sfn.Chain_Start(custom).Next(finalStatus)

sm := sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromChainable(chain),
	Timeout: awscdk.Duration_*Seconds(jsii.Number(30)),
	Comment: jsii.String("a super cool state machine"),
})

// don't forget permissions. You need to assign them
table.GrantWriteData(sm)

type DefinitionBody added in v2.85.0

type DefinitionBody interface {
	Bind(scope constructs.Construct, sfnPrincipal awsiam.IPrincipal, sfnProps *StateMachineProps, graph StateGraph) *DefinitionConfig
}

Example:

stateMachine := stepfunctions.NewStateMachine(this, jsii.String("SM"), &StateMachineProps{
	DefinitionBody: stepfunctions.DefinitionBody_FromChainable(stepfunctions.NewWait(this, jsii.String("Hello"), &WaitProps{
		Time: stepfunctions.WaitTime_Duration(awscdk.Duration_Seconds(jsii.Number(10))),
	})),
})

iot.NewTopicRule(this, jsii.String("TopicRule"), &TopicRuleProps{
	Sql: iot.IotSql_FromStringAsVer20160323(jsii.String("SELECT * FROM 'device/+/data'")),
	Actions: []iAction{
		actions.NewStepFunctionsStateMachineAction(stateMachine),
	},
})

func ChainDefinitionBody_FromChainable added in v2.85.0

func ChainDefinitionBody_FromChainable(chainable IChainable) DefinitionBody

func ChainDefinitionBody_FromFile added in v2.85.0

func ChainDefinitionBody_FromFile(path *string, options *awss3assets.AssetOptions) DefinitionBody

func ChainDefinitionBody_FromString added in v2.85.0

func ChainDefinitionBody_FromString(definition *string) DefinitionBody

func DefinitionBody_FromChainable added in v2.85.0

func DefinitionBody_FromChainable(chainable IChainable) DefinitionBody

func DefinitionBody_FromFile added in v2.85.0

func DefinitionBody_FromFile(path *string, options *awss3assets.AssetOptions) DefinitionBody

func DefinitionBody_FromString added in v2.85.0

func DefinitionBody_FromString(definition *string) DefinitionBody

func FileDefinitionBody_FromChainable added in v2.85.0

func FileDefinitionBody_FromChainable(chainable IChainable) DefinitionBody

func FileDefinitionBody_FromFile added in v2.85.0

func FileDefinitionBody_FromFile(path *string, options *awss3assets.AssetOptions) DefinitionBody

func FileDefinitionBody_FromString added in v2.85.0

func FileDefinitionBody_FromString(definition *string) DefinitionBody

func StringDefinitionBody_FromChainable added in v2.85.0

func StringDefinitionBody_FromChainable(chainable IChainable) DefinitionBody

func StringDefinitionBody_FromFile added in v2.85.0

func StringDefinitionBody_FromFile(path *string, options *awss3assets.AssetOptions) DefinitionBody

func StringDefinitionBody_FromString added in v2.85.0

func StringDefinitionBody_FromString(definition *string) DefinitionBody

type DefinitionConfig added in v2.85.0

type DefinitionConfig struct {
	Definition           interface{}                         `field:"optional" json:"definition" yaml:"definition"`
	DefinitionS3Location *CfnStateMachine_S3LocationProperty `field:"optional" json:"definitionS3Location" yaml:"definitionS3Location"`
	DefinitionString     *string                             `field:"optional" json:"definitionString" yaml:"definitionString"`
}

Partial object from the StateMachine L1 construct properties containing definition information.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var definition interface{}

definitionConfig := &DefinitionConfig{
	Definition: definition,
	DefinitionS3Location: &S3LocationProperty{
		Bucket: jsii.String("bucket"),
		Key: jsii.String("key"),

		// the properties below are optional
		Version: jsii.String("version"),
	},
	DefinitionString: jsii.String("definitionString"),
}

type DistributedMap added in v2.127.0

type DistributedMap interface {
	MapBase
	INextable
	Branches() *[]StateGraph
	Comment() *string
	DefaultChoice() State
	SetDefaultChoice(val State)
	// Continuable states of this Chainable.
	EndStates() *[]INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	ItemSelector() *map[string]interface{}
	ItemsPath() *string
	Iteration() StateGraph
	SetIteration(val StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	Processor() StateGraph
	SetProcessor(val StateGraph)
	ProcessorConfig() *ProcessorConfig
	SetProcessorConfig(val *ProcessorConfig)
	ProcessorMode() ProcessorMode
	SetProcessorMode(val ProcessorMode)
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	StateName() *string
	// Add a parallel branch to this state.
	AddBranch(branch StateGraph)
	// Add a recovery handler for this state.
	//
	// When a particular error occurs, execution will continue at the error
	// handler instead of failing the state machine execution.
	AddCatch(handler IChainable, props *CatchProps) DistributedMap
	// Add a choice branch to this state.
	AddChoice(condition Condition, next State, options *ChoiceTransitionOptions)
	// Add a item processor to this state.
	AddItemProcessor(processor StateGraph, config *ProcessorConfig)
	// Add a map iterator to this state.
	AddIterator(iteration StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Add retry configuration for this state.
	//
	// This controls if and how the execution will be retried if a particular
	// error occurs.
	AddRetry(props *RetryProps) DistributedMap
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph StateGraph)
	// Define item processor in a Distributed Map.
	//
	// A Distributed Map must have a non-empty item processor.
	ItemProcessor(processor IChainable, config *ProcessorConfig) DistributedMap
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def State)
	// Make the indicated state the default transition of this state.
	MakeNext(next State)
	// Continue normal execution with the given state.
	Next(next IChainable) Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render ItemProcessor in ASL JSON format.
	RenderItemProcessor() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Return the Amazon States Language object for this state.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Validate this state.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph StateGraph)
}

Define a Distributed Mode Map state in the state machine.

A `Map` state can be used to run a set of steps for each element of an input array. A Map state will execute the same steps for multiple entries of an array in the state input.

While the Parallel state executes multiple branches of steps using the same input, a Map state will execute the same steps for multiple entries of an array in the state input.

A `Map` state in `Distributed` mode will execute a child workflow for each iteration of the Map state. This serves to increase concurrency and allows for larger workloads to be run in a single state machine.

Example:

distributedMap := sfn.NewDistributedMap(this, jsii.String("DistributedMap"), &DistributedMapProps{
	MapExecutionType: sfn.StateMachineType_EXPRESS,
})

distributedMap.ItemProcessor(sfn.NewPass(this, jsii.String("Pass")), &ProcessorConfig{
	Mode: sfn.ProcessorMode_DISTRIBUTED,
	ExecutionType: sfn.ProcessorType_STANDARD,
})

See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-asl-use-map-state-distributed.html

func NewDistributedMap added in v2.127.0

func NewDistributedMap(scope constructs.Construct, id *string, props *DistributedMapProps) DistributedMap

type DistributedMapProps added in v2.127.0

type DistributedMapProps struct {
	// An optional description for this state.
	// Default: No comment.
	//
	Comment *string `field:"optional" json:"comment" yaml:"comment"`
	// JSONPath expression to select part of the state to be the input to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// input to be the empty object {}.
	// Default: $.
	//
	InputPath *string `field:"optional" json:"inputPath" yaml:"inputPath"`
	// The JSON that you want to override your default iteration input (mutually exclusive  with `parameters`).
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-itemselector.html
	//
	// Default: $.
	//
	ItemSelector *map[string]interface{} `field:"optional" json:"itemSelector" yaml:"itemSelector"`
	// JSONPath expression to select the array to iterate over.
	// Default: $.
	//
	ItemsPath *string `field:"optional" json:"itemsPath" yaml:"itemsPath"`
	// MaxConcurrency.
	//
	// An upper bound on the number of iterations you want running at once.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-asl-use-map-state-inline.html#map-state-inline-additional-fields
	//
	// Default: - full concurrency.
	//
	MaxConcurrency *float64 `field:"optional" json:"maxConcurrency" yaml:"maxConcurrency"`
	// MaxConcurrencyPath.
	//
	// A JsonPath that specifies the maximum concurrency dynamically from the state input.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-asl-use-map-state-inline.html#map-state-inline-additional-fields
	//
	// Default: - full concurrency.
	//
	MaxConcurrencyPath *string `field:"optional" json:"maxConcurrencyPath" yaml:"maxConcurrencyPath"`
	// JSONPath expression to select part of the state to be the output to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// output to be the empty object {}.
	// Default: $.
	//
	OutputPath *string `field:"optional" json:"outputPath" yaml:"outputPath"`
	// JSONPath expression to indicate where to inject the state's output.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the state's
	// input to become its output.
	// Default: $.
	//
	ResultPath *string `field:"optional" json:"resultPath" yaml:"resultPath"`
	// The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.
	//
	// You can use ResultSelector to create a payload with values that are static
	// or selected from the state's raw result.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-resultselector
	//
	// Default: - None.
	//
	ResultSelector *map[string]interface{} `field:"optional" json:"resultSelector" yaml:"resultSelector"`
	// Optional name for this state.
	// Default: - The construct ID will be used as state name.
	//
	StateName *string `field:"optional" json:"stateName" yaml:"stateName"`
	// Specifies to process a group of items in a single child workflow execution.
	// Default: - No itemBatcher.
	//
	ItemBatcher ItemBatcher `field:"optional" json:"itemBatcher" yaml:"itemBatcher"`
	// ItemReader.
	//
	// Configuration for where to read items dataset in S3 to iterate.
	// Default: - No itemReader.
	//
	ItemReader IItemReader `field:"optional" json:"itemReader" yaml:"itemReader"`
	// Label.
	//
	// Unique name for the Distributed Map state added to each Map Run.
	// Default: - No label.
	//
	Label *string `field:"optional" json:"label" yaml:"label"`
	// MapExecutionType.
	//
	// The execution type of the distributed map state
	//
	// This property overwrites ProcessorConfig.executionType
	// Default: StateMachineType.STANDARD
	//
	MapExecutionType StateMachineType `field:"optional" json:"mapExecutionType" yaml:"mapExecutionType"`
	// Configuration for S3 location in which to save Map Run results.
	// Default: - No resultWriter.
	//
	ResultWriter ResultWriter `field:"optional" json:"resultWriter" yaml:"resultWriter"`
	// ToleratedFailureCount.
	//
	// Number of failed items to tolerate in a Map Run, as static number.
	// Default: - No toleratedFailureCount.
	//
	ToleratedFailureCount *float64 `field:"optional" json:"toleratedFailureCount" yaml:"toleratedFailureCount"`
	// ToleratedFailureCountPath.
	//
	// Number of failed items to tolerate in a Map Run, as JsonPath.
	// Default: - No toleratedFailureCountPath.
	//
	ToleratedFailureCountPath *string `field:"optional" json:"toleratedFailureCountPath" yaml:"toleratedFailureCountPath"`
	// ToleratedFailurePercentage.
	//
	// Percentage of failed items to tolerate in a Map Run, as static number.
	// Default: - No toleratedFailurePercentage.
	//
	ToleratedFailurePercentage *float64 `field:"optional" json:"toleratedFailurePercentage" yaml:"toleratedFailurePercentage"`
	// ToleratedFailurePercentagePath.
	//
	// Percentage of failed items to tolerate in a Map Run, as JsonPath.
	// Default: - No toleratedFailurePercentagePath.
	//
	ToleratedFailurePercentagePath *string `field:"optional" json:"toleratedFailurePercentagePath" yaml:"toleratedFailurePercentagePath"`
}

Properties for configuring a Distribute Map state.

Example:

distributedMap := sfn.NewDistributedMap(this, jsii.String("DistributedMap"), &DistributedMapProps{
	MapExecutionType: sfn.StateMachineType_EXPRESS,
})

distributedMap.ItemProcessor(sfn.NewPass(this, jsii.String("Pass")), &ProcessorConfig{
	Mode: sfn.ProcessorMode_DISTRIBUTED,
	ExecutionType: sfn.ProcessorType_STANDARD,
})

type Errors

type Errors interface {
}

Predefined error strings Error names in Amazon States Language - https://states-language.net/spec.html#appendix-a Error handling in Step Functions - https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

// create a table
table := dynamodb.NewTable(this, jsii.String("montable"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
})

finalStatus := sfn.NewPass(this, jsii.String("final step"))

// States language JSON to put an item into DynamoDB
// snippet generated from https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-code-snippet.html#tutorial-code-snippet-1
stateJson := map[string]interface{}{
	"Type": jsii.String("Task"),
	"Resource": jsii.String("arn:aws:states:::dynamodb:putItem"),
	"Parameters": map[string]interface{}{
		"TableName": table.tableName,
		"Item": map[string]map[string]*string{
			"id": map[string]*string{
				"S": jsii.String("MyEntry"),
			},
		},
	},
	"ResultPath": nil,
}

// custom state which represents a task to insert data into DynamoDB
custom := sfn.NewCustomState(this, jsii.String("my custom task"), &CustomStateProps{
	StateJson: StateJson,
})

// catch errors with addCatch
errorHandler := sfn.NewPass(this, jsii.String("handle failure"))
custom.AddCatch(errorHandler)

// retry the task if something goes wrong
custom.AddRetry(&RetryProps{
	Errors: []*string{
		sfn.Errors_ALL(),
	},
	Interval: awscdk.Duration_Seconds(jsii.Number(10)),
	MaxAttempts: jsii.Number(5),
})

chain := sfn.Chain_Start(custom).Next(finalStatus)

sm := sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromChainable(chain),
	Timeout: awscdk.Duration_*Seconds(jsii.Number(30)),
	Comment: jsii.String("a super cool state machine"),
})

// don't forget permissions. You need to assign them
table.GrantWriteData(sm)

func NewErrors

func NewErrors() Errors

type Fail

type Fail interface {
	State
	Branches() *[]StateGraph
	Comment() *string
	DefaultChoice() State
	SetDefaultChoice(val State)
	// Continuable states of this Chainable.
	EndStates() *[]INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() StateGraph
	SetIteration(val StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	Processor() StateGraph
	SetProcessor(val StateGraph)
	ProcessorConfig() *ProcessorConfig
	SetProcessorConfig(val *ProcessorConfig)
	ProcessorMode() ProcessorMode
	SetProcessorMode(val ProcessorMode)
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	StateName() *string
	// Add a parallel branch to this state.
	AddBranch(branch StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition Condition, next State, options *ChoiceTransitionOptions)
	// Add a item processor to this state.
	AddItemProcessor(processor StateGraph, config *ProcessorConfig)
	// Add a map iterator to this state.
	AddIterator(iteration StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph StateGraph)
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def State)
	// Make the indicated state the default transition of this state.
	MakeNext(next State)
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render ItemProcessor in ASL JSON format.
	RenderItemProcessor() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Return the Amazon States Language object for this state.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Validate this state.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph StateGraph)
}

Define a Fail state in the state machine.

Reaching a Fail state terminates the state execution in failure.

Example:

fail := sfn.NewFail(this, jsii.String("Fail"), &FailProps{
	ErrorPath: sfn.JsonPath_Format(jsii.String("error: {}."), sfn.JsonPath_StringAt(jsii.String("$.someError"))),
	CausePath: jsii.String("States.Format('cause: {}.', $.someCause)"),
})

func NewFail

func NewFail(scope constructs.Construct, id *string, props *FailProps) Fail

type FailProps

type FailProps struct {
	// A description for the cause of the failure.
	// Default: - No description.
	//
	Cause *string `field:"optional" json:"cause" yaml:"cause"`
	// JsonPath expression to select part of the state to be the cause to this state.
	//
	// You can also use an intrinsic function that returns a string to specify this property.
	// The allowed functions include States.Format, States.JsonToString, States.ArrayGetItem, States.Base64Encode, States.Base64Decode, States.Hash, and States.UUID.
	// Default: - No cause path.
	//
	CausePath *string `field:"optional" json:"causePath" yaml:"causePath"`
	// An optional description for this state.
	// Default: - No comment.
	//
	Comment *string `field:"optional" json:"comment" yaml:"comment"`
	// Error code used to represent this failure.
	// Default: - No error code.
	//
	Error *string `field:"optional" json:"error" yaml:"error"`
	// JsonPath expression to select part of the state to be the error to this state.
	//
	// You can also use an intrinsic function that returns a string to specify this property.
	// The allowed functions include States.Format, States.JsonToString, States.ArrayGetItem, States.Base64Encode, States.Base64Decode, States.Hash, and States.UUID.
	// Default: - No error path.
	//
	ErrorPath *string `field:"optional" json:"errorPath" yaml:"errorPath"`
	// Optional name for this state.
	// Default: - The construct ID will be used as state name.
	//
	StateName *string `field:"optional" json:"stateName" yaml:"stateName"`
}

Properties for defining a Fail state.

Example:

fail := sfn.NewFail(this, jsii.String("Fail"), &FailProps{
	ErrorPath: sfn.JsonPath_Format(jsii.String("error: {}."), sfn.JsonPath_StringAt(jsii.String("$.someError"))),
	CausePath: jsii.String("States.Format('cause: {}.', $.someCause)"),
})

type FieldUtils

type FieldUtils interface {
}

Helper functions to work with structures containing fields.

type FileDefinitionBody added in v2.85.0

type FileDefinitionBody interface {
	DefinitionBody
	Path() *string
	Bind(scope constructs.Construct, _sfnPrincipal awsiam.IPrincipal, _sfnProps *StateMachineProps, _graph StateGraph) *DefinitionConfig
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var chainable iChainable

fileDefinitionBody := awscdk.Aws_stepfunctions.FileDefinitionBody_FromChainable(chainable)

func NewFileDefinitionBody added in v2.85.0

func NewFileDefinitionBody(path *string, options *awss3assets.AssetOptions) FileDefinitionBody

type FindStateOptions

type FindStateOptions struct {
	// Whether or not to follow error-handling transitions.
	// Default: false.
	//
	IncludeErrorHandlers *bool `field:"optional" json:"includeErrorHandlers" yaml:"includeErrorHandlers"`
}

Options for finding reachable states.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

findStateOptions := &FindStateOptions{
	IncludeErrorHandlers: jsii.Boolean(false),
}

type IActivity

type IActivity interface {
	awscdk.IResource
	// The ARN of the activity.
	ActivityArn() *string
	// The name of the activity.
	ActivityName() *string
}

Represents a Step Functions Activity https://docs.aws.amazon.com/step-functions/latest/dg/concepts-activities.html.

func Activity_FromActivityArn

func Activity_FromActivityArn(scope constructs.Construct, id *string, activityArn *string) IActivity

Construct an Activity from an existing Activity ARN.

func Activity_FromActivityName

func Activity_FromActivityName(scope constructs.Construct, id *string, activityName *string) IActivity

Construct an Activity from an existing Activity Name.

type IChainable

type IChainable interface {
	// The chainable end state(s) of this chainable.
	EndStates() *[]INextable
	// Descriptive identifier for this chainable.
	Id() *string
	// The start state of this chainable.
	StartState() State
}

Interface for objects that can be used in a Chain.

type IItemReader added in v2.127.0

type IItemReader interface {
	// Compile policy statements to provide relevent permissions to the state machine.
	ProvidePolicyStatements() *[]awsiam.PolicyStatement
	// Render the ItemReader as JSON object.
	Render() interface{}
	// S3 Bucket containing objects to iterate over or a file with a list to iterate over.
	Bucket() awss3.IBucket
	// Limits the number of items passed to the Distributed Map state.
	// Default: - Distributed Map state will iterate over all items provided by the ItemReader.
	//
	MaxItems() *float64
	// The Amazon S3 API action that Step Functions must invoke depending on the specified dataset.
	Resource() *string
}

Base interface for Item Reader configurations.

type INextable

type INextable interface {
	// Go to the indicated state after this state.
	//
	// Returns: The chain of states built up.
	Next(state IChainable) Chain
}

Interface for states that can have 'next' states.

type IStateMachine

type IStateMachine interface {
	awsiam.IGrantable
	awscdk.IResource
	// Grant the given identity custom permissions.
	Grant(identity awsiam.IGrantable, actions ...*string) awsiam.Grant
	// Grant the given identity permissions for all executions of a state machine.
	GrantExecution(identity awsiam.IGrantable, actions ...*string) awsiam.Grant
	// Grant the given identity read permissions for this state machine.
	GrantRead(identity awsiam.IGrantable) awsiam.Grant
	// Grant the given identity permissions to start an execution of this state machine.
	GrantStartExecution(identity awsiam.IGrantable) awsiam.Grant
	// Grant the given identity permissions to start a synchronous execution of this state machine.
	GrantStartSyncExecution(identity awsiam.IGrantable) awsiam.Grant
	// Grant the given identity read permissions for this state machine.
	GrantTaskResponse(identity awsiam.IGrantable) awsiam.Grant
	// Return the given named metric for this State Machine's executions.
	// Default: - sum over 5 minutes.
	//
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of executions that were aborted.
	// Default: - sum over 5 minutes.
	//
	MetricAborted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of executions that failed.
	// Default: - sum over 5 minutes.
	//
	MetricFailed(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of executions that were started.
	// Default: - sum over 5 minutes.
	//
	MetricStarted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of executions that succeeded.
	// Default: - sum over 5 minutes.
	//
	MetricSucceeded(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of executions that were throttled.
	// Default: sum over 5 minutes.
	//
	MetricThrottled(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the interval, in milliseconds, between the time the execution starts and the time it closes.
	// Default: - sum over 5 minutes.
	//
	MetricTime(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of executions that timed out.
	// Default: - sum over 5 minutes.
	//
	MetricTimedOut(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The ARN of the state machine.
	StateMachineArn() *string
}

A State Machine.

func StateMachine_FromStateMachineArn

func StateMachine_FromStateMachineArn(scope constructs.Construct, id *string, stateMachineArn *string) IStateMachine

Import a state machine.

func StateMachine_FromStateMachineName added in v2.33.0

func StateMachine_FromStateMachineName(scope constructs.Construct, id *string, stateMachineName *string) IStateMachine

Import a state machine via resource name.

type InputType

type InputType string

The type of task input.

const (
	// Use a literal string This might be a JSON-encoded object, or just text.
	//
	// valid JSON text: standalone, quote-delimited strings; objects; arrays; numbers; Boolean values; and null.
	//
	// example: `literal string`
	// example: {"json": "encoded"}.
	InputType_TEXT InputType = "TEXT"
	// Use an object which may contain Data and Context fields as object values, if desired.
	//
	// example:
	// {
	//  literal: 'literal',
	//  SomeInput: sfn.JsonPath.stringAt('$.someField')
	// }.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html
	//
	InputType_OBJECT InputType = "OBJECT"
)

type IntegrationPattern

type IntegrationPattern string

AWS Step Functions integrates with services directly in the Amazon States Language.

You can control these AWS services using service integration patterns:.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

codebuildProject := codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{
	ProjectName: jsii.String("MyTestProject"),
	BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{
		"version": jsii.String("0.2"),
		"phases": map[string]map[string][]*string{
			"build": map[string][]*string{
				"commands": []*string{
					jsii.String("echo \"Hello, CodeBuild!\""),
				},
			},
		},
	}),
})

task := tasks.NewCodeBuildStartBuild(this, jsii.String("Task"), &CodeBuildStartBuildProps{
	Project: codebuildProject,
	IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
	EnvironmentVariablesOverride: map[string]buildEnvironmentVariable{
		"ZONE": &buildEnvironmentVariable{
			"type": codebuild.BuildEnvironmentVariableType_PLAINTEXT,
			"value": sfn.JsonPath_stringAt(jsii.String("$.envVariables.zone")),
		},
	},
})

See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html

const (
	// Step Functions will wait for an HTTP response and then progress to the next state.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-default
	//
	IntegrationPattern_REQUEST_RESPONSE IntegrationPattern = "REQUEST_RESPONSE"
	// Step Functions can wait for a request to complete before progressing to the next state.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync
	//
	IntegrationPattern_RUN_JOB IntegrationPattern = "RUN_JOB"
	// Callback tasks provide a way to pause a workflow until a task token is returned.
	//
	// You must set a task token when using the callback pattern.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token
	//
	IntegrationPattern_WAIT_FOR_TASK_TOKEN IntegrationPattern = "WAIT_FOR_TASK_TOKEN"
)

type ItemBatcher added in v2.127.0

type ItemBatcher interface {
	// Render ItemBatcher in ASL JSON format.
	Render() interface{}
	// Validate this ItemBatcher.
	ValidateItemBatcher() *[]*string
}

Configuration for processing a group of items in a single child workflow execution.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var batchInput interface{}

itemBatcher := awscdk.Aws_stepfunctions.NewItemBatcher(&ItemBatcherProps{
	BatchInput: batchInput,
	MaxInputBytesPerBatch: jsii.Number(123),
	MaxInputBytesPerBatchPath: jsii.String("maxInputBytesPerBatchPath"),
	MaxItemsPerBatch: jsii.Number(123),
	MaxItemsPerBatchPath: jsii.String("maxItemsPerBatchPath"),
})

func NewItemBatcher added in v2.127.0

func NewItemBatcher(props *ItemBatcherProps) ItemBatcher

type ItemBatcherProps added in v2.127.0

type ItemBatcherProps struct {
	// BatchInput.
	//
	// Fixed JSON input to include in each batch passed to each child workflow execution.
	// Default: - No batchInput.
	//
	BatchInput *map[string]interface{} `field:"optional" json:"batchInput" yaml:"batchInput"`
	// MaxInputBytesPerBatch.
	//
	// Specifies the maximum number of bytes that each child workflow execution processes, as static number.
	// Default: - uses value of `maxInputBytesPerBatchPath` as the max size per batch,
	// no limits on the batch size under the 256KB limit if that property was also not provided.
	//
	MaxInputBytesPerBatch *float64 `field:"optional" json:"maxInputBytesPerBatch" yaml:"maxInputBytesPerBatch"`
	// MaxInputBytesPerBatchPath.
	//
	// Specifies the maximum number of bytes that each child workflow execution processes, as JsonPath.
	// Default: - uses value of `maxInputBytesPerBatch` as the max size per batch,
	// no limits on the batch size under the 256KB limit if that property was also not provided.
	//
	MaxInputBytesPerBatchPath *string `field:"optional" json:"maxInputBytesPerBatchPath" yaml:"maxInputBytesPerBatchPath"`
	// MaxItemsPerBatch.
	//
	// Specifies the maximum number of items that each child workflow execution processes, as static number.
	// Default: - uses value of `maxItemsPerBatchPath` as the max items per batch,
	// no limits on the number of items in a batch under the 256KB limit if that property was also not provided.
	//
	MaxItemsPerBatch *float64 `field:"optional" json:"maxItemsPerBatch" yaml:"maxItemsPerBatch"`
	// MaxItemsPerBatchPath.
	//
	// Specifies the maximum number of items that each child workflow execution processes, as JsonPath.
	// Default: - uses value of `maxItemsPerBatch` as the max items per batch,
	// no limits on the number of items in a batch under the 256KB limit if that property was also not provided.
	//
	MaxItemsPerBatchPath *string `field:"optional" json:"maxItemsPerBatchPath" yaml:"maxItemsPerBatchPath"`
}

Interface for ItemBatcher configuration properties.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var batchInput interface{}

itemBatcherProps := &ItemBatcherProps{
	BatchInput: batchInput,
	MaxInputBytesPerBatch: jsii.Number(123),
	MaxInputBytesPerBatchPath: jsii.String("maxInputBytesPerBatchPath"),
	MaxItemsPerBatch: jsii.Number(123),
	MaxItemsPerBatchPath: jsii.String("maxItemsPerBatchPath"),
}

type ItemReaderProps added in v2.127.0

type ItemReaderProps struct {
	// S3 Bucket containing objects to iterate over or a file with a list to iterate over.
	Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"`
	// Limits the number of items passed to the Distributed Map state.
	// Default: - Distributed Map state will iterate over all items provided by the ItemReader.
	//
	MaxItems *float64 `field:"optional" json:"maxItems" yaml:"maxItems"`
}

Base interface for Item Reader configuration properties.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var bucket bucket

itemReaderProps := &ItemReaderProps{
	Bucket: bucket,

	// the properties below are optional
	MaxItems: jsii.Number(123),
}

type JitterType added in v2.95.0

type JitterType string

Values allowed in the retrier JitterStrategy field.

Example:

parallel := sfn.NewParallel(this, jsii.String("Do the work in parallel"))

// Add branches to be executed in parallel
shipItem := sfn.NewPass(this, jsii.String("ShipItem"))
sendInvoice := sfn.NewPass(this, jsii.String("SendInvoice"))
restock := sfn.NewPass(this, jsii.String("Restock"))
parallel.Branch(shipItem)
parallel.Branch(sendInvoice)
parallel.Branch(restock)

// Retry the whole workflow if something goes wrong with exponential backoff
parallel.AddRetry(&RetryProps{
	MaxAttempts: jsii.Number(1),
	MaxDelay: awscdk.Duration_Seconds(jsii.Number(5)),
	JitterStrategy: sfn.JitterType_FULL,
})

// How to recover from errors
sendFailureNotification := sfn.NewPass(this, jsii.String("SendFailureNotification"))
parallel.AddCatch(sendFailureNotification)

// What to do in case everything succeeded
closeOrder := sfn.NewPass(this, jsii.String("CloseOrder"))
parallel.Next(closeOrder)
const (
	// Calculates the delay to be a random number between 0 and the computed backoff for the given retry attempt count.
	JitterType_FULL JitterType = "FULL"
	// Calculates the delay to be the computed backoff for the given retry attempt count (equivalent to if Jitter was not declared - i.e. the default value).
	JitterType_NONE JitterType = "NONE"
)

type JsonPath

type JsonPath interface {
}

Extract a field from the State Machine data or context that gets passed around between states.

Example:

submitJobActivity := sfn.NewActivity(this, jsii.String("SubmitJob"))

tasks.NewStepFunctionsInvokeActivity(this, jsii.String("Submit Job"), &StepFunctionsInvokeActivityProps{
	Activity: submitJobActivity,
	Parameters: map[string]interface{}{
		"comment": jsii.String("Selecting what I care about."),
		"MyDetails": map[string]interface{}{
			"size": sfn.JsonPath_stringAt(jsii.String("$.product.details.size")),
			"exists": sfn.JsonPath_stringAt(jsii.String("$.product.availability")),
			"StaticValue": jsii.String("foo"),
		},
	},
})

See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-paths.html

type LogLevel

type LogLevel string

Defines which category of execution history events are logged.

Example:

import logs "github.com/aws/aws-cdk-go/awscdk"

logGroup := logs.NewLogGroup(this, jsii.String("MyLogGroup"))

definition := sfn.Chain_Start(sfn.NewPass(this, jsii.String("Pass")))

sfn.NewStateMachine(this, jsii.String("MyStateMachine"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromChainable(definition),
	Logs: &LogOptions{
		Destination: logGroup,
		Level: sfn.LogLevel_ALL,
	},
})

See: https://docs.aws.amazon.com/step-functions/latest/dg/cloudwatch-log-level.html

Default: ERROR.

const (
	// No Logging.
	LogLevel_OFF LogLevel = "OFF"
	// Log everything.
	LogLevel_ALL LogLevel = "ALL"
	// Log all errors.
	LogLevel_ERROR LogLevel = "ERROR"
	// Log fatal errors.
	LogLevel_FATAL LogLevel = "FATAL"
)

type LogOptions

type LogOptions struct {
	// The log group where the execution history events will be logged.
	Destination awslogs.ILogGroup `field:"required" json:"destination" yaml:"destination"`
	// Determines whether execution data is included in your log.
	// Default: false.
	//
	IncludeExecutionData *bool `field:"optional" json:"includeExecutionData" yaml:"includeExecutionData"`
	// Defines which category of execution history events are logged.
	// Default: ERROR.
	//
	Level LogLevel `field:"optional" json:"level" yaml:"level"`
}

Defines what execution history events are logged and where they are logged.

Example:

import logs "github.com/aws/aws-cdk-go/awscdk"

logGroup := logs.NewLogGroup(this, jsii.String("MyLogGroup"))

definition := sfn.Chain_Start(sfn.NewPass(this, jsii.String("Pass")))

sfn.NewStateMachine(this, jsii.String("MyStateMachine"), &StateMachineProps{
	DefinitionBody: sfn.DefinitionBody_FromChainable(definition),
	Logs: &LogOptions{
		Destination: logGroup,
		Level: sfn.LogLevel_ALL,
	},
})

type Map

type Map interface {
	MapBase
	INextable
	Branches() *[]StateGraph
	Comment() *string
	DefaultChoice() State
	SetDefaultChoice(val State)
	// Continuable states of this Chainable.
	EndStates() *[]INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	ItemSelector() *map[string]interface{}
	ItemsPath() *string
	Iteration() StateGraph
	SetIteration(val StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	Processor() StateGraph
	SetProcessor(val StateGraph)
	ProcessorConfig() *ProcessorConfig
	SetProcessorConfig(val *ProcessorConfig)
	ProcessorMode() ProcessorMode
	SetProcessorMode(val ProcessorMode)
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	StateName() *string
	// Add a parallel branch to this state.
	AddBranch(branch StateGraph)
	// Add a recovery handler for this state.
	//
	// When a particular error occurs, execution will continue at the error
	// handler instead of failing the state machine execution.
	AddCatch(handler IChainable, props *CatchProps) Map
	// Add a choice branch to this state.
	AddChoice(condition Condition, next State, options *ChoiceTransitionOptions)
	// Add a item processor to this state.
	AddItemProcessor(processor StateGraph, config *ProcessorConfig)
	// Add a map iterator to this state.
	AddIterator(iteration StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Add retry configuration for this state.
	//
	// This controls if and how the execution will be retried if a particular
	// error occurs.
	AddRetry(props *RetryProps) Map
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph StateGraph)
	// Define item processor in Map.
	//
	// A Map must either have a non-empty iterator or a non-empty item processor (mutually exclusive  with `iterator`).
	ItemProcessor(processor IChainable, config *ProcessorConfig) Map
	// Define iterator state machine in Map.
	//
	// A Map must either have a non-empty iterator or a non-empty item processor (mutually exclusive  with `itemProcessor`).
	// Deprecated: - use `itemProcessor` instead.
	Iterator(iterator IChainable) Map
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def State)
	// Make the indicated state the default transition of this state.
	MakeNext(next State)
	// Continue normal execution with the given state.
	Next(next IChainable) Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render ItemProcessor in ASL JSON format.
	RenderItemProcessor() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Return the Amazon States Language object for this state.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Validate this state.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph StateGraph)
}

Define a Map state in the state machine.

A `Map` state can be used to run a set of steps for each element of an input array. A Map state will execute the same steps for multiple entries of an array in the state input.

While the Parallel state executes multiple branches of steps using the same input, a Map state will execute the same steps for multiple entries of an array in the state input.

Example:

map := sfn.NewMap(this, jsii.String("Map State"), &MapProps{
	MaxConcurrency: jsii.Number(1),
	ItemsPath: sfn.JsonPath_StringAt(jsii.String("$.inputForMap")),
	ItemSelector: map[string]interface{}{
		"item": sfn.JsonPath_*StringAt(jsii.String("$.Map.Item.Value")),
	},
	ResultPath: jsii.String("$.mapOutput"),
})

// The Map iterator can contain a IChainable, which can be an individual or multiple steps chained together.
// Below example is with a Choice and Pass step
choice := sfn.NewChoice(this, jsii.String("Choice"))
condition1 := sfn.Condition_StringEquals(jsii.String("$.item.status"), jsii.String("SUCCESS"))
step1 := sfn.NewPass(this, jsii.String("Step1"))
step2 := sfn.NewPass(this, jsii.String("Step2"))
finish := sfn.NewPass(this, jsii.String("Finish"))

definition := choice.When(condition1, step1).Otherwise(step2).Afterwards().Next(finish)

map.ItemProcessor(definition)

See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-map-state.html

func NewMap

func NewMap(scope constructs.Construct, id *string, props *MapProps) Map

type MapBase added in v2.127.0

type MapBase interface {
	State
	INextable
	Branches() *[]StateGraph
	Comment() *string
	DefaultChoice() State
	SetDefaultChoice(val State)
	// Continuable states of this Chainable.
	EndStates() *[]INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	ItemSelector() *map[string]interface{}
	ItemsPath() *string
	Iteration() StateGraph
	SetIteration(val StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	Processor() StateGraph
	SetProcessor(val StateGraph)
	ProcessorConfig() *ProcessorConfig
	SetProcessorConfig(val *ProcessorConfig)
	ProcessorMode() ProcessorMode
	SetProcessorMode(val ProcessorMode)
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	StateName() *string
	// Add a parallel branch to this state.
	AddBranch(branch StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition Condition, next State, options *ChoiceTransitionOptions)
	// Add a item processor to this state.
	AddItemProcessor(processor StateGraph, config *ProcessorConfig)
	// Add a map iterator to this state.
	AddIterator(iteration StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph StateGraph)
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def State)
	// Make the indicated state the default transition of this state.
	MakeNext(next State)
	// Continue normal execution with the given state.
	Next(next IChainable) Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render ItemProcessor in ASL JSON format.
	RenderItemProcessor() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Return the Amazon States Language object for this state.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Validate this state.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph StateGraph)
}

Define a Map state in the state machine.

A `Map` state can be used to run a set of steps for each element of an input array. A Map state will execute the same steps for multiple entries of an array in the state input.

While the Parallel state executes multiple branches of steps using the same input, a Map state will execute the same steps for multiple entries of an array in the state input. See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-map-state.html

type MapBaseProps added in v2.127.0

type MapBaseProps struct {
	// An optional description for this state.
	// Default: No comment.
	//
	Comment *string `field:"optional" json:"comment" yaml:"comment"`
	// JSONPath expression to select part of the state to be the input to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// input to be the empty object {}.
	// Default: $.
	//
	InputPath *string `field:"optional" json:"inputPath" yaml:"inputPath"`
	// The JSON that you want to override your default iteration input (mutually exclusive  with `parameters`).
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-itemselector.html
	//
	// Default: $.
	//
	ItemSelector *map[string]interface{} `field:"optional" json:"itemSelector" yaml:"itemSelector"`
	// JSONPath expression to select the array to iterate over.
	// Default: $.
	//
	ItemsPath *string `field:"optional" json:"itemsPath" yaml:"itemsPath"`
	// MaxConcurrency.
	//
	// An upper bound on the number of iterations you want running at once.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-asl-use-map-state-inline.html#map-state-inline-additional-fields
	//
	// Default: - full concurrency.
	//
	MaxConcurrency *float64 `field:"optional" json:"maxConcurrency" yaml:"maxConcurrency"`
	// MaxConcurrencyPath.
	//
	// A JsonPath that specifies the maximum concurrency dynamically from the state input.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-asl-use-map-state-inline.html#map-state-inline-additional-fields
	//
	// Default: - full concurrency.
	//
	MaxConcurrencyPath *string `field:"optional" json:"maxConcurrencyPath" yaml:"maxConcurrencyPath"`
	// JSONPath expression to select part of the state to be the output to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// output to be the empty object {}.
	// Default: $.
	//
	OutputPath *string `field:"optional" json:"outputPath" yaml:"outputPath"`
	// JSONPath expression to indicate where to inject the state's output.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the state's
	// input to become its output.
	// Default: $.
	//
	ResultPath *string `field:"optional" json:"resultPath" yaml:"resultPath"`
	// The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.
	//
	// You can use ResultSelector to create a payload with values that are static
	// or selected from the state's raw result.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-resultselector
	//
	// Default: - None.
	//
	ResultSelector *map[string]interface{} `field:"optional" json:"resultSelector" yaml:"resultSelector"`
	// Optional name for this state.
	// Default: - The construct ID will be used as state name.
	//
	StateName *string `field:"optional" json:"stateName" yaml:"stateName"`
}

Properties for defining a Map state.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var itemSelector interface{}
var resultSelector interface{}

mapBaseProps := &MapBaseProps{
	Comment: jsii.String("comment"),
	InputPath: jsii.String("inputPath"),
	ItemSelector: map[string]interface{}{
		"itemSelectorKey": itemSelector,
	},
	ItemsPath: jsii.String("itemsPath"),
	MaxConcurrency: jsii.Number(123),
	MaxConcurrencyPath: jsii.String("maxConcurrencyPath"),
	OutputPath: jsii.String("outputPath"),
	ResultPath: jsii.String("resultPath"),
	ResultSelector: map[string]interface{}{
		"resultSelectorKey": resultSelector,
	},
	StateName: jsii.String("stateName"),
}

type MapProps

type MapProps struct {
	// An optional description for this state.
	// Default: No comment.
	//
	Comment *string `field:"optional" json:"comment" yaml:"comment"`
	// JSONPath expression to select part of the state to be the input to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// input to be the empty object {}.
	// Default: $.
	//
	InputPath *string `field:"optional" json:"inputPath" yaml:"inputPath"`
	// The JSON that you want to override your default iteration input (mutually exclusive  with `parameters`).
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-itemselector.html
	//
	// Default: $.
	//
	ItemSelector *map[string]interface{} `field:"optional" json:"itemSelector" yaml:"itemSelector"`
	// JSONPath expression to select the array to iterate over.
	// Default: $.
	//
	ItemsPath *string `field:"optional" json:"itemsPath" yaml:"itemsPath"`
	// MaxConcurrency.
	//
	// An upper bound on the number of iterations you want running at once.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-asl-use-map-state-inline.html#map-state-inline-additional-fields
	//
	// Default: - full concurrency.
	//
	MaxConcurrency *float64 `field:"optional" json:"maxConcurrency" yaml:"maxConcurrency"`
	// MaxConcurrencyPath.
	//
	// A JsonPath that specifies the maximum concurrency dynamically from the state input.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-asl-use-map-state-inline.html#map-state-inline-additional-fields
	//
	// Default: - full concurrency.
	//
	MaxConcurrencyPath *string `field:"optional" json:"maxConcurrencyPath" yaml:"maxConcurrencyPath"`
	// JSONPath expression to select part of the state to be the output to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// output to be the empty object {}.
	// Default: $.
	//
	OutputPath *string `field:"optional" json:"outputPath" yaml:"outputPath"`
	// JSONPath expression to indicate where to inject the state's output.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the state's
	// input to become its output.
	// Default: $.
	//
	ResultPath *string `field:"optional" json:"resultPath" yaml:"resultPath"`
	// The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.
	//
	// You can use ResultSelector to create a payload with values that are static
	// or selected from the state's raw result.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-resultselector
	//
	// Default: - None.
	//
	ResultSelector *map[string]interface{} `field:"optional" json:"resultSelector" yaml:"resultSelector"`
	// Optional name for this state.
	// Default: - The construct ID will be used as state name.
	//
	StateName *string `field:"optional" json:"stateName" yaml:"stateName"`
	// The JSON that you want to override your default iteration input (mutually exclusive  with `itemSelector`).
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-itemselector.html
	//
	// Default: $.
	//
	// Deprecated: Step Functions has deprecated the `parameters` field in favor of
	// the new `itemSelector` field.
	Parameters *map[string]interface{} `field:"optional" json:"parameters" yaml:"parameters"`
}

Properties for defining a Map state.

Example:

map := sfn.NewMap(this, jsii.String("Map State"), &MapProps{
	MaxConcurrency: jsii.Number(1),
	ItemsPath: sfn.JsonPath_StringAt(jsii.String("$.inputForMap")),
	ItemSelector: map[string]interface{}{
		"item": sfn.JsonPath_*StringAt(jsii.String("$.Map.Item.Value")),
	},
	ResultPath: jsii.String("$.mapOutput"),
})

// The Map iterator can contain a IChainable, which can be an individual or multiple steps chained together.
// Below example is with a Choice and Pass step
choice := sfn.NewChoice(this, jsii.String("Choice"))
condition1 := sfn.Condition_StringEquals(jsii.String("$.item.status"), jsii.String("SUCCESS"))
step1 := sfn.NewPass(this, jsii.String("Step1"))
step2 := sfn.NewPass(this, jsii.String("Step2"))
finish := sfn.NewPass(this, jsii.String("Finish"))

definition := choice.When(condition1, step1).Otherwise(step2).Afterwards().Next(finish)

map.ItemProcessor(definition)

type Parallel

type Parallel interface {
	State
	INextable
	Branches() *[]StateGraph
	Comment() *string
	DefaultChoice() State
	SetDefaultChoice(val State)
	// Continuable states of this Chainable.
	EndStates() *[]INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() StateGraph
	SetIteration(val StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	Processor() StateGraph
	SetProcessor(val StateGraph)
	ProcessorConfig() *ProcessorConfig
	SetProcessorConfig(val *ProcessorConfig)
	ProcessorMode() ProcessorMode
	SetProcessorMode(val ProcessorMode)
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	StateName() *string
	// Add a parallel branch to this state.
	AddBranch(branch StateGraph)
	// Add a recovery handler for this state.
	//
	// When a particular error occurs, execution will continue at the error
	// handler instead of failing the state machine execution.
	AddCatch(handler IChainable, props *CatchProps) Parallel
	// Add a choice branch to this state.
	AddChoice(condition Condition, next State, options *ChoiceTransitionOptions)
	// Add a item processor to this state.
	AddItemProcessor(processor StateGraph, config *ProcessorConfig)
	// Add a map iterator to this state.
	AddIterator(iteration StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Add retry configuration for this state.
	//
	// This controls if and how the execution will be retried if a particular
	// error occurs.
	AddRetry(props *RetryProps) Parallel
	// Overwrites State.bindToGraph. Adds branches to the Parallel state here so that any necessary prefixes are appended first.
	BindToGraph(graph StateGraph)
	// Define one or more branches to run in parallel.
	Branch(branches ...IChainable) Parallel
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def State)
	// Make the indicated state the default transition of this state.
	MakeNext(next State)
	// Continue normal execution with the given state.
	Next(next IChainable) Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render ItemProcessor in ASL JSON format.
	RenderItemProcessor() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Return the Amazon States Language object for this state.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Validate this state.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph StateGraph)
}

Define a Parallel state in the state machine.

A Parallel state can be used to run one or more state machines at the same time.

The Result of a Parallel state is an array of the results of its substatemachines.

Example:

import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/constructs-go/constructs"
import "github.com/aws/aws-cdk-go/awscdk"

type myJobProps struct {
	jobFlavor *string
}

type myJob struct {
	stateMachineFragment
	startState state
	endStates []iNextable
}

func newMyJob(parent construct, id *string, props myJobProps) *myJob {
	this := &myJob{}
	sfn.NewStateMachineFragment_Override(this, parent, id)

	choice := sfn.NewChoice(this, jsii.String("Choice")).When(sfn.Condition_StringEquals(jsii.String("$.branch"), jsii.String("left")), sfn.NewPass(this, jsii.String("Left Branch"))).When(sfn.Condition_StringEquals(jsii.String("$.branch"), jsii.String("right")), sfn.NewPass(this, jsii.String("Right Branch")))

	// ...

	this.startState = choice
	this.endStates = choice.Afterwards().EndStates
	return this
}

type myStack struct {
	stack
}

func newMyStack(scope construct, id *string) *myStack {
	this := &myStack{}
	newStack_Override(this, scope, id)
	// Do 3 different variants of MyJob in parallel
	parallel := sfn.NewParallel(this, jsii.String("All jobs")).Branch(NewMyJob(this, jsii.String("Quick"), &myJobProps{
		jobFlavor: jsii.String("quick"),
	}).PrefixStates()).Branch(NewMyJob(this, jsii.String("Medium"), &myJobProps{
		jobFlavor: jsii.String("medium"),
	}).PrefixStates()).Branch(NewMyJob(this, jsii.String("Slow"), &myJobProps{
		jobFlavor: jsii.String("slow"),
	}).PrefixStates())

	sfn.NewStateMachine(this, jsii.String("MyStateMachine"), &StateMachineProps{
		DefinitionBody: sfn.DefinitionBody_FromChainable(parallel),
	})
	return this
}

func NewParallel

func NewParallel(scope constructs.Construct, id *string, props *ParallelProps) Parallel

type ParallelProps

type ParallelProps struct {
	// An optional description for this state.
	// Default: No comment.
	//
	Comment *string `field:"optional" json:"comment" yaml:"comment"`
	// JSONPath expression to select part of the state to be the input to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// input to be the empty object {}.
	// Default: $.
	//
	InputPath *string `field:"optional" json:"inputPath" yaml:"inputPath"`
	// JSONPath expression to select part of the state to be the output to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// output to be the empty object {}.
	// Default: $.
	//
	OutputPath *string `field:"optional" json:"outputPath" yaml:"outputPath"`
	// JSONPath expression to indicate where to inject the state's output.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the state's
	// input to become its output.
	// Default: $.
	//
	ResultPath *string `field:"optional" json:"resultPath" yaml:"resultPath"`
	// The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.
	//
	// You can use ResultSelector to create a payload with values that are static
	// or selected from the state's raw result.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-resultselector
	//
	// Default: - None.
	//
	ResultSelector *map[string]interface{} `field:"optional" json:"resultSelector" yaml:"resultSelector"`
	// Optional name for this state.
	// Default: - The construct ID will be used as state name.
	//
	StateName *string `field:"optional" json:"stateName" yaml:"stateName"`
}

Properties for defining a Parallel state.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var resultSelector interface{}

parallelProps := &ParallelProps{
	Comment: jsii.String("comment"),
	InputPath: jsii.String("inputPath"),
	OutputPath: jsii.String("outputPath"),
	ResultPath: jsii.String("resultPath"),
	ResultSelector: map[string]interface{}{
		"resultSelectorKey": resultSelector,
	},
	StateName: jsii.String("stateName"),
}

type Pass

type Pass interface {
	State
	INextable
	Branches() *[]StateGraph
	Comment() *string
	DefaultChoice() State
	SetDefaultChoice(val State)
	// Continuable states of this Chainable.
	EndStates() *[]INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() StateGraph
	SetIteration(val StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	Processor() StateGraph
	SetProcessor(val StateGraph)
	ProcessorConfig() *ProcessorConfig
	SetProcessorConfig(val *ProcessorConfig)
	ProcessorMode() ProcessorMode
	SetProcessorMode(val ProcessorMode)
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	StateName() *string
	// Add a parallel branch to this state.
	AddBranch(branch StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition Condition, next State, options *ChoiceTransitionOptions)
	// Add a item processor to this state.
	AddItemProcessor(processor StateGraph, config *ProcessorConfig)
	// Add a map iterator to this state.
	AddIterator(iteration StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph StateGraph)
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def State)
	// Make the indicated state the default transition of this state.
	MakeNext(next State)
	// Continue normal execution with the given state.
	Next(next IChainable) Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render ItemProcessor in ASL JSON format.
	RenderItemProcessor() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Return the Amazon States Language object for this state.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph StateGraph)
}

Define a Pass in the state machine.

A Pass state can be used to transform the current execution's state.

Example:

choice := sfn.NewChoice(this, jsii.String("Did it work?"))

// Add conditions with .when()
successState := sfn.NewPass(this, jsii.String("SuccessState"))
failureState := sfn.NewPass(this, jsii.String("FailureState"))
choice.When(sfn.Condition_StringEquals(jsii.String("$.status"), jsii.String("SUCCESS")), successState)
choice.When(sfn.Condition_NumberGreaterThan(jsii.String("$.attempts"), jsii.Number(5)), failureState)

// Use .otherwise() to indicate what should be done if none of the conditions match
tryAgainState := sfn.NewPass(this, jsii.String("TryAgainState"))
choice.Otherwise(tryAgainState)

func NewPass

func NewPass(scope constructs.Construct, id *string, props *PassProps) Pass

type PassProps

type PassProps struct {
	// An optional description for this state.
	// Default: No comment.
	//
	Comment *string `field:"optional" json:"comment" yaml:"comment"`
	// JSONPath expression to select part of the state to be the input to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// input to be the empty object {}.
	// Default: $.
	//
	InputPath *string `field:"optional" json:"inputPath" yaml:"inputPath"`
	// JSONPath expression to select part of the state to be the output to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// output to be the empty object {}.
	// Default: $.
	//
	OutputPath *string `field:"optional" json:"outputPath" yaml:"outputPath"`
	// Parameters pass a collection of key-value pairs, either static values or JSONPath expressions that select from the input.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-parameters
	//
	// Default: No parameters.
	//
	Parameters *map[string]interface{} `field:"optional" json:"parameters" yaml:"parameters"`
	// If given, treat as the result of this operation.
	//
	// Can be used to inject or replace the current execution state.
	// Default: No injected result.
	//
	Result Result `field:"optional" json:"result" yaml:"result"`
	// JSONPath expression to indicate where to inject the state's output.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the state's
	// input to become its output.
	// Default: $.
	//
	ResultPath *string `field:"optional" json:"resultPath" yaml:"resultPath"`
	// Optional name for this state.
	// Default: - The construct ID will be used as state name.
	//
	StateName *string `field:"optional" json:"stateName" yaml:"stateName"`
}

Properties for defining a Pass state.

Example:

// Makes the current JSON state { ..., "subObject": { "hello": "world" } }
pass := sfn.NewPass(this, jsii.String("Add Hello World"), &PassProps{
	Result: sfn.Result_FromObject(map[string]interface{}{
		"hello": jsii.String("world"),
	}),
	ResultPath: jsii.String("$.subObject"),
})

// Set the next state
nextState := sfn.NewPass(this, jsii.String("NextState"))
pass.Next(nextState)

type ProcessorConfig added in v2.116.0

type ProcessorConfig struct {
	// Specifies the execution type for the Map workflow.
	//
	// If you use the `Map` class, you must provide this field if you specified `DISTRIBUTED` for the `mode` sub-field.
	//
	// If you use the `DistributedMap` class, this property is ignored.
	// Use the `mapExecutionType` in the `DistributedMap` class instead.
	// Default: - no execution type.
	//
	ExecutionType ProcessorType `field:"optional" json:"executionType" yaml:"executionType"`
	// Specifies the execution mode for the Map workflow.
	// Default: - ProcessorMode.INLINE if using the `Map` class, ProcessorMode.DISTRIBUTED if using the `DistributedMap` class
	//
	Mode ProcessorMode `field:"optional" json:"mode" yaml:"mode"`
}

Specifies the configuration for the processor Map state.

Example:

map := sfn.NewMap(this, jsii.String("Map State"), &MapProps{
	MaxConcurrency: jsii.Number(1),
	ItemsPath: sfn.JsonPath_StringAt(jsii.String("$.inputForMap")),
	ItemSelector: map[string]interface{}{
		"item": sfn.JsonPath_*StringAt(jsii.String("$.Map.Item.Value")),
	},
	ResultPath: jsii.String("$.mapOutput"),
})

map.ItemProcessor(sfn.NewPass(this, jsii.String("Pass State")), &ProcessorConfig{
	Mode: sfn.ProcessorMode_DISTRIBUTED,
	ExecutionType: sfn.ProcessorType_STANDARD,
})

type ProcessorMode added in v2.116.0

type ProcessorMode string

Mode of the Map workflow.

Example:

map := sfn.NewMap(this, jsii.String("Map State"), &MapProps{
	MaxConcurrency: jsii.Number(1),
	ItemsPath: sfn.JsonPath_StringAt(jsii.String("$.inputForMap")),
	ItemSelector: map[string]interface{}{
		"item": sfn.JsonPath_*StringAt(jsii.String("$.Map.Item.Value")),
	},
	ResultPath: jsii.String("$.mapOutput"),
})

map.ItemProcessor(sfn.NewPass(this, jsii.String("Pass State")), &ProcessorConfig{
	Mode: sfn.ProcessorMode_DISTRIBUTED,
	ExecutionType: sfn.ProcessorType_STANDARD,
})
const (
	// Inline Map mode.
	ProcessorMode_INLINE ProcessorMode = "INLINE"
	// Distributed Map mode.
	ProcessorMode_DISTRIBUTED ProcessorMode = "DISTRIBUTED"
)

type ProcessorType added in v2.116.0

type ProcessorType string

Execution type for the Map workflow.

Example:

map := sfn.NewMap(this, jsii.String("Map State"), &MapProps{
	MaxConcurrency: jsii.Number(1),
	ItemsPath: sfn.JsonPath_StringAt(jsii.String("$.inputForMap")),
	ItemSelector: map[string]interface{}{
		"item": sfn.JsonPath_*StringAt(jsii.String("$.Map.Item.Value")),
	},
	ResultPath: jsii.String("$.mapOutput"),
})

map.ItemProcessor(sfn.NewPass(this, jsii.String("Pass State")), &ProcessorConfig{
	Mode: sfn.ProcessorMode_DISTRIBUTED,
	ExecutionType: sfn.ProcessorType_STANDARD,
})
const (
	// Standard execution type.
	ProcessorType_STANDARD ProcessorType = "STANDARD"
	// Express execution type.
	ProcessorType_EXPRESS ProcessorType = "EXPRESS"
)

type Result

type Result interface {
	// result of the Pass operation.
	Value() interface{}
}

The result of a Pass operation.

Example:

// Makes the current JSON state { ..., "subObject": { "hello": "world" } }
pass := sfn.NewPass(this, jsii.String("Add Hello World"), &PassProps{
	Result: sfn.Result_FromObject(map[string]interface{}{
		"hello": jsii.String("world"),
	}),
	ResultPath: jsii.String("$.subObject"),
})

// Set the next state
nextState := sfn.NewPass(this, jsii.String("NextState"))
pass.Next(nextState)

func NewResult

func NewResult(value interface{}) Result

func Result_FromArray

func Result_FromArray(value *[]interface{}) Result

The result of the operation is an array.

func Result_FromBoolean

func Result_FromBoolean(value *bool) Result

The result of the operation is a boolean.

func Result_FromNumber

func Result_FromNumber(value *float64) Result

The result of the operation is a number.

func Result_FromObject

func Result_FromObject(value *map[string]interface{}) Result

The result of the operation is an object.

func Result_FromString

func Result_FromString(value *string) Result

The result of the operation is a string.

type ResultWriter added in v2.127.0

type ResultWriter interface {
	// S3 Bucket in which to save Map Run results.
	Bucket() awss3.IBucket
	// S3 prefix in which to save Map Run results.
	// Default: - No prefix.
	//
	Prefix() *string
	// Compile policy statements to provide relevent permissions to the state machine.
	ProvidePolicyStatements() *[]awsiam.PolicyStatement
	// Render ResultWriter in ASL JSON format.
	Render() interface{}
}

Configuration for writing Distributed Map state results to S3.

Example:

import s3 "github.com/aws/aws-cdk-go/awscdk"

// create a bucket
bucket := s3.NewBucket(this, jsii.String("Bucket"))

distributedMap := sfn.NewDistributedMap(this, jsii.String("Distributed Map State"), &DistributedMapProps{
	ItemReader: sfn.NewS3JsonItemReader(&S3FileItemReaderProps{
		Bucket: bucket,
		Key: jsii.String("my-key.json"),
	}),
	ResultWriter: sfn.NewResultWriter(&ResultWriterProps{
		Bucket: bucket,
		Prefix: jsii.String("my-prefix"),
	}),
})
distributedMap.ItemProcessor(sfn.NewPass(this, jsii.String("Pass State")))

func NewResultWriter added in v2.127.0

func NewResultWriter(props *ResultWriterProps) ResultWriter

type ResultWriterProps added in v2.127.0

type ResultWriterProps struct {
	// S3 Bucket in which to save Map Run results.
	Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"`
	// S3 prefix in which to save Map Run results.
	// Default: - No prefix.
	//
	Prefix *string `field:"optional" json:"prefix" yaml:"prefix"`
}

Interface for Result Writer configuration properties.

Example:

import s3 "github.com/aws/aws-cdk-go/awscdk"

// create a bucket
bucket := s3.NewBucket(this, jsii.String("Bucket"))

distributedMap := sfn.NewDistributedMap(this, jsii.String("Distributed Map State"), &DistributedMapProps{
	ItemReader: sfn.NewS3JsonItemReader(&S3FileItemReaderProps{
		Bucket: bucket,
		Key: jsii.String("my-key.json"),
	}),
	ResultWriter: sfn.NewResultWriter(&ResultWriterProps{
		Bucket: bucket,
		Prefix: jsii.String("my-prefix"),
	}),
})
distributedMap.ItemProcessor(sfn.NewPass(this, jsii.String("Pass State")))

type RetryProps

type RetryProps struct {
	// Multiplication for how much longer the wait interval gets on every retry.
	// Default: 2.
	//
	BackoffRate *float64 `field:"optional" json:"backoffRate" yaml:"backoffRate"`
	// Errors to retry.
	//
	// A list of error strings to retry, which can be either predefined errors
	// (for example Errors.NoChoiceMatched) or a self-defined error.
	// Default: All errors.
	//
	Errors *[]*string `field:"optional" json:"errors" yaml:"errors"`
	// How many seconds to wait initially before retrying.
	// Default: Duration.seconds(1)
	//
	Interval awscdk.Duration `field:"optional" json:"interval" yaml:"interval"`
	// Introduces a randomization over the retry interval.
	// Default: - No jitter strategy.
	//
	JitterStrategy JitterType `field:"optional" json:"jitterStrategy" yaml:"jitterStrategy"`
	// How many times to retry this particular error.
	//
	// May be 0 to disable retry for specific errors (in case you have
	// a catch-all retry policy).
	// Default: 3.
	//
	MaxAttempts *float64 `field:"optional" json:"maxAttempts" yaml:"maxAttempts"`
	// Maximum limit on retry interval growth during exponential backoff.
	// Default: - No max delay.
	//
	MaxDelay awscdk.Duration `field:"optional" json:"maxDelay" yaml:"maxDelay"`
}

Retry details.

Example:

parallel := sfn.NewParallel(this, jsii.String("Do the work in parallel"))

// Add branches to be executed in parallel
shipItem := sfn.NewPass(this, jsii.String("ShipItem"))
sendInvoice := sfn.NewPass(this, jsii.String("SendInvoice"))
restock := sfn.NewPass(this, jsii.String("Restock"))
parallel.Branch(shipItem)
parallel.Branch(sendInvoice)
parallel.Branch(restock)

// Retry the whole workflow if something goes wrong with exponential backoff
parallel.AddRetry(&RetryProps{
	MaxAttempts: jsii.Number(1),
	MaxDelay: awscdk.Duration_Seconds(jsii.Number(5)),
	JitterStrategy: sfn.JitterType_FULL,
})

// How to recover from errors
sendFailureNotification := sfn.NewPass(this, jsii.String("SendFailureNotification"))
parallel.AddCatch(sendFailureNotification)

// What to do in case everything succeeded
closeOrder := sfn.NewPass(this, jsii.String("CloseOrder"))
parallel.Next(closeOrder)

type S3CsvItemReader added in v2.127.0

type S3CsvItemReader interface {
	IItemReader
	// S3 Bucket containing a file with a list to iterate over.
	Bucket() awss3.IBucket
	// CSV headers configuration.
	CsvHeaders() CsvHeaders
	InputType() *string
	// S3 key of a file with a list to iterate over.
	Key() *string
	// Limits the number of items passed to the Distributed Map state.
	// Default: - No maxItems.
	//
	MaxItems() *float64
	// ARN for the `getObject` method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.
	Resource() *string
	// Compile policy statements to provide relevent permissions to the state machine.
	ProvidePolicyStatements() *[]awsiam.PolicyStatement
	// Renders the ItemReader configuration as JSON object.
	Render() interface{}
}

Item Reader configuration for iterating over items in a CSV file stored in S3.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var bucket bucket
var csvHeaders csvHeaders

s3CsvItemReader := awscdk.Aws_stepfunctions.NewS3CsvItemReader(&S3CsvItemReaderProps{
	Bucket: bucket,
	Key: jsii.String("key"),

	// the properties below are optional
	CsvHeaders: csvHeaders,
	MaxItems: jsii.Number(123),
})

func NewS3CsvItemReader added in v2.127.0

func NewS3CsvItemReader(props *S3CsvItemReaderProps) S3CsvItemReader

type S3CsvItemReaderProps added in v2.127.0

type S3CsvItemReaderProps struct {
	// S3 Bucket containing objects to iterate over or a file with a list to iterate over.
	Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"`
	// Limits the number of items passed to the Distributed Map state.
	// Default: - Distributed Map state will iterate over all items provided by the ItemReader.
	//
	MaxItems *float64 `field:"optional" json:"maxItems" yaml:"maxItems"`
	// Key of file stored in S3 bucket containing an array to iterate over.
	Key *string `field:"required" json:"key" yaml:"key"`
	// CSV file header configuration.
	// Default: - CsvHeaders with CsvHeadersLocation.FIRST_ROW
	//
	CsvHeaders CsvHeaders `field:"optional" json:"csvHeaders" yaml:"csvHeaders"`
}

Properties for configuring an Item Reader that iterates over items in a CSV file in S3.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var bucket bucket
var csvHeaders csvHeaders

s3CsvItemReaderProps := &S3CsvItemReaderProps{
	Bucket: bucket,
	Key: jsii.String("key"),

	// the properties below are optional
	CsvHeaders: csvHeaders,
	MaxItems: jsii.Number(123),
}

type S3FileItemReaderProps added in v2.127.0

type S3FileItemReaderProps struct {
	// S3 Bucket containing objects to iterate over or a file with a list to iterate over.
	Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"`
	// Limits the number of items passed to the Distributed Map state.
	// Default: - Distributed Map state will iterate over all items provided by the ItemReader.
	//
	MaxItems *float64 `field:"optional" json:"maxItems" yaml:"maxItems"`
	// Key of file stored in S3 bucket containing an array to iterate over.
	Key *string `field:"required" json:"key" yaml:"key"`
}

Base interface for Item Reader configuration properties the iterate over entries in a S3 file.

Example:

import s3 "github.com/aws/aws-cdk-go/awscdk"

// create a bucket
bucket := s3.NewBucket(this, jsii.String("Bucket"))

distributedMap := sfn.NewDistributedMap(this, jsii.String("Distributed Map State"), &DistributedMapProps{
	ItemReader: sfn.NewS3JsonItemReader(&S3FileItemReaderProps{
		Bucket: bucket,
		Key: jsii.String("my-key.json"),
	}),
	ResultWriter: sfn.NewResultWriter(&ResultWriterProps{
		Bucket: bucket,
		Prefix: jsii.String("my-prefix"),
	}),
})
distributedMap.ItemProcessor(sfn.NewPass(this, jsii.String("Pass State")))

type S3JsonItemReader added in v2.127.0

type S3JsonItemReader interface {
	IItemReader
	// S3 Bucket containing a file with a list to iterate over.
	Bucket() awss3.IBucket
	InputType() *string
	// S3 key of a file with a list to iterate over.
	Key() *string
	// Limits the number of items passed to the Distributed Map state.
	// Default: - No maxItems.
	//
	MaxItems() *float64
	// ARN for the `getObject` method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.
	Resource() *string
	// Compile policy statements to provide relevent permissions to the state machine.
	ProvidePolicyStatements() *[]awsiam.PolicyStatement
	// Renders the ItemReader configuration as JSON object.
	//
	// Returns: - JSON object.
	Render() interface{}
}

Item Reader configuration for iterating over items in a JSON array stored in a S3 file.

Example:

import s3 "github.com/aws/aws-cdk-go/awscdk"

// create a bucket
bucket := s3.NewBucket(this, jsii.String("Bucket"))

distributedMap := sfn.NewDistributedMap(this, jsii.String("Distributed Map State"), &DistributedMapProps{
	ItemReader: sfn.NewS3JsonItemReader(&S3FileItemReaderProps{
		Bucket: bucket,
		Key: jsii.String("my-key.json"),
	}),
	ResultWriter: sfn.NewResultWriter(&ResultWriterProps{
		Bucket: bucket,
		Prefix: jsii.String("my-prefix"),
	}),
})
distributedMap.ItemProcessor(sfn.NewPass(this, jsii.String("Pass State")))

func NewS3JsonItemReader added in v2.127.0

func NewS3JsonItemReader(props *S3FileItemReaderProps) S3JsonItemReader

type S3ManifestItemReader added in v2.127.0

type S3ManifestItemReader interface {
	IItemReader
	// S3 Bucket containing a file with a list to iterate over.
	Bucket() awss3.IBucket
	InputType() *string
	// S3 key of a file with a list to iterate over.
	Key() *string
	// Limits the number of items passed to the Distributed Map state.
	// Default: - No maxItems.
	//
	MaxItems() *float64
	// ARN for the `getObject` method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.
	Resource() *string
	// Compile policy statements to provide relevent permissions to the state machine.
	ProvidePolicyStatements() *[]awsiam.PolicyStatement
	// Renders the ItemReader configuration as JSON object.
	//
	// Returns: - JSON object.
	Render() interface{}
}

Item Reader configuration for iterating over items in a S3 inventory manifest file stored in S3.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var bucket bucket

s3ManifestItemReader := awscdk.Aws_stepfunctions.NewS3ManifestItemReader(&S3FileItemReaderProps{
	Bucket: bucket,
	Key: jsii.String("key"),

	// the properties below are optional
	MaxItems: jsii.Number(123),
})

func NewS3ManifestItemReader added in v2.127.0

func NewS3ManifestItemReader(props *S3FileItemReaderProps) S3ManifestItemReader

type S3ObjectsItemReader added in v2.127.0

type S3ObjectsItemReader interface {
	IItemReader
	// S3 Bucket containing objects to iterate over.
	Bucket() awss3.IBucket
	// Limits the number of items passed to the Distributed Map state.
	// Default: - Distributed Map state will iterate over all items provided by the ItemReader.
	//
	MaxItems() *float64
	// S3 prefix used to limit objects to iterate over.
	// Default: - No prefix.
	//
	Prefix() *string
	// ARN for the `listObjectsV2` method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.
	Resource() *string
	// Compile policy statements to provide relevent permissions to the state machine.
	ProvidePolicyStatements() *[]awsiam.PolicyStatement
	// Renders the ItemReader configuration as JSON object.
	//
	// Returns: - JSON object.
	Render() interface{}
}

Item Reader configuration for iterating over objects in an S3 bucket.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var bucket bucket

s3ObjectsItemReader := awscdk.Aws_stepfunctions.NewS3ObjectsItemReader(&S3ObjectsItemReaderProps{
	Bucket: bucket,

	// the properties below are optional
	MaxItems: jsii.Number(123),
	Prefix: jsii.String("prefix"),
})

func NewS3ObjectsItemReader added in v2.127.0

func NewS3ObjectsItemReader(props *S3ObjectsItemReaderProps) S3ObjectsItemReader

type S3ObjectsItemReaderProps added in v2.127.0

type S3ObjectsItemReaderProps struct {
	// S3 Bucket containing objects to iterate over or a file with a list to iterate over.
	Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"`
	// Limits the number of items passed to the Distributed Map state.
	// Default: - Distributed Map state will iterate over all items provided by the ItemReader.
	//
	MaxItems *float64 `field:"optional" json:"maxItems" yaml:"maxItems"`
	// S3 prefix used to limit objects to iterate over.
	// Default: - No prefix.
	//
	Prefix *string `field:"optional" json:"prefix" yaml:"prefix"`
}

Properties for configuring an Item Reader that iterates over objects in an S3 bucket.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var bucket bucket

s3ObjectsItemReaderProps := &S3ObjectsItemReaderProps{
	Bucket: bucket,

	// the properties below are optional
	MaxItems: jsii.Number(123),
	Prefix: jsii.String("prefix"),
}

type ServiceIntegrationPattern

type ServiceIntegrationPattern string

Three ways to call an integrated service: Request Response, Run a Job and Wait for a Callback with Task Token. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html

Here, they are named as FIRE_AND_FORGET, SYNC and WAIT_FOR_TASK_TOKEN respectfully.

Default: FIRE_AND_FORGET.

const (
	// Call a service and progress to the next state immediately after the API call completes.
	ServiceIntegrationPattern_FIRE_AND_FORGET ServiceIntegrationPattern = "FIRE_AND_FORGET"
	// Call a service and wait for a job to complete.
	ServiceIntegrationPattern_SYNC ServiceIntegrationPattern = "SYNC"
	// Call a service with a task token and wait until that token is returned by SendTaskSuccess/SendTaskFailure with payload.
	ServiceIntegrationPattern_WAIT_FOR_TASK_TOKEN ServiceIntegrationPattern = "WAIT_FOR_TASK_TOKEN"
)

type SingleStateOptions

type SingleStateOptions struct {
	// An optional description for this state.
	// Default: No comment.
	//
	Comment *string `field:"optional" json:"comment" yaml:"comment"`
	// JSONPath expression to select part of the state to be the input to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// input to be the empty object {}.
	// Default: $.
	//
	InputPath *string `field:"optional" json:"inputPath" yaml:"inputPath"`
	// JSONPath expression to select part of the state to be the output to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// output to be the empty object {}.
	// Default: $.
	//
	OutputPath *string `field:"optional" json:"outputPath" yaml:"outputPath"`
	// JSONPath expression to indicate where to inject the state's output.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the state's
	// input to become its output.
	// Default: $.
	//
	ResultPath *string `field:"optional" json:"resultPath" yaml:"resultPath"`
	// The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.
	//
	// You can use ResultSelector to create a payload with values that are static
	// or selected from the state's raw result.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-resultselector
	//
	// Default: - None.
	//
	ResultSelector *map[string]interface{} `field:"optional" json:"resultSelector" yaml:"resultSelector"`
	// Optional name for this state.
	// Default: - The construct ID will be used as state name.
	//
	StateName *string `field:"optional" json:"stateName" yaml:"stateName"`
	// String to prefix all stateIds in the state machine with.
	// Default: stateId.
	//
	PrefixStates *string `field:"optional" json:"prefixStates" yaml:"prefixStates"`
	// ID of newly created containing state.
	// Default: Construct ID of the StateMachineFragment.
	//
	StateId *string `field:"optional" json:"stateId" yaml:"stateId"`
}

Options for creating a single state.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var resultSelector interface{}

singleStateOptions := &SingleStateOptions{
	Comment: jsii.String("comment"),
	InputPath: jsii.String("inputPath"),
	OutputPath: jsii.String("outputPath"),
	PrefixStates: jsii.String("prefixStates"),
	ResultPath: jsii.String("resultPath"),
	ResultSelector: map[string]interface{}{
		"resultSelectorKey": resultSelector,
	},
	StateId: jsii.String("stateId"),
	StateName: jsii.String("stateName"),
}

type State

type State interface {
	constructs.Construct
	IChainable
	Branches() *[]StateGraph
	Comment() *string
	DefaultChoice() State
	SetDefaultChoice(val State)
	// Continuable states of this Chainable.
	EndStates() *[]INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() StateGraph
	SetIteration(val StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	Processor() StateGraph
	SetProcessor(val StateGraph)
	ProcessorConfig() *ProcessorConfig
	SetProcessorConfig(val *ProcessorConfig)
	ProcessorMode() ProcessorMode
	SetProcessorMode(val ProcessorMode)
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	StateName() *string
	// Add a parallel branch to this state.
	AddBranch(branch StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition Condition, next State, options *ChoiceTransitionOptions)
	// Add a item processor to this state.
	AddItemProcessor(processor StateGraph, config *ProcessorConfig)
	// Add a map iterator to this state.
	AddIterator(iteration StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph StateGraph)
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def State)
	// Make the indicated state the default transition of this state.
	MakeNext(next State)
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render ItemProcessor in ASL JSON format.
	RenderItemProcessor() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Render the state as JSON.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph StateGraph)
}

Base class for all other state classes.

type StateGraph

type StateGraph interface {
	// The accumulated policy statements.
	PolicyStatements() *[]awsiam.PolicyStatement
	// state that gets executed when the state machine is launched.
	StartState() State
	// Set a timeout to render into the graph JSON.
	//
	// Read/write. Only makes sense on the top-level graph, subgraphs
	// do not support this feature.
	// Default: No timeout.
	//
	Timeout() awscdk.Duration
	SetTimeout(val awscdk.Duration)
	// Binds this StateGraph to the StateMachine it defines and updates state machine permissions.
	Bind(stateMachine StateMachine)
	// Register a Policy Statement used by states in this graph.
	RegisterPolicyStatement(statement awsiam.PolicyStatement)
	// Register a state as part of this graph.
	//
	// Called by State.bindToGraph().
	RegisterState(state State)
	// Register this graph as a child of the given graph.
	//
	// Resource changes will be bubbled up to the given graph.
	RegisterSuperGraph(graph StateGraph)
	// Return the Amazon States Language JSON for this graph.
	ToGraphJson() *map[string]interface{}
	// Return a string description of this graph.
	ToString() *string
}

A collection of connected states.

A StateGraph is used to keep track of all states that are connected (have transitions between them). It does not include the substatemachines in a Parallel's branches: those are their own StateGraphs, but the graphs themselves have a hierarchical relationship as well.

By assigning states to a definitive StateGraph, we verify that no state machines are constructed. In particular:

  • Every state object can only ever be in 1 StateGraph, and not inadvertently be used in two graphs.
  • Every stateId must be unique across all states in the entire state machine.

All policy statements in all states in all substatemachines are bubbled so that the top-level StateMachine instantiation can read them all and add them to the IAM Role.

You do not need to instantiate this class; it is used internally.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var state state

stateGraph := awscdk.Aws_stepfunctions.NewStateGraph(state, jsii.String("graphDescription"))

func NewStateGraph

func NewStateGraph(startState State, graphDescription *string) StateGraph

type StateMachine

type StateMachine interface {
	awscdk.Resource
	IStateMachine
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	Env() *awscdk.ResourceEnvironment
	// The principal this state machine is running as.
	GrantPrincipal() awsiam.IPrincipal
	// The tree node.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	PhysicalName() *string
	// Execution role of this state machine.
	Role() awsiam.IRole
	// The stack in which this resource is defined.
	Stack() awscdk.Stack
	// The ARN of the state machine.
	StateMachineArn() *string
	// The name of the state machine.
	StateMachineName() *string
	// Identifier for the state machine revision, which is an immutable, read-only snapshot of a state machine’s definition and configuration.
	StateMachineRevisionId() *string
	// Type of the state machine.
	StateMachineType() StateMachineType
	// Add the given statement to the role's policy.
	AddToRolePolicy(statement awsiam.PolicyStatement)
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	GetResourceNameAttribute(nameAttr *string) *string
	// Grant the given identity custom permissions.
	Grant(identity awsiam.IGrantable, actions ...*string) awsiam.Grant
	// Grant the given identity permissions on all executions of the state machine.
	GrantExecution(identity awsiam.IGrantable, actions ...*string) awsiam.Grant
	// Grant the given identity permissions to read results from state machine.
	GrantRead(identity awsiam.IGrantable) awsiam.Grant
	// Grant the given identity permissions to start an execution of this state machine.
	GrantStartExecution(identity awsiam.IGrantable) awsiam.Grant
	// Grant the given identity permissions to start a synchronous execution of this state machine.
	GrantStartSyncExecution(identity awsiam.IGrantable) awsiam.Grant
	// Grant the given identity task response permissions on a state machine.
	GrantTaskResponse(identity awsiam.IGrantable) awsiam.Grant
	// Return the given named metric for this State Machine's executions.
	// Default: - sum over 5 minutes.
	//
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of executions that were aborted.
	// Default: - sum over 5 minutes.
	//
	MetricAborted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of executions that failed.
	// Default: - sum over 5 minutes.
	//
	MetricFailed(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of executions that were started.
	// Default: - sum over 5 minutes.
	//
	MetricStarted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of executions that succeeded.
	// Default: - sum over 5 minutes.
	//
	MetricSucceeded(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of executions that were throttled.
	// Default: - sum over 5 minutes.
	//
	MetricThrottled(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the interval, in milliseconds, between the time the execution starts and the time it closes.
	// Default: - average over 5 minutes.
	//
	MetricTime(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of executions that timed out.
	// Default: - sum over 5 minutes.
	//
	MetricTimedOut(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Returns a string representation of this construct.
	ToString() *string
}

Define a StepFunctions State Machine.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
inputArtifact := codepipeline.NewArtifact()
startState := stepfunctions.NewPass(this, jsii.String("StartState"))
simpleStateMachine := stepfunctions.NewStateMachine(this, jsii.String("SimpleStateMachine"), &StateMachineProps{
	Definition: startState,
})
stepFunctionAction := codepipeline_actions.NewStepFunctionInvokeAction(&StepFunctionsInvokeActionProps{
	ActionName: jsii.String("Invoke"),
	StateMachine: simpleStateMachine,
	StateMachineInput: codepipeline_actions.StateMachineInput_FilePath(inputArtifact.AtPath(jsii.String("assets/input.json"))),
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("StepFunctions"),
	Actions: []iAction{
		stepFunctionAction,
	},
})

func NewStateMachine

func NewStateMachine(scope constructs.Construct, id *string, props *StateMachineProps) StateMachine

type StateMachineFragment

type StateMachineFragment interface {
	constructs.Construct
	IChainable
	// The states to chain onto if this fragment is used.
	EndStates() *[]INextable
	// Descriptive identifier for this chainable.
	Id() *string
	// The tree node.
	Node() constructs.Node
	// The start state of this state machine fragment.
	StartState() State
	// Continue normal execution with the given state.
	Next(next IChainable) Chain
	// Prefix the IDs of all states in this state machine fragment.
	//
	// Use this to avoid multiple copies of the state machine all having the
	// same state IDs.
	PrefixStates(prefix *string) StateMachineFragment
	// Wrap all states in this state machine fragment up into a single state.
	//
	// This can be used to add retry or error handling onto this state
	// machine fragment.
	//
	// Be aware that this changes the result of the inner state machine
	// to be an array with the result of the state machine in it. Adjust
	// your paths accordingly. For example, change 'outputPath' to
	// '$[0]'.
	ToSingleState(options *SingleStateOptions) Parallel
	// Returns a string representation of this construct.
	ToString() *string
}

Base class for reusable state machine fragments.

Example:

import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/constructs-go/constructs"
import "github.com/aws/aws-cdk-go/awscdk"

type myJobProps struct {
	jobFlavor *string
}

type myJob struct {
	stateMachineFragment
	startState state
	endStates []iNextable
}

func newMyJob(parent construct, id *string, props myJobProps) *myJob {
	this := &myJob{}
	sfn.NewStateMachineFragment_Override(this, parent, id)

	choice := sfn.NewChoice(this, jsii.String("Choice")).When(sfn.Condition_StringEquals(jsii.String("$.branch"), jsii.String("left")), sfn.NewPass(this, jsii.String("Left Branch"))).When(sfn.Condition_StringEquals(jsii.String("$.branch"), jsii.String("right")), sfn.NewPass(this, jsii.String("Right Branch")))

	// ...

	this.startState = choice
	this.endStates = choice.Afterwards().EndStates
	return this
}

type myStack struct {
	stack
}

func newMyStack(scope construct, id *string) *myStack {
	this := &myStack{}
	newStack_Override(this, scope, id)
	// Do 3 different variants of MyJob in parallel
	parallel := sfn.NewParallel(this, jsii.String("All jobs")).Branch(NewMyJob(this, jsii.String("Quick"), &myJobProps{
		jobFlavor: jsii.String("quick"),
	}).PrefixStates()).Branch(NewMyJob(this, jsii.String("Medium"), &myJobProps{
		jobFlavor: jsii.String("medium"),
	}).PrefixStates()).Branch(NewMyJob(this, jsii.String("Slow"), &myJobProps{
		jobFlavor: jsii.String("slow"),
	}).PrefixStates())

	sfn.NewStateMachine(this, jsii.String("MyStateMachine"), &StateMachineProps{
		DefinitionBody: sfn.DefinitionBody_FromChainable(parallel),
	})
	return this
}

type StateMachineProps

type StateMachineProps struct {
	// Comment that describes this state machine.
	// Default: - No comment.
	//
	Comment *string `field:"optional" json:"comment" yaml:"comment"`
	// Definition for this state machine.
	// Deprecated: use definitionBody: DefinitionBody.fromChainable()
	Definition IChainable `field:"optional" json:"definition" yaml:"definition"`
	// Definition for this state machine.
	DefinitionBody DefinitionBody `field:"optional" json:"definitionBody" yaml:"definitionBody"`
	// substitutions for the definition body as a key-value map.
	DefinitionSubstitutions *map[string]*string `field:"optional" json:"definitionSubstitutions" yaml:"definitionSubstitutions"`
	// Defines what execution history events are logged and where they are logged.
	// Default: No logging.
	//
	Logs *LogOptions `field:"optional" json:"logs" yaml:"logs"`
	// The removal policy to apply to state machine.
	// Default: RemovalPolicy.DESTROY
	//
	RemovalPolicy awscdk.RemovalPolicy `field:"optional" json:"removalPolicy" yaml:"removalPolicy"`
	// The execution role for the state machine service.
	// Default: A role is automatically created.
	//
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// A name for the state machine.
	// Default: A name is automatically generated.
	//
	StateMachineName *string `field:"optional" json:"stateMachineName" yaml:"stateMachineName"`
	// Type of the state machine.
	// Default: StateMachineType.STANDARD
	//
	StateMachineType StateMachineType `field:"optional" json:"stateMachineType" yaml:"stateMachineType"`
	// Maximum run time for this state machine.
	// Default: No timeout.
	//
	Timeout awscdk.Duration `field:"optional" json:"timeout" yaml:"timeout"`
	// Specifies whether Amazon X-Ray tracing is enabled for this state machine.
	// Default: false.
	//
	TracingEnabled *bool `field:"optional" json:"tracingEnabled" yaml:"tracingEnabled"`
}

Properties for defining a State Machine.

Example:

import "github.com/aws/aws-cdk-go/awscdk"

pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
inputArtifact := codepipeline.NewArtifact()
startState := stepfunctions.NewPass(this, jsii.String("StartState"))
simpleStateMachine := stepfunctions.NewStateMachine(this, jsii.String("SimpleStateMachine"), &StateMachineProps{
	Definition: startState,
})
stepFunctionAction := codepipeline_actions.NewStepFunctionInvokeAction(&StepFunctionsInvokeActionProps{
	ActionName: jsii.String("Invoke"),
	StateMachine: simpleStateMachine,
	StateMachineInput: codepipeline_actions.StateMachineInput_FilePath(inputArtifact.AtPath(jsii.String("assets/input.json"))),
})
pipeline.AddStage(&StageOptions{
	StageName: jsii.String("StepFunctions"),
	Actions: []iAction{
		stepFunctionAction,
	},
})

type StateMachineType

type StateMachineType string

Two types of state machines are available in AWS Step Functions: EXPRESS AND STANDARD.

Example:

distributedMap := sfn.NewDistributedMap(this, jsii.String("DistributedMap"), &DistributedMapProps{
	MapExecutionType: sfn.StateMachineType_EXPRESS,
})

distributedMap.ItemProcessor(sfn.NewPass(this, jsii.String("Pass")), &ProcessorConfig{
	Mode: sfn.ProcessorMode_DISTRIBUTED,
	ExecutionType: sfn.ProcessorType_STANDARD,
})

See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-standard-vs-express.html

Default: STANDARD.

const (
	// Express Workflows are ideal for high-volume, event processing workloads.
	StateMachineType_EXPRESS StateMachineType = "EXPRESS"
	// Standard Workflows are ideal for long-running, durable, and auditable workflows.
	StateMachineType_STANDARD StateMachineType = "STANDARD"
)

type StateProps

type StateProps struct {
	// A comment describing this state.
	// Default: No comment.
	//
	Comment *string `field:"optional" json:"comment" yaml:"comment"`
	// JSONPath expression to select part of the state to be the input to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// input to be the empty object {}.
	// Default: $.
	//
	InputPath *string `field:"optional" json:"inputPath" yaml:"inputPath"`
	// JSONPath expression to select part of the state to be the output to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// output to be the empty object {}.
	// Default: $.
	//
	OutputPath *string `field:"optional" json:"outputPath" yaml:"outputPath"`
	// Parameters pass a collection of key-value pairs, either static values or JSONPath expressions that select from the input.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-parameters
	//
	// Default: No parameters.
	//
	Parameters *map[string]interface{} `field:"optional" json:"parameters" yaml:"parameters"`
	// JSONPath expression to indicate where to inject the state's output.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the state's
	// input to become its output.
	// Default: $.
	//
	ResultPath *string `field:"optional" json:"resultPath" yaml:"resultPath"`
	// The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.
	//
	// You can use ResultSelector to create a payload with values that are static
	// or selected from the state's raw result.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-resultselector
	//
	// Default: - None.
	//
	ResultSelector *map[string]interface{} `field:"optional" json:"resultSelector" yaml:"resultSelector"`
	// Optional name for this state.
	// Default: - The construct ID will be used as state name.
	//
	StateName *string `field:"optional" json:"stateName" yaml:"stateName"`
}

Properties shared by all states.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var parameters interface{}
var resultSelector interface{}

stateProps := &StateProps{
	Comment: jsii.String("comment"),
	InputPath: jsii.String("inputPath"),
	OutputPath: jsii.String("outputPath"),
	Parameters: map[string]interface{}{
		"parametersKey": parameters,
	},
	ResultPath: jsii.String("resultPath"),
	ResultSelector: map[string]interface{}{
		"resultSelectorKey": resultSelector,
	},
	StateName: jsii.String("stateName"),
}

type StateTransitionMetric

type StateTransitionMetric interface {
}

Metrics on the rate limiting performed on state machine execution.

These rate limits are shared across all state machines.

Example:

cloudwatch.NewAlarm(this, jsii.String("ThrottledAlarm"), &AlarmProps{
	Metric: sfn.StateTransitionMetric_MetricThrottledEvents(),
	Threshold: jsii.Number(10),
	EvaluationPeriods: jsii.Number(2),
})

func NewStateTransitionMetric

func NewStateTransitionMetric() StateTransitionMetric

type StringDefinitionBody added in v2.85.0

type StringDefinitionBody interface {
	DefinitionBody
	Body() *string
	Bind(_scope constructs.Construct, _sfnPrincipal awsiam.IPrincipal, _sfnProps *StateMachineProps, _graph StateGraph) *DefinitionConfig
}

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var chainable iChainable

stringDefinitionBody := awscdk.Aws_stepfunctions.StringDefinitionBody_FromChainable(chainable)

func NewStringDefinitionBody added in v2.85.0

func NewStringDefinitionBody(body *string) StringDefinitionBody

type Succeed

type Succeed interface {
	State
	Branches() *[]StateGraph
	Comment() *string
	DefaultChoice() State
	SetDefaultChoice(val State)
	// Continuable states of this Chainable.
	EndStates() *[]INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() StateGraph
	SetIteration(val StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	Processor() StateGraph
	SetProcessor(val StateGraph)
	ProcessorConfig() *ProcessorConfig
	SetProcessorConfig(val *ProcessorConfig)
	ProcessorMode() ProcessorMode
	SetProcessorMode(val ProcessorMode)
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	StateName() *string
	// Add a parallel branch to this state.
	AddBranch(branch StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition Condition, next State, options *ChoiceTransitionOptions)
	// Add a item processor to this state.
	AddItemProcessor(processor StateGraph, config *ProcessorConfig)
	// Add a map iterator to this state.
	AddIterator(iteration StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph StateGraph)
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def State)
	// Make the indicated state the default transition of this state.
	MakeNext(next State)
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render ItemProcessor in ASL JSON format.
	RenderItemProcessor() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Return the Amazon States Language object for this state.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph StateGraph)
}

Define a Succeed state in the state machine.

Reaching a Succeed state terminates the state execution in success.

Example:

success := sfn.NewSucceed(this, jsii.String("We did it!"))

func NewSucceed

func NewSucceed(scope constructs.Construct, id *string, props *SucceedProps) Succeed

type SucceedProps

type SucceedProps struct {
	// An optional description for this state.
	// Default: No comment.
	//
	Comment *string `field:"optional" json:"comment" yaml:"comment"`
	// JSONPath expression to select part of the state to be the input to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// input to be the empty object {}.
	// Default: $.
	//
	InputPath *string `field:"optional" json:"inputPath" yaml:"inputPath"`
	// JSONPath expression to select part of the state to be the output to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// output to be the empty object {}.
	// Default: $.
	//
	OutputPath *string `field:"optional" json:"outputPath" yaml:"outputPath"`
	// Optional name for this state.
	// Default: - The construct ID will be used as state name.
	//
	StateName *string `field:"optional" json:"stateName" yaml:"stateName"`
}

Properties for defining a Succeed state.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

succeedProps := &SucceedProps{
	Comment: jsii.String("comment"),
	InputPath: jsii.String("inputPath"),
	OutputPath: jsii.String("outputPath"),
	StateName: jsii.String("stateName"),
}

type TaskInput

type TaskInput interface {
	// type of task input.
	Type() InputType
	// payload for the corresponding input type.
	//
	// It can be a JSON-encoded object, context, data, etc.
	Value() interface{}
}

Type union for task classes that accept multiple types of payload.

Example:

var fn function

tasks.NewLambdaInvoke(this, jsii.String("Invoke with callback"), &LambdaInvokeProps{
	LambdaFunction: fn,
	IntegrationPattern: sfn.IntegrationPattern_WAIT_FOR_TASK_TOKEN,
	Payload: sfn.TaskInput_FromObject(map[string]interface{}{
		"token": sfn.JsonPath_taskToken(),
		"input": sfn.JsonPath_stringAt(jsii.String("$.someField")),
	}),
})

func TaskInput_FromJsonPathAt

func TaskInput_FromJsonPathAt(path *string) TaskInput

Use a part of the execution data or task context as task input.

Use this when you want to use a subobject or string from the current state machine execution or the current task context as complete payload to a task.

func TaskInput_FromObject

func TaskInput_FromObject(obj *map[string]interface{}) TaskInput

Use an object as task input.

This object may contain JSON path fields as object values, if desired.

Use `sfn.JsonPath.DISCARD` in place of `null` for languages that do not support `null` (i.e. Python).

func TaskInput_FromText

func TaskInput_FromText(text *string) TaskInput

Use a literal string as task input.

This might be a JSON-encoded object, or just a text.

type TaskMetricsConfig

type TaskMetricsConfig struct {
	// The dimensions to attach to metrics.
	// Default: - No metrics.
	//
	MetricDimensions *map[string]interface{} `field:"optional" json:"metricDimensions" yaml:"metricDimensions"`
	// Prefix for plural metric names of activity actions.
	// Default: - No such metrics.
	//
	MetricPrefixPlural *string `field:"optional" json:"metricPrefixPlural" yaml:"metricPrefixPlural"`
	// Prefix for singular metric names of activity actions.
	// Default: - No such metrics.
	//
	MetricPrefixSingular *string `field:"optional" json:"metricPrefixSingular" yaml:"metricPrefixSingular"`
}

Task Metrics.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var metricDimensions interface{}

taskMetricsConfig := &TaskMetricsConfig{
	MetricDimensions: map[string]interface{}{
		"metricDimensionsKey": metricDimensions,
	},
	MetricPrefixPlural: jsii.String("metricPrefixPlural"),
	MetricPrefixSingular: jsii.String("metricPrefixSingular"),
}

type TaskRole added in v2.54.0

type TaskRole interface {
	// Retrieves the resource for use in IAM Policies for this TaskRole.
	Resource() *string
	// Retrieves the roleArn for this TaskRole.
	RoleArn() *string
}

Role to be assumed by the State Machine's execution role for invoking a task's resource.

Example:

import lambda "github.com/aws/aws-cdk-go/awscdk"

var submitLambda function
var iamRole role

// use a fixed role for all task invocations
role := sfn.TaskRole_FromRole(iamRole)
// or use a json expression to resolve the role at runtime based on task inputs
//const role = sfn.TaskRole.fromRoleArnJsonPath('$.RoleArn');

submitJob := tasks.NewLambdaInvoke(this, jsii.String("Submit Job"), &LambdaInvokeProps{
	LambdaFunction: submitLambda,
	OutputPath: jsii.String("$.Payload"),
	// use credentials
	Credentials: &Credentials{
		Role: *Role,
	},
})

See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-task-state.html#task-state-fields

func TaskRole_FromRole added in v2.54.0

func TaskRole_FromRole(role awsiam.IRole) TaskRole

Construct a task role based on the provided IAM Role.

func TaskRole_FromRoleArnJsonPath added in v2.54.0

func TaskRole_FromRoleArnJsonPath(expression *string) TaskRole

Construct a task role retrieved from task inputs using a json expression.

Example:

sfn.TaskRole_FromRoleArnJsonPath(jsii.String("$.RoleArn"))

type TaskStateBase

type TaskStateBase interface {
	State
	INextable
	Branches() *[]StateGraph
	Comment() *string
	DefaultChoice() State
	SetDefaultChoice(val State)
	// Continuable states of this Chainable.
	EndStates() *[]INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() StateGraph
	SetIteration(val StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	Processor() StateGraph
	SetProcessor(val StateGraph)
	ProcessorConfig() *ProcessorConfig
	SetProcessorConfig(val *ProcessorConfig)
	ProcessorMode() ProcessorMode
	SetProcessorMode(val ProcessorMode)
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	StateName() *string
	TaskMetrics() *TaskMetricsConfig
	TaskPolicies() *[]awsiam.PolicyStatement
	// Add a parallel branch to this state.
	AddBranch(branch StateGraph)
	// Add a recovery handler for this state.
	//
	// When a particular error occurs, execution will continue at the error
	// handler instead of failing the state machine execution.
	AddCatch(handler IChainable, props *CatchProps) TaskStateBase
	// Add a choice branch to this state.
	AddChoice(condition Condition, next State, options *ChoiceTransitionOptions)
	// Add a item processor to this state.
	AddItemProcessor(processor StateGraph, config *ProcessorConfig)
	// Add a map iterator to this state.
	AddIterator(iteration StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Add retry configuration for this state.
	//
	// This controls if and how the execution will be retried if a particular
	// error occurs.
	AddRetry(props *RetryProps) TaskStateBase
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph StateGraph)
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def State)
	// Make the indicated state the default transition of this state.
	MakeNext(next State)
	// Return the given named metric for this Task.
	// Default: - sum over 5 minutes.
	//
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of times this activity fails.
	// Default: - sum over 5 minutes.
	//
	MetricFailed(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of times the heartbeat times out for this activity.
	// Default: - sum over 5 minutes.
	//
	MetricHeartbeatTimedOut(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The interval, in milliseconds, between the time the Task starts and the time it closes.
	// Default: - average over 5 minutes.
	//
	MetricRunTime(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of times this activity is scheduled.
	// Default: - sum over 5 minutes.
	//
	MetricScheduled(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The interval, in milliseconds, for which the activity stays in the schedule state.
	// Default: - average over 5 minutes.
	//
	MetricScheduleTime(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of times this activity is started.
	// Default: - sum over 5 minutes.
	//
	MetricStarted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of times this activity succeeds.
	// Default: - sum over 5 minutes.
	//
	MetricSucceeded(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The interval, in milliseconds, between the time the activity is scheduled and the time it closes.
	// Default: - average over 5 minutes.
	//
	MetricTime(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the number of times this activity times out.
	// Default: - sum over 5 minutes.
	//
	MetricTimedOut(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Continue normal execution with the given state.
	Next(next IChainable) Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render ItemProcessor in ASL JSON format.
	RenderItemProcessor() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Return the Amazon States Language object for this state.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph StateGraph)
}

Define a Task state in the state machine.

Reaching a Task state causes some work to be executed, represented by the Task's resource property. Task constructs represent a generic Amazon States Language Task.

For some resource types, more specific subclasses of Task may be available which are more convenient to use.

type TaskStateBaseProps

type TaskStateBaseProps struct {
	// An optional description for this state.
	// Default: - No comment.
	//
	Comment *string `field:"optional" json:"comment" yaml:"comment"`
	// Credentials for an IAM Role that the State Machine assumes for executing the task.
	//
	// This enables cross-account resource invocations.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-access-cross-acct-resources.html
	//
	// Default: - None (Task is executed using the State Machine's execution role).
	//
	Credentials *Credentials `field:"optional" json:"credentials" yaml:"credentials"`
	// Timeout for the heartbeat.
	// Default: - None.
	//
	// Deprecated: use `heartbeatTimeout`.
	Heartbeat awscdk.Duration `field:"optional" json:"heartbeat" yaml:"heartbeat"`
	// Timeout for the heartbeat.
	//
	// [disable-awslint:duration-prop-type] is needed because all props interface in
	// aws-stepfunctions-tasks extend this interface.
	// Default: - None.
	//
	HeartbeatTimeout Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"`
	// JSONPath expression to select part of the state to be the input to this state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// input to be the empty object {}.
	// Default: - The entire task input (JSON path '$').
	//
	InputPath *string `field:"optional" json:"inputPath" yaml:"inputPath"`
	// AWS Step Functions integrates with services directly in the Amazon States Language.
	//
	// You can control these AWS services using service integration patterns.
	//
	// Depending on the AWS Service, the Service Integration Pattern availability will vary.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-supported-services.html
	//
	// Default: - `IntegrationPattern.REQUEST_RESPONSE` for most tasks.
	// `IntegrationPattern.RUN_JOB` for the following exceptions:
	// `BatchSubmitJob`, `EmrAddStep`, `EmrCreateCluster`, `EmrTerminationCluster`, and `EmrContainersStartJobRun`.
	//
	IntegrationPattern IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"`
	// JSONPath expression to select select a portion of the state output to pass to the next state.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the effective
	// output to be the empty object {}.
	// Default: - The entire JSON node determined by the state input, the task result,
	// and resultPath is passed to the next state (JSON path '$').
	//
	OutputPath *string `field:"optional" json:"outputPath" yaml:"outputPath"`
	// JSONPath expression to indicate where to inject the state's output.
	//
	// May also be the special value JsonPath.DISCARD, which will cause the state's
	// input to become its output.
	// Default: - Replaces the entire input with the result (JSON path '$').
	//
	ResultPath *string `field:"optional" json:"resultPath" yaml:"resultPath"`
	// The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.
	//
	// You can use ResultSelector to create a payload with values that are static
	// or selected from the state's raw result.
	// See: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-resultselector
	//
	// Default: - None.
	//
	ResultSelector *map[string]interface{} `field:"optional" json:"resultSelector" yaml:"resultSelector"`
	// Optional name for this state.
	// Default: - The construct ID will be used as state name.
	//
	StateName *string `field:"optional" json:"stateName" yaml:"stateName"`
	// Timeout for the task.
	//
	// [disable-awslint:duration-prop-type] is needed because all props interface in
	// aws-stepfunctions-tasks extend this interface.
	// Default: - None.
	//
	TaskTimeout Timeout `field:"optional" json:"taskTimeout" yaml:"taskTimeout"`
	// Timeout for the task.
	// Default: - None.
	//
	// Deprecated: use `taskTimeout`.
	Timeout awscdk.Duration `field:"optional" json:"timeout" yaml:"timeout"`
}

Props that are common to all tasks.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var resultSelector interface{}
var taskRole taskRole
var timeout timeout

taskStateBaseProps := &TaskStateBaseProps{
	Comment: jsii.String("comment"),
	Credentials: &Credentials{
		Role: taskRole,
	},
	Heartbeat: cdk.Duration_Minutes(jsii.Number(30)),
	HeartbeatTimeout: timeout,
	InputPath: jsii.String("inputPath"),
	IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE,
	OutputPath: jsii.String("outputPath"),
	ResultPath: jsii.String("resultPath"),
	ResultSelector: map[string]interface{}{
		"resultSelectorKey": resultSelector,
	},
	StateName: jsii.String("stateName"),
	TaskTimeout: timeout,
	Timeout: cdk.Duration_*Minutes(jsii.Number(30)),
}

type Timeout added in v2.63.0

type Timeout interface {
	// Path for this timeout.
	Path() *string
	// Seconds for this timeout.
	Seconds() *float64
}

Timeout for a task or heartbeat.

Example:

tasks.NewGlueStartJobRun(this, jsii.String("Task"), &GlueStartJobRunProps{
	GlueJobName: jsii.String("my-glue-job"),
	Arguments: sfn.TaskInput_FromObject(map[string]interface{}{
		"key": jsii.String("value"),
	}),
	TaskTimeout: sfn.Timeout_Duration(awscdk.Duration_Minutes(jsii.Number(30))),
	NotifyDelayAfter: awscdk.Duration_*Minutes(jsii.Number(5)),
})

func Timeout_At added in v2.63.0

func Timeout_At(path *string) Timeout

Use a dynamic timeout specified by a path in the state input.

The path must select a field whose value is a positive integer.

func Timeout_Duration added in v2.63.0

func Timeout_Duration(duration awscdk.Duration) Timeout

Use a duration as timeout.

type Wait

type Wait interface {
	State
	INextable
	Branches() *[]StateGraph
	Comment() *string
	DefaultChoice() State
	SetDefaultChoice(val State)
	// Continuable states of this Chainable.
	EndStates() *[]INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() StateGraph
	SetIteration(val StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	Processor() StateGraph
	SetProcessor(val StateGraph)
	ProcessorConfig() *ProcessorConfig
	SetProcessorConfig(val *ProcessorConfig)
	ProcessorMode() ProcessorMode
	SetProcessorMode(val ProcessorMode)
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	StateName() *string
	// Add a parallel branch to this state.
	AddBranch(branch StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition Condition, next State, options *ChoiceTransitionOptions)
	// Add a item processor to this state.
	AddItemProcessor(processor StateGraph, config *ProcessorConfig)
	// Add a map iterator to this state.
	AddIterator(iteration StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph StateGraph)
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def State)
	// Make the indicated state the default transition of this state.
	MakeNext(next State)
	// Continue normal execution with the given state.
	Next(next IChainable) Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render ItemProcessor in ASL JSON format.
	RenderItemProcessor() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Return the Amazon States Language object for this state.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph StateGraph)
}

Define a Wait state in the state machine.

A Wait state can be used to delay execution of the state machine for a while.

Example:

convertToSeconds := tasks.NewEvaluateExpression(this, jsii.String("Convert to seconds"), &EvaluateExpressionProps{
	Expression: jsii.String("$.waitMilliseconds / 1000"),
	ResultPath: jsii.String("$.waitSeconds"),
})

createMessage := tasks.NewEvaluateExpression(this, jsii.String("Create message"), &EvaluateExpressionProps{
	// Note: this is a string inside a string.
	Expression: jsii.String("`Now waiting ${$.waitSeconds} seconds...`"),
	Runtime: lambda.Runtime_NODEJS_LATEST(),
	ResultPath: jsii.String("$.message"),
})

publishMessage := tasks.NewSnsPublish(this, jsii.String("Publish message"), &SnsPublishProps{
	Topic: sns.NewTopic(this, jsii.String("cool-topic")),
	Message: sfn.TaskInput_FromJsonPathAt(jsii.String("$.message")),
	ResultPath: jsii.String("$.sns"),
})

wait := sfn.NewWait(this, jsii.String("Wait"), &WaitProps{
	Time: sfn.WaitTime_SecondsPath(jsii.String("$.waitSeconds")),
})

sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{
	Definition: convertToSeconds.Next(createMessage).Next(publishMessage).*Next(wait),
})

func NewWait

func NewWait(scope constructs.Construct, id *string, props *WaitProps) Wait

type WaitProps

type WaitProps struct {
	// Wait duration.
	Time WaitTime `field:"required" json:"time" yaml:"time"`
	// An optional description for this state.
	// Default: No comment.
	//
	Comment *string `field:"optional" json:"comment" yaml:"comment"`
	// Optional name for this state.
	// Default: - The construct ID will be used as state name.
	//
	StateName *string `field:"optional" json:"stateName" yaml:"stateName"`
}

Properties for defining a Wait state.

Example:

convertToSeconds := tasks.NewEvaluateExpression(this, jsii.String("Convert to seconds"), &EvaluateExpressionProps{
	Expression: jsii.String("$.waitMilliseconds / 1000"),
	ResultPath: jsii.String("$.waitSeconds"),
})

createMessage := tasks.NewEvaluateExpression(this, jsii.String("Create message"), &EvaluateExpressionProps{
	// Note: this is a string inside a string.
	Expression: jsii.String("`Now waiting ${$.waitSeconds} seconds...`"),
	Runtime: lambda.Runtime_NODEJS_LATEST(),
	ResultPath: jsii.String("$.message"),
})

publishMessage := tasks.NewSnsPublish(this, jsii.String("Publish message"), &SnsPublishProps{
	Topic: sns.NewTopic(this, jsii.String("cool-topic")),
	Message: sfn.TaskInput_FromJsonPathAt(jsii.String("$.message")),
	ResultPath: jsii.String("$.sns"),
})

wait := sfn.NewWait(this, jsii.String("Wait"), &WaitProps{
	Time: sfn.WaitTime_SecondsPath(jsii.String("$.waitSeconds")),
})

sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{
	Definition: convertToSeconds.Next(createMessage).Next(publishMessage).*Next(wait),
})

type WaitTime

type WaitTime interface {
}

Represents the Wait state which delays a state machine from continuing for a specified time.

Example:

convertToSeconds := tasks.NewEvaluateExpression(this, jsii.String("Convert to seconds"), &EvaluateExpressionProps{
	Expression: jsii.String("$.waitMilliseconds / 1000"),
	ResultPath: jsii.String("$.waitSeconds"),
})

createMessage := tasks.NewEvaluateExpression(this, jsii.String("Create message"), &EvaluateExpressionProps{
	// Note: this is a string inside a string.
	Expression: jsii.String("`Now waiting ${$.waitSeconds} seconds...`"),
	Runtime: lambda.Runtime_NODEJS_LATEST(),
	ResultPath: jsii.String("$.message"),
})

publishMessage := tasks.NewSnsPublish(this, jsii.String("Publish message"), &SnsPublishProps{
	Topic: sns.NewTopic(this, jsii.String("cool-topic")),
	Message: sfn.TaskInput_FromJsonPathAt(jsii.String("$.message")),
	ResultPath: jsii.String("$.sns"),
})

wait := sfn.NewWait(this, jsii.String("Wait"), &WaitProps{
	Time: sfn.WaitTime_SecondsPath(jsii.String("$.waitSeconds")),
})

sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{
	Definition: convertToSeconds.Next(createMessage).Next(publishMessage).*Next(wait),
})

See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-wait-state.html

func WaitTime_Duration

func WaitTime_Duration(duration awscdk.Duration) WaitTime

Wait a fixed amount of time.

func WaitTime_SecondsPath

func WaitTime_SecondsPath(path *string) WaitTime

Wait for a number of seconds stored in the state object.

Example value: `$.waitSeconds`

func WaitTime_Timestamp

func WaitTime_Timestamp(timestamp *string) WaitTime

Wait until the given ISO8601 timestamp.

Example value: `2016-03-14T01:59:00Z`.

func WaitTime_TimestampPath

func WaitTime_TimestampPath(path *string) WaitTime

Wait until a timestamp found in the state object.

Example value: `$.waitTimestamp`

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL