README
¶
Tasks for AWS Step Functions
AWS Step Functions is a web service that enables you to coordinate the components of distributed applications and microservices using visual workflows. You build applications from individual components that each perform a discrete function, or task, allowing you to scale and change applications quickly.
A Task state represents a single unit of work performed by a state machine. All work in your state machine is performed by tasks. This module contains a collection of classes that allow you to call various AWS services from your Step Functions state machine.
Be sure to familiarize yourself with the aws-stepfunctions
module documentation first.
This module is part of the AWS Cloud Development Kit project.
Table Of Contents
Paths
Learn more about input and output processing in Step Functions here
Evaluate Expression
Use the EvaluateExpression
to perform simple operations referencing state paths. The
expression
referenced in the task will be evaluated in a Lambda function
(eval()
). This allows you to not have to write Lambda code for simple operations.
Example: convert a wait time from milliseconds to seconds, concat this in a message and wait:
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),
})
The EvaluateExpression
supports a runtime
prop to specify the Lambda
runtime to use to evaluate the expression. Currently, only runtimes
of the Node.js family are supported.
API Gateway
Step Functions supports API Gateway through the service integration pattern.
HTTP APIs are designed for low-latency, cost-effective integrations with AWS services, including AWS Lambda, and HTTP endpoints. HTTP APIs support OIDC and OAuth 2.0 authorization, and come with built-in support for CORS and automatic deployments. Previous-generation REST APIs currently offer more features. More details can be found here.
Call REST API Endpoint
The CallApiGatewayRestApiEndpoint
calls the REST API endpoint.
import apigateway "github.com/aws/aws-cdk-go/awscdk"
restApi := apigateway.NewRestApi(this, jsii.String("MyRestApi"))
invokeTask := tasks.NewCallApiGatewayRestApiEndpoint(this, jsii.String("Call REST API"), &CallApiGatewayRestApiEndpointProps{
Api: restApi,
StageName: jsii.String("prod"),
Method: tasks.HttpMethod_GET,
})
By default, the API endpoint URI will be constructed using the AWS region of
the stack in which the provided api
is created.
To construct the endpoint with a different region, use the region
parameter:
import apigateway "github.com/aws/aws-cdk-go/awscdk"
restApi := apigateway.NewRestApi(this, jsii.String("MyRestApi"))
invokeTask := tasks.NewCallApiGatewayRestApiEndpoint(this, jsii.String("Call REST API"), &CallApiGatewayRestApiEndpointProps{
Api: restApi,
StageName: jsii.String("prod"),
Method: tasks.HttpMethod_GET,
Region: jsii.String("us-west-2"),
})
Be aware that the header values must be arrays. When passing the Task Token
in the headers field WAIT_FOR_TASK_TOKEN
integration, use
JsonPath.array()
to wrap the token in an array:
import apigateway "github.com/aws/aws-cdk-go/awscdk"
var api restApi
tasks.NewCallApiGatewayRestApiEndpoint(this, jsii.String("Endpoint"), &CallApiGatewayRestApiEndpointProps{
Api: Api,
StageName: jsii.String("Stage"),
Method: tasks.HttpMethod_PUT,
IntegrationPattern: sfn.IntegrationPattern_WAIT_FOR_TASK_TOKEN,
Headers: sfn.TaskInput_FromObject(map[string]interface{}{
"TaskToken": sfn.JsonPath_array(sfn.JsonPath_taskToken()),
}),
})
Call HTTP API Endpoint
The CallApiGatewayHttpApiEndpoint
calls the HTTP API endpoint.
import apigatewayv2 "github.com/aws/aws-cdk-go/awscdk"
httpApi := apigatewayv2.NewHttpApi(this, jsii.String("MyHttpApi"))
invokeTask := tasks.NewCallApiGatewayHttpApiEndpoint(this, jsii.String("Call HTTP API"), &CallApiGatewayHttpApiEndpointProps{
ApiId: httpApi.ApiId,
ApiStack: awscdk.*stack_Of(httpApi),
Method: tasks.HttpMethod_GET,
})
AWS SDK
Step Functions supports calling AWS service's API actions through the service integration pattern.
You can use Step Functions' AWS SDK integrations to call any of the over two hundred AWS services directly from your state machine, giving you access to over nine thousand API actions.
var myBucket bucket
getObject := tasks.NewCallAwsService(this, jsii.String("GetObject"), &CallAwsServiceProps{
Service: jsii.String("s3"),
Action: jsii.String("getObject"),
Parameters: map[string]interface{}{
"Bucket": myBucket.bucketName,
"Key": sfn.JsonPath_stringAt(jsii.String("$.key")),
},
IamResources: []*string{
myBucket.ArnForObjects(jsii.String("*")),
},
})
Use camelCase for actions and PascalCase for parameter names.
The task automatically adds an IAM statement to the state machine role's policy based on the
service and action called. The resources for this statement must be specified in iamResources
.
Use the iamAction
prop to manually specify the IAM action name in the case where the IAM
action name does not match with the API service/action name:
listBuckets := tasks.NewCallAwsService(this, jsii.String("ListBuckets"), &CallAwsServiceProps{
Service: jsii.String("s3"),
Action: jsii.String("listBuckets"),
IamResources: []*string{
jsii.String("*"),
},
IamAction: jsii.String("s3:ListAllMyBuckets"),
})
Use the additionalIamStatements
prop to pass additional IAM statements that will be added to the
state machine role's policy. Use it in the case where the call requires more than a single statement
to be executed:
detectLabels := tasks.NewCallAwsService(this, jsii.String("DetectLabels"), &CallAwsServiceProps{
Service: jsii.String("rekognition"),
Action: jsii.String("detectLabels"),
IamResources: []*string{
jsii.String("*"),
},
AdditionalIamStatements: []policyStatement{
iam.NewPolicyStatement(&PolicyStatementProps{
Actions: []*string{
jsii.String("s3:getObject"),
},
Resources: []*string{
jsii.String("arn:aws:s3:::amzn-s3-demo-bucket/*"),
},
}),
},
})
Cross-region AWS API call
You can call AWS API in a different region from your state machine by using the CallAwsServiceCrossRegion
construct. In addition to the properties for CallAwsService
construct, you have to set region
property to call the API.
var myBucket bucket
getObject := tasks.NewCallAwsServiceCrossRegion(this, jsii.String("GetObject"), &CallAwsServiceCrossRegionProps{
Region: jsii.String("ap-northeast-1"),
Service: jsii.String("s3"),
Action: jsii.String("getObject"),
Parameters: map[string]interface{}{
"Bucket": myBucket.bucketName,
"Key": sfn.JsonPath_stringAt(jsii.String("$.key")),
},
IamResources: []*string{
myBucket.ArnForObjects(jsii.String("*")),
},
})
Other properties such as additionalIamStatements
can be used in the same way as the CallAwsService
task.
Note that when you use integrationPattern.WAIT_FOR_TASK_TOKEN
, the output path changes under Payload
property.
Athena
Step Functions supports Athena through the service integration pattern.
StartQueryExecution
The StartQueryExecution API runs the SQL query statement.
startQueryExecutionJob := tasks.NewAthenaStartQueryExecution(this, jsii.String("Start Athena Query"), &AthenaStartQueryExecutionProps{
QueryString: sfn.JsonPath_StringAt(jsii.String("$.queryString")),
QueryExecutionContext: &QueryExecutionContext{
DatabaseName: jsii.String("mydatabase"),
},
ResultConfiguration: &ResultConfiguration{
EncryptionConfiguration: &EncryptionConfiguration{
EncryptionOption: tasks.EncryptionOption_S3_MANAGED,
},
OutputLocation: &Location{
BucketName: jsii.String("amzn-s3-demo-bucket"),
ObjectKey: jsii.String("folder"),
},
},
ExecutionParameters: []*string{
jsii.String("param1"),
jsii.String("param2"),
},
})
You can reuse the query results by setting the resultReuseConfigurationMaxAge
property.
startQueryExecutionJob := tasks.NewAthenaStartQueryExecution(this, jsii.String("Start Athena Query"), &AthenaStartQueryExecutionProps{
QueryString: sfn.JsonPath_StringAt(jsii.String("$.queryString")),
QueryExecutionContext: &QueryExecutionContext{
DatabaseName: jsii.String("mydatabase"),
},
ResultConfiguration: &ResultConfiguration{
EncryptionConfiguration: &EncryptionConfiguration{
EncryptionOption: tasks.EncryptionOption_S3_MANAGED,
},
OutputLocation: &Location{
BucketName: jsii.String("query-results-bucket"),
ObjectKey: jsii.String("folder"),
},
},
ExecutionParameters: []*string{
jsii.String("param1"),
jsii.String("param2"),
},
ResultReuseConfigurationMaxAge: awscdk.Duration_Minutes(jsii.Number(100)),
})
GetQueryExecution
The GetQueryExecution API gets information about a single execution of a query.
getQueryExecutionJob := tasks.NewAthenaGetQueryExecution(this, jsii.String("Get Query Execution"), &AthenaGetQueryExecutionProps{
QueryExecutionId: sfn.JsonPath_StringAt(jsii.String("$.QueryExecutionId")),
})
GetQueryResults
The GetQueryResults API that streams the results of a single query execution specified by QueryExecutionId from S3.
getQueryResultsJob := tasks.NewAthenaGetQueryResults(this, jsii.String("Get Query Results"), &AthenaGetQueryResultsProps{
QueryExecutionId: sfn.JsonPath_StringAt(jsii.String("$.QueryExecutionId")),
})
StopQueryExecution
The StopQueryExecution API that stops a query execution.
stopQueryExecutionJob := tasks.NewAthenaStopQueryExecution(this, jsii.String("Stop Query Execution"), &AthenaStopQueryExecutionProps{
QueryExecutionId: sfn.JsonPath_StringAt(jsii.String("$.QueryExecutionId")),
})
Batch
Step Functions supports Batch through the service integration pattern.
SubmitJob
The SubmitJob API submits an AWS Batch job from a job definition.
import batch "github.com/aws/aws-cdk-go/awscdk"
var batchJobDefinition ecsJobDefinition
var batchQueue jobQueue
task := tasks.NewBatchSubmitJob(this, jsii.String("Submit Job"), &BatchSubmitJobProps{
JobDefinitionArn: batchJobDefinition.JobDefinitionArn,
JobName: jsii.String("MyJob"),
JobQueueArn: batchQueue.JobQueueArn,
})
Bedrock
Step Functions supports Bedrock through the service integration pattern.
InvokeModel
The InvokeModel API invokes the specified Bedrock model to run inference using the input provided. The format of the input body and the response body depend on the model selected.
import "github.com/aws/aws-cdk-go/awscdk"
model := bedrock.FoundationModel_FromFoundationModelId(this, jsii.String("Model"), bedrock.FoundationModelIdentifier_AMAZON_TITAN_TEXT_G1_EXPRESS_V1())
task := tasks.NewBedrockInvokeModel(this, jsii.String("Prompt Model"), &BedrockInvokeModelProps{
Model: Model,
Body: sfn.TaskInput_FromObject(map[string]interface{}{
"inputText": jsii.String("Generate a list of five first names."),
"textGenerationConfig": map[string]*f64{
"maxTokenCount": jsii.Number(100),
"temperature": jsii.Number(1),
},
}),
ResultSelector: map[string]interface{}{
"names": sfn.JsonPath_stringAt(jsii.String("$.Body.results[0].outputText")),
},
})
Using Input Path for S3 URI
Provide S3 URI as an input or output path to invoke a model
To specify the S3 URI as JSON path to your input or output fields, use props s3InputUri
and s3OutputUri
under BedrockInvokeModelProps and set
feature flag @aws-cdk/aws-stepfunctions-tasks:useNewS3UriParametersForBedrockInvokeModelTask
to true.
If this flag is not enabled, the code will populate the S3Uri using InputPath
and OutputPath
fields, which is not recommended.
import "github.com/aws/aws-cdk-go/awscdk"
model := bedrock.FoundationModel_FromFoundationModelId(this, jsii.String("Model"), bedrock.FoundationModelIdentifier_AMAZON_TITAN_TEXT_G1_EXPRESS_V1())
task := tasks.NewBedrockInvokeModel(this, jsii.String("Prompt Model"), &BedrockInvokeModelProps{
Model: Model,
Input: &BedrockInvokeModelInputProps{
S3InputUri: sfn.JsonPath_StringAt(jsii.String("$.prompt")),
},
Output: &BedrockInvokeModelOutputProps{
S3OutputUri: sfn.JsonPath_*StringAt(jsii.String("$.prompt")),
},
})
Using Input Path
Provide S3 URI as an input or output path to invoke a model
Currently, input and output Path provided in the BedrockInvokeModelProps input is defined as S3URI field under task definition of state machine.
To modify the existing behaviour, set @aws-cdk/aws-stepfunctions-tasks:useNewS3UriParametersForBedrockInvokeModelTask
to true.
If this feature flag is enabled, S3URI fields will be generated from other Props(s3InputUri
and s3OutputUri
), and the given inputPath, OutputPath will be rendered as
it is in the JSON task definition.
If the feature flag is set to false
, the behavior will be to populate the S3Uri using the InputPath
and OutputPath
fields, which is not recommended.
import "github.com/aws/aws-cdk-go/awscdk"
model := bedrock.FoundationModel_FromFoundationModelId(this, jsii.String("Model"), bedrock.FoundationModelIdentifier_AMAZON_TITAN_TEXT_G1_EXPRESS_V1())
task := tasks.NewBedrockInvokeModel(this, jsii.String("Prompt Model"), &BedrockInvokeModelProps{
Model: Model,
InputPath: sfn.JsonPath_StringAt(jsii.String("$.prompt")),
OutputPath: sfn.JsonPath_*StringAt(jsii.String("$.prompt")),
})
You can apply a guardrail to the invocation by setting guardrail
.
import "github.com/aws/aws-cdk-go/awscdk"
model := bedrock.FoundationModel_FromFoundationModelId(this, jsii.String("Model"), bedrock.FoundationModelIdentifier_AMAZON_TITAN_TEXT_G1_EXPRESS_V1())
task := tasks.NewBedrockInvokeModel(this, jsii.String("Prompt Model with guardrail"), &BedrockInvokeModelProps{
Model: Model,
Body: sfn.TaskInput_FromObject(map[string]interface{}{
"inputText": jsii.String("Generate a list of five first names."),
"textGenerationConfig": map[string]*f64{
"maxTokenCount": jsii.Number(100),
"temperature": jsii.Number(1),
},
}),
Guardrail: tasks.Guardrail_Enable(jsii.String("guardrailId"), jsii.Number(1)),
ResultSelector: map[string]interface{}{
"names": sfn.JsonPath_stringAt(jsii.String("$.Body.results[0].outputText")),
},
})
CodeBuild
Step Functions supports CodeBuild through the service integration pattern.
StartBuild
StartBuild starts a CodeBuild Project by Project Name.
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")),
},
},
})
StartBuildBatch
StartBuildBatch starts a batch CodeBuild for a project by project name. It is necessary to enable the batch build feature in the CodeBuild project.
import "github.com/aws/aws-cdk-go/awscdk"
project := codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{
ProjectName: jsii.String("MyTestProject"),
BuildSpec: codebuild.BuildSpec_FromObjectToYaml(map[string]interface{}{
"version": jsii.Number(0.2),
"batch": map[string][]map[string]*string{
"build-list": []map[string]*string{
map[string]*string{
"identifier": jsii.String("id"),
"buildspec": jsii.String("version: 0.2\nphases:\n build:\n commands:\n - echo \"Hello, from small!\""),
},
},
},
}),
})
project.EnableBatchBuilds()
task := tasks.NewCodeBuildStartBuildBatch(this, jsii.String("buildBatchTask"), &CodeBuildStartBuildBatchProps{
Project: Project,
IntegrationPattern: sfn.IntegrationPattern_REQUEST_RESPONSE,
EnvironmentVariablesOverride: map[string]buildEnvironmentVariable{
"test": &buildEnvironmentVariable{
"type": codebuild.BuildEnvironmentVariableType_PLAINTEXT,
"value": jsii.String("testValue"),
},
},
})
Note: enableBatchBuilds()
will do nothing for imported projects.
If you are using an imported project, you must ensure that the project is already configured for batch builds.
DynamoDB
You can call DynamoDB APIs from a Task
state.
Read more about calling DynamoDB APIs here
GetItem
The GetItem operation returns a set of attributes for the item with the given primary key.
var myTable table
tasks.NewDynamoGetItem(this, jsii.String("Get Item"), &DynamoGetItemProps{
Key: map[string]dynamoAttributeValue{
"messageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")),
},
Table: myTable,
})
PutItem
The PutItem operation creates a new item, or replaces an old item with a new item.
var myTable table
tasks.NewDynamoPutItem(this, jsii.String("PutItem"), &DynamoPutItemProps{
Item: map[string]dynamoAttributeValue{
"MessageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")),
"Text": tasks.*dynamoAttributeValue_fromString(sfn.JsonPath_stringAt(jsii.String("$.bar"))),
"TotalCount": tasks.*dynamoAttributeValue_fromNumber(jsii.Number(10)),
},
Table: myTable,
})
DeleteItem
The DeleteItem operation deletes a single item in a table by primary key.
var myTable table
tasks.NewDynamoDeleteItem(this, jsii.String("DeleteItem"), &DynamoDeleteItemProps{
Key: map[string]dynamoAttributeValue{
"MessageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")),
},
Table: myTable,
ResultPath: sfn.JsonPath_DISCARD(),
})
UpdateItem
The UpdateItem operation edits an existing item's attributes, or adds a new item to the table if it does not already exist.
var myTable table
tasks.NewDynamoUpdateItem(this, jsii.String("UpdateItem"), &DynamoUpdateItemProps{
Key: map[string]dynamoAttributeValue{
"MessageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")),
},
Table: myTable,
ExpressionAttributeValues: map[string]*dynamoAttributeValue{
":val": tasks.*dynamoAttributeValue_numberFromString(sfn.JsonPath_stringAt(jsii.String("$.Item.TotalCount.N"))),
":rand": tasks.*dynamoAttributeValue_fromNumber(jsii.Number(20)),
},
UpdateExpression: jsii.String("SET TotalCount = :val + :rand"),
})
ECS
Step Functions supports ECS/Fargate through the service integration pattern.
RunTask
RunTask starts a new task using the specified task definition.
EC2
The EC2 launch type allows you to run your containerized applications on a cluster of Amazon EC2 instances that you manage.
When a task that uses the EC2 launch type is launched, Amazon ECS must determine where to place the task based on the requirements specified in the task definition, such as CPU and memory. Similarly, when you scale down the task count, Amazon ECS must determine which tasks to terminate. You can apply task placement strategies and constraints to customize how Amazon ECS places and terminates tasks. Learn more about task placement
The latest ACTIVE revision of the passed task definition is used for running the task.
The following example runs a job from a task definition on EC2
vpc := ec2.Vpc_FromLookup(this, jsii.String("Vpc"), &VpcLookupOptions{
IsDefault: jsii.Boolean(true),
})
cluster := ecs.NewCluster(this, jsii.String("Ec2Cluster"), &ClusterProps{
Vpc: Vpc,
})
cluster.AddCapacity(jsii.String("DefaultAutoScalingGroup"), &AddCapacityOptions{
InstanceType: ec2.NewInstanceType(jsii.String("t2.micro")),
VpcSubnets: &SubnetSelection{
SubnetType: ec2.SubnetType_PUBLIC,
},
})
taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TD"), &TaskDefinitionProps{
Compatibility: ecs.Compatibility_EC2,
})
taskDefinition.AddContainer(jsii.String("TheContainer"), &ContainerDefinitionOptions{
Image: ecs.ContainerImage_FromRegistry(jsii.String("foo/bar")),
MemoryLimitMiB: jsii.Number(256),
})
runTask := tasks.NewEcsRunTask(this, jsii.String("Run"), &EcsRunTaskProps{
IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
Cluster: Cluster,
TaskDefinition: TaskDefinition,
LaunchTarget: tasks.NewEcsEc2LaunchTarget(&EcsEc2LaunchTargetOptions{
PlacementStrategies: []placementStrategy{
ecs.*placementStrategy_SpreadAcrossInstances(),
ecs.*placementStrategy_PackedByCpu(),
ecs.*placementStrategy_Randomly(),
},
PlacementConstraints: []placementConstraint{
ecs.*placementConstraint_MemberOf(jsii.String("blieptuut")),
},
}),
PropagatedTagSource: ecs.PropagatedTagSource_TASK_DEFINITION,
})
Fargate
AWS Fargate is a serverless compute engine for containers that works with Amazon Elastic Container Service (ECS). Fargate makes it easy for you to focus on building your applications. Fargate removes the need to provision and manage servers, lets you specify and pay for resources per application, and improves security through application isolation by design. Learn more about Fargate
The Fargate launch type allows you to run your containerized applications without the need to provision and manage the backend infrastructure. Just register your task definition and Fargate launches the container for you. The latest ACTIVE revision of the passed task definition is used for running the task. Learn more about Fargate Versioning
The following example runs a job from a task definition on Fargate
vpc := ec2.Vpc_FromLookup(this, jsii.String("Vpc"), &VpcLookupOptions{
IsDefault: jsii.Boolean(true),
})
cluster := ecs.NewCluster(this, jsii.String("FargateCluster"), &ClusterProps{
Vpc: Vpc,
})
taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TD"), &TaskDefinitionProps{
MemoryMiB: jsii.String("512"),
Cpu: jsii.String("256"),
Compatibility: ecs.Compatibility_FARGATE,
})
containerDefinition := taskDefinition.AddContainer(jsii.String("TheContainer"), &ContainerDefinitionOptions{
Image: ecs.ContainerImage_FromRegistry(jsii.String("foo/bar")),
MemoryLimitMiB: jsii.Number(256),
})
runTask := tasks.NewEcsRunTask(this, jsii.String("RunFargate"), &EcsRunTaskProps{
IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
Cluster: Cluster,
TaskDefinition: TaskDefinition,
AssignPublicIp: jsii.Boolean(true),
ContainerOverrides: []containerOverride{
&containerOverride{
ContainerDefinition: *ContainerDefinition,
Environment: []taskEnvironmentVariable{
&taskEnvironmentVariable{
Name: jsii.String("SOME_KEY"),
Value: sfn.JsonPath_StringAt(jsii.String("$.SomeKey")),
},
},
},
},
LaunchTarget: tasks.NewEcsFargateLaunchTarget(),
PropagatedTagSource: ecs.PropagatedTagSource_TASK_DEFINITION,
})
Override CPU and Memory Parameter
By setting the property cpu or memoryMiB, you can override the Fargate or EC2 task instance size at runtime.
see: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskOverride.html
vpc := ec2.Vpc_FromLookup(this, jsii.String("Vpc"), &VpcLookupOptions{
IsDefault: jsii.Boolean(true),
})
cluster := ecs.NewCluster(this, jsii.String("ECSCluster"), &ClusterProps{
Vpc: Vpc,
})
taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TD"), &TaskDefinitionProps{
Compatibility: ecs.Compatibility_FARGATE,
Cpu: jsii.String("256"),
MemoryMiB: jsii.String("512"),
})
taskDefinition.AddContainer(jsii.String("TheContainer"), &ContainerDefinitionOptions{
Image: ecs.ContainerImage_FromRegistry(jsii.String("foo/bar")),
})
runTask := tasks.NewEcsRunTask(this, jsii.String("Run"), &EcsRunTaskProps{
IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
Cluster: Cluster,
TaskDefinition: TaskDefinition,
LaunchTarget: tasks.NewEcsFargateLaunchTarget(),
Cpu: jsii.String("1024"),
MemoryMiB: jsii.String("1048"),
})
ECS enable Exec
By setting the property enableExecuteCommand
to true
, you can enable the ECS Exec feature for the task for either Fargate or EC2 launch types.
vpc := ec2.Vpc_FromLookup(this, jsii.String("Vpc"), &VpcLookupOptions{
IsDefault: jsii.Boolean(true),
})
cluster := ecs.NewCluster(this, jsii.String("ECSCluster"), &ClusterProps{
Vpc: Vpc,
})
taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TD"), &TaskDefinitionProps{
Compatibility: ecs.Compatibility_EC2,
})
taskDefinition.AddContainer(jsii.String("TheContainer"), &ContainerDefinitionOptions{
Image: ecs.ContainerImage_FromRegistry(jsii.String("foo/bar")),
MemoryLimitMiB: jsii.Number(256),
})
runTask := tasks.NewEcsRunTask(this, jsii.String("Run"), &EcsRunTaskProps{
IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
Cluster: Cluster,
TaskDefinition: TaskDefinition,
LaunchTarget: tasks.NewEcsEc2LaunchTarget(),
EnableExecuteCommand: jsii.Boolean(true),
})
EMR
Step Functions supports Amazon EMR through the service integration pattern. The service integration APIs correspond to Amazon EMR APIs but differ in the parameters that are used.
Read more about the differences when using these service integrations.
Create Cluster
Creates and starts running a cluster (job flow).
Corresponds to the runJobFlow
API in EMR.
clusterRole := iam.NewRole(this, jsii.String("ClusterRole"), &RoleProps{
AssumedBy: iam.NewServicePrincipal(jsii.String("ec2.amazonaws.com")),
})
serviceRole := iam.NewRole(this, jsii.String("ServiceRole"), &RoleProps{
AssumedBy: iam.NewServicePrincipal(jsii.String("elasticmapreduce.amazonaws.com")),
})
autoScalingRole := iam.NewRole(this, jsii.String("AutoScalingRole"), &RoleProps{
AssumedBy: iam.NewServicePrincipal(jsii.String("elasticmapreduce.amazonaws.com")),
})
autoScalingRole.AssumeRolePolicy.AddStatements(
iam.NewPolicyStatement(&PolicyStatementProps{
Effect: iam.Effect_ALLOW,
Principals: []iPrincipal{
iam.NewServicePrincipal(jsii.String("application-autoscaling.amazonaws.com")),
},
Actions: []*string{
jsii.String("sts:AssumeRole"),
},
}))
tasks.NewEmrCreateCluster(this, jsii.String("Create Cluster"), &EmrCreateClusterProps{
Instances: &InstancesConfigProperty{
},
ClusterRole: ClusterRole,
Name: sfn.TaskInput_FromJsonPathAt(jsii.String("$.ClusterName")).value,
ServiceRole: ServiceRole,
AutoScalingRole: AutoScalingRole,
})
You can use the launch specification for On-Demand and Spot instances in the fleet.
tasks.NewEmrCreateCluster(this, jsii.String("OnDemandSpecification"), &EmrCreateClusterProps{
Instances: &InstancesConfigProperty{
InstanceFleets: []instanceFleetConfigProperty{
&instanceFleetConfigProperty{
InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER,
LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{
OnDemandSpecification: &OnDemandProvisioningSpecificationProperty{
AllocationStrategy: tasks.EmrCreateCluster.OnDemandAllocationStrategy_LOWEST_PRICE,
},
},
},
},
},
Name: jsii.String("OnDemandCluster"),
IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
})
tasks.NewEmrCreateCluster(this, jsii.String("SpotSpecification"), &EmrCreateClusterProps{
Instances: &InstancesConfigProperty{
InstanceFleets: []*instanceFleetConfigProperty{
&instanceFleetConfigProperty{
InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER,
LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{
SpotSpecification: &SpotProvisioningSpecificationProperty{
AllocationStrategy: tasks.EmrCreateCluster.SpotAllocationStrategy_CAPACITY_OPTIMIZED,
TimeoutAction: tasks.EmrCreateCluster.SpotTimeoutAction_TERMINATE_CLUSTER,
Timeout: awscdk.Duration_Minutes(jsii.Number(5)),
},
},
},
},
},
Name: jsii.String("SpotCluster"),
IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
})
If you want to run multiple steps in parallel,
you can specify the stepConcurrencyLevel
property. The concurrency range is between 1
and 256 inclusive, where the default concurrency of 1 means no step concurrency is allowed.
stepConcurrencyLevel
requires the EMR release label to be 5.28.0 or above.
tasks.NewEmrCreateCluster(this, jsii.String("Create Cluster"), &EmrCreateClusterProps{
Instances: &InstancesConfigProperty{
},
Name: sfn.TaskInput_FromJsonPathAt(jsii.String("$.ClusterName")).value,
StepConcurrencyLevel: jsii.Number(10),
})
If you want to use an auto-termination policy,
you can specify the autoTerminationPolicyIdleTimeout
property.
Specifies the amount of idle time after which the cluster automatically terminates. You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).
tasks.NewEmrCreateCluster(this, jsii.String("Create Cluster"), &EmrCreateClusterProps{
Instances: &InstancesConfigProperty{
},
Name: jsii.String("ClusterName"),
AutoTerminationPolicyIdleTimeout: awscdk.Duration_Seconds(jsii.Number(100)),
})
Termination Protection
Locks a cluster (job flow) so the EC2 instances in the cluster cannot be terminated by user intervention, an API call, or a job-flow error.
Corresponds to the setTerminationProtection
API in EMR.
tasks.NewEmrSetClusterTerminationProtection(this, jsii.String("Task"), &EmrSetClusterTerminationProtectionProps{
ClusterId: jsii.String("ClusterId"),
TerminationProtected: jsii.Boolean(false),
})
Terminate Cluster
Shuts down a cluster (job flow).
Corresponds to the terminateJobFlows
API in EMR.
tasks.NewEmrTerminateCluster(this, jsii.String("Task"), &EmrTerminateClusterProps{
ClusterId: jsii.String("ClusterId"),
})
Add Step
Adds a new step to a running cluster.
Corresponds to the addJobFlowSteps
API in EMR.
tasks.NewEmrAddStep(this, jsii.String("Task"), &EmrAddStepProps{
ClusterId: jsii.String("ClusterId"),
Name: jsii.String("StepName"),
Jar: jsii.String("Jar"),
ActionOnFailure: tasks.ActionOnFailure_CONTINUE,
})
To specify a custom runtime role use the executionRoleArn
property.
Note: The EMR cluster must be created with a security configuration and the runtime role must have a specific trust policy. See this blog post for more details.
import emr "github.com/aws/aws-cdk-go/awscdk"
cfnSecurityConfiguration := emr.NewCfnSecurityConfiguration(this, jsii.String("EmrSecurityConfiguration"), &CfnSecurityConfigurationProps{
Name: jsii.String("AddStepRuntimeRoleSecConfig"),
SecurityConfiguration: jSON.parse(jsii.String(`
{
"AuthorizationConfiguration": {
"IAMConfiguration": {
"EnableApplicationScopedIAMRole": true,
"ApplicationScopedIAMRoleConfiguration":
{
"PropagateSourceIdentity": true
}
},
"LakeFormationConfiguration": {
"AuthorizedSessionTagValue": "Amazon EMR"
}
}
}`)),
})
task := tasks.NewEmrCreateCluster(this, jsii.String("Create Cluster"), &EmrCreateClusterProps{
Instances: &InstancesConfigProperty{
},
Name: sfn.TaskInput_FromJsonPathAt(jsii.String("$.ClusterName")).value,
SecurityConfiguration: cfnSecurityConfiguration.Name,
})
executionRole := iam.NewRole(this, jsii.String("Role"), &RoleProps{
AssumedBy: iam.NewArnPrincipal(task.clusterRole.RoleArn),
})
executionRole.AssumeRolePolicy.AddStatements(
iam.NewPolicyStatement(&PolicyStatementProps{
Effect: iam.Effect_ALLOW,
Principals: []iPrincipal{
task.clusterRole,
},
Actions: []*string{
jsii.String("sts:SetSourceIdentity"),
},
}),
iam.NewPolicyStatement(&PolicyStatementProps{
Effect: iam.Effect_ALLOW,
Principals: []*iPrincipal{
task.clusterRole,
},
Actions: []*string{
jsii.String("sts:TagSession"),
},
Conditions: map[string]interface{}{
"StringEquals": map[string]*string{
"aws:RequestTag/LakeFormationAuthorizedCaller": jsii.String("Amazon EMR"),
},
},
}))
tasks.NewEmrAddStep(this, jsii.String("Task"), &EmrAddStepProps{
ClusterId: jsii.String("ClusterId"),
ExecutionRoleArn: executionRole.RoleArn,
Name: jsii.String("StepName"),
Jar: jsii.String("Jar"),
ActionOnFailure: tasks.ActionOnFailure_CONTINUE,
})
Cancel Step
Cancels a pending step in a running cluster.
Corresponds to the cancelSteps
API in EMR.
tasks.NewEmrCancelStep(this, jsii.String("Task"), &EmrCancelStepProps{
ClusterId: jsii.String("ClusterId"),
StepId: jsii.String("StepId"),
})
Modify Instance Fleet
Modifies the target On-Demand and target Spot capacities for the instance fleet with the specified InstanceFleetName.
Corresponds to the modifyInstanceFleet
API in EMR.
tasks.NewEmrModifyInstanceFleetByName(this, jsii.String("Task"), &EmrModifyInstanceFleetByNameProps{
ClusterId: jsii.String("ClusterId"),
InstanceFleetName: jsii.String("InstanceFleetName"),
TargetOnDemandCapacity: jsii.Number(2),
TargetSpotCapacity: jsii.Number(0),
})
Modify Instance Group
Modifies the number of nodes and configuration settings of an instance group.
Corresponds to the modifyInstanceGroups
API in EMR.
tasks.NewEmrModifyInstanceGroupByName(this, jsii.String("Task"), &EmrModifyInstanceGroupByNameProps{
ClusterId: jsii.String("ClusterId"),
InstanceGroupName: sfn.JsonPath_StringAt(jsii.String("$.InstanceGroupName")),
InstanceGroup: &InstanceGroupModifyConfigProperty{
InstanceCount: jsii.Number(1),
},
})
EMR on EKS
Step Functions supports Amazon EMR on EKS through the service integration pattern. The service integration APIs correspond to Amazon EMR on EKS APIs, but differ in the parameters that are used.
Read more about the differences when using these service integrations.
Setting up the EKS cluster is required.
Create Virtual Cluster
The CreateVirtualCluster API creates a single virtual cluster that's mapped to a single Kubernetes namespace.
The EKS cluster containing the Kubernetes namespace where the virtual cluster will be mapped can be passed in from the task input.
tasks.NewEmrContainersCreateVirtualCluster(this, jsii.String("Create a Virtual Cluster"), &EmrContainersCreateVirtualClusterProps{
EksCluster: tasks.EksClusterInput_FromTaskInput(sfn.TaskInput_FromText(jsii.String("clusterId"))),
})
The EKS cluster can also be passed in directly.
import eks "github.com/aws/aws-cdk-go/awscdk"
var eksCluster cluster
tasks.NewEmrContainersCreateVirtualCluster(this, jsii.String("Create a Virtual Cluster"), &EmrContainersCreateVirtualClusterProps{
EksCluster: tasks.EksClusterInput_FromCluster(eksCluster),
})
By default, the Kubernetes namespace that a virtual cluster maps to is "default", but a specific namespace within an EKS cluster can be selected.
tasks.NewEmrContainersCreateVirtualCluster(this, jsii.String("Create a Virtual Cluster"), &EmrContainersCreateVirtualClusterProps{
EksCluster: tasks.EksClusterInput_FromTaskInput(sfn.TaskInput_FromText(jsii.String("clusterId"))),
EksNamespace: jsii.String("specified-namespace"),
})
Delete Virtual Cluster
The DeleteVirtualCluster API deletes a virtual cluster.
tasks.NewEmrContainersDeleteVirtualCluster(this, jsii.String("Delete a Virtual Cluster"), &EmrContainersDeleteVirtualClusterProps{
VirtualClusterId: sfn.TaskInput_FromJsonPathAt(jsii.String("$.virtualCluster")),
})
Start Job Run
The StartJobRun API starts a job run. A job is a unit of work that you submit to Amazon EMR on EKS for execution. The work performed by the job can be defined by a Spark jar, PySpark script, or SparkSQL query. A job run is an execution of the job on the virtual cluster.
Required setup:
- If not done already, follow the steps to setup EMR on EKS and create an EKS Cluster.
- Enable Cluster access
- Enable IAM Role access
The following actions must be performed if the virtual cluster ID is supplied from the task input. Otherwise, if it is supplied statically in the state machine definition, these actions will be done automatically.
- Create an IAM role
- Update the Role Trust Policy of the Job Execution Role.
The job can be configured with spark submit parameters:
tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{
VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")),
ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(),
JobDriver: &JobDriver{
SparkSubmitJobDriver: &SparkSubmitJobDriver{
EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")),
SparkSubmitParameters: jsii.String("--conf spark.executor.instances=2 --conf spark.executor.memory=2G --conf spark.executor.cores=2 --conf spark.driver.cores=1"),
},
},
})
Configuring the job can also be done via application configuration:
tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{
VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")),
ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(),
JobName: jsii.String("EMR-Containers-Job"),
JobDriver: &JobDriver{
SparkSubmitJobDriver: &SparkSubmitJobDriver{
EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")),
},
},
ApplicationConfig: []applicationConfiguration{
&applicationConfiguration{
Classification: tasks.Classification_SPARK_DEFAULTS(),
Properties: map[string]*string{
"spark.executor.instances": jsii.String("1"),
"spark.executor.memory": jsii.String("512M"),
},
},
},
})
Job monitoring can be enabled if monitoring.logging
is set true. This automatically generates an S3 bucket and CloudWatch logs.
tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{
VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")),
ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(),
JobDriver: &JobDriver{
SparkSubmitJobDriver: &SparkSubmitJobDriver{
EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")),
SparkSubmitParameters: jsii.String("--conf spark.executor.instances=2 --conf spark.executor.memory=2G --conf spark.executor.cores=2 --conf spark.driver.cores=1"),
},
},
Monitoring: &Monitoring{
Logging: jsii.Boolean(true),
},
})
Otherwise, providing monitoring for jobs with existing log groups and log buckets is also available.
import logs "github.com/aws/aws-cdk-go/awscdk"
logGroup := logs.NewLogGroup(this, jsii.String("Log Group"))
logBucket := s3.NewBucket(this, jsii.String("S3 Bucket"))
tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{
VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")),
ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(),
JobDriver: &JobDriver{
SparkSubmitJobDriver: &SparkSubmitJobDriver{
EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")),
SparkSubmitParameters: jsii.String("--conf spark.executor.instances=2 --conf spark.executor.memory=2G --conf spark.executor.cores=2 --conf spark.driver.cores=1"),
},
},
Monitoring: &Monitoring{
LogGroup: logGroup,
LogBucket: logBucket,
},
})
Users can provide their own existing Job Execution Role.
tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{
VirtualCluster: tasks.VirtualClusterInput_FromTaskInput(sfn.TaskInput_FromJsonPathAt(jsii.String("$.VirtualClusterId"))),
ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(),
JobName: jsii.String("EMR-Containers-Job"),
ExecutionRole: iam.Role_FromRoleArn(this, jsii.String("Job-Execution-Role"), jsii.String("arn:aws:iam::xxxxxxxxxxxx:role/JobExecutionRole")),
JobDriver: &JobDriver{
SparkSubmitJobDriver: &SparkSubmitJobDriver{
EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")),
SparkSubmitParameters: jsii.String("--conf spark.executor.instances=2 --conf spark.executor.memory=2G --conf spark.executor.cores=2 --conf spark.driver.cores=1"),
},
},
})
EKS
Step Functions supports Amazon EKS through the service integration pattern. The service integration APIs correspond to Amazon EKS APIs.
Read more about the differences when using these service integrations.
Call
Read and write Kubernetes resource objects via a Kubernetes API endpoint.
Corresponds to the call
API in Step Functions Connector.
The following code snippet includes a Task state that uses eks:call to list the pods.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/cdklabs/awscdk-kubectl-go/kubectlv32"
myEksCluster := eks.NewCluster(this, jsii.String("my sample cluster"), &ClusterProps{
Version: eks.KubernetesVersion_V1_32(),
ClusterName: jsii.String("myEksCluster"),
KubectlLayer: kubectlv32.NewKubectlV32Layer(this, jsii.String("kubectl")),
})
tasks.NewEksCall(this, jsii.String("Call a EKS Endpoint"), &EksCallProps{
Cluster: myEksCluster,
HttpMethod: tasks.HttpMethods_GET,
HttpPath: jsii.String("/api/v1/namespaces/default/pods"),
})
EventBridge
Step Functions supports Amazon EventBridge through the service integration pattern. The service integration APIs correspond to Amazon EventBridge APIs.
Read more about the differences when using these service integrations.
Put Events
Send events to an EventBridge bus.
Corresponds to the put-events
API in Step Functions Connector.
The following code snippet includes a Task state that uses events:putevents to send an event to the default bus.
import events "github.com/aws/aws-cdk-go/awscdk"
myEventBus := events.NewEventBus(this, jsii.String("EventBus"), &EventBusProps{
EventBusName: jsii.String("MyEventBus1"),
})
tasks.NewEventBridgePutEvents(this, jsii.String("Send an event to EventBridge"), &EventBridgePutEventsProps{
Entries: []eventBridgePutEventsEntry{
&eventBridgePutEventsEntry{
Detail: sfn.TaskInput_FromObject(map[string]interface{}{
"Message": jsii.String("Hello from Step Functions!"),
}),
EventBus: myEventBus,
DetailType: jsii.String("MessageFromStepFunctions"),
Source: jsii.String("step.functions"),
},
},
})
EventBridge Scheduler
You can call EventBridge Scheduler APIs from a Task
state.
Read more about calling Scheduler APIs here
Create Scheduler
The CreateSchedule API creates a new schedule.
Here is an example of how to create a schedule that puts an event to SQS queue every 5 minutes:
import scheduler "github.com/aws/aws-cdk-go/awscdk"
import kms "github.com/aws/aws-cdk-go/awscdk"
var key key
var scheduleGroup cfnScheduleGroup
var targetQueue queue
var deadLetterQueue queue
schedulerRole := iam.NewRole(this, jsii.String("SchedulerRole"), &RoleProps{
AssumedBy: iam.NewServicePrincipal(jsii.String("scheduler.amazonaws.com")),
})
// To send the message to the queue
// This policy changes depending on the type of target.
schedulerRole.AddToPrincipalPolicy(iam.NewPolicyStatement(&PolicyStatementProps{
Actions: []*string{
jsii.String("sqs:SendMessage"),
},
Resources: []*string{
targetQueue.QueueArn,
},
}))
createScheduleTask1 := tasks.NewEventBridgeSchedulerCreateScheduleTask(this, jsii.String("createSchedule"), &EventBridgeSchedulerCreateScheduleTaskProps{
ScheduleName: jsii.String("TestSchedule"),
ActionAfterCompletion: tasks.ActionAfterCompletion_NONE,
ClientToken: jsii.String("testToken"),
Description: jsii.String("TestDescription"),
StartDate: NewDate(),
EndDate: NewDate(NewDate().getTime() + 1000 * 60 * 60),
FlexibleTimeWindow: awscdk.Duration_Minutes(jsii.Number(5)),
GroupName: scheduleGroup.ref,
KmsKey: key,
Schedule: tasks.Schedule_Rate(awscdk.Duration_*Minutes(jsii.Number(5))),
Timezone: jsii.String("UTC"),
Enabled: jsii.Boolean(true),
Target: tasks.NewEventBridgeSchedulerTarget(&EventBridgeSchedulerTargetProps{
Arn: targetQueue.*QueueArn,
Role: schedulerRole,
RetryPolicy: &RetryPolicy{
MaximumRetryAttempts: jsii.Number(2),
MaximumEventAge: awscdk.Duration_*Minutes(jsii.Number(5)),
},
DeadLetterQueue: *DeadLetterQueue,
}),
})
Glue
Step Functions supports AWS Glue through the service integration pattern.
StartJobRun
You can call the StartJobRun
API from a Task
state.
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)),
})
You can configure workers by setting the workerTypeV2
and numberOfWorkers
properties.
workerType
is deprecated and no longer recommended. Use workerTypeV2
which is
a ENUM-like class for more powerful worker configuration around using pre-defined values or
dynamic values.
tasks.NewGlueStartJobRun(this, jsii.String("Task"), &GlueStartJobRunProps{
GlueJobName: jsii.String("my-glue-job"),
WorkerConfiguration: &WorkerConfigurationProperty{
WorkerTypeV2: tasks.WorkerTypeV2_G_1X(),
// Worker type
NumberOfWorkers: jsii.Number(2),
},
})
To configure the worker type or number of workers dynamically from StateMachine's input,
you can configure it using JSON Path values using workerTypeV2
like this:
tasks.NewGlueStartJobRun(this, jsii.String("Glue Job Task"), &GlueStartJobRunProps{
GlueJobName: jsii.String("my-glue-job"),
WorkerConfiguration: &WorkerConfigurationProperty{
WorkerTypeV2: tasks.WorkerTypeV2_Of(sfn.JsonPath_StringAt(jsii.String("$.glue_jobs_configs.executor_type"))),
NumberOfWorkers: sfn.JsonPath_NumberAt(jsii.String("$.glue_jobs_configs.max_number_workers")),
},
})
You can choose the execution class by setting the executionClass
property.
tasks.NewGlueStartJobRun(this, jsii.String("Task"), &GlueStartJobRunProps{
GlueJobName: jsii.String("my-glue-job"),
ExecutionClass: tasks.ExecutionClass_FLEX,
})
StartCrawlerRun
You can call the StartCrawler
API from a Task
state through AWS SDK service integrations.
import glue "github.com/aws/aws-cdk-go/awscdk"
var myCrawler cfnCrawler
// You can get the crawler name from `crawler.ref`
// You can get the crawler name from `crawler.ref`
tasks.NewGlueStartCrawlerRun(this, jsii.String("Task1"), &GlueStartCrawlerRunProps{
CrawlerName: myCrawler.ref,
})
// Of course, you can also specify the crawler name directly.
// Of course, you can also specify the crawler name directly.
tasks.NewGlueStartCrawlerRun(this, jsii.String("Task2"), &GlueStartCrawlerRunProps{
CrawlerName: jsii.String("my-crawler-job"),
})
Glue DataBrew
Step Functions supports AWS Glue DataBrew through the service integration pattern.
Start Job Run
You can call the StartJobRun
API from a Task
state.
tasks.NewGlueDataBrewStartJobRun(this, jsii.String("Task"), &GlueDataBrewStartJobRunProps{
Name: jsii.String("databrew-job"),
})
Invoke HTTP API
Step Functions supports calling third-party APIs with credentials managed by Amazon EventBridge Connections.
The following snippet creates a new API destination connection, and uses it to make a POST request to the specified URL. The endpoint response is available at the $.ResponseBody
path.
import "github.com/aws/aws-cdk-go/awscdk"
connection := events.NewConnection(this, jsii.String("Connection"), &ConnectionProps{
Authorization: events.Authorization_Basic(jsii.String("username"), awscdk.SecretValue_UnsafePlainText(jsii.String("password"))),
})
tasks.NewHttpInvoke(this, jsii.String("Invoke HTTP API"), &HttpInvokeProps{
ApiRoot: jsii.String("https://api.example.com"),
ApiEndpoint: sfn.TaskInput_FromText(jsii.String("path/to/resource")),
Body: sfn.TaskInput_FromObject(map[string]interface{}{
"foo": jsii.String("bar"),
}),
Connection: Connection,
Headers: sfn.TaskInput_*FromObject(map[string]interface{}{
"Content-Type": jsii.String("application/json"),
}),
Method: sfn.TaskInput_*FromText(jsii.String("POST")),
QueryStringParameters: sfn.TaskInput_*FromObject(map[string]interface{}{
"id": jsii.String("123"),
}),
UrlEncodingFormat: tasks.URLEncodingFormat_BRACKETS,
})
Lambda
Step Functions supports AWS Lambda through the service integration pattern.
Invoke
Invoke a Lambda function.
You can specify the input to your Lambda function through the payload
attribute.
By default, Step Functions invokes Lambda function with the state input (JSON path '$')
as the input.
The following snippet invokes a Lambda Function with the state input as the payload
by referencing the $
path.
var fn function
tasks.NewLambdaInvoke(this, jsii.String("Invoke with state input"), &LambdaInvokeProps{
LambdaFunction: fn,
})
When a function is invoked, the Lambda service sends these response elements back.
⚠️ The response from the Lambda function is in an attribute called Payload
The following snippet invokes a Lambda Function by referencing the $.Payload
path
to reference the output of a Lambda executed before it.
var fn function
tasks.NewLambdaInvoke(this, jsii.String("Invoke with empty object as payload"), &LambdaInvokeProps{
LambdaFunction: fn,
Payload: sfn.TaskInput_FromObject(map[string]interface{}{
}),
})
// use the output of fn as input
// use the output of fn as input
tasks.NewLambdaInvoke(this, jsii.String("Invoke with payload field in the state input"), &LambdaInvokeProps{
LambdaFunction: fn,
Payload: sfn.TaskInput_FromJsonPathAt(jsii.String("$.Payload")),
})
The following snippet invokes a Lambda and sets the task output to only include the Lambda function response.
var fn function
tasks.NewLambdaInvoke(this, jsii.String("Invoke and set function response as task output"), &LambdaInvokeProps{
LambdaFunction: fn,
OutputPath: jsii.String("$.Payload"),
})
If you want to combine the input and the Lambda function response you can use
the payloadResponseOnly
property and specify the resultPath
. This will put the
Lambda function ARN directly in the "Resource" string, but it conflicts with the
integrationPattern, invocationType, clientContext, and qualifier properties.
var fn function
tasks.NewLambdaInvoke(this, jsii.String("Invoke and combine function response with task input"), &LambdaInvokeProps{
LambdaFunction: fn,
PayloadResponseOnly: jsii.Boolean(true),
ResultPath: jsii.String("$.fn"),
})
You can have Step Functions pause a task, and wait for an external process to return a task token. Read more about the callback pattern
To use the callback pattern, set the token
property on the task. Call the Step
Functions SendTaskSuccess
or SendTaskFailure
APIs with the token to
indicate that the task has completed and the state machine should resume execution.
The following snippet invokes a Lambda with the task token as part of the input to the Lambda.
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")),
}),
})
⚠️ The task will pause until it receives that task token back with a SendTaskSuccess
or SendTaskFailure
call. Learn more about Callback with the Task
Token.
AWS Lambda can occasionally experience transient service errors. In this case, invoking Lambda
results in a 500 error, such as ClientExecutionTimeoutException
, ServiceException
, AWSLambdaException
, or SdkClientException
.
As a best practice, the LambdaInvoke
task will retry on those errors with an interval of 2 seconds,
a back-off rate of 2 and 6 maximum attempts. Set the retryOnServiceExceptions
prop to false
to
disable this behavior.
MediaConvert
Step Functions supports AWS MediaConvert through the Optimized integration pattern.
CreateJob
The CreateJob API creates a new transcoding job. For information about jobs and job settings, see the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html
You can call the CreateJob
API from a Task
state. Optionally you can specify the integrationPattern
.
Make sure you update the required fields - Role & Settings and refer CreateJobRequest for all other optional parameters.
tasks.NewMediaConvertCreateJob(this, jsii.String("CreateJob"), &MediaConvertCreateJobProps{
CreateJobRequest: map[string]interface{}{
"Role": jsii.String("arn:aws:iam::123456789012:role/MediaConvertRole"),
"Settings": map[string][]map[string]interface{}{
"OutputGroups": []map[string]interface{}{
map[string]interface{}{
"Outputs": []map[string]interface{}{
map[string]interface{}{
"ContainerSettings": map[string]*string{
"Container": jsii.String("MP4"),
},
"VideoDescription": map[string]map[string]interface{}{
"CodecSettings": map[string]interface{}{
"Codec": jsii.String("H_264"),
"H264Settings": map[string]interface{}{
"MaxBitrate": jsii.Number(1000),
"RateControlMode": jsii.String("QVBR"),
"SceneChangeDetect": jsii.String("TRANSITION_DETECTION"),
},
},
},
"AudioDescriptions": []map[string]map[string]interface{}{
map[string]map[string]interface{}{
"CodecSettings": map[string]interface{}{
"Codec": jsii.String("AAC"),
"AacSettings": map[string]interface{}{
"Bitrate": jsii.Number(96000),
"CodingMode": jsii.String("CODING_MODE_2_0"),
"SampleRate": jsii.Number(48000),
},
},
},
},
},
},
"OutputGroupSettings": map[string]interface{}{
"Type": jsii.String("FILE_GROUP_SETTINGS"),
"FileGroupSettings": map[string]*string{
"Destination": jsii.String("s3://EXAMPLE-DESTINATION-BUCKET/"),
},
},
},
},
"Inputs": []map[string]interface{}{
map[string]interface{}{
"AudioSelectors": map[string]map[string]*string{
"Audio Selector 1": map[string]*string{
"DefaultSelection": jsii.String("DEFAULT"),
},
},
"FileInput": jsii.String("s3://EXAMPLE-SOURCE-BUCKET/EXAMPLE-SOURCE_FILE"),
},
},
},
},
IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
})
SageMaker
Step Functions supports AWS SageMaker through the service integration pattern.
If your training job or model uses resources from AWS Marketplace,
network isolation is required.
To do so, set the enableNetworkIsolation
property to true
for SageMakerCreateModel
or SageMakerCreateTrainingJob
.
To set environment variables for the Docker container use the environment
property.
Create Training Job
You can call the CreateTrainingJob
API from a Task
state.
tasks.NewSageMakerCreateTrainingJob(this, jsii.String("TrainSagemaker"), &SageMakerCreateTrainingJobProps{
TrainingJobName: sfn.JsonPath_StringAt(jsii.String("$.JobName")),
AlgorithmSpecification: &AlgorithmSpecification{
AlgorithmName: jsii.String("BlazingText"),
TrainingInputMode: tasks.InputMode_FILE,
},
InputDataConfig: []channel{
&channel{
ChannelName: jsii.String("train"),
DataSource: &DataSource{
S3DataSource: &S3DataSource{
S3DataType: tasks.S3DataType_S3_PREFIX,
S3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.S3Bucket")),
},
},
},
},
OutputDataConfig: &OutputDataConfig{
S3OutputLocation: tasks.S3Location_FromBucket(s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("amzn-s3-demo-bucket")), jsii.String("myoutputpath")),
},
ResourceConfig: &ResourceConfig{
InstanceCount: jsii.Number(1),
InstanceType: ec2.NewInstanceType(sfn.JsonPath_*StringAt(jsii.String("$.InstanceType"))),
VolumeSize: awscdk.Size_Gibibytes(jsii.Number(50)),
},
// optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume
StoppingCondition: &StoppingCondition{
MaxRuntime: awscdk.Duration_Hours(jsii.Number(2)),
},
})
You can specify TrainingInputMode via the trainingInputMode property.
- To download the data from Amazon Simple Storage Service (Amazon S3) to the provisioned ML storage volume, and mount the directory to a Docker volume, choose
InputMode.FILE
if an algorithm supports it. - To stream data directly from Amazon S3 to the container, choose
InputMode.PIPE
if an algorithm supports it. - To stream data directly from Amazon S3 to the container with no code changes and to provide file system access to the data, choose
InputMode.FAST_FILE
if an algorithm supports it.
Create Transform Job
You can call the CreateTransformJob
API from a Task
state.
tasks.NewSageMakerCreateTransformJob(this, jsii.String("Batch Inference"), &SageMakerCreateTransformJobProps{
TransformJobName: jsii.String("MyTransformJob"),
ModelName: jsii.String("MyModelName"),
ModelClientOptions: &ModelClientOptions{
InvocationsMaxRetries: jsii.Number(3),
// default is 0
InvocationsTimeout: awscdk.Duration_Minutes(jsii.Number(5)),
},
TransformInput: &TransformInput{
TransformDataSource: &TransformDataSource{
S3DataSource: &TransformS3DataSource{
S3Uri: jsii.String("s3://inputbucket/train"),
S3DataType: tasks.S3DataType_S3_PREFIX,
},
},
},
TransformOutput: &TransformOutput{
S3OutputPath: jsii.String("s3://outputbucket/TransformJobOutputPath"),
},
TransformResources: &TransformResources{
InstanceCount: jsii.Number(1),
InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_M4, ec2.InstanceSize_XLARGE),
},
})
Create Endpoint
You can call the CreateEndpoint
API from a Task
state.
tasks.NewSageMakerCreateEndpoint(this, jsii.String("SagemakerEndpoint"), &SageMakerCreateEndpointProps{
EndpointName: sfn.JsonPath_StringAt(jsii.String("$.EndpointName")),
EndpointConfigName: sfn.JsonPath_*StringAt(jsii.String("$.EndpointConfigName")),
})
Create Endpoint Config
You can call the CreateEndpointConfig
API from a Task
state.
tasks.NewSageMakerCreateEndpointConfig(this, jsii.String("SagemakerEndpointConfig"), &SageMakerCreateEndpointConfigProps{
EndpointConfigName: jsii.String("MyEndpointConfig"),
ProductionVariants: []productionVariant{
&productionVariant{
InitialInstanceCount: jsii.Number(2),
InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_M5, ec2.InstanceSize_XLARGE),
ModelName: jsii.String("MyModel"),
VariantName: jsii.String("awesome-variant"),
},
},
})
Create Model
You can call the CreateModel
API from a Task
state.
tasks.NewSageMakerCreateModel(this, jsii.String("Sagemaker"), &SageMakerCreateModelProps{
ModelName: jsii.String("MyModel"),
PrimaryContainer: tasks.NewContainerDefinition(&ContainerDefinitionOptions{
Image: tasks.DockerImage_FromJsonExpression(sfn.JsonPath_StringAt(jsii.String("$.Model.imageName"))),
Mode: tasks.Mode_SINGLE_MODEL,
ModelS3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.TrainingJob.ModelArtifacts.S3ModelArtifacts")),
}),
})
Update Endpoint
You can call the UpdateEndpoint
API from a Task
state.
tasks.NewSageMakerUpdateEndpoint(this, jsii.String("SagemakerEndpoint"), &SageMakerUpdateEndpointProps{
EndpointName: sfn.JsonPath_StringAt(jsii.String("$.Endpoint.Name")),
EndpointConfigName: sfn.JsonPath_*StringAt(jsii.String("$.Endpoint.EndpointConfig")),
})
SNS
Step Functions supports Amazon SNS through the service integration pattern.
Publish
You can call the Publish
API from a Task
state to publish to an SNS topic.
topic := sns.NewTopic(this, jsii.String("Topic"))
// Use a field from the execution data as message.
task1 := tasks.NewSnsPublish(this, jsii.String("Publish1"), &SnsPublishProps{
Topic: Topic,
IntegrationPattern: sfn.IntegrationPattern_REQUEST_RESPONSE,
Message: sfn.TaskInput_FromDataAt(jsii.String("$.state.message")),
MessageAttributes: map[string]messageAttribute{
"place": &messageAttribute{
"value": sfn.JsonPath_stringAt(jsii.String("$.place")),
},
"pic": &messageAttribute{
// BINARY must be explicitly set
"dataType": tasks.MessageAttributeDataType_BINARY,
"value": sfn.JsonPath_stringAt(jsii.String("$.pic")),
},
"people": &messageAttribute{
"value": jsii.Number(4),
},
"handles": &messageAttribute{
"value": []interface{}{
jsii.String("@kslater"),
jsii.String("@jjf"),
nil,
jsii.String("@mfanning"),
},
},
},
})
// Combine a field from the execution data with
// a literal object.
task2 := tasks.NewSnsPublish(this, jsii.String("Publish2"), &SnsPublishProps{
Topic: Topic,
Message: sfn.TaskInput_FromObject(map[string]interface{}{
"field1": jsii.String("somedata"),
"field2": sfn.JsonPath_stringAt(jsii.String("$.field2")),
}),
})
Step Functions
Step Functions supports AWS Step Functions through the service integration pattern.
Start Execution
You can manage AWS Step Functions executions.
AWS Step Functions supports it's own StartExecution
API as a service integration.
// Define a state machine with one Pass state
child := sfn.NewStateMachine(this, jsii.String("ChildStateMachine"), &StateMachineProps{
Definition: sfn.Chain_Start(sfn.NewPass(this, jsii.String("PassState"))),
})
// Include the state machine in a Task state with callback pattern
task := tasks.NewStepFunctionsStartExecution(this, jsii.String("ChildTask"), &StepFunctionsStartExecutionProps{
StateMachine: child,
IntegrationPattern: sfn.IntegrationPattern_WAIT_FOR_TASK_TOKEN,
Input: sfn.TaskInput_FromObject(map[string]interface{}{
"token": sfn.JsonPath_taskToken(),
"foo": jsii.String("bar"),
}),
Name: jsii.String("MyExecutionName"),
})
// Define a second state machine with the Task state above
// Define a second state machine with the Task state above
sfn.NewStateMachine(this, jsii.String("ParentStateMachine"), &StateMachineProps{
Definition: task,
})
You can utilize Associate Workflow Executions
via the associateWithParent
property. This allows the Step Functions UI to link child
executions from parent executions, making it easier to trace execution flow across state machines.
var child stateMachine
task := tasks.NewStepFunctionsStartExecution(this, jsii.String("ChildTask"), &StepFunctionsStartExecutionProps{
StateMachine: child,
AssociateWithParent: jsii.Boolean(true),
})
This will add the payload AWS_STEP_FUNCTIONS_STARTED_BY_EXECUTION_ID.$: $$.Execution.Id
to the
input
property for you, which will pass the execution ID from the context object to the
execution input. It requires input
to be an object or not be set at all.
Invoke Activity
You can invoke a Step Functions Activity which enables you to have a task in your state machine where the work is performed by a worker that can be hosted on Amazon EC2, Amazon ECS, AWS Lambda, basically anywhere. Activities are a way to associate code running somewhere (known as an activity worker) with a specific task in a state machine.
When Step Functions reaches an activity task state, the workflow waits for an activity worker to poll for a task. An activity worker polls Step Functions by using GetActivityTask, and sending the ARN for the related activity.
After the activity worker completes its work, it can provide a report of its
success or failure by using SendTaskSuccess
or SendTaskFailure
. These two
calls use the taskToken provided by GetActivityTask to associate the result
with that task.
The following example creates an activity and creates a task that invokes the activity.
submitJobActivity := sfn.NewActivity(this, jsii.String("SubmitJob"))
tasks.NewStepFunctionsInvokeActivity(this, jsii.String("Submit Job"), &StepFunctionsInvokeActivityProps{
Activity: submitJobActivity,
})
Use the Parameters field to create a collection of key-value pairs that are passed as input. The values of each can either be static values that you include in your state machine definition, or selected from either the input or the context object with a path.
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"),
},
},
})
SQS
Step Functions supports Amazon SQS
Send Message
You can call the SendMessage
API from a Task
state
to send a message to an SQS queue.
queue := sqs.NewQueue(this, jsii.String("Queue"))
// Use a field from the execution data as message.
task1 := tasks.NewSqsSendMessage(this, jsii.String("Send1"), &SqsSendMessageProps{
Queue: Queue,
MessageBody: sfn.TaskInput_FromJsonPathAt(jsii.String("$.message")),
})
// Combine a field from the execution data with
// a literal object.
task2 := tasks.NewSqsSendMessage(this, jsii.String("Send2"), &SqsSendMessageProps{
Queue: Queue,
MessageBody: sfn.TaskInput_FromObject(map[string]interface{}{
"field1": jsii.String("somedata"),
"field2": sfn.JsonPath_stringAt(jsii.String("$.field2")),
}),
})
Documentation
¶
Index ¶
- func AthenaGetQueryExecution_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func AthenaGetQueryExecution_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func AthenaGetQueryExecution_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func AthenaGetQueryExecution_IsConstruct(x interface{}) *bool
- func AthenaGetQueryExecution_PrefixStates(root constructs.IConstruct, prefix *string)
- func AthenaGetQueryResults_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func AthenaGetQueryResults_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func AthenaGetQueryResults_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func AthenaGetQueryResults_IsConstruct(x interface{}) *bool
- func AthenaGetQueryResults_PrefixStates(root constructs.IConstruct, prefix *string)
- func AthenaStartQueryExecution_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func AthenaStartQueryExecution_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func AthenaStartQueryExecution_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func AthenaStartQueryExecution_IsConstruct(x interface{}) *bool
- func AthenaStartQueryExecution_PrefixStates(root constructs.IConstruct, prefix *string)
- func AthenaStopQueryExecution_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func AthenaStopQueryExecution_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func AthenaStopQueryExecution_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func AthenaStopQueryExecution_IsConstruct(x interface{}) *bool
- func AthenaStopQueryExecution_PrefixStates(root constructs.IConstruct, prefix *string)
- func BatchSubmitJob_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func BatchSubmitJob_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func BatchSubmitJob_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func BatchSubmitJob_IsConstruct(x interface{}) *bool
- func BatchSubmitJob_PrefixStates(root constructs.IConstruct, prefix *string)
- func BedrockInvokeModel_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func BedrockInvokeModel_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func BedrockInvokeModel_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func BedrockInvokeModel_IsConstruct(x interface{}) *bool
- func BedrockInvokeModel_PrefixStates(root constructs.IConstruct, prefix *string)
- func CallApiGatewayHttpApiEndpoint_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func CallApiGatewayHttpApiEndpoint_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func CallApiGatewayHttpApiEndpoint_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func CallApiGatewayHttpApiEndpoint_IsConstruct(x interface{}) *bool
- func CallApiGatewayHttpApiEndpoint_PrefixStates(root constructs.IConstruct, prefix *string)
- func CallApiGatewayRestApiEndpoint_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func CallApiGatewayRestApiEndpoint_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func CallApiGatewayRestApiEndpoint_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func CallApiGatewayRestApiEndpoint_IsConstruct(x interface{}) *bool
- func CallApiGatewayRestApiEndpoint_PrefixStates(root constructs.IConstruct, prefix *string)
- func CallAwsServiceCrossRegion_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func CallAwsServiceCrossRegion_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func CallAwsServiceCrossRegion_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func CallAwsServiceCrossRegion_IsConstruct(x interface{}) *bool
- func CallAwsServiceCrossRegion_PrefixStates(root constructs.IConstruct, prefix *string)
- func CallAwsService_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func CallAwsService_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func CallAwsService_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func CallAwsService_IsConstruct(x interface{}) *bool
- func CallAwsService_PrefixStates(root constructs.IConstruct, prefix *string)
- func CodeBuildStartBuildBatch_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func CodeBuildStartBuildBatch_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func CodeBuildStartBuildBatch_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func CodeBuildStartBuildBatch_IsConstruct(x interface{}) *bool
- func CodeBuildStartBuildBatch_PrefixStates(root constructs.IConstruct, prefix *string)
- func CodeBuildStartBuild_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func CodeBuildStartBuild_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func CodeBuildStartBuild_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func CodeBuildStartBuild_IsConstruct(x interface{}) *bool
- func CodeBuildStartBuild_PrefixStates(root constructs.IConstruct, prefix *string)
- func DynamoDeleteItem_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func DynamoDeleteItem_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func DynamoDeleteItem_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func DynamoDeleteItem_IsConstruct(x interface{}) *bool
- func DynamoDeleteItem_PrefixStates(root constructs.IConstruct, prefix *string)
- func DynamoGetItem_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func DynamoGetItem_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func DynamoGetItem_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func DynamoGetItem_IsConstruct(x interface{}) *bool
- func DynamoGetItem_PrefixStates(root constructs.IConstruct, prefix *string)
- func DynamoPutItem_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func DynamoPutItem_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func DynamoPutItem_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func DynamoPutItem_IsConstruct(x interface{}) *bool
- func DynamoPutItem_PrefixStates(root constructs.IConstruct, prefix *string)
- func DynamoUpdateItem_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func DynamoUpdateItem_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func DynamoUpdateItem_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func DynamoUpdateItem_IsConstruct(x interface{}) *bool
- func DynamoUpdateItem_PrefixStates(root constructs.IConstruct, prefix *string)
- func EcsRunTask_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func EcsRunTask_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EcsRunTask_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EcsRunTask_IsConstruct(x interface{}) *bool
- func EcsRunTask_PrefixStates(root constructs.IConstruct, prefix *string)
- func EksCall_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func EksCall_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EksCall_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EksCall_IsConstruct(x interface{}) *bool
- func EksCall_PrefixStates(root constructs.IConstruct, prefix *string)
- func EmrAddStep_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func EmrAddStep_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrAddStep_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrAddStep_IsConstruct(x interface{}) *bool
- func EmrAddStep_PrefixStates(root constructs.IConstruct, prefix *string)
- func EmrCancelStep_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func EmrCancelStep_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrCancelStep_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrCancelStep_IsConstruct(x interface{}) *bool
- func EmrCancelStep_PrefixStates(root constructs.IConstruct, prefix *string)
- func EmrContainersCreateVirtualCluster_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func EmrContainersCreateVirtualCluster_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrContainersCreateVirtualCluster_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrContainersCreateVirtualCluster_IsConstruct(x interface{}) *bool
- func EmrContainersCreateVirtualCluster_PrefixStates(root constructs.IConstruct, prefix *string)
- func EmrContainersDeleteVirtualCluster_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func EmrContainersDeleteVirtualCluster_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrContainersDeleteVirtualCluster_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrContainersDeleteVirtualCluster_IsConstruct(x interface{}) *bool
- func EmrContainersDeleteVirtualCluster_PrefixStates(root constructs.IConstruct, prefix *string)
- func EmrContainersStartJobRun_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func EmrContainersStartJobRun_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrContainersStartJobRun_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrContainersStartJobRun_IsConstruct(x interface{}) *bool
- func EmrContainersStartJobRun_PrefixStates(root constructs.IConstruct, prefix *string)
- func EmrCreateCluster_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func EmrCreateCluster_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrCreateCluster_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrCreateCluster_IsConstruct(x interface{}) *bool
- func EmrCreateCluster_PrefixStates(root constructs.IConstruct, prefix *string)
- func EmrModifyInstanceFleetByName_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func EmrModifyInstanceFleetByName_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrModifyInstanceFleetByName_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrModifyInstanceFleetByName_IsConstruct(x interface{}) *bool
- func EmrModifyInstanceFleetByName_PrefixStates(root constructs.IConstruct, prefix *string)
- func EmrModifyInstanceGroupByName_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func EmrModifyInstanceGroupByName_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrModifyInstanceGroupByName_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrModifyInstanceGroupByName_IsConstruct(x interface{}) *bool
- func EmrModifyInstanceGroupByName_PrefixStates(root constructs.IConstruct, prefix *string)
- func EmrSetClusterTerminationProtection_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func EmrSetClusterTerminationProtection_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrSetClusterTerminationProtection_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrSetClusterTerminationProtection_IsConstruct(x interface{}) *bool
- func EmrSetClusterTerminationProtection_PrefixStates(root constructs.IConstruct, prefix *string)
- func EmrTerminateCluster_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func EmrTerminateCluster_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrTerminateCluster_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EmrTerminateCluster_IsConstruct(x interface{}) *bool
- func EmrTerminateCluster_PrefixStates(root constructs.IConstruct, prefix *string)
- func EvaluateExpression_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func EvaluateExpression_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EvaluateExpression_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EvaluateExpression_IsConstruct(x interface{}) *bool
- func EvaluateExpression_PrefixStates(root constructs.IConstruct, prefix *string)
- func EventBridgePutEvents_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func EventBridgePutEvents_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EventBridgePutEvents_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EventBridgePutEvents_IsConstruct(x interface{}) *bool
- func EventBridgePutEvents_PrefixStates(root constructs.IConstruct, prefix *string)
- func EventBridgeSchedulerCreateScheduleTask_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func EventBridgeSchedulerCreateScheduleTask_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EventBridgeSchedulerCreateScheduleTask_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func EventBridgeSchedulerCreateScheduleTask_IsConstruct(x interface{}) *bool
- func EventBridgeSchedulerCreateScheduleTask_PrefixStates(root constructs.IConstruct, prefix *string)
- func GlueDataBrewStartJobRun_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func GlueDataBrewStartJobRun_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func GlueDataBrewStartJobRun_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func GlueDataBrewStartJobRun_IsConstruct(x interface{}) *bool
- func GlueDataBrewStartJobRun_PrefixStates(root constructs.IConstruct, prefix *string)
- func GlueStartCrawlerRun_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func GlueStartCrawlerRun_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func GlueStartCrawlerRun_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func GlueStartCrawlerRun_IsConstruct(x interface{}) *bool
- func GlueStartCrawlerRun_PrefixStates(root constructs.IConstruct, prefix *string)
- func GlueStartJobRun_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func GlueStartJobRun_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func GlueStartJobRun_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func GlueStartJobRun_IsConstruct(x interface{}) *bool
- func GlueStartJobRun_PrefixStates(root constructs.IConstruct, prefix *string)
- func HttpInvoke_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func HttpInvoke_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func HttpInvoke_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func HttpInvoke_IsConstruct(x interface{}) *bool
- func HttpInvoke_PrefixStates(root constructs.IConstruct, prefix *string)
- func LambdaInvoke_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func LambdaInvoke_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func LambdaInvoke_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func LambdaInvoke_IsConstruct(x interface{}) *bool
- func LambdaInvoke_PrefixStates(root constructs.IConstruct, prefix *string)
- func MediaConvertCreateJob_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func MediaConvertCreateJob_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func MediaConvertCreateJob_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func MediaConvertCreateJob_IsConstruct(x interface{}) *bool
- func MediaConvertCreateJob_PrefixStates(root constructs.IConstruct, prefix *string)
- func NewAcceleratorType_Override(a AcceleratorType, instanceTypeIdentifier *string)
- func NewAthenaGetQueryExecution_Override(a AthenaGetQueryExecution, scope constructs.Construct, id *string, ...)
- func NewAthenaGetQueryResults_Override(a AthenaGetQueryResults, scope constructs.Construct, id *string, ...)
- func NewAthenaStartQueryExecution_Override(a AthenaStartQueryExecution, scope constructs.Construct, id *string, ...)
- func NewAthenaStopQueryExecution_Override(a AthenaStopQueryExecution, scope constructs.Construct, id *string, ...)
- func NewBatchSubmitJob_Override(b BatchSubmitJob, scope constructs.Construct, id *string, ...)
- func NewBedrockInvokeModel_Override(b BedrockInvokeModel, scope constructs.Construct, id *string, ...)
- func NewCallApiGatewayHttpApiEndpoint_Override(c CallApiGatewayHttpApiEndpoint, scope constructs.Construct, id *string, ...)
- func NewCallApiGatewayRestApiEndpoint_Override(c CallApiGatewayRestApiEndpoint, scope constructs.Construct, id *string, ...)
- func NewCallAwsServiceCrossRegion_Override(c CallAwsServiceCrossRegion, scope constructs.Construct, id *string, ...)
- func NewCallAwsService_Override(c CallAwsService, scope constructs.Construct, id *string, ...)
- func NewClassification_Override(c Classification, classificationStatement *string)
- func NewCodeBuildStartBuildBatch_Override(c CodeBuildStartBuildBatch, scope constructs.Construct, id *string, ...)
- func NewCodeBuildStartBuild_Override(c CodeBuildStartBuild, scope constructs.Construct, id *string, ...)
- func NewContainerDefinition_Override(c ContainerDefinition, options *ContainerDefinitionOptions)
- func NewDockerImage_Override(d DockerImage)
- func NewDynamoDeleteItem_Override(d DynamoDeleteItem, scope constructs.Construct, id *string, ...)
- func NewDynamoGetItem_Override(d DynamoGetItem, scope constructs.Construct, id *string, ...)
- func NewDynamoProjectionExpression_Override(d DynamoProjectionExpression)
- func NewDynamoPutItem_Override(d DynamoPutItem, scope constructs.Construct, id *string, ...)
- func NewDynamoUpdateItem_Override(d DynamoUpdateItem, scope constructs.Construct, id *string, ...)
- func NewEcsEc2LaunchTarget_Override(e EcsEc2LaunchTarget, options *EcsEc2LaunchTargetOptions)
- func NewEcsFargateLaunchTarget_Override(e EcsFargateLaunchTarget, options *EcsFargateLaunchTargetOptions)
- func NewEcsRunTask_Override(e EcsRunTask, scope constructs.Construct, id *string, props *EcsRunTaskProps)
- func NewEksCall_Override(e EksCall, scope constructs.Construct, id *string, props *EksCallProps)
- func NewEmrAddStep_Override(e EmrAddStep, scope constructs.Construct, id *string, props *EmrAddStepProps)
- func NewEmrCancelStep_Override(e EmrCancelStep, scope constructs.Construct, id *string, ...)
- func NewEmrContainersCreateVirtualCluster_Override(e EmrContainersCreateVirtualCluster, scope constructs.Construct, id *string, ...)
- func NewEmrContainersDeleteVirtualCluster_Override(e EmrContainersDeleteVirtualCluster, scope constructs.Construct, id *string, ...)
- func NewEmrContainersStartJobRun_Override(e EmrContainersStartJobRun, scope constructs.Construct, id *string, ...)
- func NewEmrCreateCluster_Override(e EmrCreateCluster, scope constructs.Construct, id *string, ...)
- func NewEmrModifyInstanceFleetByName_Override(e EmrModifyInstanceFleetByName, scope constructs.Construct, id *string, ...)
- func NewEmrModifyInstanceGroupByName_Override(e EmrModifyInstanceGroupByName, scope constructs.Construct, id *string, ...)
- func NewEmrSetClusterTerminationProtection_Override(e EmrSetClusterTerminationProtection, scope constructs.Construct, id *string, ...)
- func NewEmrTerminateCluster_Override(e EmrTerminateCluster, scope constructs.Construct, id *string, ...)
- func NewEvaluateExpression_Override(e EvaluateExpression, scope constructs.Construct, id *string, ...)
- func NewEventBridgePutEvents_Override(e EventBridgePutEvents, scope constructs.Construct, id *string, ...)
- func NewEventBridgeSchedulerCreateScheduleTask_Override(e EventBridgeSchedulerCreateScheduleTask, scope constructs.Construct, ...)
- func NewEventBridgeSchedulerTarget_Override(e EventBridgeSchedulerTarget, props *EventBridgeSchedulerTargetProps)
- func NewGlueDataBrewStartJobRun_Override(g GlueDataBrewStartJobRun, scope constructs.Construct, id *string, ...)
- func NewGlueStartCrawlerRun_Override(g GlueStartCrawlerRun, scope constructs.Construct, id *string, ...)
- func NewGlueStartJobRun_Override(g GlueStartJobRun, scope constructs.Construct, id *string, ...)
- func NewHttpInvoke_Override(h HttpInvoke, scope constructs.Construct, id *string, props *HttpInvokeProps)
- func NewLambdaInvoke_Override(l LambdaInvoke, scope constructs.Construct, id *string, ...)
- func NewMediaConvertCreateJob_Override(m MediaConvertCreateJob, scope constructs.Construct, id *string, ...)
- func NewReleaseLabel_Override(r ReleaseLabel, label *string)
- func NewS3Location_Override(s S3Location)
- func NewSageMakerCreateEndpointConfig_Override(s SageMakerCreateEndpointConfig, scope constructs.Construct, id *string, ...)
- func NewSageMakerCreateEndpoint_Override(s SageMakerCreateEndpoint, scope constructs.Construct, id *string, ...)
- func NewSageMakerCreateModel_Override(s SageMakerCreateModel, scope constructs.Construct, id *string, ...)
- func NewSageMakerCreateTrainingJob_Override(s SageMakerCreateTrainingJob, scope constructs.Construct, id *string, ...)
- func NewSageMakerCreateTransformJob_Override(s SageMakerCreateTransformJob, scope constructs.Construct, id *string, ...)
- func NewSageMakerUpdateEndpoint_Override(s SageMakerUpdateEndpoint, scope constructs.Construct, id *string, ...)
- func NewSnsPublish_Override(s SnsPublish, scope constructs.Construct, id *string, props *SnsPublishProps)
- func NewSqsSendMessage_Override(s SqsSendMessage, scope constructs.Construct, id *string, ...)
- func NewStepFunctionsInvokeActivity_Override(s StepFunctionsInvokeActivity, scope constructs.Construct, id *string, ...)
- func NewStepFunctionsStartExecution_Override(s StepFunctionsStartExecution, scope constructs.Construct, id *string, ...)
- func SageMakerCreateEndpointConfig_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func SageMakerCreateEndpointConfig_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func SageMakerCreateEndpointConfig_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func SageMakerCreateEndpointConfig_IsConstruct(x interface{}) *bool
- func SageMakerCreateEndpointConfig_PrefixStates(root constructs.IConstruct, prefix *string)
- func SageMakerCreateEndpoint_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func SageMakerCreateEndpoint_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func SageMakerCreateEndpoint_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func SageMakerCreateEndpoint_IsConstruct(x interface{}) *bool
- func SageMakerCreateEndpoint_PrefixStates(root constructs.IConstruct, prefix *string)
- func SageMakerCreateModel_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func SageMakerCreateModel_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func SageMakerCreateModel_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func SageMakerCreateModel_IsConstruct(x interface{}) *bool
- func SageMakerCreateModel_PrefixStates(root constructs.IConstruct, prefix *string)
- func SageMakerCreateTrainingJob_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func SageMakerCreateTrainingJob_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func SageMakerCreateTrainingJob_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func SageMakerCreateTrainingJob_IsConstruct(x interface{}) *bool
- func SageMakerCreateTrainingJob_PrefixStates(root constructs.IConstruct, prefix *string)
- func SageMakerCreateTransformJob_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func SageMakerCreateTransformJob_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func SageMakerCreateTransformJob_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func SageMakerCreateTransformJob_IsConstruct(x interface{}) *bool
- func SageMakerCreateTransformJob_PrefixStates(root constructs.IConstruct, prefix *string)
- func SageMakerUpdateEndpoint_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func SageMakerUpdateEndpoint_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func SageMakerUpdateEndpoint_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func SageMakerUpdateEndpoint_IsConstruct(x interface{}) *bool
- func SageMakerUpdateEndpoint_PrefixStates(root constructs.IConstruct, prefix *string)
- func SnsPublish_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func SnsPublish_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func SnsPublish_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func SnsPublish_IsConstruct(x interface{}) *bool
- func SnsPublish_PrefixStates(root constructs.IConstruct, prefix *string)
- func SqsSendMessage_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func SqsSendMessage_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func SqsSendMessage_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func SqsSendMessage_IsConstruct(x interface{}) *bool
- func SqsSendMessage_PrefixStates(root constructs.IConstruct, prefix *string)
- func StepFunctionsInvokeActivity_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func StepFunctionsInvokeActivity_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func StepFunctionsInvokeActivity_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func StepFunctionsInvokeActivity_IsConstruct(x interface{}) *bool
- func StepFunctionsInvokeActivity_PrefixStates(root constructs.IConstruct, prefix *string)
- func StepFunctionsStartExecution_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
- func StepFunctionsStartExecution_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func StepFunctionsStartExecution_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
- func StepFunctionsStartExecution_IsConstruct(x interface{}) *bool
- func StepFunctionsStartExecution_PrefixStates(root constructs.IConstruct, prefix *string)
- type AcceleratorClass
- type AcceleratorType
- type ActionAfterCompletion
- type ActionOnFailure
- type AlgorithmSpecification
- type ApplicationConfiguration
- type AssembleWith
- type AthenaGetQueryExecution
- func AthenaGetQueryExecution_JsonPath(scope constructs.Construct, id *string, ...) AthenaGetQueryExecution
- func AthenaGetQueryExecution_Jsonata(scope constructs.Construct, id *string, ...) AthenaGetQueryExecution
- func NewAthenaGetQueryExecution(scope constructs.Construct, id *string, props *AthenaGetQueryExecutionProps) AthenaGetQueryExecution
- type AthenaGetQueryExecutionJsonPathProps
- type AthenaGetQueryExecutionJsonataProps
- type AthenaGetQueryExecutionProps
- type AthenaGetQueryResults
- func AthenaGetQueryResults_JsonPath(scope constructs.Construct, id *string, ...) AthenaGetQueryResults
- func AthenaGetQueryResults_Jsonata(scope constructs.Construct, id *string, ...) AthenaGetQueryResults
- func NewAthenaGetQueryResults(scope constructs.Construct, id *string, props *AthenaGetQueryResultsProps) AthenaGetQueryResults
- type AthenaGetQueryResultsJsonPathProps
- type AthenaGetQueryResultsJsonataProps
- type AthenaGetQueryResultsProps
- type AthenaStartQueryExecution
- func AthenaStartQueryExecution_JsonPath(scope constructs.Construct, id *string, ...) AthenaStartQueryExecution
- func AthenaStartQueryExecution_Jsonata(scope constructs.Construct, id *string, ...) AthenaStartQueryExecution
- func NewAthenaStartQueryExecution(scope constructs.Construct, id *string, props *AthenaStartQueryExecutionProps) AthenaStartQueryExecution
- type AthenaStartQueryExecutionJsonPathProps
- type AthenaStartQueryExecutionJsonataProps
- type AthenaStartQueryExecutionProps
- type AthenaStopQueryExecution
- func AthenaStopQueryExecution_JsonPath(scope constructs.Construct, id *string, ...) AthenaStopQueryExecution
- func AthenaStopQueryExecution_Jsonata(scope constructs.Construct, id *string, ...) AthenaStopQueryExecution
- func NewAthenaStopQueryExecution(scope constructs.Construct, id *string, props *AthenaStopQueryExecutionProps) AthenaStopQueryExecution
- type AthenaStopQueryExecutionJsonPathProps
- type AthenaStopQueryExecutionJsonataProps
- type AthenaStopQueryExecutionProps
- type AuthType
- type BatchContainerOverrides
- type BatchJobDependency
- type BatchStrategy
- type BatchSubmitJob
- func BatchSubmitJob_JsonPath(scope constructs.Construct, id *string, props *BatchSubmitJobJsonPathProps) BatchSubmitJob
- func BatchSubmitJob_Jsonata(scope constructs.Construct, id *string, props *BatchSubmitJobJsonataProps) BatchSubmitJob
- func NewBatchSubmitJob(scope constructs.Construct, id *string, props *BatchSubmitJobProps) BatchSubmitJob
- type BatchSubmitJobJsonPathProps
- type BatchSubmitJobJsonataProps
- type BatchSubmitJobProps
- type BedrockInvokeModel
- func BedrockInvokeModel_JsonPath(scope constructs.Construct, id *string, props *BedrockInvokeModelJsonPathProps) BedrockInvokeModel
- func BedrockInvokeModel_Jsonata(scope constructs.Construct, id *string, props *BedrockInvokeModelJsonataProps) BedrockInvokeModel
- func NewBedrockInvokeModel(scope constructs.Construct, id *string, props *BedrockInvokeModelProps) BedrockInvokeModel
- type BedrockInvokeModelInputProps
- type BedrockInvokeModelJsonPathProps
- type BedrockInvokeModelJsonataProps
- type BedrockInvokeModelOutputProps
- type BedrockInvokeModelProps
- type CallApiGatewayEndpointBaseOptions
- type CallApiGatewayEndpointBaseProps
- type CallApiGatewayEndpointJsonPathBaseProps
- type CallApiGatewayEndpointJsonataBaseProps
- type CallApiGatewayHttpApiEndpoint
- func CallApiGatewayHttpApiEndpoint_JsonPath(scope constructs.Construct, id *string, ...) CallApiGatewayHttpApiEndpoint
- func CallApiGatewayHttpApiEndpoint_Jsonata(scope constructs.Construct, id *string, ...) CallApiGatewayHttpApiEndpoint
- func NewCallApiGatewayHttpApiEndpoint(scope constructs.Construct, id *string, ...) CallApiGatewayHttpApiEndpoint
- type CallApiGatewayHttpApiEndpointJsonPathProps
- type CallApiGatewayHttpApiEndpointJsonataProps
- type CallApiGatewayHttpApiEndpointOptions
- type CallApiGatewayHttpApiEndpointProps
- type CallApiGatewayRestApiEndpoint
- func CallApiGatewayRestApiEndpoint_JsonPath(scope constructs.Construct, id *string, ...) CallApiGatewayRestApiEndpoint
- func CallApiGatewayRestApiEndpoint_Jsonata(scope constructs.Construct, id *string, ...) CallApiGatewayRestApiEndpoint
- func NewCallApiGatewayRestApiEndpoint(scope constructs.Construct, id *string, ...) CallApiGatewayRestApiEndpoint
- type CallApiGatewayRestApiEndpointJsonPathProps
- type CallApiGatewayRestApiEndpointJsonataProps
- type CallApiGatewayRestApiEndpointOptions
- type CallApiGatewayRestApiEndpointProps
- type CallAwsService
- func CallAwsService_JsonPath(scope constructs.Construct, id *string, props *CallAwsServiceJsonPathProps) CallAwsService
- func CallAwsService_Jsonata(scope constructs.Construct, id *string, props *CallAwsServiceJsonataProps) CallAwsService
- func NewCallAwsService(scope constructs.Construct, id *string, props *CallAwsServiceProps) CallAwsService
- type CallAwsServiceCrossRegion
- func CallAwsServiceCrossRegion_JsonPath(scope constructs.Construct, id *string, ...) CallAwsServiceCrossRegion
- func CallAwsServiceCrossRegion_Jsonata(scope constructs.Construct, id *string, ...) CallAwsServiceCrossRegion
- func NewCallAwsServiceCrossRegion(scope constructs.Construct, id *string, props *CallAwsServiceCrossRegionProps) CallAwsServiceCrossRegion
- type CallAwsServiceCrossRegionJsonPathProps
- type CallAwsServiceCrossRegionJsonataProps
- type CallAwsServiceCrossRegionProps
- type CallAwsServiceJsonPathProps
- type CallAwsServiceJsonataProps
- type CallAwsServiceProps
- type Channel
- type Classification
- func Classification_SPARK() Classification
- func Classification_SPARK_DEFAULTS() Classification
- func Classification_SPARK_ENV() Classification
- func Classification_SPARK_HIVE_SITE() Classification
- func Classification_SPARK_LOG4J() Classification
- func Classification_SPARK_METRICS() Classification
- func NewClassification(classificationStatement *string) Classification
- type CodeBuildStartBuild
- func CodeBuildStartBuild_JsonPath(scope constructs.Construct, id *string, ...) CodeBuildStartBuild
- func CodeBuildStartBuild_Jsonata(scope constructs.Construct, id *string, props *CodeBuildStartBuildJsonataProps) CodeBuildStartBuild
- func NewCodeBuildStartBuild(scope constructs.Construct, id *string, props *CodeBuildStartBuildProps) CodeBuildStartBuild
- type CodeBuildStartBuildBatch
- func CodeBuildStartBuildBatch_JsonPath(scope constructs.Construct, id *string, ...) CodeBuildStartBuildBatch
- func CodeBuildStartBuildBatch_Jsonata(scope constructs.Construct, id *string, ...) CodeBuildStartBuildBatch
- func NewCodeBuildStartBuildBatch(scope constructs.Construct, id *string, props *CodeBuildStartBuildBatchProps) CodeBuildStartBuildBatch
- type CodeBuildStartBuildBatchJsonPathProps
- type CodeBuildStartBuildBatchJsonataProps
- type CodeBuildStartBuildBatchProps
- type CodeBuildStartBuildJsonPathProps
- type CodeBuildStartBuildJsonataProps
- type CodeBuildStartBuildProps
- type CommonEcsRunTaskProps
- type CompressionType
- type ContainerDefinition
- type ContainerDefinitionConfig
- type ContainerDefinitionOptions
- type ContainerOverride
- type ContainerOverrides
- type CronOptions
- type DataSource
- type DockerImage
- func DockerImage_FromAsset(scope constructs.Construct, id *string, ...) DockerImage
- func DockerImage_FromEcrRepository(repository awsecr.IRepository, tagOrDigest *string) DockerImage
- func DockerImage_FromJsonExpression(expression *string, allowAnyEcrImagePull *bool) DockerImage
- func DockerImage_FromRegistry(imageUri *string) DockerImage
- type DockerImageConfig
- type DynamoAttributeValue
- func DynamoAttributeValue_BooleanFromJsonPath(value *string) DynamoAttributeValue
- func DynamoAttributeValue_BooleanFromJsonata(value *string) DynamoAttributeValue
- func DynamoAttributeValue_FromBinary(value *string) DynamoAttributeValue
- func DynamoAttributeValue_FromBinarySet(value *[]*string) DynamoAttributeValue
- func DynamoAttributeValue_FromBoolean(value *bool) DynamoAttributeValue
- func DynamoAttributeValue_FromList(value *[]DynamoAttributeValue) DynamoAttributeValue
- func DynamoAttributeValue_FromMap(value *map[string]DynamoAttributeValue) DynamoAttributeValue
- func DynamoAttributeValue_FromNull(value *bool) DynamoAttributeValue
- func DynamoAttributeValue_FromNumber(value *float64) DynamoAttributeValue
- func DynamoAttributeValue_FromNumberSet(value *[]*float64) DynamoAttributeValue
- func DynamoAttributeValue_FromString(value *string) DynamoAttributeValue
- func DynamoAttributeValue_FromStringSet(value *[]*string) DynamoAttributeValue
- func DynamoAttributeValue_ListFromJsonPath(value *string) DynamoAttributeValue
- func DynamoAttributeValue_ListFromJsonata(value *string) DynamoAttributeValue
- func DynamoAttributeValue_MapFromJsonPath(value *string) DynamoAttributeValue
- func DynamoAttributeValue_MapFromJsonata(value *string) DynamoAttributeValue
- func DynamoAttributeValue_NumberFromString(value *string) DynamoAttributeValue
- func DynamoAttributeValue_NumberSetFromStrings(value *[]*string) DynamoAttributeValue
- type DynamoConsumedCapacity
- type DynamoDeleteItem
- func DynamoDeleteItem_JsonPath(scope constructs.Construct, id *string, props *DynamoDeleteItemJsonPathProps) DynamoDeleteItem
- func DynamoDeleteItem_Jsonata(scope constructs.Construct, id *string, props *DynamoDeleteItemJsonataProps) DynamoDeleteItem
- func NewDynamoDeleteItem(scope constructs.Construct, id *string, props *DynamoDeleteItemProps) DynamoDeleteItem
- type DynamoDeleteItemJsonPathProps
- type DynamoDeleteItemJsonataProps
- type DynamoDeleteItemProps
- type DynamoGetItem
- func DynamoGetItem_JsonPath(scope constructs.Construct, id *string, props *DynamoGetItemJsonPathProps) DynamoGetItem
- func DynamoGetItem_Jsonata(scope constructs.Construct, id *string, props *DynamoGetItemJsonataProps) DynamoGetItem
- func NewDynamoGetItem(scope constructs.Construct, id *string, props *DynamoGetItemProps) DynamoGetItem
- type DynamoGetItemJsonPathProps
- type DynamoGetItemJsonataProps
- type DynamoGetItemProps
- type DynamoItemCollectionMetrics
- type DynamoProjectionExpression
- type DynamoPutItem
- func DynamoPutItem_JsonPath(scope constructs.Construct, id *string, props *DynamoPutItemJsonPathProps) DynamoPutItem
- func DynamoPutItem_Jsonata(scope constructs.Construct, id *string, props *DynamoPutItemJsonataProps) DynamoPutItem
- func NewDynamoPutItem(scope constructs.Construct, id *string, props *DynamoPutItemProps) DynamoPutItem
- type DynamoPutItemJsonPathProps
- type DynamoPutItemJsonataProps
- type DynamoPutItemProps
- type DynamoReturnValues
- type DynamoUpdateItem
- func DynamoUpdateItem_JsonPath(scope constructs.Construct, id *string, props *DynamoUpdateItemJsonPathProps) DynamoUpdateItem
- func DynamoUpdateItem_Jsonata(scope constructs.Construct, id *string, props *DynamoUpdateItemJsonataProps) DynamoUpdateItem
- func NewDynamoUpdateItem(scope constructs.Construct, id *string, props *DynamoUpdateItemProps) DynamoUpdateItem
- type DynamoUpdateItemJsonPathProps
- type DynamoUpdateItemJsonataProps
- type DynamoUpdateItemProps
- type EcsEc2LaunchTarget
- type EcsEc2LaunchTargetOptions
- type EcsFargateLaunchTarget
- type EcsFargateLaunchTargetOptions
- type EcsLaunchTargetConfig
- type EcsRunTask
- func EcsRunTask_JsonPath(scope constructs.Construct, id *string, props *EcsRunTaskJsonPathProps) EcsRunTask
- func EcsRunTask_Jsonata(scope constructs.Construct, id *string, props *EcsRunTaskJsonataProps) EcsRunTask
- func NewEcsRunTask(scope constructs.Construct, id *string, props *EcsRunTaskProps) EcsRunTask
- type EcsRunTaskJsonPathProps
- type EcsRunTaskJsonataProps
- type EcsRunTaskProps
- type EksCall
- type EksCallJsonPathProps
- type EksCallJsonataProps
- type EksCallProps
- type EksClusterInput
- type EmrAddStep
- func EmrAddStep_JsonPath(scope constructs.Construct, id *string, props *EmrAddStepJsonPathProps) EmrAddStep
- func EmrAddStep_Jsonata(scope constructs.Construct, id *string, props *EmrAddStepJsonataProps) EmrAddStep
- func NewEmrAddStep(scope constructs.Construct, id *string, props *EmrAddStepProps) EmrAddStep
- type EmrAddStepJsonPathProps
- type EmrAddStepJsonataProps
- type EmrAddStepProps
- type EmrCancelStep
- func EmrCancelStep_JsonPath(scope constructs.Construct, id *string, props *EmrCancelStepJsonPathProps) EmrCancelStep
- func EmrCancelStep_Jsonata(scope constructs.Construct, id *string, props *EmrCancelStepJsonataProps) EmrCancelStep
- func NewEmrCancelStep(scope constructs.Construct, id *string, props *EmrCancelStepProps) EmrCancelStep
- type EmrCancelStepJsonPathProps
- type EmrCancelStepJsonataProps
- type EmrCancelStepProps
- type EmrContainersCreateVirtualCluster
- func EmrContainersCreateVirtualCluster_JsonPath(scope constructs.Construct, id *string, ...) EmrContainersCreateVirtualCluster
- func EmrContainersCreateVirtualCluster_Jsonata(scope constructs.Construct, id *string, ...) EmrContainersCreateVirtualCluster
- func NewEmrContainersCreateVirtualCluster(scope constructs.Construct, id *string, ...) EmrContainersCreateVirtualCluster
- type EmrContainersCreateVirtualClusterJsonPathProps
- type EmrContainersCreateVirtualClusterJsonataProps
- type EmrContainersCreateVirtualClusterProps
- type EmrContainersDeleteVirtualCluster
- func EmrContainersDeleteVirtualCluster_JsonPath(scope constructs.Construct, id *string, ...) EmrContainersDeleteVirtualCluster
- func EmrContainersDeleteVirtualCluster_Jsonata(scope constructs.Construct, id *string, ...) EmrContainersDeleteVirtualCluster
- func NewEmrContainersDeleteVirtualCluster(scope constructs.Construct, id *string, ...) EmrContainersDeleteVirtualCluster
- type EmrContainersDeleteVirtualClusterJsonPathProps
- type EmrContainersDeleteVirtualClusterJsonataProps
- type EmrContainersDeleteVirtualClusterProps
- type EmrContainersStartJobRun
- func EmrContainersStartJobRun_JsonPath(scope constructs.Construct, id *string, ...) EmrContainersStartJobRun
- func EmrContainersStartJobRun_Jsonata(scope constructs.Construct, id *string, ...) EmrContainersStartJobRun
- func NewEmrContainersStartJobRun(scope constructs.Construct, id *string, props *EmrContainersStartJobRunProps) EmrContainersStartJobRun
- type EmrContainersStartJobRunJsonPathProps
- type EmrContainersStartJobRunJsonataProps
- type EmrContainersStartJobRunProps
- type EmrCreateCluster
- func EmrCreateCluster_JsonPath(scope constructs.Construct, id *string, props *EmrCreateClusterJsonPathProps) EmrCreateCluster
- func EmrCreateCluster_Jsonata(scope constructs.Construct, id *string, props *EmrCreateClusterJsonataProps) EmrCreateCluster
- func NewEmrCreateCluster(scope constructs.Construct, id *string, props *EmrCreateClusterProps) EmrCreateCluster
- type EmrCreateClusterJsonPathProps
- type EmrCreateClusterJsonataProps
- type EmrCreateClusterProps
- type EmrCreateCluster_ApplicationConfigProperty
- type EmrCreateCluster_AutoScalingPolicyProperty
- type EmrCreateCluster_BootstrapActionConfigProperty
- type EmrCreateCluster_CloudWatchAlarmComparisonOperator
- type EmrCreateCluster_CloudWatchAlarmDefinitionProperty
- type EmrCreateCluster_CloudWatchAlarmStatistic
- type EmrCreateCluster_CloudWatchAlarmUnit
- type EmrCreateCluster_ConfigurationProperty
- type EmrCreateCluster_EbsBlockDeviceConfigProperty
- type EmrCreateCluster_EbsBlockDeviceVolumeType
- type EmrCreateCluster_EbsConfigurationProperty
- type EmrCreateCluster_EmrClusterScaleDownBehavior
- type EmrCreateCluster_InstanceFleetConfigProperty
- type EmrCreateCluster_InstanceFleetProvisioningSpecificationsProperty
- type EmrCreateCluster_InstanceGroupConfigProperty
- type EmrCreateCluster_InstanceMarket
- type EmrCreateCluster_InstanceRoleType
- type EmrCreateCluster_InstanceTypeConfigProperty
- type EmrCreateCluster_InstancesConfigProperty
- type EmrCreateCluster_KerberosAttributesProperty
- type EmrCreateCluster_MetricDimensionProperty
- type EmrCreateCluster_OnDemandAllocationStrategy
- type EmrCreateCluster_OnDemandProvisioningSpecificationProperty
- type EmrCreateCluster_PlacementTypeProperty
- type EmrCreateCluster_ScalingActionProperty
- type EmrCreateCluster_ScalingAdjustmentType
- type EmrCreateCluster_ScalingConstraintsProperty
- type EmrCreateCluster_ScalingRuleProperty
- type EmrCreateCluster_ScalingTriggerProperty
- type EmrCreateCluster_ScriptBootstrapActionConfigProperty
- type EmrCreateCluster_SimpleScalingPolicyConfigurationProperty
- type EmrCreateCluster_SpotAllocationStrategy
- type EmrCreateCluster_SpotProvisioningSpecificationProperty
- type EmrCreateCluster_SpotTimeoutAction
- type EmrCreateCluster_VolumeSpecificationProperty
- type EmrModifyInstanceFleetByName
- func EmrModifyInstanceFleetByName_JsonPath(scope constructs.Construct, id *string, ...) EmrModifyInstanceFleetByName
- func EmrModifyInstanceFleetByName_Jsonata(scope constructs.Construct, id *string, ...) EmrModifyInstanceFleetByName
- func NewEmrModifyInstanceFleetByName(scope constructs.Construct, id *string, ...) EmrModifyInstanceFleetByName
- type EmrModifyInstanceFleetByNameJsonPathProps
- type EmrModifyInstanceFleetByNameJsonataProps
- type EmrModifyInstanceFleetByNameProps
- type EmrModifyInstanceGroupByName
- func EmrModifyInstanceGroupByName_JsonPath(scope constructs.Construct, id *string, ...) EmrModifyInstanceGroupByName
- func EmrModifyInstanceGroupByName_Jsonata(scope constructs.Construct, id *string, ...) EmrModifyInstanceGroupByName
- func NewEmrModifyInstanceGroupByName(scope constructs.Construct, id *string, ...) EmrModifyInstanceGroupByName
- type EmrModifyInstanceGroupByNameJsonPathProps
- type EmrModifyInstanceGroupByNameJsonataProps
- type EmrModifyInstanceGroupByNameProps
- type EmrModifyInstanceGroupByName_InstanceGroupModifyConfigProperty
- type EmrModifyInstanceGroupByName_InstanceResizePolicyProperty
- type EmrModifyInstanceGroupByName_ShrinkPolicyProperty
- type EmrSetClusterTerminationProtection
- func EmrSetClusterTerminationProtection_JsonPath(scope constructs.Construct, id *string, ...) EmrSetClusterTerminationProtection
- func EmrSetClusterTerminationProtection_Jsonata(scope constructs.Construct, id *string, ...) EmrSetClusterTerminationProtection
- func NewEmrSetClusterTerminationProtection(scope constructs.Construct, id *string, ...) EmrSetClusterTerminationProtection
- type EmrSetClusterTerminationProtectionJsonPathProps
- type EmrSetClusterTerminationProtectionJsonataProps
- type EmrSetClusterTerminationProtectionProps
- type EmrTerminateCluster
- func EmrTerminateCluster_JsonPath(scope constructs.Construct, id *string, ...) EmrTerminateCluster
- func EmrTerminateCluster_Jsonata(scope constructs.Construct, id *string, props *EmrTerminateClusterJsonataProps) EmrTerminateCluster
- func NewEmrTerminateCluster(scope constructs.Construct, id *string, props *EmrTerminateClusterProps) EmrTerminateCluster
- type EmrTerminateClusterJsonPathProps
- type EmrTerminateClusterJsonataProps
- type EmrTerminateClusterProps
- type EncryptionConfiguration
- type EncryptionOption
- type EvaluateExpression
- type EvaluateExpressionProps
- type EventBridgePutEvents
- func EventBridgePutEvents_JsonPath(scope constructs.Construct, id *string, ...) EventBridgePutEvents
- func EventBridgePutEvents_Jsonata(scope constructs.Construct, id *string, ...) EventBridgePutEvents
- func NewEventBridgePutEvents(scope constructs.Construct, id *string, props *EventBridgePutEventsProps) EventBridgePutEvents
- type EventBridgePutEventsEntry
- type EventBridgePutEventsJsonPathProps
- type EventBridgePutEventsJsonataProps
- type EventBridgePutEventsProps
- type EventBridgeSchedulerCreateScheduleTask
- func EventBridgeSchedulerCreateScheduleTask_JsonPath(scope constructs.Construct, id *string, ...) EventBridgeSchedulerCreateScheduleTask
- func EventBridgeSchedulerCreateScheduleTask_Jsonata(scope constructs.Construct, id *string, ...) EventBridgeSchedulerCreateScheduleTask
- func NewEventBridgeSchedulerCreateScheduleTask(scope constructs.Construct, id *string, ...) EventBridgeSchedulerCreateScheduleTask
- type EventBridgeSchedulerCreateScheduleTaskJsonPathProps
- type EventBridgeSchedulerCreateScheduleTaskJsonataProps
- type EventBridgeSchedulerCreateScheduleTaskProps
- type EventBridgeSchedulerTarget
- type EventBridgeSchedulerTargetProps
- type ExecutionClass
- type GlueDataBrewStartJobRun
- func GlueDataBrewStartJobRun_JsonPath(scope constructs.Construct, id *string, ...) GlueDataBrewStartJobRun
- func GlueDataBrewStartJobRun_Jsonata(scope constructs.Construct, id *string, ...) GlueDataBrewStartJobRun
- func NewGlueDataBrewStartJobRun(scope constructs.Construct, id *string, props *GlueDataBrewStartJobRunProps) GlueDataBrewStartJobRun
- type GlueDataBrewStartJobRunJsonPathProps
- type GlueDataBrewStartJobRunJsonataProps
- type GlueDataBrewStartJobRunProps
- type GlueStartCrawlerRun
- func GlueStartCrawlerRun_JsonPath(scope constructs.Construct, id *string, ...) GlueStartCrawlerRun
- func GlueStartCrawlerRun_Jsonata(scope constructs.Construct, id *string, props *GlueStartCrawlerRunJsonataProps) GlueStartCrawlerRun
- func NewGlueStartCrawlerRun(scope constructs.Construct, id *string, props *GlueStartCrawlerRunProps) GlueStartCrawlerRun
- type GlueStartCrawlerRunJsonPathProps
- type GlueStartCrawlerRunJsonataProps
- type GlueStartCrawlerRunProps
- type GlueStartJobRun
- func GlueStartJobRun_JsonPath(scope constructs.Construct, id *string, props *GlueStartJobRunJsonPathProps) GlueStartJobRun
- func GlueStartJobRun_Jsonata(scope constructs.Construct, id *string, props *GlueStartJobRunJsonataProps) GlueStartJobRun
- func NewGlueStartJobRun(scope constructs.Construct, id *string, props *GlueStartJobRunProps) GlueStartJobRun
- type GlueStartJobRunJsonPathProps
- type GlueStartJobRunJsonataProps
- type GlueStartJobRunProps
- type Guardrail
- type HttpInvoke
- func HttpInvoke_JsonPath(scope constructs.Construct, id *string, props *HttpInvokeJsonPathProps) HttpInvoke
- func HttpInvoke_Jsonata(scope constructs.Construct, id *string, props *HttpInvokeJsonataProps) HttpInvoke
- func NewHttpInvoke(scope constructs.Construct, id *string, props *HttpInvokeProps) HttpInvoke
- type HttpInvokeJsonPathProps
- type HttpInvokeJsonataProps
- type HttpInvokeProps
- type HttpMethod
- type HttpMethods
- type IContainerDefinition
- type IEcsLaunchTarget
- type ISageMakerTask
- type InputMode
- type JobDependency
- type JobDriver
- type LambdaInvocationType
- type LambdaInvoke
- func LambdaInvoke_JsonPath(scope constructs.Construct, id *string, props *LambdaInvokeJsonPathProps) LambdaInvoke
- func LambdaInvoke_Jsonata(scope constructs.Construct, id *string, props *LambdaInvokeJsonataProps) LambdaInvoke
- func NewLambdaInvoke(scope constructs.Construct, id *string, props *LambdaInvokeProps) LambdaInvoke
- type LambdaInvokeJsonPathProps
- type LambdaInvokeJsonataProps
- type LambdaInvokeProps
- type LaunchTargetBindOptions
- type MediaConvertCreateJob
- func MediaConvertCreateJob_JsonPath(scope constructs.Construct, id *string, ...) MediaConvertCreateJob
- func MediaConvertCreateJob_Jsonata(scope constructs.Construct, id *string, ...) MediaConvertCreateJob
- func NewMediaConvertCreateJob(scope constructs.Construct, id *string, props *MediaConvertCreateJobProps) MediaConvertCreateJob
- type MediaConvertCreateJobJsonPathProps
- type MediaConvertCreateJobJsonataProps
- type MediaConvertCreateJobProps
- type MessageAttribute
- type MessageAttributeDataType
- type MetricDefinition
- type Mode
- type ModelClientOptions
- type Monitoring
- type OutputDataConfig
- type ProductionVariant
- type QueryExecutionContext
- type RecordWrapperType
- type ReleaseLabel
- type ResourceConfig
- type ResultConfiguration
- type RetryPolicy
- type S3DataDistributionType
- type S3DataSource
- type S3DataType
- type S3Location
- type S3LocationBindOptions
- type S3LocationConfig
- type SageMakerCreateEndpoint
- func NewSageMakerCreateEndpoint(scope constructs.Construct, id *string, props *SageMakerCreateEndpointProps) SageMakerCreateEndpoint
- func SageMakerCreateEndpoint_JsonPath(scope constructs.Construct, id *string, ...) SageMakerCreateEndpoint
- func SageMakerCreateEndpoint_Jsonata(scope constructs.Construct, id *string, ...) SageMakerCreateEndpoint
- type SageMakerCreateEndpointConfig
- func NewSageMakerCreateEndpointConfig(scope constructs.Construct, id *string, ...) SageMakerCreateEndpointConfig
- func SageMakerCreateEndpointConfig_JsonPath(scope constructs.Construct, id *string, ...) SageMakerCreateEndpointConfig
- func SageMakerCreateEndpointConfig_Jsonata(scope constructs.Construct, id *string, ...) SageMakerCreateEndpointConfig
- type SageMakerCreateEndpointConfigJsonPathProps
- type SageMakerCreateEndpointConfigJsonataProps
- type SageMakerCreateEndpointConfigProps
- type SageMakerCreateEndpointJsonPathProps
- type SageMakerCreateEndpointJsonataProps
- type SageMakerCreateEndpointProps
- type SageMakerCreateModel
- func NewSageMakerCreateModel(scope constructs.Construct, id *string, props *SageMakerCreateModelProps) SageMakerCreateModel
- func SageMakerCreateModel_JsonPath(scope constructs.Construct, id *string, ...) SageMakerCreateModel
- func SageMakerCreateModel_Jsonata(scope constructs.Construct, id *string, ...) SageMakerCreateModel
- type SageMakerCreateModelJsonPathProps
- type SageMakerCreateModelJsonataProps
- type SageMakerCreateModelProps
- type SageMakerCreateTrainingJob
- func NewSageMakerCreateTrainingJob(scope constructs.Construct, id *string, props *SageMakerCreateTrainingJobProps) SageMakerCreateTrainingJob
- func SageMakerCreateTrainingJob_JsonPath(scope constructs.Construct, id *string, ...) SageMakerCreateTrainingJob
- func SageMakerCreateTrainingJob_Jsonata(scope constructs.Construct, id *string, ...) SageMakerCreateTrainingJob
- type SageMakerCreateTrainingJobJsonPathProps
- type SageMakerCreateTrainingJobJsonataProps
- type SageMakerCreateTrainingJobProps
- type SageMakerCreateTransformJob
- func NewSageMakerCreateTransformJob(scope constructs.Construct, id *string, ...) SageMakerCreateTransformJob
- func SageMakerCreateTransformJob_JsonPath(scope constructs.Construct, id *string, ...) SageMakerCreateTransformJob
- func SageMakerCreateTransformJob_Jsonata(scope constructs.Construct, id *string, ...) SageMakerCreateTransformJob
- type SageMakerCreateTransformJobJsonPathProps
- type SageMakerCreateTransformJobJsonataProps
- type SageMakerCreateTransformJobProps
- type SageMakerUpdateEndpoint
- func NewSageMakerUpdateEndpoint(scope constructs.Construct, id *string, props *SageMakerUpdateEndpointProps) SageMakerUpdateEndpoint
- func SageMakerUpdateEndpoint_JsonPath(scope constructs.Construct, id *string, ...) SageMakerUpdateEndpoint
- func SageMakerUpdateEndpoint_Jsonata(scope constructs.Construct, id *string, ...) SageMakerUpdateEndpoint
- type SageMakerUpdateEndpointJsonPathProps
- type SageMakerUpdateEndpointJsonataProps
- type SageMakerUpdateEndpointProps
- type Schedule
- type ShuffleConfig
- type SnsPublish
- func NewSnsPublish(scope constructs.Construct, id *string, props *SnsPublishProps) SnsPublish
- func SnsPublish_JsonPath(scope constructs.Construct, id *string, props *SnsPublishJsonPathProps) SnsPublish
- func SnsPublish_Jsonata(scope constructs.Construct, id *string, props *SnsPublishJsonataProps) SnsPublish
- type SnsPublishJsonPathProps
- type SnsPublishJsonataProps
- type SnsPublishProps
- type SparkSubmitJobDriver
- type SplitType
- type SqsSendMessage
- func NewSqsSendMessage(scope constructs.Construct, id *string, props *SqsSendMessageProps) SqsSendMessage
- func SqsSendMessage_JsonPath(scope constructs.Construct, id *string, props *SqsSendMessageJsonPathProps) SqsSendMessage
- func SqsSendMessage_Jsonata(scope constructs.Construct, id *string, props *SqsSendMessageJsonataProps) SqsSendMessage
- type SqsSendMessageJsonPathProps
- type SqsSendMessageJsonataProps
- type SqsSendMessageProps
- type StepFunctionsInvokeActivity
- func NewStepFunctionsInvokeActivity(scope constructs.Construct, id *string, ...) StepFunctionsInvokeActivity
- func StepFunctionsInvokeActivity_JsonPath(scope constructs.Construct, id *string, ...) StepFunctionsInvokeActivity
- func StepFunctionsInvokeActivity_Jsonata(scope constructs.Construct, id *string, ...) StepFunctionsInvokeActivity
- type StepFunctionsInvokeActivityJsonPathProps
- type StepFunctionsInvokeActivityJsonataProps
- type StepFunctionsInvokeActivityProps
- type StepFunctionsStartExecution
- func NewStepFunctionsStartExecution(scope constructs.Construct, id *string, ...) StepFunctionsStartExecution
- func StepFunctionsStartExecution_JsonPath(scope constructs.Construct, id *string, ...) StepFunctionsStartExecution
- func StepFunctionsStartExecution_Jsonata(scope constructs.Construct, id *string, ...) StepFunctionsStartExecution
- type StepFunctionsStartExecutionJsonPathProps
- type StepFunctionsStartExecutionJsonataProps
- type StepFunctionsStartExecutionProps
- type StoppingCondition
- type TaskEnvironmentVariable
- type TransformDataSource
- type TransformInput
- type TransformOutput
- type TransformResources
- type TransformS3DataSource
- type URLEncodingFormat
- type VirtualClusterInput
- type VpcConfig
- type WorkerConfigurationProperty
- type WorkerType
- type WorkerTypeV2
- func WorkerTypeV2_G_025X() WorkerTypeV2
- func WorkerTypeV2_G_1X() WorkerTypeV2
- func WorkerTypeV2_G_2X() WorkerTypeV2
- func WorkerTypeV2_G_4X() WorkerTypeV2
- func WorkerTypeV2_G_8X() WorkerTypeV2
- func WorkerTypeV2_Of(workerType *string) WorkerTypeV2
- func WorkerTypeV2_STANDARD() WorkerTypeV2
- func WorkerTypeV2_Z_2X() WorkerTypeV2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AthenaGetQueryExecution_FilterNextables ¶
func AthenaGetQueryExecution_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func AthenaGetQueryExecution_FindReachableEndStates ¶
func AthenaGetQueryExecution_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func AthenaGetQueryExecution_FindReachableStates ¶
func AthenaGetQueryExecution_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 AthenaGetQueryExecution_IsConstruct ¶
func AthenaGetQueryExecution_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 AthenaGetQueryExecution_PrefixStates ¶
func AthenaGetQueryExecution_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func AthenaGetQueryResults_FilterNextables ¶
func AthenaGetQueryResults_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func AthenaGetQueryResults_FindReachableEndStates ¶
func AthenaGetQueryResults_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func AthenaGetQueryResults_FindReachableStates ¶
func AthenaGetQueryResults_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 AthenaGetQueryResults_IsConstruct ¶
func AthenaGetQueryResults_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 AthenaGetQueryResults_PrefixStates ¶
func AthenaGetQueryResults_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func AthenaStartQueryExecution_FilterNextables ¶
func AthenaStartQueryExecution_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func AthenaStartQueryExecution_FindReachableEndStates ¶
func AthenaStartQueryExecution_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func AthenaStartQueryExecution_FindReachableStates ¶
func AthenaStartQueryExecution_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 AthenaStartQueryExecution_IsConstruct ¶
func AthenaStartQueryExecution_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 AthenaStartQueryExecution_PrefixStates ¶
func AthenaStartQueryExecution_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func AthenaStopQueryExecution_FilterNextables ¶
func AthenaStopQueryExecution_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func AthenaStopQueryExecution_FindReachableEndStates ¶
func AthenaStopQueryExecution_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func AthenaStopQueryExecution_FindReachableStates ¶
func AthenaStopQueryExecution_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 AthenaStopQueryExecution_IsConstruct ¶
func AthenaStopQueryExecution_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 AthenaStopQueryExecution_PrefixStates ¶
func AthenaStopQueryExecution_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func BatchSubmitJob_FilterNextables ¶
func BatchSubmitJob_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func BatchSubmitJob_FindReachableEndStates ¶
func BatchSubmitJob_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func BatchSubmitJob_FindReachableStates ¶
func BatchSubmitJob_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 BatchSubmitJob_IsConstruct ¶
func BatchSubmitJob_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 BatchSubmitJob_PrefixStates ¶
func BatchSubmitJob_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func BedrockInvokeModel_FilterNextables ¶ added in v2.115.0
func BedrockInvokeModel_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func BedrockInvokeModel_FindReachableEndStates ¶ added in v2.115.0
func BedrockInvokeModel_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func BedrockInvokeModel_FindReachableStates ¶ added in v2.115.0
func BedrockInvokeModel_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 BedrockInvokeModel_IsConstruct ¶ added in v2.115.0
func BedrockInvokeModel_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 BedrockInvokeModel_PrefixStates ¶ added in v2.115.0
func BedrockInvokeModel_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func CallApiGatewayHttpApiEndpoint_FilterNextables ¶
func CallApiGatewayHttpApiEndpoint_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func CallApiGatewayHttpApiEndpoint_FindReachableEndStates ¶
func CallApiGatewayHttpApiEndpoint_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func CallApiGatewayHttpApiEndpoint_FindReachableStates ¶
func CallApiGatewayHttpApiEndpoint_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 CallApiGatewayHttpApiEndpoint_IsConstruct ¶
func CallApiGatewayHttpApiEndpoint_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 CallApiGatewayHttpApiEndpoint_PrefixStates ¶
func CallApiGatewayHttpApiEndpoint_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func CallApiGatewayRestApiEndpoint_FilterNextables ¶
func CallApiGatewayRestApiEndpoint_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func CallApiGatewayRestApiEndpoint_FindReachableEndStates ¶
func CallApiGatewayRestApiEndpoint_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func CallApiGatewayRestApiEndpoint_FindReachableStates ¶
func CallApiGatewayRestApiEndpoint_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 CallApiGatewayRestApiEndpoint_IsConstruct ¶
func CallApiGatewayRestApiEndpoint_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 CallApiGatewayRestApiEndpoint_PrefixStates ¶
func CallApiGatewayRestApiEndpoint_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func CallAwsServiceCrossRegion_FilterNextables ¶ added in v2.148.0
func CallAwsServiceCrossRegion_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func CallAwsServiceCrossRegion_FindReachableEndStates ¶ added in v2.148.0
func CallAwsServiceCrossRegion_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func CallAwsServiceCrossRegion_FindReachableStates ¶ added in v2.148.0
func CallAwsServiceCrossRegion_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 CallAwsServiceCrossRegion_IsConstruct ¶ added in v2.148.0
func CallAwsServiceCrossRegion_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 CallAwsServiceCrossRegion_PrefixStates ¶ added in v2.148.0
func CallAwsServiceCrossRegion_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func CallAwsService_FilterNextables ¶
func CallAwsService_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func CallAwsService_FindReachableEndStates ¶
func CallAwsService_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func CallAwsService_FindReachableStates ¶
func CallAwsService_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 CallAwsService_IsConstruct ¶
func CallAwsService_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 CallAwsService_PrefixStates ¶
func CallAwsService_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func CodeBuildStartBuildBatch_FilterNextables ¶ added in v2.132.0
func CodeBuildStartBuildBatch_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func CodeBuildStartBuildBatch_FindReachableEndStates ¶ added in v2.132.0
func CodeBuildStartBuildBatch_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func CodeBuildStartBuildBatch_FindReachableStates ¶ added in v2.132.0
func CodeBuildStartBuildBatch_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 CodeBuildStartBuildBatch_IsConstruct ¶ added in v2.132.0
func CodeBuildStartBuildBatch_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 CodeBuildStartBuildBatch_PrefixStates ¶ added in v2.132.0
func CodeBuildStartBuildBatch_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func CodeBuildStartBuild_FilterNextables ¶
func CodeBuildStartBuild_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func CodeBuildStartBuild_FindReachableEndStates ¶
func CodeBuildStartBuild_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func CodeBuildStartBuild_FindReachableStates ¶
func CodeBuildStartBuild_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 CodeBuildStartBuild_IsConstruct ¶
func CodeBuildStartBuild_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 CodeBuildStartBuild_PrefixStates ¶
func CodeBuildStartBuild_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func DynamoDeleteItem_FilterNextables ¶
func DynamoDeleteItem_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func DynamoDeleteItem_FindReachableEndStates ¶
func DynamoDeleteItem_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func DynamoDeleteItem_FindReachableStates ¶
func DynamoDeleteItem_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 DynamoDeleteItem_IsConstruct ¶
func DynamoDeleteItem_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 DynamoDeleteItem_PrefixStates ¶
func DynamoDeleteItem_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func DynamoGetItem_FilterNextables ¶
func DynamoGetItem_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func DynamoGetItem_FindReachableEndStates ¶
func DynamoGetItem_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func DynamoGetItem_FindReachableStates ¶
func DynamoGetItem_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 DynamoGetItem_IsConstruct ¶
func DynamoGetItem_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 DynamoGetItem_PrefixStates ¶
func DynamoGetItem_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func DynamoPutItem_FilterNextables ¶
func DynamoPutItem_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func DynamoPutItem_FindReachableEndStates ¶
func DynamoPutItem_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func DynamoPutItem_FindReachableStates ¶
func DynamoPutItem_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 DynamoPutItem_IsConstruct ¶
func DynamoPutItem_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 DynamoPutItem_PrefixStates ¶
func DynamoPutItem_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func DynamoUpdateItem_FilterNextables ¶
func DynamoUpdateItem_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func DynamoUpdateItem_FindReachableEndStates ¶
func DynamoUpdateItem_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func DynamoUpdateItem_FindReachableStates ¶
func DynamoUpdateItem_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 DynamoUpdateItem_IsConstruct ¶
func DynamoUpdateItem_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 DynamoUpdateItem_PrefixStates ¶
func DynamoUpdateItem_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func EcsRunTask_FilterNextables ¶
func EcsRunTask_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func EcsRunTask_FindReachableEndStates ¶
func EcsRunTask_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func EcsRunTask_FindReachableStates ¶
func EcsRunTask_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 EcsRunTask_IsConstruct ¶
func EcsRunTask_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 EcsRunTask_PrefixStates ¶
func EcsRunTask_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func EksCall_FilterNextables ¶
func EksCall_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func EksCall_FindReachableEndStates ¶
func EksCall_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func EksCall_FindReachableStates ¶
func EksCall_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 EksCall_IsConstruct ¶
func EksCall_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 EksCall_PrefixStates ¶
func EksCall_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func EmrAddStep_FilterNextables ¶
func EmrAddStep_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func EmrAddStep_FindReachableEndStates ¶
func EmrAddStep_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func EmrAddStep_FindReachableStates ¶
func EmrAddStep_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 EmrAddStep_IsConstruct ¶
func EmrAddStep_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 EmrAddStep_PrefixStates ¶
func EmrAddStep_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func EmrCancelStep_FilterNextables ¶
func EmrCancelStep_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func EmrCancelStep_FindReachableEndStates ¶
func EmrCancelStep_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func EmrCancelStep_FindReachableStates ¶
func EmrCancelStep_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 EmrCancelStep_IsConstruct ¶
func EmrCancelStep_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 EmrCancelStep_PrefixStates ¶
func EmrCancelStep_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func EmrContainersCreateVirtualCluster_FilterNextables ¶ added in v2.1.0
func EmrContainersCreateVirtualCluster_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func EmrContainersCreateVirtualCluster_FindReachableEndStates ¶ added in v2.1.0
func EmrContainersCreateVirtualCluster_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func EmrContainersCreateVirtualCluster_FindReachableStates ¶ added in v2.1.0
func EmrContainersCreateVirtualCluster_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 EmrContainersCreateVirtualCluster_IsConstruct ¶ added in v2.1.0
func EmrContainersCreateVirtualCluster_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 EmrContainersCreateVirtualCluster_PrefixStates ¶ added in v2.1.0
func EmrContainersCreateVirtualCluster_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func EmrContainersDeleteVirtualCluster_FilterNextables ¶ added in v2.1.0
func EmrContainersDeleteVirtualCluster_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func EmrContainersDeleteVirtualCluster_FindReachableEndStates ¶ added in v2.1.0
func EmrContainersDeleteVirtualCluster_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func EmrContainersDeleteVirtualCluster_FindReachableStates ¶ added in v2.1.0
func EmrContainersDeleteVirtualCluster_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 EmrContainersDeleteVirtualCluster_IsConstruct ¶ added in v2.1.0
func EmrContainersDeleteVirtualCluster_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 EmrContainersDeleteVirtualCluster_PrefixStates ¶ added in v2.1.0
func EmrContainersDeleteVirtualCluster_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func EmrContainersStartJobRun_FilterNextables ¶ added in v2.1.0
func EmrContainersStartJobRun_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func EmrContainersStartJobRun_FindReachableEndStates ¶ added in v2.1.0
func EmrContainersStartJobRun_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func EmrContainersStartJobRun_FindReachableStates ¶ added in v2.1.0
func EmrContainersStartJobRun_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 EmrContainersStartJobRun_IsConstruct ¶ added in v2.1.0
func EmrContainersStartJobRun_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 EmrContainersStartJobRun_PrefixStates ¶ added in v2.1.0
func EmrContainersStartJobRun_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func EmrCreateCluster_FilterNextables ¶
func EmrCreateCluster_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func EmrCreateCluster_FindReachableEndStates ¶
func EmrCreateCluster_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func EmrCreateCluster_FindReachableStates ¶
func EmrCreateCluster_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 EmrCreateCluster_IsConstruct ¶
func EmrCreateCluster_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 EmrCreateCluster_PrefixStates ¶
func EmrCreateCluster_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func EmrModifyInstanceFleetByName_FilterNextables ¶
func EmrModifyInstanceFleetByName_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func EmrModifyInstanceFleetByName_FindReachableEndStates ¶
func EmrModifyInstanceFleetByName_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func EmrModifyInstanceFleetByName_FindReachableStates ¶
func EmrModifyInstanceFleetByName_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 EmrModifyInstanceFleetByName_IsConstruct ¶
func EmrModifyInstanceFleetByName_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 EmrModifyInstanceFleetByName_PrefixStates ¶
func EmrModifyInstanceFleetByName_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func EmrModifyInstanceGroupByName_FilterNextables ¶
func EmrModifyInstanceGroupByName_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func EmrModifyInstanceGroupByName_FindReachableEndStates ¶
func EmrModifyInstanceGroupByName_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func EmrModifyInstanceGroupByName_FindReachableStates ¶
func EmrModifyInstanceGroupByName_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 EmrModifyInstanceGroupByName_IsConstruct ¶
func EmrModifyInstanceGroupByName_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 EmrModifyInstanceGroupByName_PrefixStates ¶
func EmrModifyInstanceGroupByName_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func EmrSetClusterTerminationProtection_FilterNextables ¶
func EmrSetClusterTerminationProtection_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func EmrSetClusterTerminationProtection_FindReachableEndStates ¶
func EmrSetClusterTerminationProtection_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func EmrSetClusterTerminationProtection_FindReachableStates ¶
func EmrSetClusterTerminationProtection_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 EmrSetClusterTerminationProtection_IsConstruct ¶
func EmrSetClusterTerminationProtection_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 EmrSetClusterTerminationProtection_PrefixStates ¶
func EmrSetClusterTerminationProtection_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func EmrTerminateCluster_FilterNextables ¶
func EmrTerminateCluster_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func EmrTerminateCluster_FindReachableEndStates ¶
func EmrTerminateCluster_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func EmrTerminateCluster_FindReachableStates ¶
func EmrTerminateCluster_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 EmrTerminateCluster_IsConstruct ¶
func EmrTerminateCluster_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 EmrTerminateCluster_PrefixStates ¶
func EmrTerminateCluster_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func EvaluateExpression_FilterNextables ¶
func EvaluateExpression_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func EvaluateExpression_FindReachableEndStates ¶
func EvaluateExpression_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func EvaluateExpression_FindReachableStates ¶
func EvaluateExpression_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 EvaluateExpression_IsConstruct ¶
func EvaluateExpression_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 EvaluateExpression_PrefixStates ¶
func EvaluateExpression_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func EventBridgePutEvents_FilterNextables ¶
func EventBridgePutEvents_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func EventBridgePutEvents_FindReachableEndStates ¶
func EventBridgePutEvents_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func EventBridgePutEvents_FindReachableStates ¶
func EventBridgePutEvents_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 EventBridgePutEvents_IsConstruct ¶
func EventBridgePutEvents_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 EventBridgePutEvents_PrefixStates ¶
func EventBridgePutEvents_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func EventBridgeSchedulerCreateScheduleTask_FilterNextables ¶ added in v2.168.0
func EventBridgeSchedulerCreateScheduleTask_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func EventBridgeSchedulerCreateScheduleTask_FindReachableEndStates ¶ added in v2.168.0
func EventBridgeSchedulerCreateScheduleTask_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func EventBridgeSchedulerCreateScheduleTask_FindReachableStates ¶ added in v2.168.0
func EventBridgeSchedulerCreateScheduleTask_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 EventBridgeSchedulerCreateScheduleTask_IsConstruct ¶ added in v2.168.0
func EventBridgeSchedulerCreateScheduleTask_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 EventBridgeSchedulerCreateScheduleTask_PrefixStates ¶ added in v2.168.0
func EventBridgeSchedulerCreateScheduleTask_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func GlueDataBrewStartJobRun_FilterNextables ¶
func GlueDataBrewStartJobRun_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func GlueDataBrewStartJobRun_FindReachableEndStates ¶
func GlueDataBrewStartJobRun_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func GlueDataBrewStartJobRun_FindReachableStates ¶
func GlueDataBrewStartJobRun_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 GlueDataBrewStartJobRun_IsConstruct ¶
func GlueDataBrewStartJobRun_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 GlueDataBrewStartJobRun_PrefixStates ¶
func GlueDataBrewStartJobRun_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func GlueStartCrawlerRun_FilterNextables ¶ added in v2.133.0
func GlueStartCrawlerRun_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func GlueStartCrawlerRun_FindReachableEndStates ¶ added in v2.133.0
func GlueStartCrawlerRun_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func GlueStartCrawlerRun_FindReachableStates ¶ added in v2.133.0
func GlueStartCrawlerRun_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 GlueStartCrawlerRun_IsConstruct ¶ added in v2.133.0
func GlueStartCrawlerRun_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 GlueStartCrawlerRun_PrefixStates ¶ added in v2.133.0
func GlueStartCrawlerRun_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func GlueStartJobRun_FilterNextables ¶
func GlueStartJobRun_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func GlueStartJobRun_FindReachableEndStates ¶
func GlueStartJobRun_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func GlueStartJobRun_FindReachableStates ¶
func GlueStartJobRun_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 GlueStartJobRun_IsConstruct ¶
func GlueStartJobRun_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 GlueStartJobRun_PrefixStates ¶
func GlueStartJobRun_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func HttpInvoke_FilterNextables ¶ added in v2.138.0
func HttpInvoke_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func HttpInvoke_FindReachableEndStates ¶ added in v2.138.0
func HttpInvoke_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func HttpInvoke_FindReachableStates ¶ added in v2.138.0
func HttpInvoke_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 HttpInvoke_IsConstruct ¶ added in v2.138.0
func HttpInvoke_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 HttpInvoke_PrefixStates ¶ added in v2.138.0
func HttpInvoke_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func LambdaInvoke_FilterNextables ¶
func LambdaInvoke_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func LambdaInvoke_FindReachableEndStates ¶
func LambdaInvoke_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func LambdaInvoke_FindReachableStates ¶
func LambdaInvoke_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 LambdaInvoke_IsConstruct ¶
func LambdaInvoke_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 LambdaInvoke_PrefixStates ¶
func LambdaInvoke_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func MediaConvertCreateJob_FilterNextables ¶ added in v2.144.0
func MediaConvertCreateJob_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func MediaConvertCreateJob_FindReachableEndStates ¶ added in v2.144.0
func MediaConvertCreateJob_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func MediaConvertCreateJob_FindReachableStates ¶ added in v2.144.0
func MediaConvertCreateJob_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 MediaConvertCreateJob_IsConstruct ¶ added in v2.144.0
func MediaConvertCreateJob_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 MediaConvertCreateJob_PrefixStates ¶ added in v2.144.0
func MediaConvertCreateJob_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func NewAcceleratorType_Override ¶
func NewAcceleratorType_Override(a AcceleratorType, instanceTypeIdentifier *string)
func NewAthenaGetQueryExecution_Override ¶
func NewAthenaGetQueryExecution_Override(a AthenaGetQueryExecution, scope constructs.Construct, id *string, props *AthenaGetQueryExecutionProps)
func NewAthenaGetQueryResults_Override ¶
func NewAthenaGetQueryResults_Override(a AthenaGetQueryResults, scope constructs.Construct, id *string, props *AthenaGetQueryResultsProps)
func NewAthenaStartQueryExecution_Override ¶
func NewAthenaStartQueryExecution_Override(a AthenaStartQueryExecution, scope constructs.Construct, id *string, props *AthenaStartQueryExecutionProps)
func NewAthenaStopQueryExecution_Override ¶
func NewAthenaStopQueryExecution_Override(a AthenaStopQueryExecution, scope constructs.Construct, id *string, props *AthenaStopQueryExecutionProps)
func NewBatchSubmitJob_Override ¶
func NewBatchSubmitJob_Override(b BatchSubmitJob, scope constructs.Construct, id *string, props *BatchSubmitJobProps)
func NewBedrockInvokeModel_Override ¶ added in v2.115.0
func NewBedrockInvokeModel_Override(b BedrockInvokeModel, scope constructs.Construct, id *string, props *BedrockInvokeModelProps)
func NewCallApiGatewayHttpApiEndpoint_Override ¶
func NewCallApiGatewayHttpApiEndpoint_Override(c CallApiGatewayHttpApiEndpoint, scope constructs.Construct, id *string, props *CallApiGatewayHttpApiEndpointProps)
func NewCallApiGatewayRestApiEndpoint_Override ¶
func NewCallApiGatewayRestApiEndpoint_Override(c CallApiGatewayRestApiEndpoint, scope constructs.Construct, id *string, props *CallApiGatewayRestApiEndpointProps)
func NewCallAwsServiceCrossRegion_Override ¶ added in v2.148.0
func NewCallAwsServiceCrossRegion_Override(c CallAwsServiceCrossRegion, scope constructs.Construct, id *string, props *CallAwsServiceCrossRegionProps)
func NewCallAwsService_Override ¶
func NewCallAwsService_Override(c CallAwsService, scope constructs.Construct, id *string, props *CallAwsServiceProps)
func NewClassification_Override ¶ added in v2.1.0
func NewClassification_Override(c Classification, classificationStatement *string)
Creates a new Classification.
func NewCodeBuildStartBuildBatch_Override ¶ added in v2.132.0
func NewCodeBuildStartBuildBatch_Override(c CodeBuildStartBuildBatch, scope constructs.Construct, id *string, props *CodeBuildStartBuildBatchProps)
func NewCodeBuildStartBuild_Override ¶
func NewCodeBuildStartBuild_Override(c CodeBuildStartBuild, scope constructs.Construct, id *string, props *CodeBuildStartBuildProps)
func NewContainerDefinition_Override ¶
func NewContainerDefinition_Override(c ContainerDefinition, options *ContainerDefinitionOptions)
func NewDockerImage_Override ¶
func NewDockerImage_Override(d DockerImage)
func NewDynamoDeleteItem_Override ¶
func NewDynamoDeleteItem_Override(d DynamoDeleteItem, scope constructs.Construct, id *string, props *DynamoDeleteItemProps)
func NewDynamoGetItem_Override ¶
func NewDynamoGetItem_Override(d DynamoGetItem, scope constructs.Construct, id *string, props *DynamoGetItemProps)
func NewDynamoProjectionExpression_Override ¶
func NewDynamoProjectionExpression_Override(d DynamoProjectionExpression)
func NewDynamoPutItem_Override ¶
func NewDynamoPutItem_Override(d DynamoPutItem, scope constructs.Construct, id *string, props *DynamoPutItemProps)
func NewDynamoUpdateItem_Override ¶
func NewDynamoUpdateItem_Override(d DynamoUpdateItem, scope constructs.Construct, id *string, props *DynamoUpdateItemProps)
func NewEcsEc2LaunchTarget_Override ¶
func NewEcsEc2LaunchTarget_Override(e EcsEc2LaunchTarget, options *EcsEc2LaunchTargetOptions)
func NewEcsFargateLaunchTarget_Override ¶
func NewEcsFargateLaunchTarget_Override(e EcsFargateLaunchTarget, options *EcsFargateLaunchTargetOptions)
func NewEcsRunTask_Override ¶
func NewEcsRunTask_Override(e EcsRunTask, scope constructs.Construct, id *string, props *EcsRunTaskProps)
func NewEksCall_Override ¶
func NewEksCall_Override(e EksCall, scope constructs.Construct, id *string, props *EksCallProps)
func NewEmrAddStep_Override ¶
func NewEmrAddStep_Override(e EmrAddStep, scope constructs.Construct, id *string, props *EmrAddStepProps)
func NewEmrCancelStep_Override ¶
func NewEmrCancelStep_Override(e EmrCancelStep, scope constructs.Construct, id *string, props *EmrCancelStepProps)
func NewEmrContainersCreateVirtualCluster_Override ¶ added in v2.1.0
func NewEmrContainersCreateVirtualCluster_Override(e EmrContainersCreateVirtualCluster, scope constructs.Construct, id *string, props *EmrContainersCreateVirtualClusterProps)
func NewEmrContainersDeleteVirtualCluster_Override ¶ added in v2.1.0
func NewEmrContainersDeleteVirtualCluster_Override(e EmrContainersDeleteVirtualCluster, scope constructs.Construct, id *string, props *EmrContainersDeleteVirtualClusterProps)
func NewEmrContainersStartJobRun_Override ¶ added in v2.1.0
func NewEmrContainersStartJobRun_Override(e EmrContainersStartJobRun, scope constructs.Construct, id *string, props *EmrContainersStartJobRunProps)
func NewEmrCreateCluster_Override ¶
func NewEmrCreateCluster_Override(e EmrCreateCluster, scope constructs.Construct, id *string, props *EmrCreateClusterProps)
func NewEmrModifyInstanceFleetByName_Override ¶
func NewEmrModifyInstanceFleetByName_Override(e EmrModifyInstanceFleetByName, scope constructs.Construct, id *string, props *EmrModifyInstanceFleetByNameProps)
func NewEmrModifyInstanceGroupByName_Override ¶
func NewEmrModifyInstanceGroupByName_Override(e EmrModifyInstanceGroupByName, scope constructs.Construct, id *string, props *EmrModifyInstanceGroupByNameProps)
func NewEmrSetClusterTerminationProtection_Override ¶
func NewEmrSetClusterTerminationProtection_Override(e EmrSetClusterTerminationProtection, scope constructs.Construct, id *string, props *EmrSetClusterTerminationProtectionProps)
func NewEmrTerminateCluster_Override ¶
func NewEmrTerminateCluster_Override(e EmrTerminateCluster, scope constructs.Construct, id *string, props *EmrTerminateClusterProps)
func NewEvaluateExpression_Override ¶
func NewEvaluateExpression_Override(e EvaluateExpression, scope constructs.Construct, id *string, props *EvaluateExpressionProps)
func NewEventBridgePutEvents_Override ¶
func NewEventBridgePutEvents_Override(e EventBridgePutEvents, scope constructs.Construct, id *string, props *EventBridgePutEventsProps)
func NewEventBridgeSchedulerCreateScheduleTask_Override ¶ added in v2.168.0
func NewEventBridgeSchedulerCreateScheduleTask_Override(e EventBridgeSchedulerCreateScheduleTask, scope constructs.Construct, id *string, props *EventBridgeSchedulerCreateScheduleTaskProps)
func NewEventBridgeSchedulerTarget_Override ¶ added in v2.168.0
func NewEventBridgeSchedulerTarget_Override(e EventBridgeSchedulerTarget, props *EventBridgeSchedulerTargetProps)
func NewGlueDataBrewStartJobRun_Override ¶
func NewGlueDataBrewStartJobRun_Override(g GlueDataBrewStartJobRun, scope constructs.Construct, id *string, props *GlueDataBrewStartJobRunProps)
func NewGlueStartCrawlerRun_Override ¶ added in v2.133.0
func NewGlueStartCrawlerRun_Override(g GlueStartCrawlerRun, scope constructs.Construct, id *string, props *GlueStartCrawlerRunProps)
func NewGlueStartJobRun_Override ¶
func NewGlueStartJobRun_Override(g GlueStartJobRun, scope constructs.Construct, id *string, props *GlueStartJobRunProps)
func NewHttpInvoke_Override ¶ added in v2.138.0
func NewHttpInvoke_Override(h HttpInvoke, scope constructs.Construct, id *string, props *HttpInvokeProps)
func NewLambdaInvoke_Override ¶
func NewLambdaInvoke_Override(l LambdaInvoke, scope constructs.Construct, id *string, props *LambdaInvokeProps)
func NewMediaConvertCreateJob_Override ¶ added in v2.144.0
func NewMediaConvertCreateJob_Override(m MediaConvertCreateJob, scope constructs.Construct, id *string, props *MediaConvertCreateJobProps)
func NewReleaseLabel_Override ¶ added in v2.1.0
func NewReleaseLabel_Override(r ReleaseLabel, label *string)
Initializes the label string.
func NewS3Location_Override ¶
func NewS3Location_Override(s S3Location)
func NewSageMakerCreateEndpointConfig_Override ¶
func NewSageMakerCreateEndpointConfig_Override(s SageMakerCreateEndpointConfig, scope constructs.Construct, id *string, props *SageMakerCreateEndpointConfigProps)
func NewSageMakerCreateEndpoint_Override ¶
func NewSageMakerCreateEndpoint_Override(s SageMakerCreateEndpoint, scope constructs.Construct, id *string, props *SageMakerCreateEndpointProps)
func NewSageMakerCreateModel_Override ¶
func NewSageMakerCreateModel_Override(s SageMakerCreateModel, scope constructs.Construct, id *string, props *SageMakerCreateModelProps)
func NewSageMakerCreateTrainingJob_Override ¶
func NewSageMakerCreateTrainingJob_Override(s SageMakerCreateTrainingJob, scope constructs.Construct, id *string, props *SageMakerCreateTrainingJobProps)
func NewSageMakerCreateTransformJob_Override ¶
func NewSageMakerCreateTransformJob_Override(s SageMakerCreateTransformJob, scope constructs.Construct, id *string, props *SageMakerCreateTransformJobProps)
func NewSageMakerUpdateEndpoint_Override ¶
func NewSageMakerUpdateEndpoint_Override(s SageMakerUpdateEndpoint, scope constructs.Construct, id *string, props *SageMakerUpdateEndpointProps)
func NewSnsPublish_Override ¶
func NewSnsPublish_Override(s SnsPublish, scope constructs.Construct, id *string, props *SnsPublishProps)
func NewSqsSendMessage_Override ¶
func NewSqsSendMessage_Override(s SqsSendMessage, scope constructs.Construct, id *string, props *SqsSendMessageProps)
func NewStepFunctionsInvokeActivity_Override ¶
func NewStepFunctionsInvokeActivity_Override(s StepFunctionsInvokeActivity, scope constructs.Construct, id *string, props *StepFunctionsInvokeActivityProps)
func NewStepFunctionsStartExecution_Override ¶
func NewStepFunctionsStartExecution_Override(s StepFunctionsStartExecution, scope constructs.Construct, id *string, props *StepFunctionsStartExecutionProps)
func SageMakerCreateEndpointConfig_FilterNextables ¶
func SageMakerCreateEndpointConfig_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func SageMakerCreateEndpointConfig_FindReachableEndStates ¶
func SageMakerCreateEndpointConfig_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func SageMakerCreateEndpointConfig_FindReachableStates ¶
func SageMakerCreateEndpointConfig_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 SageMakerCreateEndpointConfig_IsConstruct ¶
func SageMakerCreateEndpointConfig_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 SageMakerCreateEndpointConfig_PrefixStates ¶
func SageMakerCreateEndpointConfig_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func SageMakerCreateEndpoint_FilterNextables ¶
func SageMakerCreateEndpoint_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func SageMakerCreateEndpoint_FindReachableEndStates ¶
func SageMakerCreateEndpoint_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func SageMakerCreateEndpoint_FindReachableStates ¶
func SageMakerCreateEndpoint_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 SageMakerCreateEndpoint_IsConstruct ¶
func SageMakerCreateEndpoint_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 SageMakerCreateEndpoint_PrefixStates ¶
func SageMakerCreateEndpoint_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func SageMakerCreateModel_FilterNextables ¶
func SageMakerCreateModel_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func SageMakerCreateModel_FindReachableEndStates ¶
func SageMakerCreateModel_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func SageMakerCreateModel_FindReachableStates ¶
func SageMakerCreateModel_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 SageMakerCreateModel_IsConstruct ¶
func SageMakerCreateModel_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 SageMakerCreateModel_PrefixStates ¶
func SageMakerCreateModel_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func SageMakerCreateTrainingJob_FilterNextables ¶
func SageMakerCreateTrainingJob_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func SageMakerCreateTrainingJob_FindReachableEndStates ¶
func SageMakerCreateTrainingJob_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func SageMakerCreateTrainingJob_FindReachableStates ¶
func SageMakerCreateTrainingJob_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 SageMakerCreateTrainingJob_IsConstruct ¶
func SageMakerCreateTrainingJob_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 SageMakerCreateTrainingJob_PrefixStates ¶
func SageMakerCreateTrainingJob_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func SageMakerCreateTransformJob_FilterNextables ¶
func SageMakerCreateTransformJob_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func SageMakerCreateTransformJob_FindReachableEndStates ¶
func SageMakerCreateTransformJob_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func SageMakerCreateTransformJob_FindReachableStates ¶
func SageMakerCreateTransformJob_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 SageMakerCreateTransformJob_IsConstruct ¶
func SageMakerCreateTransformJob_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 SageMakerCreateTransformJob_PrefixStates ¶
func SageMakerCreateTransformJob_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func SageMakerUpdateEndpoint_FilterNextables ¶
func SageMakerUpdateEndpoint_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func SageMakerUpdateEndpoint_FindReachableEndStates ¶
func SageMakerUpdateEndpoint_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func SageMakerUpdateEndpoint_FindReachableStates ¶
func SageMakerUpdateEndpoint_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 SageMakerUpdateEndpoint_IsConstruct ¶
func SageMakerUpdateEndpoint_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 SageMakerUpdateEndpoint_PrefixStates ¶
func SageMakerUpdateEndpoint_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func SnsPublish_FilterNextables ¶
func SnsPublish_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func SnsPublish_FindReachableEndStates ¶
func SnsPublish_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func SnsPublish_FindReachableStates ¶
func SnsPublish_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 SnsPublish_IsConstruct ¶
func SnsPublish_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 SnsPublish_PrefixStates ¶
func SnsPublish_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func SqsSendMessage_FilterNextables ¶
func SqsSendMessage_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func SqsSendMessage_FindReachableEndStates ¶
func SqsSendMessage_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func SqsSendMessage_FindReachableStates ¶
func SqsSendMessage_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 SqsSendMessage_IsConstruct ¶
func SqsSendMessage_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 SqsSendMessage_PrefixStates ¶
func SqsSendMessage_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func StepFunctionsInvokeActivity_FilterNextables ¶
func StepFunctionsInvokeActivity_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func StepFunctionsInvokeActivity_FindReachableEndStates ¶
func StepFunctionsInvokeActivity_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func StepFunctionsInvokeActivity_FindReachableStates ¶
func StepFunctionsInvokeActivity_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 StepFunctionsInvokeActivity_IsConstruct ¶
func StepFunctionsInvokeActivity_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 StepFunctionsInvokeActivity_PrefixStates ¶
func StepFunctionsInvokeActivity_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
func StepFunctionsStartExecution_FilterNextables ¶
func StepFunctionsStartExecution_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable
Return only the states that allow chaining from an array of states.
func StepFunctionsStartExecution_FindReachableEndStates ¶
func StepFunctionsStartExecution_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State
Find the set of end states states reachable through transitions from the given start state.
func StepFunctionsStartExecution_FindReachableStates ¶
func StepFunctionsStartExecution_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.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 StepFunctionsStartExecution_IsConstruct ¶
func StepFunctionsStartExecution_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 StepFunctionsStartExecution_PrefixStates ¶
func StepFunctionsStartExecution_PrefixStates(root constructs.IConstruct, prefix *string)
Add a prefix to the stateId of all States found in a construct tree.
Types ¶
type AcceleratorClass ¶
type AcceleratorClass interface { // - Elastic Inference accelerator generation. Version() *string }
The generation of Elastic Inference (EI) instance.
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" acceleratorClass := awscdk.Aws_stepfunctions_tasks.AcceleratorClass_Of(jsii.String("version"))
See: https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html
func AcceleratorClass_EIA1 ¶
func AcceleratorClass_EIA1() AcceleratorClass
func AcceleratorClass_EIA2 ¶
func AcceleratorClass_EIA2() AcceleratorClass
func AcceleratorClass_Of ¶
func AcceleratorClass_Of(version *string) AcceleratorClass
Custom AcceleratorType.
type AcceleratorType ¶
type AcceleratorType interface { // Return the accelerator type as a dotted string. ToString() *string }
The size of the Elastic Inference (EI) instance to use for the production variant.
EI instances provide on-demand GPU computing for inference.
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" acceleratorType := awscdk.Aws_stepfunctions_tasks.NewAcceleratorType(jsii.String("instanceTypeIdentifier"))
See: https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html
func AcceleratorType_Of ¶
func AcceleratorType_Of(acceleratorClass AcceleratorClass, instanceSize awsec2.InstanceSize) AcceleratorType
AcceleratorType.
This class takes a combination of a class and size.
func NewAcceleratorType ¶
func NewAcceleratorType(instanceTypeIdentifier *string) AcceleratorType
type ActionAfterCompletion ¶ added in v2.168.0
type ActionAfterCompletion string
The action that EventBridge Scheduler applies to the schedule after the schedule completes invoking the target.
Example:
import scheduler "github.com/aws/aws-cdk-go/awscdk" import kms "github.com/aws/aws-cdk-go/awscdk" var key key var scheduleGroup cfnScheduleGroup var targetQueue queue var deadLetterQueue queue schedulerRole := iam.NewRole(this, jsii.String("SchedulerRole"), &RoleProps{ AssumedBy: iam.NewServicePrincipal(jsii.String("scheduler.amazonaws.com")), }) // To send the message to the queue // This policy changes depending on the type of target. schedulerRole.AddToPrincipalPolicy(iam.NewPolicyStatement(&PolicyStatementProps{ Actions: []*string{ jsii.String("sqs:SendMessage"), }, Resources: []*string{ targetQueue.QueueArn, }, })) createScheduleTask1 := tasks.NewEventBridgeSchedulerCreateScheduleTask(this, jsii.String("createSchedule"), &EventBridgeSchedulerCreateScheduleTaskProps{ ScheduleName: jsii.String("TestSchedule"), ActionAfterCompletion: tasks.ActionAfterCompletion_NONE, ClientToken: jsii.String("testToken"), Description: jsii.String("TestDescription"), StartDate: NewDate(), EndDate: NewDate(NewDate().getTime() + 1000 * 60 * 60), FlexibleTimeWindow: awscdk.Duration_Minutes(jsii.Number(5)), GroupName: scheduleGroup.ref, KmsKey: key, Schedule: tasks.Schedule_Rate(awscdk.Duration_*Minutes(jsii.Number(5))), Timezone: jsii.String("UTC"), Enabled: jsii.Boolean(true), Target: tasks.NewEventBridgeSchedulerTarget(&EventBridgeSchedulerTargetProps{ Arn: targetQueue.*QueueArn, Role: schedulerRole, RetryPolicy: &RetryPolicy{ MaximumRetryAttempts: jsii.Number(2), MaximumEventAge: awscdk.Duration_*Minutes(jsii.Number(5)), }, DeadLetterQueue: *DeadLetterQueue, }), })
const ( // Takes no action. ActionAfterCompletion_NONE ActionAfterCompletion = "NONE" // Deletes the schedule. ActionAfterCompletion_DELETE ActionAfterCompletion = "DELETE" )
type ActionOnFailure ¶
type ActionOnFailure string
The action to take when the cluster step fails.
Example:
tasks.NewEmrAddStep(this, jsii.String("Task"), &EmrAddStepProps{ ClusterId: jsii.String("ClusterId"), Name: jsii.String("StepName"), Jar: jsii.String("Jar"), ActionOnFailure: tasks.ActionOnFailure_CONTINUE, })
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_StepConfig.html
Here, they are named as TERMINATE_JOB_FLOW, TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE respectively.
Default: CONTINUE.
const ( // Terminate the Cluster on Step Failure. ActionOnFailure_TERMINATE_CLUSTER ActionOnFailure = "TERMINATE_CLUSTER" // Cancel Step execution and enter WAITING state. ActionOnFailure_CANCEL_AND_WAIT ActionOnFailure = "CANCEL_AND_WAIT" // Continue to the next Step. ActionOnFailure_CONTINUE ActionOnFailure = "CONTINUE" )
type AlgorithmSpecification ¶
type AlgorithmSpecification struct { // Name of the algorithm resource to use for the training job. // // This must be an algorithm resource that you created or subscribe to on AWS Marketplace. // If you specify a value for this parameter, you can't specify a value for TrainingImage. // Default: - No algorithm is specified. // AlgorithmName *string `field:"optional" json:"algorithmName" yaml:"algorithmName"` // List of metric definition objects. // // Each object specifies the metric name and regular expressions used to parse algorithm logs. // Default: - No metrics. // MetricDefinitions *[]*MetricDefinition `field:"optional" json:"metricDefinitions" yaml:"metricDefinitions"` // Registry path of the Docker image that contains the training algorithm. // Default: - No Docker image is specified. // TrainingImage DockerImage `field:"optional" json:"trainingImage" yaml:"trainingImage"` // Input mode that the algorithm supports. // Default: 'File' mode. // TrainingInputMode InputMode `field:"optional" json:"trainingInputMode" yaml:"trainingInputMode"` }
Specify the training algorithm and algorithm-specific metadata.
Example:
tasks.NewSageMakerCreateTrainingJob(this, jsii.String("TrainSagemaker"), &SageMakerCreateTrainingJobProps{ TrainingJobName: sfn.JsonPath_StringAt(jsii.String("$.JobName")), AlgorithmSpecification: &AlgorithmSpecification{ AlgorithmName: jsii.String("BlazingText"), TrainingInputMode: tasks.InputMode_FILE, }, InputDataConfig: []channel{ &channel{ ChannelName: jsii.String("train"), DataSource: &DataSource{ S3DataSource: &S3DataSource{ S3DataType: tasks.S3DataType_S3_PREFIX, S3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.S3Bucket")), }, }, }, }, OutputDataConfig: &OutputDataConfig{ S3OutputLocation: tasks.S3Location_FromBucket(s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("amzn-s3-demo-bucket")), jsii.String("myoutputpath")), }, ResourceConfig: &ResourceConfig{ InstanceCount: jsii.Number(1), InstanceType: ec2.NewInstanceType(sfn.JsonPath_*StringAt(jsii.String("$.InstanceType"))), VolumeSize: awscdk.Size_Gibibytes(jsii.Number(50)), }, // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume StoppingCondition: &StoppingCondition{ MaxRuntime: awscdk.Duration_Hours(jsii.Number(2)), }, })
type ApplicationConfiguration ¶ added in v2.1.0
type ApplicationConfiguration struct { // The classification within a configuration. // // Length Constraints: Minimum length of 1. Maximum length of 1024. Classification Classification `field:"required" json:"classification" yaml:"classification"` // A list of additional configurations to apply within a configuration object. // // Array Members: Maximum number of 100 items. // Default: - No other configurations. // NestedConfig *[]*ApplicationConfiguration `field:"optional" json:"nestedConfig" yaml:"nestedConfig"` // A set of properties specified within a configuration classification. // // Map Entries: Maximum number of 100 items. // Default: - No properties. // Properties *map[string]*string `field:"optional" json:"properties" yaml:"properties"` }
A configuration specification to be used when provisioning virtual clusters, which can include configurations for applications and software bundled with Amazon EMR on EKS.
A configuration consists of a classification, properties, and optional nested configurations. A classification refers to an application-specific configuration file. Properties are the settings you want to change in that 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" var applicationConfiguration_ applicationConfiguration var classification classification applicationConfiguration := &applicationConfiguration{ Classification: classification, // the properties below are optional NestedConfig: []*applicationConfiguration{ applicationConfiguration_, }, Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, }
See: https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html
type AssembleWith ¶
type AssembleWith string
How to assemble the results of the transform job as a single S3 object.
const ( // Concatenate the results in binary format. AssembleWith_NONE AssembleWith = "NONE" // Add a newline character at the end of every transformed record. AssembleWith_LINE AssembleWith = "LINE" )
type AthenaGetQueryExecution ¶
type AthenaGetQueryExecution interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Get an Athena Query Execution as a Task.
Example:
getQueryExecutionJob := tasks.NewAthenaGetQueryExecution(this, jsii.String("Get Query Execution"), &AthenaGetQueryExecutionProps{ QueryExecutionId: sfn.JsonPath_StringAt(jsii.String("$.QueryExecutionId")), })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html
func AthenaGetQueryExecution_JsonPath ¶ added in v2.178.0
func AthenaGetQueryExecution_JsonPath(scope constructs.Construct, id *string, props *AthenaGetQueryExecutionJsonPathProps) AthenaGetQueryExecution
Get an Athena Query Execution as a Task that using JSONPath. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html
func AthenaGetQueryExecution_Jsonata ¶ added in v2.178.0
func AthenaGetQueryExecution_Jsonata(scope constructs.Construct, id *string, props *AthenaGetQueryExecutionJsonataProps) AthenaGetQueryExecution
Get an Athena Query Execution as a Task that using JSONata. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html
func NewAthenaGetQueryExecution ¶
func NewAthenaGetQueryExecution(scope constructs.Construct, id *string, props *AthenaGetQueryExecutionProps) AthenaGetQueryExecution
type AthenaGetQueryExecutionJsonPathProps ¶ added in v2.178.0
type AthenaGetQueryExecutionJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Query that will be retrieved. // // Example value: `adfsaf-23trf23-f23rt23`. QueryExecutionId *string `field:"required" json:"queryExecutionId" yaml:"queryExecutionId"` }
Properties for getting a Query Execution using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var taskRole taskRole var timeout timeout athenaGetQueryExecutionJsonPathProps := &AthenaGetQueryExecutionJsonPathProps{ QueryExecutionId: jsii.String("queryExecutionId"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type AthenaGetQueryExecutionJsonataProps ¶ added in v2.178.0
type AthenaGetQueryExecutionJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Query that will be retrieved. // // Example value: `adfsaf-23trf23-f23rt23`. QueryExecutionId *string `field:"required" json:"queryExecutionId" yaml:"queryExecutionId"` }
Properties for getting a Query Execution using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var taskRole taskRole var timeout timeout athenaGetQueryExecutionJsonataProps := &AthenaGetQueryExecutionJsonataProps{ QueryExecutionId: jsii.String("queryExecutionId"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type AthenaGetQueryExecutionProps ¶
type AthenaGetQueryExecutionProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Query that will be retrieved. // // Example value: `adfsaf-23trf23-f23rt23`. QueryExecutionId *string `field:"required" json:"queryExecutionId" yaml:"queryExecutionId"` }
Properties for getting a Query Execution.
Example:
getQueryExecutionJob := tasks.NewAthenaGetQueryExecution(this, jsii.String("Get Query Execution"), &AthenaGetQueryExecutionProps{ QueryExecutionId: sfn.JsonPath_StringAt(jsii.String("$.QueryExecutionId")), })
type AthenaGetQueryResults ¶
type AthenaGetQueryResults interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Get an Athena Query Results as a Task.
Example:
getQueryResultsJob := tasks.NewAthenaGetQueryResults(this, jsii.String("Get Query Results"), &AthenaGetQueryResultsProps{ QueryExecutionId: sfn.JsonPath_StringAt(jsii.String("$.QueryExecutionId")), })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html
func AthenaGetQueryResults_JsonPath ¶ added in v2.178.0
func AthenaGetQueryResults_JsonPath(scope constructs.Construct, id *string, props *AthenaGetQueryResultsJsonPathProps) AthenaGetQueryResults
Get an Athena Query Results as a Task that using JSONPath. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html
func AthenaGetQueryResults_Jsonata ¶ added in v2.178.0
func AthenaGetQueryResults_Jsonata(scope constructs.Construct, id *string, props *AthenaGetQueryResultsJsonataProps) AthenaGetQueryResults
Get an Athena Query Results as a Task that using JSONata. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html
func NewAthenaGetQueryResults ¶
func NewAthenaGetQueryResults(scope constructs.Construct, id *string, props *AthenaGetQueryResultsProps) AthenaGetQueryResults
type AthenaGetQueryResultsJsonPathProps ¶ added in v2.178.0
type AthenaGetQueryResultsJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Query that will be retrieved. // // Example value: `adfsaf-23trf23-f23rt23`. QueryExecutionId *string `field:"required" json:"queryExecutionId" yaml:"queryExecutionId"` // Max number of results. // Default: 1000. // MaxResults *float64 `field:"optional" json:"maxResults" yaml:"maxResults"` // Pagination token. // Default: - No next token. // NextToken *string `field:"optional" json:"nextToken" yaml:"nextToken"` }
Properties for getting a Query Results using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var taskRole taskRole var timeout timeout athenaGetQueryResultsJsonPathProps := &AthenaGetQueryResultsJsonPathProps{ QueryExecutionId: jsii.String("queryExecutionId"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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, MaxResults: jsii.Number(123), NextToken: jsii.String("nextToken"), OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type AthenaGetQueryResultsJsonataProps ¶ added in v2.178.0
type AthenaGetQueryResultsJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Query that will be retrieved. // // Example value: `adfsaf-23trf23-f23rt23`. QueryExecutionId *string `field:"required" json:"queryExecutionId" yaml:"queryExecutionId"` // Max number of results. // Default: 1000. // MaxResults *float64 `field:"optional" json:"maxResults" yaml:"maxResults"` // Pagination token. // Default: - No next token. // NextToken *string `field:"optional" json:"nextToken" yaml:"nextToken"` }
Properties for getting a Query Results using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var taskRole taskRole var timeout timeout athenaGetQueryResultsJsonataProps := &AthenaGetQueryResultsJsonataProps{ QueryExecutionId: jsii.String("queryExecutionId"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, MaxResults: jsii.Number(123), NextToken: jsii.String("nextToken"), Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type AthenaGetQueryResultsProps ¶
type AthenaGetQueryResultsProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Query that will be retrieved. // // Example value: `adfsaf-23trf23-f23rt23`. QueryExecutionId *string `field:"required" json:"queryExecutionId" yaml:"queryExecutionId"` // Max number of results. // Default: 1000. // MaxResults *float64 `field:"optional" json:"maxResults" yaml:"maxResults"` // Pagination token. // Default: - No next token. // NextToken *string `field:"optional" json:"nextToken" yaml:"nextToken"` }
Properties for getting a Query Results.
Example:
getQueryResultsJob := tasks.NewAthenaGetQueryResults(this, jsii.String("Get Query Results"), &AthenaGetQueryResultsProps{ QueryExecutionId: sfn.JsonPath_StringAt(jsii.String("$.QueryExecutionId")), })
type AthenaStartQueryExecution ¶
type AthenaStartQueryExecution interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Start an Athena Query as a Task.
Example:
startQueryExecutionJob := tasks.NewAthenaStartQueryExecution(this, jsii.String("Start Athena Query"), &AthenaStartQueryExecutionProps{ QueryString: sfn.JsonPath_StringAt(jsii.String("$.queryString")), QueryExecutionContext: &QueryExecutionContext{ DatabaseName: jsii.String("mydatabase"), }, ResultConfiguration: &ResultConfiguration{ EncryptionConfiguration: &EncryptionConfiguration{ EncryptionOption: tasks.EncryptionOption_S3_MANAGED, }, OutputLocation: &Location{ BucketName: jsii.String("amzn-s3-demo-bucket"), ObjectKey: jsii.String("folder"), }, }, ExecutionParameters: []*string{ jsii.String("param1"), jsii.String("param2"), }, })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html
func AthenaStartQueryExecution_JsonPath ¶ added in v2.178.0
func AthenaStartQueryExecution_JsonPath(scope constructs.Construct, id *string, props *AthenaStartQueryExecutionJsonPathProps) AthenaStartQueryExecution
Start an Athena Query as a Task using JSONPath.
func AthenaStartQueryExecution_Jsonata ¶ added in v2.178.0
func AthenaStartQueryExecution_Jsonata(scope constructs.Construct, id *string, props *AthenaStartQueryExecutionJsonataProps) AthenaStartQueryExecution
Start an Athena Query as a Task using JSONata.
func NewAthenaStartQueryExecution ¶
func NewAthenaStartQueryExecution(scope constructs.Construct, id *string, props *AthenaStartQueryExecutionProps) AthenaStartQueryExecution
type AthenaStartQueryExecutionJsonPathProps ¶ added in v2.178.0
type AthenaStartQueryExecutionJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Query that will be started. QueryString *string `field:"required" json:"queryString" yaml:"queryString"` // Unique string string to ensure idempotence. // Default: - No client request token. // ClientRequestToken *string `field:"optional" json:"clientRequestToken" yaml:"clientRequestToken"` // A list of values for the parameters in a query. // // The values are applied sequentially to the parameters in the query in the order // in which the parameters occur. // Default: - No parameters. // ExecutionParameters *[]*string `field:"optional" json:"executionParameters" yaml:"executionParameters"` // Database within which query executes. // Default: - No query execution context. // QueryExecutionContext *QueryExecutionContext `field:"optional" json:"queryExecutionContext" yaml:"queryExecutionContext"` // Configuration on how and where to save query. // Default: - No result configuration. // ResultConfiguration *ResultConfiguration `field:"optional" json:"resultConfiguration" yaml:"resultConfiguration"` // Specifies, in minutes, the maximum age of a previous query result that Athena should consider for reuse. // Default: - Query results are not reused. // ResultReuseConfigurationMaxAge awscdk.Duration `field:"optional" json:"resultReuseConfigurationMaxAge" yaml:"resultReuseConfigurationMaxAge"` // Configuration on how and where to save query. // Default: - No work group. // WorkGroup *string `field:"optional" json:"workGroup" yaml:"workGroup"` }
Properties for starting a Query Execution using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var key key var resultSelector interface{} var taskRole taskRole var timeout timeout athenaStartQueryExecutionJsonPathProps := &AthenaStartQueryExecutionJsonPathProps{ QueryString: jsii.String("queryString"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, ClientRequestToken: jsii.String("clientRequestToken"), Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, ExecutionParameters: []*string{ jsii.String("executionParameters"), }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), QueryExecutionContext: &QueryExecutionContext{ CatalogName: jsii.String("catalogName"), DatabaseName: jsii.String("databaseName"), }, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultConfiguration: &ResultConfiguration{ EncryptionConfiguration: &EncryptionConfiguration{ EncryptionOption: awscdk.Aws_stepfunctions_tasks.EncryptionOption_S3_MANAGED, // the properties below are optional EncryptionKey: key, }, OutputLocation: &Location{ BucketName: jsii.String("bucketName"), ObjectKey: jsii.String("objectKey"), // the properties below are optional ObjectVersion: jsii.String("objectVersion"), }, }, ResultPath: jsii.String("resultPath"), ResultReuseConfigurationMaxAge: cdk.Duration_*Minutes(jsii.Number(30)), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), WorkGroup: jsii.String("workGroup"), }
type AthenaStartQueryExecutionJsonataProps ¶ added in v2.178.0
type AthenaStartQueryExecutionJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Query that will be started. QueryString *string `field:"required" json:"queryString" yaml:"queryString"` // Unique string string to ensure idempotence. // Default: - No client request token. // ClientRequestToken *string `field:"optional" json:"clientRequestToken" yaml:"clientRequestToken"` // A list of values for the parameters in a query. // // The values are applied sequentially to the parameters in the query in the order // in which the parameters occur. // Default: - No parameters. // ExecutionParameters *[]*string `field:"optional" json:"executionParameters" yaml:"executionParameters"` // Database within which query executes. // Default: - No query execution context. // QueryExecutionContext *QueryExecutionContext `field:"optional" json:"queryExecutionContext" yaml:"queryExecutionContext"` // Configuration on how and where to save query. // Default: - No result configuration. // ResultConfiguration *ResultConfiguration `field:"optional" json:"resultConfiguration" yaml:"resultConfiguration"` // Specifies, in minutes, the maximum age of a previous query result that Athena should consider for reuse. // Default: - Query results are not reused. // ResultReuseConfigurationMaxAge awscdk.Duration `field:"optional" json:"resultReuseConfigurationMaxAge" yaml:"resultReuseConfigurationMaxAge"` // Configuration on how and where to save query. // Default: - No work group. // WorkGroup *string `field:"optional" json:"workGroup" yaml:"workGroup"` }
Properties for starting a Query Execution using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var key key var outputs interface{} var taskRole taskRole var timeout timeout athenaStartQueryExecutionJsonataProps := &AthenaStartQueryExecutionJsonataProps{ QueryString: jsii.String("queryString"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, ClientRequestToken: jsii.String("clientRequestToken"), Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, ExecutionParameters: []*string{ jsii.String("executionParameters"), }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryExecutionContext: &QueryExecutionContext{ CatalogName: jsii.String("catalogName"), DatabaseName: jsii.String("databaseName"), }, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultConfiguration: &ResultConfiguration{ EncryptionConfiguration: &EncryptionConfiguration{ EncryptionOption: awscdk.Aws_stepfunctions_tasks.EncryptionOption_S3_MANAGED, // the properties below are optional EncryptionKey: key, }, OutputLocation: &Location{ BucketName: jsii.String("bucketName"), ObjectKey: jsii.String("objectKey"), // the properties below are optional ObjectVersion: jsii.String("objectVersion"), }, }, ResultReuseConfigurationMaxAge: cdk.Duration_*Minutes(jsii.Number(30)), StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), WorkGroup: jsii.String("workGroup"), }
type AthenaStartQueryExecutionProps ¶
type AthenaStartQueryExecutionProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Query that will be started. QueryString *string `field:"required" json:"queryString" yaml:"queryString"` // Unique string string to ensure idempotence. // Default: - No client request token. // ClientRequestToken *string `field:"optional" json:"clientRequestToken" yaml:"clientRequestToken"` // A list of values for the parameters in a query. // // The values are applied sequentially to the parameters in the query in the order // in which the parameters occur. // Default: - No parameters. // ExecutionParameters *[]*string `field:"optional" json:"executionParameters" yaml:"executionParameters"` // Database within which query executes. // Default: - No query execution context. // QueryExecutionContext *QueryExecutionContext `field:"optional" json:"queryExecutionContext" yaml:"queryExecutionContext"` // Configuration on how and where to save query. // Default: - No result configuration. // ResultConfiguration *ResultConfiguration `field:"optional" json:"resultConfiguration" yaml:"resultConfiguration"` // Specifies, in minutes, the maximum age of a previous query result that Athena should consider for reuse. // Default: - Query results are not reused. // ResultReuseConfigurationMaxAge awscdk.Duration `field:"optional" json:"resultReuseConfigurationMaxAge" yaml:"resultReuseConfigurationMaxAge"` // Configuration on how and where to save query. // Default: - No work group. // WorkGroup *string `field:"optional" json:"workGroup" yaml:"workGroup"` }
Properties for starting a Query Execution.
Example:
startQueryExecutionJob := tasks.NewAthenaStartQueryExecution(this, jsii.String("Start Athena Query"), &AthenaStartQueryExecutionProps{ QueryString: sfn.JsonPath_StringAt(jsii.String("$.queryString")), QueryExecutionContext: &QueryExecutionContext{ DatabaseName: jsii.String("mydatabase"), }, ResultConfiguration: &ResultConfiguration{ EncryptionConfiguration: &EncryptionConfiguration{ EncryptionOption: tasks.EncryptionOption_S3_MANAGED, }, OutputLocation: &Location{ BucketName: jsii.String("amzn-s3-demo-bucket"), ObjectKey: jsii.String("folder"), }, }, ExecutionParameters: []*string{ jsii.String("param1"), jsii.String("param2"), }, })
type AthenaStopQueryExecution ¶
type AthenaStopQueryExecution interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Stop an Athena Query Execution as a Task.
Example:
stopQueryExecutionJob := tasks.NewAthenaStopQueryExecution(this, jsii.String("Stop Query Execution"), &AthenaStopQueryExecutionProps{ QueryExecutionId: sfn.JsonPath_StringAt(jsii.String("$.QueryExecutionId")), })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-athena.html
func AthenaStopQueryExecution_JsonPath ¶ added in v2.178.0
func AthenaStopQueryExecution_JsonPath(scope constructs.Construct, id *string, props *AthenaStopQueryExecutionJsonPathProps) AthenaStopQueryExecution
Stop an Athena Query Execution as a Task using JSONPath.
func AthenaStopQueryExecution_Jsonata ¶ added in v2.178.0
func AthenaStopQueryExecution_Jsonata(scope constructs.Construct, id *string, props *AthenaStopQueryExecutionJsonataProps) AthenaStopQueryExecution
Stop an Athena Query Execution as a Task using JSONata.
func NewAthenaStopQueryExecution ¶
func NewAthenaStopQueryExecution(scope constructs.Construct, id *string, props *AthenaStopQueryExecutionProps) AthenaStopQueryExecution
type AthenaStopQueryExecutionJsonPathProps ¶ added in v2.178.0
type AthenaStopQueryExecutionJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Query that will be stopped. QueryExecutionId *string `field:"required" json:"queryExecutionId" yaml:"queryExecutionId"` }
Properties for stopping a Query Execution using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var taskRole taskRole var timeout timeout athenaStopQueryExecutionJsonPathProps := &AthenaStopQueryExecutionJsonPathProps{ QueryExecutionId: jsii.String("queryExecutionId"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type AthenaStopQueryExecutionJsonataProps ¶ added in v2.178.0
type AthenaStopQueryExecutionJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Query that will be stopped. QueryExecutionId *string `field:"required" json:"queryExecutionId" yaml:"queryExecutionId"` }
Properties for stopping a Query Execution using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var taskRole taskRole var timeout timeout athenaStopQueryExecutionJsonataProps := &AthenaStopQueryExecutionJsonataProps{ QueryExecutionId: jsii.String("queryExecutionId"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type AthenaStopQueryExecutionProps ¶
type AthenaStopQueryExecutionProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Query that will be stopped. QueryExecutionId *string `field:"required" json:"queryExecutionId" yaml:"queryExecutionId"` }
Properties for stopping a Query Execution.
Example:
stopQueryExecutionJob := tasks.NewAthenaStopQueryExecution(this, jsii.String("Stop Query Execution"), &AthenaStopQueryExecutionProps{ QueryExecutionId: sfn.JsonPath_StringAt(jsii.String("$.QueryExecutionId")), })
type AuthType ¶
type AuthType string
The authentication method used to call the endpoint.
const ( // Call the API direclty with no authorization method. AuthType_NO_AUTH AuthType = "NO_AUTH" // Use the IAM role associated with the current state machine for authorization. AuthType_IAM_ROLE AuthType = "IAM_ROLE" // Use the resource policy of the API for authorization. AuthType_RESOURCE_POLICY AuthType = "RESOURCE_POLICY" )
type BatchContainerOverrides ¶
type BatchContainerOverrides struct { // The command to send to the container that overrides the default command from the Docker image or the job definition. // Default: - No command overrides. // Command *[]*string `field:"optional" json:"command" yaml:"command"` // The environment variables to send to the container. // // You can add new environment variables, which are added to the container // at launch, or you can override the existing environment variables from // the Docker image or the job definition. // Default: - No environment overrides. // Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // The number of physical GPUs to reserve for the container. // // The number of GPUs reserved for all containers in a job // should not exceed the number of available GPUs on the compute // resource that the job is launched on. // Default: - No GPU reservation. // GpuCount *float64 `field:"optional" json:"gpuCount" yaml:"gpuCount"` // The instance type to use for a multi-node parallel job. // // This parameter is not valid for single-node container jobs. // Default: - No instance type overrides. // InstanceType awsec2.InstanceType `field:"optional" json:"instanceType" yaml:"instanceType"` // Memory reserved for the job. // Default: - No memory overrides. The memory supplied in the job definition will be used. // Memory awscdk.Size `field:"optional" json:"memory" yaml:"memory"` // The number of vCPUs to reserve for the container. // // This value overrides the value set in the job definition. // Default: - No vCPUs overrides. // Vcpus *float64 `field:"optional" json:"vcpus" yaml:"vcpus"` }
The overrides that should be sent to a container.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var instanceType instanceType var size size batchContainerOverrides := &BatchContainerOverrides{ Command: []*string{ jsii.String("command"), }, Environment: map[string]*string{ "environmentKey": jsii.String("environment"), }, GpuCount: jsii.Number(123), InstanceType: instanceType, Memory: size, Vcpus: jsii.Number(123), }
type BatchJobDependency ¶
type BatchJobDependency struct { // The job ID of the AWS Batch job associated with this dependency. // Default: - No jobId. // JobId *string `field:"optional" json:"jobId" yaml:"jobId"` // The type of the job dependency. // Default: - No type. // Type *string `field:"optional" json:"type" yaml:"type"` }
An object representing an AWS Batch job dependency.
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" batchJobDependency := &BatchJobDependency{ JobId: jsii.String("jobId"), Type: jsii.String("type"), }
type BatchStrategy ¶
type BatchStrategy string
Specifies the number of records to include in a mini-batch for an HTTP inference request.
const ( // Fits multiple records in a mini-batch. BatchStrategy_MULTI_RECORD BatchStrategy = "MULTI_RECORD" // Use a single record when making an invocation request. BatchStrategy_SINGLE_RECORD BatchStrategy = "SINGLE_RECORD" )
type BatchSubmitJob ¶
type BatchSubmitJob interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Task to submits an AWS Batch job from a job definition.
Example:
import batch "github.com/aws/aws-cdk-go/awscdk" var batchJobDefinition ecsJobDefinition var batchQueue jobQueue task := tasks.NewBatchSubmitJob(this, jsii.String("Submit Job"), &BatchSubmitJobProps{ JobDefinitionArn: batchJobDefinition.JobDefinitionArn, JobName: jsii.String("MyJob"), JobQueueArn: batchQueue.JobQueueArn, })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-batch.html
func BatchSubmitJob_JsonPath ¶ added in v2.178.0
func BatchSubmitJob_JsonPath(scope constructs.Construct, id *string, props *BatchSubmitJobJsonPathProps) BatchSubmitJob
Task to submits an AWS Batch job from a job definition using JSONPath. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-batch.html
func BatchSubmitJob_Jsonata ¶ added in v2.178.0
func BatchSubmitJob_Jsonata(scope constructs.Construct, id *string, props *BatchSubmitJobJsonataProps) BatchSubmitJob
Task to submits an AWS Batch job from a job definition using JSONata. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-batch.html
func NewBatchSubmitJob ¶
func NewBatchSubmitJob(scope constructs.Construct, id *string, props *BatchSubmitJobProps) BatchSubmitJob
type BatchSubmitJobJsonPathProps ¶ added in v2.178.0
type BatchSubmitJobJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The arn of the job definition used by this job. JobDefinitionArn *string `field:"required" json:"jobDefinitionArn" yaml:"jobDefinitionArn"` // The name of the job. // // The first character must be alphanumeric, and up to 128 letters (uppercase and lowercase), // numbers, hyphens, and underscores are allowed. JobName *string `field:"required" json:"jobName" yaml:"jobName"` // The arn of the job queue into which the job is submitted. JobQueueArn *string `field:"required" json:"jobQueueArn" yaml:"jobQueueArn"` // The array size can be between 2 and 10,000. // // If you specify array properties for a job, it becomes an array job. // For more information, see Array Jobs in the AWS Batch User Guide. // Default: - No array size. // ArraySize *float64 `field:"optional" json:"arraySize" yaml:"arraySize"` // The number of times to move a job to the RUNNABLE status. // // You may specify between 1 and 10 attempts. // If the value of attempts is greater than one, // the job is retried on failure the same number of attempts as the value. // Default: 1. // Attempts *float64 `field:"optional" json:"attempts" yaml:"attempts"` // A list of container overrides in JSON format that specify the name of a container in the specified job definition and the overrides it should receive. // See: https://docs.aws.amazon.com/batch/latest/APIReference/API_SubmitJob.html#Batch-SubmitJob-request-containerOverrides // // Default: - No container overrides. // ContainerOverrides *BatchContainerOverrides `field:"optional" json:"containerOverrides" yaml:"containerOverrides"` // A list of dependencies for the job. // // A job can depend upon a maximum of 20 jobs. // See: https://docs.aws.amazon.com/batch/latest/APIReference/API_SubmitJob.html#Batch-SubmitJob-request-dependsOn // // Default: - No dependencies. // DependsOn *[]*BatchJobDependency `field:"optional" json:"dependsOn" yaml:"dependsOn"` // The payload to be passed as parameters to the batch job. // Default: - No parameters are passed. // Payload awsstepfunctions.TaskInput `field:"optional" json:"payload" yaml:"payload"` // The tags applied to the job request. // Default: {} - no tags. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` }
Properties for BatchSubmitJob using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var instanceType instanceType var resultSelector interface{} var size size var taskInput taskInput var taskRole taskRole var timeout timeout batchSubmitJobJsonPathProps := &BatchSubmitJobJsonPathProps{ JobDefinitionArn: jsii.String("jobDefinitionArn"), JobName: jsii.String("jobName"), JobQueueArn: jsii.String("jobQueueArn"), // the properties below are optional ArraySize: jsii.Number(123), Assign: map[string]interface{}{ "assignKey": assign, }, Attempts: jsii.Number(123), Comment: jsii.String("comment"), ContainerOverrides: &BatchContainerOverrides{ Command: []*string{ jsii.String("command"), }, Environment: map[string]*string{ "environmentKey": jsii.String("environment"), }, GpuCount: jsii.Number(123), InstanceType: instanceType, Memory: size, Vcpus: jsii.Number(123), }, Credentials: &Credentials{ Role: taskRole, }, DependsOn: []batchJobDependency{ &batchJobDependency{ JobId: jsii.String("jobId"), Type: jsii.String("type"), }, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), Payload: taskInput, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), Tags: map[string]*string{ "tagsKey": jsii.String("tags"), }, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type BatchSubmitJobJsonataProps ¶ added in v2.178.0
type BatchSubmitJobJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The arn of the job definition used by this job. JobDefinitionArn *string `field:"required" json:"jobDefinitionArn" yaml:"jobDefinitionArn"` // The name of the job. // // The first character must be alphanumeric, and up to 128 letters (uppercase and lowercase), // numbers, hyphens, and underscores are allowed. JobName *string `field:"required" json:"jobName" yaml:"jobName"` // The arn of the job queue into which the job is submitted. JobQueueArn *string `field:"required" json:"jobQueueArn" yaml:"jobQueueArn"` // The array size can be between 2 and 10,000. // // If you specify array properties for a job, it becomes an array job. // For more information, see Array Jobs in the AWS Batch User Guide. // Default: - No array size. // ArraySize *float64 `field:"optional" json:"arraySize" yaml:"arraySize"` // The number of times to move a job to the RUNNABLE status. // // You may specify between 1 and 10 attempts. // If the value of attempts is greater than one, // the job is retried on failure the same number of attempts as the value. // Default: 1. // Attempts *float64 `field:"optional" json:"attempts" yaml:"attempts"` // A list of container overrides in JSON format that specify the name of a container in the specified job definition and the overrides it should receive. // See: https://docs.aws.amazon.com/batch/latest/APIReference/API_SubmitJob.html#Batch-SubmitJob-request-containerOverrides // // Default: - No container overrides. // ContainerOverrides *BatchContainerOverrides `field:"optional" json:"containerOverrides" yaml:"containerOverrides"` // A list of dependencies for the job. // // A job can depend upon a maximum of 20 jobs. // See: https://docs.aws.amazon.com/batch/latest/APIReference/API_SubmitJob.html#Batch-SubmitJob-request-dependsOn // // Default: - No dependencies. // DependsOn *[]*BatchJobDependency `field:"optional" json:"dependsOn" yaml:"dependsOn"` // The payload to be passed as parameters to the batch job. // Default: - No parameters are passed. // Payload awsstepfunctions.TaskInput `field:"optional" json:"payload" yaml:"payload"` // The tags applied to the job request. // Default: {} - no tags. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` }
Properties for BatchSubmitJob using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var instanceType instanceType var outputs interface{} var size size var taskInput taskInput var taskRole taskRole var timeout timeout batchSubmitJobJsonataProps := &BatchSubmitJobJsonataProps{ JobDefinitionArn: jsii.String("jobDefinitionArn"), JobName: jsii.String("jobName"), JobQueueArn: jsii.String("jobQueueArn"), // the properties below are optional ArraySize: jsii.Number(123), Assign: map[string]interface{}{ "assignKey": assign, }, Attempts: jsii.Number(123), Comment: jsii.String("comment"), ContainerOverrides: &BatchContainerOverrides{ Command: []*string{ jsii.String("command"), }, Environment: map[string]*string{ "environmentKey": jsii.String("environment"), }, GpuCount: jsii.Number(123), InstanceType: instanceType, Memory: size, Vcpus: jsii.Number(123), }, Credentials: &Credentials{ Role: taskRole, }, DependsOn: []batchJobDependency{ &batchJobDependency{ JobId: jsii.String("jobId"), Type: jsii.String("type"), }, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, Payload: taskInput, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), Tags: map[string]*string{ "tagsKey": jsii.String("tags"), }, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type BatchSubmitJobProps ¶
type BatchSubmitJobProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The arn of the job definition used by this job. JobDefinitionArn *string `field:"required" json:"jobDefinitionArn" yaml:"jobDefinitionArn"` // The name of the job. // // The first character must be alphanumeric, and up to 128 letters (uppercase and lowercase), // numbers, hyphens, and underscores are allowed. JobName *string `field:"required" json:"jobName" yaml:"jobName"` // The arn of the job queue into which the job is submitted. JobQueueArn *string `field:"required" json:"jobQueueArn" yaml:"jobQueueArn"` // The array size can be between 2 and 10,000. // // If you specify array properties for a job, it becomes an array job. // For more information, see Array Jobs in the AWS Batch User Guide. // Default: - No array size. // ArraySize *float64 `field:"optional" json:"arraySize" yaml:"arraySize"` // The number of times to move a job to the RUNNABLE status. // // You may specify between 1 and 10 attempts. // If the value of attempts is greater than one, // the job is retried on failure the same number of attempts as the value. // Default: 1. // Attempts *float64 `field:"optional" json:"attempts" yaml:"attempts"` // A list of container overrides in JSON format that specify the name of a container in the specified job definition and the overrides it should receive. // See: https://docs.aws.amazon.com/batch/latest/APIReference/API_SubmitJob.html#Batch-SubmitJob-request-containerOverrides // // Default: - No container overrides. // ContainerOverrides *BatchContainerOverrides `field:"optional" json:"containerOverrides" yaml:"containerOverrides"` // A list of dependencies for the job. // // A job can depend upon a maximum of 20 jobs. // See: https://docs.aws.amazon.com/batch/latest/APIReference/API_SubmitJob.html#Batch-SubmitJob-request-dependsOn // // Default: - No dependencies. // DependsOn *[]*BatchJobDependency `field:"optional" json:"dependsOn" yaml:"dependsOn"` // The payload to be passed as parameters to the batch job. // Default: - No parameters are passed. // Payload awsstepfunctions.TaskInput `field:"optional" json:"payload" yaml:"payload"` // The tags applied to the job request. // Default: {} - no tags. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` }
Properties for BatchSubmitJob.
Example:
import batch "github.com/aws/aws-cdk-go/awscdk" var batchJobDefinition ecsJobDefinition var batchQueue jobQueue task := tasks.NewBatchSubmitJob(this, jsii.String("Submit Job"), &BatchSubmitJobProps{ JobDefinitionArn: batchJobDefinition.JobDefinitionArn, JobName: jsii.String("MyJob"), JobQueueArn: batchQueue.JobQueueArn, })
type BedrockInvokeModel ¶ added in v2.115.0
type BedrockInvokeModel interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to invoke a model in Bedrock.
Example:
import "github.com/aws/aws-cdk-go/awscdk" model := bedrock.FoundationModel_FromFoundationModelId(this, jsii.String("Model"), bedrock.FoundationModelIdentifier_AMAZON_TITAN_TEXT_G1_EXPRESS_V1()) task := tasks.NewBedrockInvokeModel(this, jsii.String("Prompt Model"), &BedrockInvokeModelProps{ Model: Model, Body: sfn.TaskInput_FromObject(map[string]interface{}{ "inputText": jsii.String("Generate a list of five first names."), "textGenerationConfig": map[string]*f64{ "maxTokenCount": jsii.Number(100), "temperature": jsii.Number(1), }, }), ResultSelector: map[string]interface{}{ "names": sfn.JsonPath_stringAt(jsii.String("$.Body.results[0].outputText")), }, })
func BedrockInvokeModel_JsonPath ¶ added in v2.178.0
func BedrockInvokeModel_JsonPath(scope constructs.Construct, id *string, props *BedrockInvokeModelJsonPathProps) BedrockInvokeModel
A Step Functions Task using JSONPath to invoke a model in Bedrock.
func BedrockInvokeModel_Jsonata ¶ added in v2.178.0
func BedrockInvokeModel_Jsonata(scope constructs.Construct, id *string, props *BedrockInvokeModelJsonataProps) BedrockInvokeModel
A Step Functions Task using JSONata to invoke a model in Bedrock.
func NewBedrockInvokeModel ¶ added in v2.115.0
func NewBedrockInvokeModel(scope constructs.Construct, id *string, props *BedrockInvokeModelProps) BedrockInvokeModel
type BedrockInvokeModelInputProps ¶ added in v2.115.0
type BedrockInvokeModelInputProps struct { // The source location where the API response is written. // // This field can be used to specify s3 URI in the form of token. // Default: - The API response body is returned in the result. // S3InputUri *string `field:"optional" json:"s3InputUri" yaml:"s3InputUri"` // S3 object to retrieve the input data from. // // If the S3 location is not set, then the Body must be set. // Default: - Input data is retrieved from the `body` field. // S3Location *awss3.Location `field:"optional" json:"s3Location" yaml:"s3Location"` }
Location to retrieve the input data, prior to calling Bedrock InvokeModel.
Example:
import "github.com/aws/aws-cdk-go/awscdk" model := bedrock.FoundationModel_FromFoundationModelId(this, jsii.String("Model"), bedrock.FoundationModelIdentifier_AMAZON_TITAN_TEXT_G1_EXPRESS_V1()) task := tasks.NewBedrockInvokeModel(this, jsii.String("Prompt Model"), &BedrockInvokeModelProps{ Model: Model, Input: &BedrockInvokeModelInputProps{ S3InputUri: sfn.JsonPath_StringAt(jsii.String("$.prompt")), }, Output: &BedrockInvokeModelOutputProps{ S3OutputUri: sfn.JsonPath_*StringAt(jsii.String("$.prompt")), }, })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-bedrock.html
type BedrockInvokeModelJsonPathProps ¶ added in v2.178.0
type BedrockInvokeModelJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The Bedrock model that the task will invoke. // See: https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html // Model awsbedrock.IModel `field:"required" json:"model" yaml:"model"` // The desired MIME type of the inference body in the response. // See: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html // // Default: 'application/json'. // Accept *string `field:"optional" json:"accept" yaml:"accept"` // The input data for the Bedrock model invocation. // // The inference parameters contained in the body depend on the Bedrock model being used. // // The body must be in the format specified in the `contentType` field. // For example, if the content type is `application/json`, the body must be // JSON formatted. // // The body must be up to 256 KB in size. For input data that exceeds 256 KB, // use `input` instead to retrieve the input data from S3. // // You must specify either the `body` or the `input` field, but not both. // See: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html // // Default: - Input data is retrieved from the location specified in the `input` field. // Body awsstepfunctions.TaskInput `field:"optional" json:"body" yaml:"body"` // The MIME type of the input data in the request. // See: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html // // Default: 'application/json'. // // Deprecated: This property does not require configuration because the only acceptable value is 'application/json'. ContentType *string `field:"optional" json:"contentType" yaml:"contentType"` // The guardrail is applied to the invocation. // Default: - No guardrail is applied to the invocation. // Guardrail Guardrail `field:"optional" json:"guardrail" yaml:"guardrail"` // The source location to retrieve the input data from. // Default: - Input data is retrieved from the `body` field. // Input *BedrockInvokeModelInputProps `field:"optional" json:"input" yaml:"input"` // The destination location where the API response is written. // // If you specify this field, the API response body is replaced with a reference to the // output location. // Default: - The API response body is returned in the result. // Output *BedrockInvokeModelOutputProps `field:"optional" json:"output" yaml:"output"` // Specifies whether to enable or disable the Bedrock trace. // Default: - Trace is not enabled for the invocation. // TraceEnabled *bool `field:"optional" json:"traceEnabled" yaml:"traceEnabled"` }
Properties for invoking a Bedrock Model.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var guardrail guardrail var model iModel var resultSelector interface{} var taskInput taskInput var taskRole taskRole var timeout timeout bedrockInvokeModelJsonPathProps := &BedrockInvokeModelJsonPathProps{ Model: model, // the properties below are optional Accept: jsii.String("accept"), Assign: map[string]interface{}{ "assignKey": assign, }, Body: taskInput, Comment: jsii.String("comment"), ContentType: jsii.String("contentType"), Credentials: &Credentials{ Role: taskRole, }, Guardrail: guardrail, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, Input: &BedrockInvokeModelInputProps{ S3InputUri: jsii.String("s3InputUri"), S3Location: &Location{ BucketName: jsii.String("bucketName"), ObjectKey: jsii.String("objectKey"), // the properties below are optional ObjectVersion: jsii.String("objectVersion"), }, }, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Output: &BedrockInvokeModelOutputProps{ S3Location: &Location{ BucketName: jsii.String("bucketName"), ObjectKey: jsii.String("objectKey"), // the properties below are optional ObjectVersion: jsii.String("objectVersion"), }, S3OutputUri: jsii.String("s3OutputUri"), }, OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), TraceEnabled: jsii.Boolean(false), }
type BedrockInvokeModelJsonataProps ¶ added in v2.178.0
type BedrockInvokeModelJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The Bedrock model that the task will invoke. // See: https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html // Model awsbedrock.IModel `field:"required" json:"model" yaml:"model"` // The desired MIME type of the inference body in the response. // See: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html // // Default: 'application/json'. // Accept *string `field:"optional" json:"accept" yaml:"accept"` // The input data for the Bedrock model invocation. // // The inference parameters contained in the body depend on the Bedrock model being used. // // The body must be in the format specified in the `contentType` field. // For example, if the content type is `application/json`, the body must be // JSON formatted. // // The body must be up to 256 KB in size. For input data that exceeds 256 KB, // use `input` instead to retrieve the input data from S3. // // You must specify either the `body` or the `input` field, but not both. // See: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html // // Default: - Input data is retrieved from the location specified in the `input` field. // Body awsstepfunctions.TaskInput `field:"optional" json:"body" yaml:"body"` // The MIME type of the input data in the request. // See: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html // // Default: 'application/json'. // // Deprecated: This property does not require configuration because the only acceptable value is 'application/json'. ContentType *string `field:"optional" json:"contentType" yaml:"contentType"` // The guardrail is applied to the invocation. // Default: - No guardrail is applied to the invocation. // Guardrail Guardrail `field:"optional" json:"guardrail" yaml:"guardrail"` // The source location to retrieve the input data from. // Default: - Input data is retrieved from the `body` field. // Input *BedrockInvokeModelInputProps `field:"optional" json:"input" yaml:"input"` // The destination location where the API response is written. // // If you specify this field, the API response body is replaced with a reference to the // output location. // Default: - The API response body is returned in the result. // Output *BedrockInvokeModelOutputProps `field:"optional" json:"output" yaml:"output"` // Specifies whether to enable or disable the Bedrock trace. // Default: - Trace is not enabled for the invocation. // TraceEnabled *bool `field:"optional" json:"traceEnabled" yaml:"traceEnabled"` }
Properties for invoking a Bedrock Model.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var guardrail guardrail var model iModel var outputs interface{} var taskInput taskInput var taskRole taskRole var timeout timeout bedrockInvokeModelJsonataProps := &BedrockInvokeModelJsonataProps{ Model: model, // the properties below are optional Accept: jsii.String("accept"), Assign: map[string]interface{}{ "assignKey": assign, }, Body: taskInput, Comment: jsii.String("comment"), ContentType: jsii.String("contentType"), Credentials: &Credentials{ Role: taskRole, }, Guardrail: guardrail, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, Input: &BedrockInvokeModelInputProps{ S3InputUri: jsii.String("s3InputUri"), S3Location: &Location{ BucketName: jsii.String("bucketName"), ObjectKey: jsii.String("objectKey"), // the properties below are optional ObjectVersion: jsii.String("objectVersion"), }, }, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Output: &BedrockInvokeModelOutputProps{ S3Location: &Location{ BucketName: jsii.String("bucketName"), ObjectKey: jsii.String("objectKey"), // the properties below are optional ObjectVersion: jsii.String("objectVersion"), }, S3OutputUri: jsii.String("s3OutputUri"), }, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), TraceEnabled: jsii.Boolean(false), }
type BedrockInvokeModelOutputProps ¶ added in v2.115.0
type BedrockInvokeModelOutputProps struct { // S3 object where the Bedrock InvokeModel API response is written. // // If you specify this field, the API response body is replaced with // a reference to the Amazon S3 location of the original output. // Default: - Response body is returned in the task result. // S3Location *awss3.Location `field:"optional" json:"s3Location" yaml:"s3Location"` // The destination location where the API response is written. // // This field can be used to specify s3 URI in the form of token. // Default: - The API response body is returned in the result. // S3OutputUri *string `field:"optional" json:"s3OutputUri" yaml:"s3OutputUri"` }
Location where the Bedrock InvokeModel API response is written.
Example:
import "github.com/aws/aws-cdk-go/awscdk" model := bedrock.FoundationModel_FromFoundationModelId(this, jsii.String("Model"), bedrock.FoundationModelIdentifier_AMAZON_TITAN_TEXT_G1_EXPRESS_V1()) task := tasks.NewBedrockInvokeModel(this, jsii.String("Prompt Model"), &BedrockInvokeModelProps{ Model: Model, Input: &BedrockInvokeModelInputProps{ S3InputUri: sfn.JsonPath_StringAt(jsii.String("$.prompt")), }, Output: &BedrockInvokeModelOutputProps{ S3OutputUri: sfn.JsonPath_*StringAt(jsii.String("$.prompt")), }, })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-bedrock.html
type BedrockInvokeModelProps ¶ added in v2.115.0
type BedrockInvokeModelProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The Bedrock model that the task will invoke. // See: https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html // Model awsbedrock.IModel `field:"required" json:"model" yaml:"model"` // The desired MIME type of the inference body in the response. // See: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html // // Default: 'application/json'. // Accept *string `field:"optional" json:"accept" yaml:"accept"` // The input data for the Bedrock model invocation. // // The inference parameters contained in the body depend on the Bedrock model being used. // // The body must be in the format specified in the `contentType` field. // For example, if the content type is `application/json`, the body must be // JSON formatted. // // The body must be up to 256 KB in size. For input data that exceeds 256 KB, // use `input` instead to retrieve the input data from S3. // // You must specify either the `body` or the `input` field, but not both. // See: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html // // Default: - Input data is retrieved from the location specified in the `input` field. // Body awsstepfunctions.TaskInput `field:"optional" json:"body" yaml:"body"` // The MIME type of the input data in the request. // See: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html // // Default: 'application/json'. // // Deprecated: This property does not require configuration because the only acceptable value is 'application/json'. ContentType *string `field:"optional" json:"contentType" yaml:"contentType"` // The guardrail is applied to the invocation. // Default: - No guardrail is applied to the invocation. // Guardrail Guardrail `field:"optional" json:"guardrail" yaml:"guardrail"` // The source location to retrieve the input data from. // Default: - Input data is retrieved from the `body` field. // Input *BedrockInvokeModelInputProps `field:"optional" json:"input" yaml:"input"` // The destination location where the API response is written. // // If you specify this field, the API response body is replaced with a reference to the // output location. // Default: - The API response body is returned in the result. // Output *BedrockInvokeModelOutputProps `field:"optional" json:"output" yaml:"output"` // Specifies whether to enable or disable the Bedrock trace. // Default: - Trace is not enabled for the invocation. // TraceEnabled *bool `field:"optional" json:"traceEnabled" yaml:"traceEnabled"` }
Properties for invoking a Bedrock Model.
Example:
import "github.com/aws/aws-cdk-go/awscdk" model := bedrock.FoundationModel_FromFoundationModelId(this, jsii.String("Model"), bedrock.FoundationModelIdentifier_AMAZON_TITAN_TEXT_G1_EXPRESS_V1()) task := tasks.NewBedrockInvokeModel(this, jsii.String("Prompt Model"), &BedrockInvokeModelProps{ Model: Model, Body: sfn.TaskInput_FromObject(map[string]interface{}{ "inputText": jsii.String("Generate a list of five first names."), "textGenerationConfig": map[string]*f64{ "maxTokenCount": jsii.Number(100), "temperature": jsii.Number(1), }, }), ResultSelector: map[string]interface{}{ "names": sfn.JsonPath_stringAt(jsii.String("$.Body.results[0].outputText")), }, })
type CallApiGatewayEndpointBaseOptions ¶ added in v2.178.0
type CallApiGatewayEndpointBaseOptions struct { // Http method for the API. Method HttpMethod `field:"required" json:"method" yaml:"method"` // Path parameters appended after API endpoint. // Default: - No path. // ApiPath *string `field:"optional" json:"apiPath" yaml:"apiPath"` // Authentication methods. // Default: AuthType.NO_AUTH // AuthType AuthType `field:"optional" json:"authType" yaml:"authType"` // HTTP request information that does not relate to contents of the request. // Default: - No headers. // Headers awsstepfunctions.TaskInput `field:"optional" json:"headers" yaml:"headers"` // Query strings attatched to end of request. // Default: - No query parameters. // QueryParameters awsstepfunctions.TaskInput `field:"optional" json:"queryParameters" yaml:"queryParameters"` // HTTP Request body. // Default: - No request body. // RequestBody awsstepfunctions.TaskInput `field:"optional" json:"requestBody" yaml:"requestBody"` }
Base CallApiGatewayEdnpoint Task Props.
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 taskInput taskInput callApiGatewayEndpointBaseOptions := &CallApiGatewayEndpointBaseOptions{ Method: awscdk.Aws_stepfunctions_tasks.HttpMethod_GET, // the properties below are optional ApiPath: jsii.String("apiPath"), AuthType: awscdk.*Aws_stepfunctions_tasks.AuthType_NO_AUTH, Headers: taskInput, QueryParameters: taskInput, RequestBody: taskInput, }
type CallApiGatewayEndpointBaseProps ¶
type CallApiGatewayEndpointBaseProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Http method for the API. Method HttpMethod `field:"required" json:"method" yaml:"method"` // Path parameters appended after API endpoint. // Default: - No path. // ApiPath *string `field:"optional" json:"apiPath" yaml:"apiPath"` // Authentication methods. // Default: AuthType.NO_AUTH // AuthType AuthType `field:"optional" json:"authType" yaml:"authType"` // HTTP request information that does not relate to contents of the request. // Default: - No headers. // Headers awsstepfunctions.TaskInput `field:"optional" json:"headers" yaml:"headers"` // Query strings attatched to end of request. // Default: - No query parameters. // QueryParameters awsstepfunctions.TaskInput `field:"optional" json:"queryParameters" yaml:"queryParameters"` // HTTP Request body. // Default: - No request body. // RequestBody awsstepfunctions.TaskInput `field:"optional" json:"requestBody" yaml:"requestBody"` }
Base CallApiGatewayEndpoint Task Props.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var resultSelector interface{} var taskInput taskInput var taskRole taskRole var timeout timeout callApiGatewayEndpointBaseProps := &CallApiGatewayEndpointBaseProps{ Method: awscdk.Aws_stepfunctions_tasks.HttpMethod_GET, // the properties below are optional ApiPath: jsii.String("apiPath"), Assign: map[string]interface{}{ "assignKey": assign, }, AuthType: awscdk.*Aws_stepfunctions_tasks.AuthType_NO_AUTH, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Headers: taskInput, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, QueryParameters: taskInput, RequestBody: taskInput, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type CallApiGatewayEndpointJsonPathBaseProps ¶ added in v2.178.0
type CallApiGatewayEndpointJsonPathBaseProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Http method for the API. Method HttpMethod `field:"required" json:"method" yaml:"method"` // Path parameters appended after API endpoint. // Default: - No path. // ApiPath *string `field:"optional" json:"apiPath" yaml:"apiPath"` // Authentication methods. // Default: AuthType.NO_AUTH // AuthType AuthType `field:"optional" json:"authType" yaml:"authType"` // HTTP request information that does not relate to contents of the request. // Default: - No headers. // Headers awsstepfunctions.TaskInput `field:"optional" json:"headers" yaml:"headers"` // Query strings attatched to end of request. // Default: - No query parameters. // QueryParameters awsstepfunctions.TaskInput `field:"optional" json:"queryParameters" yaml:"queryParameters"` // HTTP Request body. // Default: - No request body. // RequestBody awsstepfunctions.TaskInput `field:"optional" json:"requestBody" yaml:"requestBody"` }
Base CallApiGatewayEndpoint Task Props.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var taskInput taskInput var taskRole taskRole var timeout timeout callApiGatewayEndpointJsonPathBaseProps := &CallApiGatewayEndpointJsonPathBaseProps{ Method: awscdk.Aws_stepfunctions_tasks.HttpMethod_GET, // the properties below are optional ApiPath: jsii.String("apiPath"), Assign: map[string]interface{}{ "assignKey": assign, }, AuthType: awscdk.*Aws_stepfunctions_tasks.AuthType_NO_AUTH, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Headers: taskInput, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, QueryParameters: taskInput, RequestBody: taskInput, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type CallApiGatewayEndpointJsonataBaseProps ¶ added in v2.178.0
type CallApiGatewayEndpointJsonataBaseProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Http method for the API. Method HttpMethod `field:"required" json:"method" yaml:"method"` // Path parameters appended after API endpoint. // Default: - No path. // ApiPath *string `field:"optional" json:"apiPath" yaml:"apiPath"` // Authentication methods. // Default: AuthType.NO_AUTH // AuthType AuthType `field:"optional" json:"authType" yaml:"authType"` // HTTP request information that does not relate to contents of the request. // Default: - No headers. // Headers awsstepfunctions.TaskInput `field:"optional" json:"headers" yaml:"headers"` // Query strings attatched to end of request. // Default: - No query parameters. // QueryParameters awsstepfunctions.TaskInput `field:"optional" json:"queryParameters" yaml:"queryParameters"` // HTTP Request body. // Default: - No request body. // RequestBody awsstepfunctions.TaskInput `field:"optional" json:"requestBody" yaml:"requestBody"` }
Base CallApiGatewayEndpoint Task Props.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var taskInput taskInput var taskRole taskRole var timeout timeout callApiGatewayEndpointJsonataBaseProps := &CallApiGatewayEndpointJsonataBaseProps{ Method: awscdk.Aws_stepfunctions_tasks.HttpMethod_GET, // the properties below are optional ApiPath: jsii.String("apiPath"), Assign: map[string]interface{}{ "assignKey": assign, }, AuthType: awscdk.*Aws_stepfunctions_tasks.AuthType_NO_AUTH, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Headers: taskInput, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, QueryParameters: taskInput, RequestBody: taskInput, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type CallApiGatewayHttpApiEndpoint ¶
type CallApiGatewayHttpApiEndpoint interface { awsstepfunctions.TaskStateBase ApiEndpoint() *string Arguments() *map[string]interface{} ArnForExecuteApi() *string Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} StageName() *string // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) CreatePolicyStatements() *[]awsiam.PolicyStatement // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Call HTTP API endpoint as a Task.
Example:
import apigatewayv2 "github.com/aws/aws-cdk-go/awscdk" httpApi := apigatewayv2.NewHttpApi(this, jsii.String("MyHttpApi")) invokeTask := tasks.NewCallApiGatewayHttpApiEndpoint(this, jsii.String("Call HTTP API"), &CallApiGatewayHttpApiEndpointProps{ ApiId: httpApi.ApiId, ApiStack: awscdk.*stack_Of(httpApi), Method: tasks.HttpMethod_GET, })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
func CallApiGatewayHttpApiEndpoint_JsonPath ¶ added in v2.178.0
func CallApiGatewayHttpApiEndpoint_JsonPath(scope constructs.Construct, id *string, props *CallApiGatewayHttpApiEndpointJsonPathProps) CallApiGatewayHttpApiEndpoint
Call HTTP API endpoint as a Task using JSONPath. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
func CallApiGatewayHttpApiEndpoint_Jsonata ¶ added in v2.178.0
func CallApiGatewayHttpApiEndpoint_Jsonata(scope constructs.Construct, id *string, props *CallApiGatewayHttpApiEndpointJsonataProps) CallApiGatewayHttpApiEndpoint
Call HTTP API endpoint as a Task using JSONata. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
func NewCallApiGatewayHttpApiEndpoint ¶
func NewCallApiGatewayHttpApiEndpoint(scope constructs.Construct, id *string, props *CallApiGatewayHttpApiEndpointProps) CallApiGatewayHttpApiEndpoint
type CallApiGatewayHttpApiEndpointJsonPathProps ¶ added in v2.178.0
type CallApiGatewayHttpApiEndpointJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Http method for the API. Method HttpMethod `field:"required" json:"method" yaml:"method"` // Path parameters appended after API endpoint. // Default: - No path. // ApiPath *string `field:"optional" json:"apiPath" yaml:"apiPath"` // Authentication methods. // Default: AuthType.NO_AUTH // AuthType AuthType `field:"optional" json:"authType" yaml:"authType"` // HTTP request information that does not relate to contents of the request. // Default: - No headers. // Headers awsstepfunctions.TaskInput `field:"optional" json:"headers" yaml:"headers"` // Query strings attatched to end of request. // Default: - No query parameters. // QueryParameters awsstepfunctions.TaskInput `field:"optional" json:"queryParameters" yaml:"queryParameters"` // HTTP Request body. // Default: - No request body. // RequestBody awsstepfunctions.TaskInput `field:"optional" json:"requestBody" yaml:"requestBody"` // The Id of the API to call. ApiId *string `field:"required" json:"apiId" yaml:"apiId"` // The Stack in which the API is defined. ApiStack awscdk.Stack `field:"required" json:"apiStack" yaml:"apiStack"` // Name of the stage where the API is deployed to in API Gateway. // Default: '$default'. // StageName *string `field:"optional" json:"stageName" yaml:"stageName"` }
Properties for calling an HTTP API Endpoint using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var stack stack var taskInput taskInput var taskRole taskRole var timeout timeout callApiGatewayHttpApiEndpointJsonPathProps := &CallApiGatewayHttpApiEndpointJsonPathProps{ ApiId: jsii.String("apiId"), ApiStack: stack, Method: awscdk.Aws_stepfunctions_tasks.HttpMethod_GET, // the properties below are optional ApiPath: jsii.String("apiPath"), Assign: map[string]interface{}{ "assignKey": assign, }, AuthType: awscdk.*Aws_stepfunctions_tasks.AuthType_NO_AUTH, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Headers: taskInput, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, QueryParameters: taskInput, RequestBody: taskInput, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StageName: jsii.String("stageName"), StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type CallApiGatewayHttpApiEndpointJsonataProps ¶ added in v2.178.0
type CallApiGatewayHttpApiEndpointJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Http method for the API. Method HttpMethod `field:"required" json:"method" yaml:"method"` // Path parameters appended after API endpoint. // Default: - No path. // ApiPath *string `field:"optional" json:"apiPath" yaml:"apiPath"` // Authentication methods. // Default: AuthType.NO_AUTH // AuthType AuthType `field:"optional" json:"authType" yaml:"authType"` // HTTP request information that does not relate to contents of the request. // Default: - No headers. // Headers awsstepfunctions.TaskInput `field:"optional" json:"headers" yaml:"headers"` // Query strings attatched to end of request. // Default: - No query parameters. // QueryParameters awsstepfunctions.TaskInput `field:"optional" json:"queryParameters" yaml:"queryParameters"` // HTTP Request body. // Default: - No request body. // RequestBody awsstepfunctions.TaskInput `field:"optional" json:"requestBody" yaml:"requestBody"` // The Id of the API to call. ApiId *string `field:"required" json:"apiId" yaml:"apiId"` // The Stack in which the API is defined. ApiStack awscdk.Stack `field:"required" json:"apiStack" yaml:"apiStack"` // Name of the stage where the API is deployed to in API Gateway. // Default: '$default'. // StageName *string `field:"optional" json:"stageName" yaml:"stageName"` }
Properties for calling an HTTP API Endpoint using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var stack stack var taskInput taskInput var taskRole taskRole var timeout timeout callApiGatewayHttpApiEndpointJsonataProps := &CallApiGatewayHttpApiEndpointJsonataProps{ ApiId: jsii.String("apiId"), ApiStack: stack, Method: awscdk.Aws_stepfunctions_tasks.HttpMethod_GET, // the properties below are optional ApiPath: jsii.String("apiPath"), Assign: map[string]interface{}{ "assignKey": assign, }, AuthType: awscdk.*Aws_stepfunctions_tasks.AuthType_NO_AUTH, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Headers: taskInput, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, QueryParameters: taskInput, RequestBody: taskInput, StageName: jsii.String("stageName"), StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type CallApiGatewayHttpApiEndpointOptions ¶ added in v2.178.0
type CallApiGatewayHttpApiEndpointOptions struct { // The Id of the API to call. ApiId *string `field:"required" json:"apiId" yaml:"apiId"` // The Stack in which the API is defined. ApiStack awscdk.Stack `field:"required" json:"apiStack" yaml:"apiStack"` // Name of the stage where the API is deployed to in API Gateway. // Default: '$default'. // StageName *string `field:"optional" json:"stageName" yaml:"stageName"` }
Base properties for calling an HTTP API Endpoint.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var stack stack callApiGatewayHttpApiEndpointOptions := &CallApiGatewayHttpApiEndpointOptions{ ApiId: jsii.String("apiId"), ApiStack: stack, // the properties below are optional StageName: jsii.String("stageName"), }
type CallApiGatewayHttpApiEndpointProps ¶
type CallApiGatewayHttpApiEndpointProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Http method for the API. Method HttpMethod `field:"required" json:"method" yaml:"method"` // Path parameters appended after API endpoint. // Default: - No path. // ApiPath *string `field:"optional" json:"apiPath" yaml:"apiPath"` // Authentication methods. // Default: AuthType.NO_AUTH // AuthType AuthType `field:"optional" json:"authType" yaml:"authType"` // HTTP request information that does not relate to contents of the request. // Default: - No headers. // Headers awsstepfunctions.TaskInput `field:"optional" json:"headers" yaml:"headers"` // Query strings attatched to end of request. // Default: - No query parameters. // QueryParameters awsstepfunctions.TaskInput `field:"optional" json:"queryParameters" yaml:"queryParameters"` // HTTP Request body. // Default: - No request body. // RequestBody awsstepfunctions.TaskInput `field:"optional" json:"requestBody" yaml:"requestBody"` // The Id of the API to call. ApiId *string `field:"required" json:"apiId" yaml:"apiId"` // The Stack in which the API is defined. ApiStack awscdk.Stack `field:"required" json:"apiStack" yaml:"apiStack"` // Name of the stage where the API is deployed to in API Gateway. // Default: '$default'. // StageName *string `field:"optional" json:"stageName" yaml:"stageName"` }
Properties for calling an HTTP API Endpoint.
Example:
import apigatewayv2 "github.com/aws/aws-cdk-go/awscdk" httpApi := apigatewayv2.NewHttpApi(this, jsii.String("MyHttpApi")) invokeTask := tasks.NewCallApiGatewayHttpApiEndpoint(this, jsii.String("Call HTTP API"), &CallApiGatewayHttpApiEndpointProps{ ApiId: httpApi.ApiId, ApiStack: awscdk.*stack_Of(httpApi), Method: tasks.HttpMethod_GET, })
type CallApiGatewayRestApiEndpoint ¶
type CallApiGatewayRestApiEndpoint interface { awsstepfunctions.TaskStateBase ApiEndpoint() *string Arguments() *map[string]interface{} ArnForExecuteApi() *string Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} StageName() *string // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) CreatePolicyStatements() *[]awsiam.PolicyStatement // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Call REST API endpoint as a Task.
Be aware that the header values must be arrays. When passing the Task Token in the headers field `WAIT_FOR_TASK_TOKEN` integration, use `JsonPath.array()` to wrap the token in an array:
```ts import * as apigateway from 'aws-cdk-lib/aws-apigateway'; declare const api: apigateway.RestApi;
new tasks.CallApiGatewayRestApiEndpoint(this, 'Endpoint', { api, stageName: 'Stage', method: tasks.HttpMethod.PUT, integrationPattern: sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN, headers: sfn.TaskInput.fromObject({ TaskToken: sfn.JsonPath.array(sfn.JsonPath.taskToken), }), });
```.
Example:
import apigateway "github.com/aws/aws-cdk-go/awscdk" var api restApi tasks.CallApiGatewayRestApiEndpoint_Jsonata(this, jsii.String("Endpoint"), &CallApiGatewayRestApiEndpointJsonataProps{ Api: Api, StageName: jsii.String("Stage"), Method: tasks.HttpMethod_PUT, IntegrationPattern: sfn.IntegrationPattern_WAIT_FOR_TASK_TOKEN, Headers: sfn.TaskInput_FromObject(map[string]interface{}{ "TaskToken": jsii.String("{% States.Array($states.context.taskToken) %}"), }), })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
func CallApiGatewayRestApiEndpoint_JsonPath ¶ added in v2.178.0
func CallApiGatewayRestApiEndpoint_JsonPath(scope constructs.Construct, id *string, props *CallApiGatewayRestApiEndpointJsonPathProps) CallApiGatewayRestApiEndpoint
Call REST API endpoint as a Task using JSONPath.
Be aware that the header values must be arrays. When passing the Task Token in the headers field `WAIT_FOR_TASK_TOKEN` integration, use `JsonPath.array()` to wrap the token in an array:
```ts import * as apigateway from 'aws-cdk-lib/aws-apigateway'; declare const api: apigateway.RestApi;
tasks.CallApiGatewayRestApiEndpoint.jsonPath(this, 'Endpoint', { api, stageName: 'Stage', method: tasks.HttpMethod.PUT, integrationPattern: sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN, headers: sfn.TaskInput.fromObject({ TaskToken: sfn.JsonPath.array(sfn.JsonPath.taskToken), }), });
```. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
func CallApiGatewayRestApiEndpoint_Jsonata ¶ added in v2.178.0
func CallApiGatewayRestApiEndpoint_Jsonata(scope constructs.Construct, id *string, props *CallApiGatewayRestApiEndpointJsonataProps) CallApiGatewayRestApiEndpoint
Call REST API endpoint as a Task using JSONata.
Be aware that the header values must be arrays. When passing the Task Token in the headers field `WAIT_FOR_TASK_TOKEN` integration, use `JsonPath.array()` to wrap the token in an array:
```ts import * as apigateway from 'aws-cdk-lib/aws-apigateway'; declare const api: apigateway.RestApi;
tasks.CallApiGatewayRestApiEndpoint.jsonata(this, 'Endpoint', { api, stageName: 'Stage', method: tasks.HttpMethod.PUT, integrationPattern: sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN, headers: sfn.TaskInput.fromObject({ TaskToken: '{% States.Array($states.context.taskToken) %}', }), });
```. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html
func NewCallApiGatewayRestApiEndpoint ¶
func NewCallApiGatewayRestApiEndpoint(scope constructs.Construct, id *string, props *CallApiGatewayRestApiEndpointProps) CallApiGatewayRestApiEndpoint
type CallApiGatewayRestApiEndpointJsonPathProps ¶ added in v2.178.0
type CallApiGatewayRestApiEndpointJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Http method for the API. Method HttpMethod `field:"required" json:"method" yaml:"method"` // Path parameters appended after API endpoint. // Default: - No path. // ApiPath *string `field:"optional" json:"apiPath" yaml:"apiPath"` // Authentication methods. // Default: AuthType.NO_AUTH // AuthType AuthType `field:"optional" json:"authType" yaml:"authType"` // HTTP request information that does not relate to contents of the request. // Default: - No headers. // Headers awsstepfunctions.TaskInput `field:"optional" json:"headers" yaml:"headers"` // Query strings attatched to end of request. // Default: - No query parameters. // QueryParameters awsstepfunctions.TaskInput `field:"optional" json:"queryParameters" yaml:"queryParameters"` // HTTP Request body. // Default: - No request body. // RequestBody awsstepfunctions.TaskInput `field:"optional" json:"requestBody" yaml:"requestBody"` // API to call. Api awsapigateway.IRestApi `field:"required" json:"api" yaml:"api"` // Name of the stage where the API is deployed to in API Gateway. StageName *string `field:"required" json:"stageName" yaml:"stageName"` // Specify a custom Region where the API is deployed, e.g. 'us-east-1'. // Default: - Uses the Region of the stack containing the `api`. // Region *string `field:"optional" json:"region" yaml:"region"` }
Properties for calling an REST API Endpoint using JSONPath.
Example:
import apigateway "github.com/aws/aws-cdk-go/awscdk" var api restApi tasks.CallApiGatewayRestApiEndpoint_JsonPath(this, jsii.String("Endpoint"), &CallApiGatewayRestApiEndpointJsonPathProps{ Api: Api, StageName: jsii.String("Stage"), Method: tasks.HttpMethod_PUT, IntegrationPattern: sfn.IntegrationPattern_WAIT_FOR_TASK_TOKEN, Headers: sfn.TaskInput_FromObject(map[string]interface{}{ "TaskToken": sfn.JsonPath_array(sfn.JsonPath_taskToken()), }), })
type CallApiGatewayRestApiEndpointJsonataProps ¶ added in v2.178.0
type CallApiGatewayRestApiEndpointJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Http method for the API. Method HttpMethod `field:"required" json:"method" yaml:"method"` // Path parameters appended after API endpoint. // Default: - No path. // ApiPath *string `field:"optional" json:"apiPath" yaml:"apiPath"` // Authentication methods. // Default: AuthType.NO_AUTH // AuthType AuthType `field:"optional" json:"authType" yaml:"authType"` // HTTP request information that does not relate to contents of the request. // Default: - No headers. // Headers awsstepfunctions.TaskInput `field:"optional" json:"headers" yaml:"headers"` // Query strings attatched to end of request. // Default: - No query parameters. // QueryParameters awsstepfunctions.TaskInput `field:"optional" json:"queryParameters" yaml:"queryParameters"` // HTTP Request body. // Default: - No request body. // RequestBody awsstepfunctions.TaskInput `field:"optional" json:"requestBody" yaml:"requestBody"` // API to call. Api awsapigateway.IRestApi `field:"required" json:"api" yaml:"api"` // Name of the stage where the API is deployed to in API Gateway. StageName *string `field:"required" json:"stageName" yaml:"stageName"` // Specify a custom Region where the API is deployed, e.g. 'us-east-1'. // Default: - Uses the Region of the stack containing the `api`. // Region *string `field:"optional" json:"region" yaml:"region"` }
Properties for calling an REST API Endpoint using JSONata.
Example:
import apigateway "github.com/aws/aws-cdk-go/awscdk" var api restApi tasks.CallApiGatewayRestApiEndpoint_Jsonata(this, jsii.String("Endpoint"), &CallApiGatewayRestApiEndpointJsonataProps{ Api: Api, StageName: jsii.String("Stage"), Method: tasks.HttpMethod_PUT, IntegrationPattern: sfn.IntegrationPattern_WAIT_FOR_TASK_TOKEN, Headers: sfn.TaskInput_FromObject(map[string]interface{}{ "TaskToken": jsii.String("{% States.Array($states.context.taskToken) %}"), }), })
type CallApiGatewayRestApiEndpointOptions ¶ added in v2.178.0
type CallApiGatewayRestApiEndpointOptions struct { // API to call. Api awsapigateway.IRestApi `field:"required" json:"api" yaml:"api"` // Name of the stage where the API is deployed to in API Gateway. StageName *string `field:"required" json:"stageName" yaml:"stageName"` // Specify a custom Region where the API is deployed, e.g. 'us-east-1'. // Default: - Uses the Region of the stack containing the `api`. // Region *string `field:"optional" json:"region" yaml:"region"` }
Base properties for calling an REST API Endpoint.
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 restApi restApi callApiGatewayRestApiEndpointOptions := &CallApiGatewayRestApiEndpointOptions{ Api: restApi, StageName: jsii.String("stageName"), // the properties below are optional Region: jsii.String("region"), }
type CallApiGatewayRestApiEndpointProps ¶
type CallApiGatewayRestApiEndpointProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Http method for the API. Method HttpMethod `field:"required" json:"method" yaml:"method"` // Path parameters appended after API endpoint. // Default: - No path. // ApiPath *string `field:"optional" json:"apiPath" yaml:"apiPath"` // Authentication methods. // Default: AuthType.NO_AUTH // AuthType AuthType `field:"optional" json:"authType" yaml:"authType"` // HTTP request information that does not relate to contents of the request. // Default: - No headers. // Headers awsstepfunctions.TaskInput `field:"optional" json:"headers" yaml:"headers"` // Query strings attatched to end of request. // Default: - No query parameters. // QueryParameters awsstepfunctions.TaskInput `field:"optional" json:"queryParameters" yaml:"queryParameters"` // HTTP Request body. // Default: - No request body. // RequestBody awsstepfunctions.TaskInput `field:"optional" json:"requestBody" yaml:"requestBody"` // API to call. Api awsapigateway.IRestApi `field:"required" json:"api" yaml:"api"` // Name of the stage where the API is deployed to in API Gateway. StageName *string `field:"required" json:"stageName" yaml:"stageName"` // Specify a custom Region where the API is deployed, e.g. 'us-east-1'. // Default: - Uses the Region of the stack containing the `api`. // Region *string `field:"optional" json:"region" yaml:"region"` }
Properties for calling an REST API Endpoint.
Example:
import apigateway "github.com/aws/aws-cdk-go/awscdk" restApi := apigateway.NewRestApi(this, jsii.String("MyRestApi")) invokeTask := tasks.NewCallApiGatewayRestApiEndpoint(this, jsii.String("Call REST API"), &CallApiGatewayRestApiEndpointProps{ Api: restApi, StageName: jsii.String("prod"), Method: tasks.HttpMethod_GET, Region: jsii.String("us-west-2"), })
type CallAwsService ¶
type CallAwsService interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A StepFunctions task to call an AWS service API.
Example:
var myBucket bucket getObject := tasks.NewCallAwsService(this, jsii.String("GetObject"), &CallAwsServiceProps{ Service: jsii.String("s3"), Action: jsii.String("getObject"), Parameters: map[string]interface{}{ "Bucket": myBucket.bucketName, "Key": sfn.JsonPath_stringAt(jsii.String("$.key")), }, IamResources: []*string{ myBucket.ArnForObjects(jsii.String("*")), }, })
func CallAwsService_JsonPath ¶ added in v2.178.0
func CallAwsService_JsonPath(scope constructs.Construct, id *string, props *CallAwsServiceJsonPathProps) CallAwsService
A StepFunctions task using JSONPath to call an AWS service API.
func CallAwsService_Jsonata ¶ added in v2.178.0
func CallAwsService_Jsonata(scope constructs.Construct, id *string, props *CallAwsServiceJsonataProps) CallAwsService
A StepFunctions task using JSONata to call an AWS service API.
func NewCallAwsService ¶
func NewCallAwsService(scope constructs.Construct, id *string, props *CallAwsServiceProps) CallAwsService
type CallAwsServiceCrossRegion ¶ added in v2.148.0
type CallAwsServiceCrossRegion interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) LambdaFunction() awslambda.IFunction // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions task to call an AWS service API across regions.
This task creates a Lambda function to call cross-region AWS API and invokes it.
Example:
var myBucket bucket getObject := tasks.NewCallAwsServiceCrossRegion(this, jsii.String("GetObject"), &CallAwsServiceCrossRegionProps{ Region: jsii.String("ap-northeast-1"), Service: jsii.String("s3"), Action: jsii.String("getObject"), Parameters: map[string]interface{}{ "Bucket": myBucket.bucketName, "Key": sfn.JsonPath_stringAt(jsii.String("$.key")), }, IamResources: []*string{ myBucket.ArnForObjects(jsii.String("*")), }, })
func CallAwsServiceCrossRegion_JsonPath ¶ added in v2.178.0
func CallAwsServiceCrossRegion_JsonPath(scope constructs.Construct, id *string, props *CallAwsServiceCrossRegionJsonPathProps) CallAwsServiceCrossRegion
A Step Functions task using JSONPath to call an AWS service API across regions.
This task creates a Lambda function to call cross-region AWS API and invokes it.
func CallAwsServiceCrossRegion_Jsonata ¶ added in v2.178.0
func CallAwsServiceCrossRegion_Jsonata(scope constructs.Construct, id *string, props *CallAwsServiceCrossRegionJsonataProps) CallAwsServiceCrossRegion
A Step Functions task using JSONata to call an AWS service API across regions.
This task creates a Lambda function to call cross-region AWS API and invokes it.
func NewCallAwsServiceCrossRegion ¶ added in v2.148.0
func NewCallAwsServiceCrossRegion(scope constructs.Construct, id *string, props *CallAwsServiceCrossRegionProps) CallAwsServiceCrossRegion
type CallAwsServiceCrossRegionJsonPathProps ¶ added in v2.178.0
type CallAwsServiceCrossRegionJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The API action to call. // // Use camelCase. Action *string `field:"required" json:"action" yaml:"action"` // The resources for the IAM statement that will be added to the Lambda function role's policy to allow the state machine to make the API call. IamResources *[]*string `field:"required" json:"iamResources" yaml:"iamResources"` // The AWS region to call this AWS API for. // // Example: // "us-east-1" // Region *string `field:"required" json:"region" yaml:"region"` // The AWS service to call in AWS SDK for JavaScript v3 format. // // Example: // "s3" // // See: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/ // Service *string `field:"required" json:"service" yaml:"service"` // Additional IAM statements that will be added to the state machine role's policy. // // Use in the case where the call requires more than a single statement to // be executed, e.g. `rekognition:detectLabels` requires also S3 permissions // to read the object on which it must act. // Default: - no additional statements are added. // AdditionalIamStatements *[]awsiam.PolicyStatement `field:"optional" json:"additionalIamStatements" yaml:"additionalIamStatements"` // The AWS API endpoint. // Default: Do not override API endpoint. // Endpoint *string `field:"optional" json:"endpoint" yaml:"endpoint"` // The action for the IAM statement that will be added to the Lambda function role's policy to allow the state machine to make the API call. // // By default the action for this IAM statement will be `service:action`. // // Use in the case where the IAM action name does not match with the // API service/action name, e.g. `s3:ListBuckets` requires `s3:ListAllMyBuckets`. // Default: - service:action. // IamAction *string `field:"optional" json:"iamAction" yaml:"iamAction"` // Parameters for the API action call in AWS SDK for JavaScript v3 format. // Default: - no parameters. // Parameters *map[string]interface{} `field:"optional" json:"parameters" yaml:"parameters"` // Whether to retry on the backend Lambda service exceptions. // // This handles `Lambda.ServiceException`, `Lambda.AWSLambdaException`, // `Lambda.SdkClientException`, and `Lambda.ClientExecutionTimeoutException` // with an interval of 2 seconds, a back-off rate // of 2 and 6 maximum attempts. // See: https://docs.aws.amazon.com/step-functions/latest/dg/bp-lambda-serviceexception.html // // Default: true. // RetryOnServiceExceptions *bool `field:"optional" json:"retryOnServiceExceptions" yaml:"retryOnServiceExceptions"` }
Properties for calling an AWS service's API action using JSONPath from your state machine across regions.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var parameters interface{} var policyStatement policyStatement var resultSelector interface{} var taskRole taskRole var timeout timeout callAwsServiceCrossRegionJsonPathProps := &CallAwsServiceCrossRegionJsonPathProps{ Action: jsii.String("action"), IamResources: []*string{ jsii.String("iamResources"), }, Region: jsii.String("region"), Service: jsii.String("service"), // the properties below are optional AdditionalIamStatements: []*policyStatement{ policyStatement, }, Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Endpoint: jsii.String("endpoint"), Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IamAction: jsii.String("iamAction"), InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), Parameters: map[string]interface{}{ "parametersKey": parameters, }, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, RetryOnServiceExceptions: jsii.Boolean(false), StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type CallAwsServiceCrossRegionJsonataProps ¶ added in v2.178.0
type CallAwsServiceCrossRegionJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The API action to call. // // Use camelCase. Action *string `field:"required" json:"action" yaml:"action"` // The resources for the IAM statement that will be added to the Lambda function role's policy to allow the state machine to make the API call. IamResources *[]*string `field:"required" json:"iamResources" yaml:"iamResources"` // The AWS region to call this AWS API for. // // Example: // "us-east-1" // Region *string `field:"required" json:"region" yaml:"region"` // The AWS service to call in AWS SDK for JavaScript v3 format. // // Example: // "s3" // // See: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/ // Service *string `field:"required" json:"service" yaml:"service"` // Additional IAM statements that will be added to the state machine role's policy. // // Use in the case where the call requires more than a single statement to // be executed, e.g. `rekognition:detectLabels` requires also S3 permissions // to read the object on which it must act. // Default: - no additional statements are added. // AdditionalIamStatements *[]awsiam.PolicyStatement `field:"optional" json:"additionalIamStatements" yaml:"additionalIamStatements"` // The AWS API endpoint. // Default: Do not override API endpoint. // Endpoint *string `field:"optional" json:"endpoint" yaml:"endpoint"` // The action for the IAM statement that will be added to the Lambda function role's policy to allow the state machine to make the API call. // // By default the action for this IAM statement will be `service:action`. // // Use in the case where the IAM action name does not match with the // API service/action name, e.g. `s3:ListBuckets` requires `s3:ListAllMyBuckets`. // Default: - service:action. // IamAction *string `field:"optional" json:"iamAction" yaml:"iamAction"` // Parameters for the API action call in AWS SDK for JavaScript v3 format. // Default: - no parameters. // Parameters *map[string]interface{} `field:"optional" json:"parameters" yaml:"parameters"` // Whether to retry on the backend Lambda service exceptions. // // This handles `Lambda.ServiceException`, `Lambda.AWSLambdaException`, // `Lambda.SdkClientException`, and `Lambda.ClientExecutionTimeoutException` // with an interval of 2 seconds, a back-off rate // of 2 and 6 maximum attempts. // See: https://docs.aws.amazon.com/step-functions/latest/dg/bp-lambda-serviceexception.html // // Default: true. // RetryOnServiceExceptions *bool `field:"optional" json:"retryOnServiceExceptions" yaml:"retryOnServiceExceptions"` }
Properties for calling an AWS service's API action using JSONata from your state machine across regions.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var parameters interface{} var policyStatement policyStatement var taskRole taskRole var timeout timeout callAwsServiceCrossRegionJsonataProps := &CallAwsServiceCrossRegionJsonataProps{ Action: jsii.String("action"), IamResources: []*string{ jsii.String("iamResources"), }, Region: jsii.String("region"), Service: jsii.String("service"), // the properties below are optional AdditionalIamStatements: []*policyStatement{ policyStatement, }, Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Endpoint: jsii.String("endpoint"), Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IamAction: jsii.String("iamAction"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, Parameters: map[string]interface{}{ "parametersKey": parameters, }, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, RetryOnServiceExceptions: jsii.Boolean(false), StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type CallAwsServiceCrossRegionProps ¶ added in v2.148.0
type CallAwsServiceCrossRegionProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The API action to call. // // Use camelCase. Action *string `field:"required" json:"action" yaml:"action"` // The resources for the IAM statement that will be added to the Lambda function role's policy to allow the state machine to make the API call. IamResources *[]*string `field:"required" json:"iamResources" yaml:"iamResources"` // The AWS region to call this AWS API for. // // Example: // "us-east-1" // Region *string `field:"required" json:"region" yaml:"region"` // The AWS service to call in AWS SDK for JavaScript v3 format. // // Example: // "s3" // // See: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/ // Service *string `field:"required" json:"service" yaml:"service"` // Additional IAM statements that will be added to the state machine role's policy. // // Use in the case where the call requires more than a single statement to // be executed, e.g. `rekognition:detectLabels` requires also S3 permissions // to read the object on which it must act. // Default: - no additional statements are added. // AdditionalIamStatements *[]awsiam.PolicyStatement `field:"optional" json:"additionalIamStatements" yaml:"additionalIamStatements"` // The AWS API endpoint. // Default: Do not override API endpoint. // Endpoint *string `field:"optional" json:"endpoint" yaml:"endpoint"` // The action for the IAM statement that will be added to the Lambda function role's policy to allow the state machine to make the API call. // // By default the action for this IAM statement will be `service:action`. // // Use in the case where the IAM action name does not match with the // API service/action name, e.g. `s3:ListBuckets` requires `s3:ListAllMyBuckets`. // Default: - service:action. // IamAction *string `field:"optional" json:"iamAction" yaml:"iamAction"` // Parameters for the API action call in AWS SDK for JavaScript v3 format. // Default: - no parameters. // Parameters *map[string]interface{} `field:"optional" json:"parameters" yaml:"parameters"` // Whether to retry on the backend Lambda service exceptions. // // This handles `Lambda.ServiceException`, `Lambda.AWSLambdaException`, // `Lambda.SdkClientException`, and `Lambda.ClientExecutionTimeoutException` // with an interval of 2 seconds, a back-off rate // of 2 and 6 maximum attempts. // See: https://docs.aws.amazon.com/step-functions/latest/dg/bp-lambda-serviceexception.html // // Default: true. // RetryOnServiceExceptions *bool `field:"optional" json:"retryOnServiceExceptions" yaml:"retryOnServiceExceptions"` }
Properties for calling an AWS service's API action from your state machine across regions.
Example:
var myBucket bucket getObject := tasks.NewCallAwsServiceCrossRegion(this, jsii.String("GetObject"), &CallAwsServiceCrossRegionProps{ Region: jsii.String("ap-northeast-1"), Service: jsii.String("s3"), Action: jsii.String("getObject"), Parameters: map[string]interface{}{ "Bucket": myBucket.bucketName, "Key": sfn.JsonPath_stringAt(jsii.String("$.key")), }, IamResources: []*string{ myBucket.ArnForObjects(jsii.String("*")), }, })
type CallAwsServiceJsonPathProps ¶ added in v2.178.0
type CallAwsServiceJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The API action to call. // // Use camelCase. Action *string `field:"required" json:"action" yaml:"action"` // The resources for the IAM statement that will be added to the state machine role's policy to allow the state machine to make the API call. // // By default the action for this IAM statement will be `service:action`. IamResources *[]*string `field:"required" json:"iamResources" yaml:"iamResources"` // The AWS service to call. // See: https://docs.aws.amazon.com/step-functions/latest/dg/supported-services-awssdk.html // Service *string `field:"required" json:"service" yaml:"service"` // Additional IAM statements that will be added to the state machine role's policy. // // Use in the case where the call requires more than a single statement to // be executed, e.g. `rekognition:detectLabels` requires also S3 permissions // to read the object on which it must act. // Default: - no additional statements are added. // AdditionalIamStatements *[]awsiam.PolicyStatement `field:"optional" json:"additionalIamStatements" yaml:"additionalIamStatements"` // The action for the IAM statement that will be added to the state machine role's policy to allow the state machine to make the API call. // // Use in the case where the IAM action name does not match with the // API service/action name, e.g. `s3:ListBuckets` requires `s3:ListAllMyBuckets`. // Default: - service:action. // IamAction *string `field:"optional" json:"iamAction" yaml:"iamAction"` // Parameters for the API action call. // // Use PascalCase for the parameter names. // Default: - no parameters. // Parameters *map[string]interface{} `field:"optional" json:"parameters" yaml:"parameters"` }
Properties for calling an AWS service's API action using JSONPath from your 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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var parameters interface{} var policyStatement policyStatement var resultSelector interface{} var taskRole taskRole var timeout timeout callAwsServiceJsonPathProps := &CallAwsServiceJsonPathProps{ Action: jsii.String("action"), IamResources: []*string{ jsii.String("iamResources"), }, Service: jsii.String("service"), // the properties below are optional AdditionalIamStatements: []*policyStatement{ policyStatement, }, Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IamAction: jsii.String("iamAction"), InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), Parameters: map[string]interface{}{ "parametersKey": parameters, }, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
See: https://docs.aws.amazon.com/step-functions/latest/dg/supported-services-awssdk.html
type CallAwsServiceJsonataProps ¶ added in v2.178.0
type CallAwsServiceJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The API action to call. // // Use camelCase. Action *string `field:"required" json:"action" yaml:"action"` // The resources for the IAM statement that will be added to the state machine role's policy to allow the state machine to make the API call. // // By default the action for this IAM statement will be `service:action`. IamResources *[]*string `field:"required" json:"iamResources" yaml:"iamResources"` // The AWS service to call. // See: https://docs.aws.amazon.com/step-functions/latest/dg/supported-services-awssdk.html // Service *string `field:"required" json:"service" yaml:"service"` // Additional IAM statements that will be added to the state machine role's policy. // // Use in the case where the call requires more than a single statement to // be executed, e.g. `rekognition:detectLabels` requires also S3 permissions // to read the object on which it must act. // Default: - no additional statements are added. // AdditionalIamStatements *[]awsiam.PolicyStatement `field:"optional" json:"additionalIamStatements" yaml:"additionalIamStatements"` // The action for the IAM statement that will be added to the state machine role's policy to allow the state machine to make the API call. // // Use in the case where the IAM action name does not match with the // API service/action name, e.g. `s3:ListBuckets` requires `s3:ListAllMyBuckets`. // Default: - service:action. // IamAction *string `field:"optional" json:"iamAction" yaml:"iamAction"` // Parameters for the API action call. // // Use PascalCase for the parameter names. // Default: - no parameters. // Parameters *map[string]interface{} `field:"optional" json:"parameters" yaml:"parameters"` }
Properties for calling an AWS service's API action using JSONata from your 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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var parameters interface{} var policyStatement policyStatement var taskRole taskRole var timeout timeout callAwsServiceJsonataProps := &CallAwsServiceJsonataProps{ Action: jsii.String("action"), IamResources: []*string{ jsii.String("iamResources"), }, Service: jsii.String("service"), // the properties below are optional AdditionalIamStatements: []*policyStatement{ policyStatement, }, Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IamAction: jsii.String("iamAction"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, Parameters: map[string]interface{}{ "parametersKey": parameters, }, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
See: https://docs.aws.amazon.com/step-functions/latest/dg/supported-services-awssdk.html
type CallAwsServiceProps ¶
type CallAwsServiceProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The API action to call. // // Use camelCase. Action *string `field:"required" json:"action" yaml:"action"` // The resources for the IAM statement that will be added to the state machine role's policy to allow the state machine to make the API call. // // By default the action for this IAM statement will be `service:action`. IamResources *[]*string `field:"required" json:"iamResources" yaml:"iamResources"` // The AWS service to call. // See: https://docs.aws.amazon.com/step-functions/latest/dg/supported-services-awssdk.html // Service *string `field:"required" json:"service" yaml:"service"` // Additional IAM statements that will be added to the state machine role's policy. // // Use in the case where the call requires more than a single statement to // be executed, e.g. `rekognition:detectLabels` requires also S3 permissions // to read the object on which it must act. // Default: - no additional statements are added. // AdditionalIamStatements *[]awsiam.PolicyStatement `field:"optional" json:"additionalIamStatements" yaml:"additionalIamStatements"` // The action for the IAM statement that will be added to the state machine role's policy to allow the state machine to make the API call. // // Use in the case where the IAM action name does not match with the // API service/action name, e.g. `s3:ListBuckets` requires `s3:ListAllMyBuckets`. // Default: - service:action. // IamAction *string `field:"optional" json:"iamAction" yaml:"iamAction"` // Parameters for the API action call. // // Use PascalCase for the parameter names. // Default: - no parameters. // Parameters *map[string]interface{} `field:"optional" json:"parameters" yaml:"parameters"` }
Properties for calling an AWS service's API action from your state machine.
Example:
var myBucket bucket getObject := tasks.NewCallAwsService(this, jsii.String("GetObject"), &CallAwsServiceProps{ Service: jsii.String("s3"), Action: jsii.String("getObject"), Parameters: map[string]interface{}{ "Bucket": myBucket.bucketName, "Key": sfn.JsonPath_stringAt(jsii.String("$.key")), }, IamResources: []*string{ myBucket.ArnForObjects(jsii.String("*")), }, })
See: https://docs.aws.amazon.com/step-functions/latest/dg/supported-services-awssdk.html
type Channel ¶
type Channel struct { // Name of the channel. ChannelName *string `field:"required" json:"channelName" yaml:"channelName"` // Location of the channel data. DataSource *DataSource `field:"required" json:"dataSource" yaml:"dataSource"` // Compression type if training data is compressed. // Default: - None. // CompressionType CompressionType `field:"optional" json:"compressionType" yaml:"compressionType"` // The MIME type of the data. // Default: - None. // ContentType *string `field:"optional" json:"contentType" yaml:"contentType"` // Input mode to use for the data channel in a training job. // Default: - None. // InputMode InputMode `field:"optional" json:"inputMode" yaml:"inputMode"` // Specify RecordIO as the value when input data is in raw format but the training algorithm requires the RecordIO format. // // In this case, Amazon SageMaker wraps each individual S3 object in a RecordIO record. // If the input data is already in RecordIO format, you don't need to set this attribute. // Default: - None. // RecordWrapperType RecordWrapperType `field:"optional" json:"recordWrapperType" yaml:"recordWrapperType"` // Shuffle config option for input data in a channel. // Default: - None. // ShuffleConfig *ShuffleConfig `field:"optional" json:"shuffleConfig" yaml:"shuffleConfig"` }
Describes the training, validation or test dataset and the Amazon S3 location where it is stored.
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 s3Location s3Location channel := &Channel{ ChannelName: jsii.String("channelName"), DataSource: &DataSource{ S3DataSource: &S3DataSource{ S3Location: s3Location, // the properties below are optional AttributeNames: []*string{ jsii.String("attributeNames"), }, S3DataDistributionType: awscdk.Aws_stepfunctions_tasks.S3DataDistributionType_FULLY_REPLICATED, S3DataType: awscdk.*Aws_stepfunctions_tasks.S3DataType_MANIFEST_FILE, }, }, // the properties below are optional CompressionType: awscdk.*Aws_stepfunctions_tasks.CompressionType_NONE, ContentType: jsii.String("contentType"), InputMode: awscdk.*Aws_stepfunctions_tasks.InputMode_PIPE, RecordWrapperType: awscdk.*Aws_stepfunctions_tasks.RecordWrapperType_NONE, ShuffleConfig: &ShuffleConfig{ Seed: jsii.Number(123), }, }
type Classification ¶ added in v2.1.0
type Classification interface { // A literal string in case a new EMR classification is released, if not already defined. ClassificationStatement() *string }
The classification within a EMR Containers application configuration.
Class can be extended to add other classifications. For example, new Classification('xxx-yyy');.
Example:
tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{ VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")), ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(), JobName: jsii.String("EMR-Containers-Job"), JobDriver: &JobDriver{ SparkSubmitJobDriver: &SparkSubmitJobDriver{ EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")), }, }, ApplicationConfig: []applicationConfiguration{ &applicationConfiguration{ Classification: tasks.Classification_SPARK_DEFAULTS(), Properties: map[string]*string{ "spark.executor.instances": jsii.String("1"), "spark.executor.memory": jsii.String("512M"), }, }, }, })
func Classification_SPARK ¶ added in v2.1.0
func Classification_SPARK() Classification
func Classification_SPARK_DEFAULTS ¶ added in v2.1.0
func Classification_SPARK_DEFAULTS() Classification
func Classification_SPARK_ENV ¶ added in v2.1.0
func Classification_SPARK_ENV() Classification
func Classification_SPARK_HIVE_SITE ¶ added in v2.1.0
func Classification_SPARK_HIVE_SITE() Classification
func Classification_SPARK_LOG4J ¶ added in v2.1.0
func Classification_SPARK_LOG4J() Classification
func Classification_SPARK_METRICS ¶ added in v2.1.0
func Classification_SPARK_METRICS() Classification
func NewClassification ¶ added in v2.1.0
func NewClassification(classificationStatement *string) Classification
Creates a new Classification.
type CodeBuildStartBuild ¶
type CodeBuildStartBuild interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Start a CodeBuild Build as a task.
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-codebuild.html
func CodeBuildStartBuild_JsonPath ¶ added in v2.178.0
func CodeBuildStartBuild_JsonPath(scope constructs.Construct, id *string, props *CodeBuildStartBuildJsonPathProps) CodeBuildStartBuild
Start a CodeBuild Build as a task using JSONPath.
func CodeBuildStartBuild_Jsonata ¶ added in v2.178.0
func CodeBuildStartBuild_Jsonata(scope constructs.Construct, id *string, props *CodeBuildStartBuildJsonataProps) CodeBuildStartBuild
Start a CodeBuild Build as a task using JSONata.
func NewCodeBuildStartBuild ¶
func NewCodeBuildStartBuild(scope constructs.Construct, id *string, props *CodeBuildStartBuildProps) CodeBuildStartBuild
type CodeBuildStartBuildBatch ¶ added in v2.132.0
type CodeBuildStartBuildBatch interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Start a CodeBuild BatchBuild as a task.
Example:
import "github.com/aws/aws-cdk-go/awscdk" project := codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ ProjectName: jsii.String("MyTestProject"), BuildSpec: codebuild.BuildSpec_FromObjectToYaml(map[string]interface{}{ "version": jsii.Number(0.2), "batch": map[string][]map[string]*string{ "build-list": []map[string]*string{ map[string]*string{ "identifier": jsii.String("id"), "buildspec": jsii.String("version: 0.2\nphases:\n build:\n commands:\n - echo \"Hello, from small!\""), }, }, }, }), }) project.EnableBatchBuilds() task := tasks.NewCodeBuildStartBuildBatch(this, jsii.String("buildBatchTask"), &CodeBuildStartBuildBatchProps{ Project: Project, IntegrationPattern: sfn.IntegrationPattern_REQUEST_RESPONSE, EnvironmentVariablesOverride: map[string]buildEnvironmentVariable{ "test": &buildEnvironmentVariable{ "type": codebuild.BuildEnvironmentVariableType_PLAINTEXT, "value": jsii.String("testValue"), }, }, })
See: https://docs.aws.amazon.com/codebuild/latest/APIReference/API_StartBuildBatch.html
func CodeBuildStartBuildBatch_JsonPath ¶ added in v2.178.0
func CodeBuildStartBuildBatch_JsonPath(scope constructs.Construct, id *string, props *CodeBuildStartBuildBatchJsonPathProps) CodeBuildStartBuildBatch
Start a CodeBuild BatchBuild as a task using JSONPath. See: https://docs.aws.amazon.com/codebuild/latest/APIReference/API_StartBuildBatch.html
func CodeBuildStartBuildBatch_Jsonata ¶ added in v2.178.0
func CodeBuildStartBuildBatch_Jsonata(scope constructs.Construct, id *string, props *CodeBuildStartBuildBatchJsonataProps) CodeBuildStartBuildBatch
Start a CodeBuild BatchBuild as a task using JSONata. See: https://docs.aws.amazon.com/codebuild/latest/APIReference/API_StartBuildBatch.html
func NewCodeBuildStartBuildBatch ¶ added in v2.132.0
func NewCodeBuildStartBuildBatch(scope constructs.Construct, id *string, props *CodeBuildStartBuildBatchProps) CodeBuildStartBuildBatch
type CodeBuildStartBuildBatchJsonPathProps ¶ added in v2.178.0
type CodeBuildStartBuildBatchJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // CodeBuild project to start. Project awscodebuild.IProject `field:"required" json:"project" yaml:"project"` // A set of environment variables to be used for this build only. // Default: - the latest environment variables already defined in the build project. // EnvironmentVariablesOverride *map[string]*awscodebuild.BuildEnvironmentVariable `field:"optional" json:"environmentVariablesOverride" yaml:"environmentVariablesOverride"` }
Properties for CodeBuildStartBuildBatch using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var project project var resultSelector interface{} var taskRole taskRole var timeout timeout var value interface{} codeBuildStartBuildBatchJsonPathProps := &CodeBuildStartBuildBatchJsonPathProps{ Project: project, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, EnvironmentVariablesOverride: map[string]buildEnvironmentVariable{ "environmentVariablesOverrideKey": &buildEnvironmentVariable{ "value": value, // the properties below are optional "type": awscdk.aws_codebuild.BuildEnvironmentVariableType_PLAINTEXT, }, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type CodeBuildStartBuildBatchJsonataProps ¶ added in v2.178.0
type CodeBuildStartBuildBatchJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // CodeBuild project to start. Project awscodebuild.IProject `field:"required" json:"project" yaml:"project"` // A set of environment variables to be used for this build only. // Default: - the latest environment variables already defined in the build project. // EnvironmentVariablesOverride *map[string]*awscodebuild.BuildEnvironmentVariable `field:"optional" json:"environmentVariablesOverride" yaml:"environmentVariablesOverride"` }
Properties for CodeBuildStartBuildBatch using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var project project var taskRole taskRole var timeout timeout var value interface{} codeBuildStartBuildBatchJsonataProps := &CodeBuildStartBuildBatchJsonataProps{ Project: project, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, EnvironmentVariablesOverride: map[string]buildEnvironmentVariable{ "environmentVariablesOverrideKey": &buildEnvironmentVariable{ "value": value, // the properties below are optional "type": awscdk.aws_codebuild.BuildEnvironmentVariableType_PLAINTEXT, }, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type CodeBuildStartBuildBatchProps ¶ added in v2.132.0
type CodeBuildStartBuildBatchProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // CodeBuild project to start. Project awscodebuild.IProject `field:"required" json:"project" yaml:"project"` // A set of environment variables to be used for this build only. // Default: - the latest environment variables already defined in the build project. // EnvironmentVariablesOverride *map[string]*awscodebuild.BuildEnvironmentVariable `field:"optional" json:"environmentVariablesOverride" yaml:"environmentVariablesOverride"` }
Properties for CodeBuildStartBuildBatch.
Example:
import "github.com/aws/aws-cdk-go/awscdk" project := codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ ProjectName: jsii.String("MyTestProject"), BuildSpec: codebuild.BuildSpec_FromObjectToYaml(map[string]interface{}{ "version": jsii.Number(0.2), "batch": map[string][]map[string]*string{ "build-list": []map[string]*string{ map[string]*string{ "identifier": jsii.String("id"), "buildspec": jsii.String("version: 0.2\nphases:\n build:\n commands:\n - echo \"Hello, from small!\""), }, }, }, }), }) project.EnableBatchBuilds() task := tasks.NewCodeBuildStartBuildBatch(this, jsii.String("buildBatchTask"), &CodeBuildStartBuildBatchProps{ Project: Project, IntegrationPattern: sfn.IntegrationPattern_REQUEST_RESPONSE, EnvironmentVariablesOverride: map[string]buildEnvironmentVariable{ "test": &buildEnvironmentVariable{ "type": codebuild.BuildEnvironmentVariableType_PLAINTEXT, "value": jsii.String("testValue"), }, }, })
type CodeBuildStartBuildJsonPathProps ¶ added in v2.178.0
type CodeBuildStartBuildJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // CodeBuild project to start. Project awscodebuild.IProject `field:"required" json:"project" yaml:"project"` // A set of environment variables to be used for this build only. // Default: - the latest environment variables already defined in the build project. // EnvironmentVariablesOverride *map[string]*awscodebuild.BuildEnvironmentVariable `field:"optional" json:"environmentVariablesOverride" yaml:"environmentVariablesOverride"` }
Properties for CodeBuildStartBuild using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var project project var resultSelector interface{} var taskRole taskRole var timeout timeout var value interface{} codeBuildStartBuildJsonPathProps := &CodeBuildStartBuildJsonPathProps{ Project: project, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, EnvironmentVariablesOverride: map[string]buildEnvironmentVariable{ "environmentVariablesOverrideKey": &buildEnvironmentVariable{ "value": value, // the properties below are optional "type": awscdk.aws_codebuild.BuildEnvironmentVariableType_PLAINTEXT, }, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type CodeBuildStartBuildJsonataProps ¶ added in v2.178.0
type CodeBuildStartBuildJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // CodeBuild project to start. Project awscodebuild.IProject `field:"required" json:"project" yaml:"project"` // A set of environment variables to be used for this build only. // Default: - the latest environment variables already defined in the build project. // EnvironmentVariablesOverride *map[string]*awscodebuild.BuildEnvironmentVariable `field:"optional" json:"environmentVariablesOverride" yaml:"environmentVariablesOverride"` }
Properties for CodeBuildStartBuild using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var project project var taskRole taskRole var timeout timeout var value interface{} codeBuildStartBuildJsonataProps := &CodeBuildStartBuildJsonataProps{ Project: project, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, EnvironmentVariablesOverride: map[string]buildEnvironmentVariable{ "environmentVariablesOverrideKey": &buildEnvironmentVariable{ "value": value, // the properties below are optional "type": awscdk.aws_codebuild.BuildEnvironmentVariableType_PLAINTEXT, }, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type CodeBuildStartBuildProps ¶
type CodeBuildStartBuildProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // CodeBuild project to start. Project awscodebuild.IProject `field:"required" json:"project" yaml:"project"` // A set of environment variables to be used for this build only. // Default: - the latest environment variables already defined in the build project. // EnvironmentVariablesOverride *map[string]*awscodebuild.BuildEnvironmentVariable `field:"optional" json:"environmentVariablesOverride" yaml:"environmentVariablesOverride"` }
Properties for CodeBuildStartBuild.
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")), }, }, })
type CommonEcsRunTaskProps ¶
type CommonEcsRunTaskProps struct { // The topic to run the task on. Cluster awsecs.ICluster `field:"required" json:"cluster" yaml:"cluster"` // Task Definition used for running tasks in the service. // // Note: this must be TaskDefinition, and not ITaskDefinition, // as it requires properties that are not known for imported task definitions // If you want to run a RunTask with an imported task definition, // consider using CustomState. TaskDefinition awsecs.TaskDefinition `field:"required" json:"taskDefinition" yaml:"taskDefinition"` // Container setting overrides. // // Key is the name of the container to override, value is the // values you want to override. // Default: - No overrides. // ContainerOverrides *[]*ContainerOverride `field:"optional" json:"containerOverrides" yaml:"containerOverrides"` // The service integration pattern indicates different ways to call RunTask in ECS. // // The valid value for Lambda is FIRE_AND_FORGET, SYNC and WAIT_FOR_TASK_TOKEN. // Default: FIRE_AND_FORGET. // IntegrationPattern awsstepfunctions.ServiceIntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` }
Basic properties for ECS 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" import "github.com/aws/aws-cdk-go/awscdk" var cluster cluster var containerDefinition containerDefinition var taskDefinition taskDefinition commonEcsRunTaskProps := &CommonEcsRunTaskProps{ Cluster: cluster, TaskDefinition: taskDefinition, // the properties below are optional ContainerOverrides: []containerOverride{ &containerOverride{ ContainerDefinition: containerDefinition, // the properties below are optional Command: []*string{ jsii.String("command"), }, Cpu: jsii.Number(123), Environment: []taskEnvironmentVariable{ &taskEnvironmentVariable{ Name: jsii.String("name"), Value: jsii.String("value"), }, }, MemoryLimit: jsii.Number(123), MemoryReservation: jsii.Number(123), }, }, IntegrationPattern: awscdk.Aws_stepfunctions.ServiceIntegrationPattern_FIRE_AND_FORGET, }
type CompressionType ¶
type CompressionType string
Compression type of the data.
const ( // None compression type. CompressionType_NONE CompressionType = "NONE" // Gzip compression type. CompressionType_GZIP CompressionType = "GZIP" )
type ContainerDefinition ¶
type ContainerDefinition interface { IContainerDefinition // Called when the ContainerDefinition type configured on Sagemaker Task. Bind(task ISageMakerTask) *ContainerDefinitionConfig }
Describes the container, as part of model definition.
Example:
tasks.NewSageMakerCreateModel(this, jsii.String("Sagemaker"), &SageMakerCreateModelProps{ ModelName: jsii.String("MyModel"), PrimaryContainer: tasks.NewContainerDefinition(&ContainerDefinitionOptions{ Image: tasks.DockerImage_FromJsonExpression(sfn.JsonPath_StringAt(jsii.String("$.Model.imageName"))), Mode: tasks.Mode_SINGLE_MODEL, ModelS3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.TrainingJob.ModelArtifacts.S3ModelArtifacts")), }), })
See: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ContainerDefinition.html
func NewContainerDefinition ¶
func NewContainerDefinition(options *ContainerDefinitionOptions) ContainerDefinition
type ContainerDefinitionConfig ¶
type ContainerDefinitionConfig struct { // Additional parameters to pass to the base task. // Default: - No additional parameters passed. // Parameters *map[string]interface{} `field:"optional" json:"parameters" yaml:"parameters"` }
Configuration options for the ContainerDefinition.
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{} containerDefinitionConfig := &ContainerDefinitionConfig{ Parameters: map[string]interface{}{ "parametersKey": parameters, }, }
type ContainerDefinitionOptions ¶
type ContainerDefinitionOptions struct { // This parameter is ignored for models that contain only a PrimaryContainer. // // When a ContainerDefinition is part of an inference pipeline, // the value of the parameter uniquely identifies the container for the purposes of logging and metrics. // Default: - None. // ContainerHostName *string `field:"optional" json:"containerHostName" yaml:"containerHostName"` // The environment variables to set in the Docker container. // Default: - No variables. // EnvironmentVariables awsstepfunctions.TaskInput `field:"optional" json:"environmentVariables" yaml:"environmentVariables"` // The Amazon EC2 Container Registry (Amazon ECR) path where inference code is stored. // Default: - None. // Image DockerImage `field:"optional" json:"image" yaml:"image"` // Defines how many models the container hosts. // Default: - Mode.SINGLE_MODEL // Mode Mode `field:"optional" json:"mode" yaml:"mode"` // The name or Amazon Resource Name (ARN) of the model package to use to create the model. // Default: - None. // ModelPackageName *string `field:"optional" json:"modelPackageName" yaml:"modelPackageName"` // The S3 path where the model artifacts, which result from model training, are stored. // // This path must point to a single gzip compressed tar archive (.tar.gz suffix). // The S3 path is required for Amazon SageMaker built-in algorithms, but not if you use your own algorithms. // Default: - None. // ModelS3Location S3Location `field:"optional" json:"modelS3Location" yaml:"modelS3Location"` }
Properties to define a ContainerDefinition.
Example:
tasks.NewSageMakerCreateModel(this, jsii.String("Sagemaker"), &SageMakerCreateModelProps{ ModelName: jsii.String("MyModel"), PrimaryContainer: tasks.NewContainerDefinition(&ContainerDefinitionOptions{ Image: tasks.DockerImage_FromJsonExpression(sfn.JsonPath_StringAt(jsii.String("$.Model.imageName"))), Mode: tasks.Mode_SINGLE_MODEL, ModelS3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.TrainingJob.ModelArtifacts.S3ModelArtifacts")), }), })
See: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ContainerDefinition.html
type ContainerOverride ¶
type ContainerOverride struct { // Name of the container inside the task definition. ContainerDefinition awsecs.ContainerDefinition `field:"required" json:"containerDefinition" yaml:"containerDefinition"` // Command to run inside the container. // Default: - Default command from the Docker image or the task definition. // Command *[]*string `field:"optional" json:"command" yaml:"command"` // The number of cpu units reserved for the container. // Default: - The default value from the task definition. // Cpu *float64 `field:"optional" json:"cpu" yaml:"cpu"` // The environment variables to send to the container. // // You can add new environment variables, which are added to the container at launch, // or you can override the existing environment variables from the Docker image or the task definition. // Default: - The existing environment variables from the Docker image or the task definition. // Environment *[]*TaskEnvironmentVariable `field:"optional" json:"environment" yaml:"environment"` // The hard limit (in MiB) of memory to present to the container. // Default: - The default value from the task definition. // MemoryLimit *float64 `field:"optional" json:"memoryLimit" yaml:"memoryLimit"` // The soft limit (in MiB) of memory to reserve for the container. // Default: - The default value from the task definition. // MemoryReservation *float64 `field:"optional" json:"memoryReservation" yaml:"memoryReservation"` }
A list of container overrides that specify the name of a container and the overrides it should receive.
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 containerDefinition containerDefinition containerOverride := &ContainerOverride{ ContainerDefinition: containerDefinition, // the properties below are optional Command: []*string{ jsii.String("command"), }, Cpu: jsii.Number(123), Environment: []taskEnvironmentVariable{ &taskEnvironmentVariable{ Name: jsii.String("name"), Value: jsii.String("value"), }, }, MemoryLimit: jsii.Number(123), MemoryReservation: jsii.Number(123), }
type ContainerOverrides ¶
type ContainerOverrides struct { // The command to send to the container that overrides the default command from the Docker image or the job definition. // Default: - No command overrides. // Command *[]*string `field:"optional" json:"command" yaml:"command"` // The environment variables to send to the container. // // You can add new environment variables, which are added to the container // at launch, or you can override the existing environment variables from // the Docker image or the job definition. // Default: - No environment overrides. // Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // The number of physical GPUs to reserve for the container. // // The number of GPUs reserved for all containers in a job // should not exceed the number of available GPUs on the compute // resource that the job is launched on. // Default: - No GPU reservation. // GpuCount *float64 `field:"optional" json:"gpuCount" yaml:"gpuCount"` // The instance type to use for a multi-node parallel job. // // This parameter is not valid for single-node container jobs. // Default: - No instance type overrides. // InstanceType awsec2.InstanceType `field:"optional" json:"instanceType" yaml:"instanceType"` // The number of MiB of memory reserved for the job. // // This value overrides the value set in the job definition. // Default: - No memory overrides. // Memory *float64 `field:"optional" json:"memory" yaml:"memory"` // The number of vCPUs to reserve for the container. // // This value overrides the value set in the job definition. // Default: - No vCPUs overrides. // Vcpus *float64 `field:"optional" json:"vcpus" yaml:"vcpus"` }
The overrides that should be sent to a container.
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 instanceType instanceType containerOverrides := &ContainerOverrides{ Command: []*string{ jsii.String("command"), }, Environment: map[string]*string{ "environmentKey": jsii.String("environment"), }, GpuCount: jsii.Number(123), InstanceType: instanceType, Memory: jsii.Number(123), Vcpus: jsii.Number(123), }
type CronOptions ¶ added in v2.168.0
type CronOptions struct { // The day of the month to run this rule at. // Default: - Every day of the month. // Day *string `field:"optional" json:"day" yaml:"day"` // The hour to run this rule at. // Default: - Every hour. // Hour *string `field:"optional" json:"hour" yaml:"hour"` // The minute to run this rule at. // Default: - Every minute. // Minute *string `field:"optional" json:"minute" yaml:"minute"` // The month to run this rule at. // Default: - Every month. // Month *string `field:"optional" json:"month" yaml:"month"` // The day of the week to run this rule at. // Default: - Whichever day of the week that `day` falls on. // WeekDay *string `field:"optional" json:"weekDay" yaml:"weekDay"` // The year to run this rule at. // Default: - Every year. // Year *string `field:"optional" json:"year" yaml:"year"` }
Options to configure a cron expression.
All fields are strings so you can use complex expressions. Absence of a field implies '*' or '?', whichever one is appropriate.
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" cronOptions := &CronOptions{ Day: jsii.String("day"), Hour: jsii.String("hour"), Minute: jsii.String("minute"), Month: jsii.String("month"), WeekDay: jsii.String("weekDay"), Year: jsii.String("year"), }
type DataSource ¶
type DataSource struct { // S3 location of the data source that is associated with a channel. S3DataSource *S3DataSource `field:"required" json:"s3DataSource" yaml:"s3DataSource"` }
Location of the channel data.
Example:
tasks.NewSageMakerCreateTrainingJob(this, jsii.String("TrainSagemaker"), &SageMakerCreateTrainingJobProps{ TrainingJobName: sfn.JsonPath_StringAt(jsii.String("$.JobName")), AlgorithmSpecification: &AlgorithmSpecification{ AlgorithmName: jsii.String("BlazingText"), TrainingInputMode: tasks.InputMode_FILE, }, InputDataConfig: []channel{ &channel{ ChannelName: jsii.String("train"), DataSource: &DataSource{ S3DataSource: &S3DataSource{ S3DataType: tasks.S3DataType_S3_PREFIX, S3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.S3Bucket")), }, }, }, }, OutputDataConfig: &OutputDataConfig{ S3OutputLocation: tasks.S3Location_FromBucket(s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("amzn-s3-demo-bucket")), jsii.String("myoutputpath")), }, ResourceConfig: &ResourceConfig{ InstanceCount: jsii.Number(1), InstanceType: ec2.NewInstanceType(sfn.JsonPath_*StringAt(jsii.String("$.InstanceType"))), VolumeSize: awscdk.Size_Gibibytes(jsii.Number(50)), }, // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume StoppingCondition: &StoppingCondition{ MaxRuntime: awscdk.Duration_Hours(jsii.Number(2)), }, })
type DockerImage ¶
type DockerImage interface { // Called when the image is used by a SageMaker task. Bind(task ISageMakerTask) *DockerImageConfig }
Creates `IDockerImage` instances.
Example:
tasks.NewSageMakerCreateModel(this, jsii.String("Sagemaker"), &SageMakerCreateModelProps{ ModelName: jsii.String("MyModel"), PrimaryContainer: tasks.NewContainerDefinition(&ContainerDefinitionOptions{ Image: tasks.DockerImage_FromJsonExpression(sfn.JsonPath_StringAt(jsii.String("$.Model.imageName"))), Mode: tasks.Mode_SINGLE_MODEL, ModelS3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.TrainingJob.ModelArtifacts.S3ModelArtifacts")), }), })
func DockerImage_FromAsset ¶
func DockerImage_FromAsset(scope constructs.Construct, id *string, props *awsecrassets.DockerImageAssetProps) DockerImage
Reference a Docker image that is provided as an Asset in the current app.
func DockerImage_FromEcrRepository ¶
func DockerImage_FromEcrRepository(repository awsecr.IRepository, tagOrDigest *string) DockerImage
Reference a Docker image stored in an ECR repository.
func DockerImage_FromJsonExpression ¶
func DockerImage_FromJsonExpression(expression *string, allowAnyEcrImagePull *bool) DockerImage
Reference a Docker image which URI is obtained from the task's input.
func DockerImage_FromRegistry ¶
func DockerImage_FromRegistry(imageUri *string) DockerImage
Reference a Docker image by it's URI.
When referencing ECR images, prefer using `inEcr`.
type DockerImageConfig ¶
type DockerImageConfig struct { // The fully qualified URI of the Docker image. ImageUri *string `field:"required" json:"imageUri" yaml:"imageUri"` }
Configuration for a using Docker image.
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" dockerImageConfig := &DockerImageConfig{ ImageUri: jsii.String("imageUri"), }
type DynamoAttributeValue ¶
type DynamoAttributeValue interface { // Represents the data for the attribute. // // Data can be // i.e. "S": "Hello" AttributeValue() interface{} // Returns the DynamoDB attribute value. ToObject() interface{} }
Represents the data for an attribute.
Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.
Example:
var myTable table tasks.NewDynamoDeleteItem(this, jsii.String("DeleteItem"), &DynamoDeleteItemProps{ Key: map[string]dynamoAttributeValue{ "MessageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")), }, Table: myTable, ResultPath: sfn.JsonPath_DISCARD(), })
See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html
func DynamoAttributeValue_BooleanFromJsonPath ¶
func DynamoAttributeValue_BooleanFromJsonPath(value *string) DynamoAttributeValue
Sets an attribute of type Boolean from state input through Json path.
For example: "BOOL": true.
func DynamoAttributeValue_BooleanFromJsonata ¶ added in v2.178.0
func DynamoAttributeValue_BooleanFromJsonata(value *string) DynamoAttributeValue
Sets an attribute of type Boolean from state input through JSONata expression.
For example: "BOOL": true.
func DynamoAttributeValue_FromBinary ¶
func DynamoAttributeValue_FromBinary(value *string) DynamoAttributeValue
Sets an attribute of type Binary.
For example: "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk".
func DynamoAttributeValue_FromBinarySet ¶
func DynamoAttributeValue_FromBinarySet(value *[]*string) DynamoAttributeValue
Sets an attribute of type Binary Set.
For example: "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="].
func DynamoAttributeValue_FromBoolean ¶
func DynamoAttributeValue_FromBoolean(value *bool) DynamoAttributeValue
Sets an attribute of type Boolean.
For example: "BOOL": true.
func DynamoAttributeValue_FromList ¶
func DynamoAttributeValue_FromList(value *[]DynamoAttributeValue) DynamoAttributeValue
Sets an attribute of type List.
For example: "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]
func DynamoAttributeValue_FromMap ¶
func DynamoAttributeValue_FromMap(value *map[string]DynamoAttributeValue) DynamoAttributeValue
Sets an attribute of type Map.
For example: "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}.
func DynamoAttributeValue_FromNull ¶
func DynamoAttributeValue_FromNull(value *bool) DynamoAttributeValue
Sets an attribute of type Null.
For example: "NULL": true.
func DynamoAttributeValue_FromNumber ¶
func DynamoAttributeValue_FromNumber(value *float64) DynamoAttributeValue
Sets a literal number.
For example: 1234 Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
func DynamoAttributeValue_FromNumberSet ¶
func DynamoAttributeValue_FromNumberSet(value *[]*float64) DynamoAttributeValue
Sets an attribute of type Number Set.
For example: "NS": ["42.2", "-19", "7.5", "3.14"] Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
func DynamoAttributeValue_FromString ¶
func DynamoAttributeValue_FromString(value *string) DynamoAttributeValue
Sets an attribute of type String.
For example: "S": "Hello" Strings may be literal values or as JSONata expression or as JsonPath. Example values:
- `DynamoAttributeValue.fromString('someValue')` - `DynamoAttributeValue.fromString('{% $bar %}')` - `DynamoAttributeValue.fromString(JsonPath.stringAt('$.bar'))`
func DynamoAttributeValue_FromStringSet ¶
func DynamoAttributeValue_FromStringSet(value *[]*string) DynamoAttributeValue
Sets an attribute of type String Set.
For example: "SS": ["Giraffe", "Hippo" ,"Zebra"].
func DynamoAttributeValue_ListFromJsonPath ¶
func DynamoAttributeValue_ListFromJsonPath(value *string) DynamoAttributeValue
Sets an attribute of type List.
For example: "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"S", "Veggies"}].
func DynamoAttributeValue_ListFromJsonata ¶ added in v2.178.0
func DynamoAttributeValue_ListFromJsonata(value *string) DynamoAttributeValue
Sets an attribute of type List.
For example: "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"S", "Veggies"}].
func DynamoAttributeValue_MapFromJsonPath ¶
func DynamoAttributeValue_MapFromJsonPath(value *string) DynamoAttributeValue
Sets an attribute of type Map.
For example: "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}.
func DynamoAttributeValue_MapFromJsonata ¶ added in v2.178.0
func DynamoAttributeValue_MapFromJsonata(value *string) DynamoAttributeValue
Sets an attribute of type Map.
For example: "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}.
func DynamoAttributeValue_NumberFromString ¶
func DynamoAttributeValue_NumberFromString(value *string) DynamoAttributeValue
Sets an attribute of type Number.
For example: "N": "123.45" Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
Numbers may be expressed as literal strings or as JSONata expression or as JsonPath.
func DynamoAttributeValue_NumberSetFromStrings ¶
func DynamoAttributeValue_NumberSetFromStrings(value *[]*string) DynamoAttributeValue
Sets an attribute of type Number Set.
For example: "NS": ["42.2", "-19", "7.5", "3.14"] Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
Numbers may be expressed as literal strings or as JsonPath.
type DynamoConsumedCapacity ¶
type DynamoConsumedCapacity string
Determines the level of detail about provisioned throughput consumption that is returned.
const ( // The response includes the aggregate ConsumedCapacity for the operation, together with ConsumedCapacity for each table and secondary index that was accessed. DynamoConsumedCapacity_INDEXES DynamoConsumedCapacity = "INDEXES" // The response includes only the aggregate ConsumedCapacity for the operation. DynamoConsumedCapacity_TOTAL DynamoConsumedCapacity = "TOTAL" // No ConsumedCapacity details are included in the response. DynamoConsumedCapacity_NONE DynamoConsumedCapacity = "NONE" )
type DynamoDeleteItem ¶
type DynamoDeleteItem interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A StepFunctions task to call DynamoDeleteItem.
Example:
var myTable table tasks.NewDynamoDeleteItem(this, jsii.String("DeleteItem"), &DynamoDeleteItemProps{ Key: map[string]dynamoAttributeValue{ "MessageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")), }, Table: myTable, ResultPath: sfn.JsonPath_DISCARD(), })
func DynamoDeleteItem_JsonPath ¶ added in v2.178.0
func DynamoDeleteItem_JsonPath(scope constructs.Construct, id *string, props *DynamoDeleteItemJsonPathProps) DynamoDeleteItem
A StepFunctions task to call DynamoDeleteItem using JSONPath.
func DynamoDeleteItem_Jsonata ¶ added in v2.178.0
func DynamoDeleteItem_Jsonata(scope constructs.Construct, id *string, props *DynamoDeleteItemJsonataProps) DynamoDeleteItem
A StepFunctions task to call DynamoDeleteItem using JSONata.
func NewDynamoDeleteItem ¶
func NewDynamoDeleteItem(scope constructs.Construct, id *string, props *DynamoDeleteItemProps) DynamoDeleteItem
type DynamoDeleteItemJsonPathProps ¶ added in v2.178.0
type DynamoDeleteItemJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Primary key of the item to retrieve. // // For the primary key, you must provide all of the attributes. // For example, with a simple primary key, you only need to provide a value for the partition key. // For a composite primary key, you must provide values for both the partition key and the sort key. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-Key // Key *map[string]DynamoAttributeValue `field:"required" json:"key" yaml:"key"` // The name of the table containing the requested item. Table awsdynamodb.ITable `field:"required" json:"table" yaml:"table"` // A condition that must be satisfied in order for a conditional DeleteItem to succeed. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ConditionExpression // // Default: - No condition expression. // ConditionExpression *string `field:"optional" json:"conditionExpression" yaml:"conditionExpression"` // One or more substitution tokens for attribute names in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ExpressionAttributeNames // // Default: - No expression attribute names. // ExpressionAttributeNames *map[string]*string `field:"optional" json:"expressionAttributeNames" yaml:"expressionAttributeNames"` // One or more values that can be substituted in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ExpressionAttributeValues // // Default: - No expression attribute values. // ExpressionAttributeValues *map[string]DynamoAttributeValue `field:"optional" json:"expressionAttributeValues" yaml:"expressionAttributeValues"` // Determines the level of detail about provisioned throughput consumption that is returned in the response. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ReturnConsumedCapacity // // Default: DynamoConsumedCapacity.NONE // ReturnConsumedCapacity DynamoConsumedCapacity `field:"optional" json:"returnConsumedCapacity" yaml:"returnConsumedCapacity"` // Determines whether item collection metrics are returned. // // If set to SIZE, the response includes statistics about item collections, if any, // that were modified during the operation are returned in the response. // If set to NONE (the default), no statistics are returned. // Default: DynamoItemCollectionMetrics.NONE // ReturnItemCollectionMetrics DynamoItemCollectionMetrics `field:"optional" json:"returnItemCollectionMetrics" yaml:"returnItemCollectionMetrics"` // Use ReturnValues if you want to get the item attributes as they appeared before they were deleted. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ReturnValues // // Default: DynamoReturnValues.NONE // ReturnValues DynamoReturnValues `field:"optional" json:"returnValues" yaml:"returnValues"` }
Properties for DynamoDeleteItem Task using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var dynamoAttributeValue dynamoAttributeValue var resultSelector interface{} var table table var taskRole taskRole var timeout timeout dynamoDeleteItemJsonPathProps := &DynamoDeleteItemJsonPathProps{ Key: map[string]*dynamoAttributeValue{ "keyKey": dynamoAttributeValue, }, Table: table, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), ConditionExpression: jsii.String("conditionExpression"), Credentials: &Credentials{ Role: taskRole, }, ExpressionAttributeNames: map[string]*string{ "expressionAttributeNamesKey": jsii.String("expressionAttributeNames"), }, ExpressionAttributeValues: map[string]*dynamoAttributeValue{ "expressionAttributeValuesKey": dynamoAttributeValue, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, ReturnConsumedCapacity: awscdk.Aws_stepfunctions_tasks.DynamoConsumedCapacity_INDEXES, ReturnItemCollectionMetrics: awscdk.*Aws_stepfunctions_tasks.DynamoItemCollectionMetrics_SIZE, ReturnValues: awscdk.*Aws_stepfunctions_tasks.DynamoReturnValues_NONE, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type DynamoDeleteItemJsonataProps ¶ added in v2.178.0
type DynamoDeleteItemJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Primary key of the item to retrieve. // // For the primary key, you must provide all of the attributes. // For example, with a simple primary key, you only need to provide a value for the partition key. // For a composite primary key, you must provide values for both the partition key and the sort key. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-Key // Key *map[string]DynamoAttributeValue `field:"required" json:"key" yaml:"key"` // The name of the table containing the requested item. Table awsdynamodb.ITable `field:"required" json:"table" yaml:"table"` // A condition that must be satisfied in order for a conditional DeleteItem to succeed. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ConditionExpression // // Default: - No condition expression. // ConditionExpression *string `field:"optional" json:"conditionExpression" yaml:"conditionExpression"` // One or more substitution tokens for attribute names in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ExpressionAttributeNames // // Default: - No expression attribute names. // ExpressionAttributeNames *map[string]*string `field:"optional" json:"expressionAttributeNames" yaml:"expressionAttributeNames"` // One or more values that can be substituted in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ExpressionAttributeValues // // Default: - No expression attribute values. // ExpressionAttributeValues *map[string]DynamoAttributeValue `field:"optional" json:"expressionAttributeValues" yaml:"expressionAttributeValues"` // Determines the level of detail about provisioned throughput consumption that is returned in the response. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ReturnConsumedCapacity // // Default: DynamoConsumedCapacity.NONE // ReturnConsumedCapacity DynamoConsumedCapacity `field:"optional" json:"returnConsumedCapacity" yaml:"returnConsumedCapacity"` // Determines whether item collection metrics are returned. // // If set to SIZE, the response includes statistics about item collections, if any, // that were modified during the operation are returned in the response. // If set to NONE (the default), no statistics are returned. // Default: DynamoItemCollectionMetrics.NONE // ReturnItemCollectionMetrics DynamoItemCollectionMetrics `field:"optional" json:"returnItemCollectionMetrics" yaml:"returnItemCollectionMetrics"` // Use ReturnValues if you want to get the item attributes as they appeared before they were deleted. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ReturnValues // // Default: DynamoReturnValues.NONE // ReturnValues DynamoReturnValues `field:"optional" json:"returnValues" yaml:"returnValues"` }
Properties for DynamoDeleteItem Task using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var dynamoAttributeValue dynamoAttributeValue var outputs interface{} var table table var taskRole taskRole var timeout timeout dynamoDeleteItemJsonataProps := &DynamoDeleteItemJsonataProps{ Key: map[string]*dynamoAttributeValue{ "keyKey": dynamoAttributeValue, }, Table: table, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), ConditionExpression: jsii.String("conditionExpression"), Credentials: &Credentials{ Role: taskRole, }, ExpressionAttributeNames: map[string]*string{ "expressionAttributeNamesKey": jsii.String("expressionAttributeNames"), }, ExpressionAttributeValues: map[string]*dynamoAttributeValue{ "expressionAttributeValuesKey": dynamoAttributeValue, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ReturnConsumedCapacity: awscdk.Aws_stepfunctions_tasks.DynamoConsumedCapacity_INDEXES, ReturnItemCollectionMetrics: awscdk.*Aws_stepfunctions_tasks.DynamoItemCollectionMetrics_SIZE, ReturnValues: awscdk.*Aws_stepfunctions_tasks.DynamoReturnValues_NONE, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type DynamoDeleteItemProps ¶
type DynamoDeleteItemProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Primary key of the item to retrieve. // // For the primary key, you must provide all of the attributes. // For example, with a simple primary key, you only need to provide a value for the partition key. // For a composite primary key, you must provide values for both the partition key and the sort key. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-Key // Key *map[string]DynamoAttributeValue `field:"required" json:"key" yaml:"key"` // The name of the table containing the requested item. Table awsdynamodb.ITable `field:"required" json:"table" yaml:"table"` // A condition that must be satisfied in order for a conditional DeleteItem to succeed. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ConditionExpression // // Default: - No condition expression. // ConditionExpression *string `field:"optional" json:"conditionExpression" yaml:"conditionExpression"` // One or more substitution tokens for attribute names in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ExpressionAttributeNames // // Default: - No expression attribute names. // ExpressionAttributeNames *map[string]*string `field:"optional" json:"expressionAttributeNames" yaml:"expressionAttributeNames"` // One or more values that can be substituted in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ExpressionAttributeValues // // Default: - No expression attribute values. // ExpressionAttributeValues *map[string]DynamoAttributeValue `field:"optional" json:"expressionAttributeValues" yaml:"expressionAttributeValues"` // Determines the level of detail about provisioned throughput consumption that is returned in the response. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ReturnConsumedCapacity // // Default: DynamoConsumedCapacity.NONE // ReturnConsumedCapacity DynamoConsumedCapacity `field:"optional" json:"returnConsumedCapacity" yaml:"returnConsumedCapacity"` // Determines whether item collection metrics are returned. // // If set to SIZE, the response includes statistics about item collections, if any, // that were modified during the operation are returned in the response. // If set to NONE (the default), no statistics are returned. // Default: DynamoItemCollectionMetrics.NONE // ReturnItemCollectionMetrics DynamoItemCollectionMetrics `field:"optional" json:"returnItemCollectionMetrics" yaml:"returnItemCollectionMetrics"` // Use ReturnValues if you want to get the item attributes as they appeared before they were deleted. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#DDB-DeleteItem-request-ReturnValues // // Default: DynamoReturnValues.NONE // ReturnValues DynamoReturnValues `field:"optional" json:"returnValues" yaml:"returnValues"` }
Properties for DynamoDeleteItem Task.
Example:
var myTable table tasks.NewDynamoDeleteItem(this, jsii.String("DeleteItem"), &DynamoDeleteItemProps{ Key: map[string]dynamoAttributeValue{ "MessageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")), }, Table: myTable, ResultPath: sfn.JsonPath_DISCARD(), })
type DynamoGetItem ¶
type DynamoGetItem interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A StepFunctions task to call DynamoGetItem.
Example:
var myTable table tasks.NewDynamoGetItem(this, jsii.String("Get Item"), &DynamoGetItemProps{ Key: map[string]dynamoAttributeValue{ "messageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")), }, Table: myTable, })
func DynamoGetItem_JsonPath ¶ added in v2.178.0
func DynamoGetItem_JsonPath(scope constructs.Construct, id *string, props *DynamoGetItemJsonPathProps) DynamoGetItem
A StepFunctions task using JSONPath to call DynamoGetItem.
func DynamoGetItem_Jsonata ¶ added in v2.178.0
func DynamoGetItem_Jsonata(scope constructs.Construct, id *string, props *DynamoGetItemJsonataProps) DynamoGetItem
A StepFunctions task using JSONata to call DynamoGetItem.
func NewDynamoGetItem ¶
func NewDynamoGetItem(scope constructs.Construct, id *string, props *DynamoGetItemProps) DynamoGetItem
type DynamoGetItemJsonPathProps ¶ added in v2.178.0
type DynamoGetItemJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Primary key of the item to retrieve. // // For the primary key, you must provide all of the attributes. // For example, with a simple primary key, you only need to provide a value for the partition key. // For a composite primary key, you must provide values for both the partition key and the sort key. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-Key // Key *map[string]DynamoAttributeValue `field:"required" json:"key" yaml:"key"` // The name of the table containing the requested item. Table awsdynamodb.ITable `field:"required" json:"table" yaml:"table"` // Determines the read consistency model: If set to true, then the operation uses strongly consistent reads; // // otherwise, the operation uses eventually consistent reads. // Default: false. // ConsistentRead *bool `field:"optional" json:"consistentRead" yaml:"consistentRead"` // One or more substitution tokens for attribute names in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-ExpressionAttributeNames // // Default: - No expression attributes. // ExpressionAttributeNames *map[string]*string `field:"optional" json:"expressionAttributeNames" yaml:"expressionAttributeNames"` // An array of DynamoProjectionExpression that identifies one or more attributes to retrieve from the table. // // These attributes can include scalars, sets, or elements of a JSON document. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-ProjectionExpression // // Default: - No projection expression. // ProjectionExpression *[]DynamoProjectionExpression `field:"optional" json:"projectionExpression" yaml:"projectionExpression"` // Determines the level of detail about provisioned throughput consumption that is returned in the response. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-ReturnConsumedCapacity // // Default: DynamoConsumedCapacity.NONE // ReturnConsumedCapacity DynamoConsumedCapacity `field:"optional" json:"returnConsumedCapacity" yaml:"returnConsumedCapacity"` }
Properties for DynamoGetItem Task using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var dynamoAttributeValue dynamoAttributeValue var dynamoProjectionExpression dynamoProjectionExpression var resultSelector interface{} var table table var taskRole taskRole var timeout timeout dynamoGetItemJsonPathProps := &DynamoGetItemJsonPathProps{ Key: map[string]*dynamoAttributeValue{ "keyKey": dynamoAttributeValue, }, Table: table, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), ConsistentRead: jsii.Boolean(false), Credentials: &Credentials{ Role: taskRole, }, ExpressionAttributeNames: map[string]*string{ "expressionAttributeNamesKey": jsii.String("expressionAttributeNames"), }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), ProjectionExpression: []*dynamoProjectionExpression{ dynamoProjectionExpression, }, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, ReturnConsumedCapacity: awscdk.Aws_stepfunctions_tasks.DynamoConsumedCapacity_INDEXES, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type DynamoGetItemJsonataProps ¶ added in v2.178.0
type DynamoGetItemJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Primary key of the item to retrieve. // // For the primary key, you must provide all of the attributes. // For example, with a simple primary key, you only need to provide a value for the partition key. // For a composite primary key, you must provide values for both the partition key and the sort key. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-Key // Key *map[string]DynamoAttributeValue `field:"required" json:"key" yaml:"key"` // The name of the table containing the requested item. Table awsdynamodb.ITable `field:"required" json:"table" yaml:"table"` // Determines the read consistency model: If set to true, then the operation uses strongly consistent reads; // // otherwise, the operation uses eventually consistent reads. // Default: false. // ConsistentRead *bool `field:"optional" json:"consistentRead" yaml:"consistentRead"` // One or more substitution tokens for attribute names in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-ExpressionAttributeNames // // Default: - No expression attributes. // ExpressionAttributeNames *map[string]*string `field:"optional" json:"expressionAttributeNames" yaml:"expressionAttributeNames"` // An array of DynamoProjectionExpression that identifies one or more attributes to retrieve from the table. // // These attributes can include scalars, sets, or elements of a JSON document. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-ProjectionExpression // // Default: - No projection expression. // ProjectionExpression *[]DynamoProjectionExpression `field:"optional" json:"projectionExpression" yaml:"projectionExpression"` // Determines the level of detail about provisioned throughput consumption that is returned in the response. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-ReturnConsumedCapacity // // Default: DynamoConsumedCapacity.NONE // ReturnConsumedCapacity DynamoConsumedCapacity `field:"optional" json:"returnConsumedCapacity" yaml:"returnConsumedCapacity"` }
Properties for DynamoGetItem Task using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var dynamoAttributeValue dynamoAttributeValue var dynamoProjectionExpression dynamoProjectionExpression var outputs interface{} var table table var taskRole taskRole var timeout timeout dynamoGetItemJsonataProps := &DynamoGetItemJsonataProps{ Key: map[string]*dynamoAttributeValue{ "keyKey": dynamoAttributeValue, }, Table: table, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), ConsistentRead: jsii.Boolean(false), Credentials: &Credentials{ Role: taskRole, }, ExpressionAttributeNames: map[string]*string{ "expressionAttributeNamesKey": jsii.String("expressionAttributeNames"), }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, ProjectionExpression: []*dynamoProjectionExpression{ dynamoProjectionExpression, }, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ReturnConsumedCapacity: awscdk.Aws_stepfunctions_tasks.DynamoConsumedCapacity_INDEXES, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type DynamoGetItemProps ¶
type DynamoGetItemProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Primary key of the item to retrieve. // // For the primary key, you must provide all of the attributes. // For example, with a simple primary key, you only need to provide a value for the partition key. // For a composite primary key, you must provide values for both the partition key and the sort key. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-Key // Key *map[string]DynamoAttributeValue `field:"required" json:"key" yaml:"key"` // The name of the table containing the requested item. Table awsdynamodb.ITable `field:"required" json:"table" yaml:"table"` // Determines the read consistency model: If set to true, then the operation uses strongly consistent reads; // // otherwise, the operation uses eventually consistent reads. // Default: false. // ConsistentRead *bool `field:"optional" json:"consistentRead" yaml:"consistentRead"` // One or more substitution tokens for attribute names in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-ExpressionAttributeNames // // Default: - No expression attributes. // ExpressionAttributeNames *map[string]*string `field:"optional" json:"expressionAttributeNames" yaml:"expressionAttributeNames"` // An array of DynamoProjectionExpression that identifies one or more attributes to retrieve from the table. // // These attributes can include scalars, sets, or elements of a JSON document. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-ProjectionExpression // // Default: - No projection expression. // ProjectionExpression *[]DynamoProjectionExpression `field:"optional" json:"projectionExpression" yaml:"projectionExpression"` // Determines the level of detail about provisioned throughput consumption that is returned in the response. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-ReturnConsumedCapacity // // Default: DynamoConsumedCapacity.NONE // ReturnConsumedCapacity DynamoConsumedCapacity `field:"optional" json:"returnConsumedCapacity" yaml:"returnConsumedCapacity"` }
Properties for DynamoGetItem Task.
Example:
var myTable table tasks.NewDynamoGetItem(this, jsii.String("Get Item"), &DynamoGetItemProps{ Key: map[string]dynamoAttributeValue{ "messageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")), }, Table: myTable, })
type DynamoItemCollectionMetrics ¶
type DynamoItemCollectionMetrics string
Determines whether item collection metrics are returned.
const ( // If set to SIZE, the response includes statistics about item collections, if any, that were modified during the operation. DynamoItemCollectionMetrics_SIZE DynamoItemCollectionMetrics = "SIZE" // If set to NONE, no statistics are returned. DynamoItemCollectionMetrics_NONE DynamoItemCollectionMetrics = "NONE" )
type DynamoProjectionExpression ¶
type DynamoProjectionExpression interface { // Adds the array literal access for passed index. AtIndex(index *float64) DynamoProjectionExpression // converts and return the string expression. ToString() *string // Adds the passed attribute to the chain. WithAttribute(attr *string) DynamoProjectionExpression }
Class to generate projection expression.
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" dynamoProjectionExpression := awscdk.Aws_stepfunctions_tasks.NewDynamoProjectionExpression()
func NewDynamoProjectionExpression ¶
func NewDynamoProjectionExpression() DynamoProjectionExpression
type DynamoPutItem ¶
type DynamoPutItem interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A StepFunctions task to call DynamoPutItem.
Example:
var myTable table tasks.NewDynamoPutItem(this, jsii.String("PutItem"), &DynamoPutItemProps{ Item: map[string]dynamoAttributeValue{ "MessageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")), "Text": tasks.*dynamoAttributeValue_fromString(sfn.JsonPath_stringAt(jsii.String("$.bar"))), "TotalCount": tasks.*dynamoAttributeValue_fromNumber(jsii.Number(10)), }, Table: myTable, })
func DynamoPutItem_JsonPath ¶ added in v2.178.0
func DynamoPutItem_JsonPath(scope constructs.Construct, id *string, props *DynamoPutItemJsonPathProps) DynamoPutItem
A StepFunctions task using JSONPath to call DynamoPutItem.
func DynamoPutItem_Jsonata ¶ added in v2.178.0
func DynamoPutItem_Jsonata(scope constructs.Construct, id *string, props *DynamoPutItemJsonataProps) DynamoPutItem
A StepFunctions task using JSONata to call DynamoPutItem.
func NewDynamoPutItem ¶
func NewDynamoPutItem(scope constructs.Construct, id *string, props *DynamoPutItemProps) DynamoPutItem
type DynamoPutItemJsonPathProps ¶ added in v2.178.0
type DynamoPutItemJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // A map of attribute name/value pairs, one for each attribute. // // Only the primary key attributes are required; // you can optionally provide other attribute name-value pairs for the item. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-Item // Item *map[string]DynamoAttributeValue `field:"required" json:"item" yaml:"item"` // The name of the table where the item should be written . Table awsdynamodb.ITable `field:"required" json:"table" yaml:"table"` // A condition that must be satisfied in order for a conditional PutItem operation to succeed. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ConditionExpression // // Default: - No condition expression. // ConditionExpression *string `field:"optional" json:"conditionExpression" yaml:"conditionExpression"` // One or more substitution tokens for attribute names in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ExpressionAttributeNames // // Default: - No expression attribute names. // ExpressionAttributeNames *map[string]*string `field:"optional" json:"expressionAttributeNames" yaml:"expressionAttributeNames"` // One or more values that can be substituted in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ExpressionAttributeValues // // Default: - No expression attribute values. // ExpressionAttributeValues *map[string]DynamoAttributeValue `field:"optional" json:"expressionAttributeValues" yaml:"expressionAttributeValues"` // Determines the level of detail about provisioned throughput consumption that is returned in the response. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ReturnConsumedCapacity // // Default: DynamoConsumedCapacity.NONE // ReturnConsumedCapacity DynamoConsumedCapacity `field:"optional" json:"returnConsumedCapacity" yaml:"returnConsumedCapacity"` // The item collection metrics to returned in the response. // See: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LSI.html#LSI.ItemCollections // // Default: DynamoItemCollectionMetrics.NONE // ReturnItemCollectionMetrics DynamoItemCollectionMetrics `field:"optional" json:"returnItemCollectionMetrics" yaml:"returnItemCollectionMetrics"` // Use ReturnValues if you want to get the item attributes as they appeared before they were updated with the PutItem request. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ReturnValues // // Default: DynamoReturnValues.NONE // ReturnValues DynamoReturnValues `field:"optional" json:"returnValues" yaml:"returnValues"` }
Properties for DynamoPutItem Task using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var dynamoAttributeValue dynamoAttributeValue var resultSelector interface{} var table table var taskRole taskRole var timeout timeout dynamoPutItemJsonPathProps := &DynamoPutItemJsonPathProps{ Item: map[string]*dynamoAttributeValue{ "itemKey": dynamoAttributeValue, }, Table: table, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), ConditionExpression: jsii.String("conditionExpression"), Credentials: &Credentials{ Role: taskRole, }, ExpressionAttributeNames: map[string]*string{ "expressionAttributeNamesKey": jsii.String("expressionAttributeNames"), }, ExpressionAttributeValues: map[string]*dynamoAttributeValue{ "expressionAttributeValuesKey": dynamoAttributeValue, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, ReturnConsumedCapacity: awscdk.Aws_stepfunctions_tasks.DynamoConsumedCapacity_INDEXES, ReturnItemCollectionMetrics: awscdk.*Aws_stepfunctions_tasks.DynamoItemCollectionMetrics_SIZE, ReturnValues: awscdk.*Aws_stepfunctions_tasks.DynamoReturnValues_NONE, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type DynamoPutItemJsonataProps ¶ added in v2.178.0
type DynamoPutItemJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // A map of attribute name/value pairs, one for each attribute. // // Only the primary key attributes are required; // you can optionally provide other attribute name-value pairs for the item. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-Item // Item *map[string]DynamoAttributeValue `field:"required" json:"item" yaml:"item"` // The name of the table where the item should be written . Table awsdynamodb.ITable `field:"required" json:"table" yaml:"table"` // A condition that must be satisfied in order for a conditional PutItem operation to succeed. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ConditionExpression // // Default: - No condition expression. // ConditionExpression *string `field:"optional" json:"conditionExpression" yaml:"conditionExpression"` // One or more substitution tokens for attribute names in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ExpressionAttributeNames // // Default: - No expression attribute names. // ExpressionAttributeNames *map[string]*string `field:"optional" json:"expressionAttributeNames" yaml:"expressionAttributeNames"` // One or more values that can be substituted in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ExpressionAttributeValues // // Default: - No expression attribute values. // ExpressionAttributeValues *map[string]DynamoAttributeValue `field:"optional" json:"expressionAttributeValues" yaml:"expressionAttributeValues"` // Determines the level of detail about provisioned throughput consumption that is returned in the response. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ReturnConsumedCapacity // // Default: DynamoConsumedCapacity.NONE // ReturnConsumedCapacity DynamoConsumedCapacity `field:"optional" json:"returnConsumedCapacity" yaml:"returnConsumedCapacity"` // The item collection metrics to returned in the response. // See: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LSI.html#LSI.ItemCollections // // Default: DynamoItemCollectionMetrics.NONE // ReturnItemCollectionMetrics DynamoItemCollectionMetrics `field:"optional" json:"returnItemCollectionMetrics" yaml:"returnItemCollectionMetrics"` // Use ReturnValues if you want to get the item attributes as they appeared before they were updated with the PutItem request. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ReturnValues // // Default: DynamoReturnValues.NONE // ReturnValues DynamoReturnValues `field:"optional" json:"returnValues" yaml:"returnValues"` }
Properties for DynamoPutItem Task using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var dynamoAttributeValue dynamoAttributeValue var outputs interface{} var table table var taskRole taskRole var timeout timeout dynamoPutItemJsonataProps := &DynamoPutItemJsonataProps{ Item: map[string]*dynamoAttributeValue{ "itemKey": dynamoAttributeValue, }, Table: table, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), ConditionExpression: jsii.String("conditionExpression"), Credentials: &Credentials{ Role: taskRole, }, ExpressionAttributeNames: map[string]*string{ "expressionAttributeNamesKey": jsii.String("expressionAttributeNames"), }, ExpressionAttributeValues: map[string]*dynamoAttributeValue{ "expressionAttributeValuesKey": dynamoAttributeValue, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ReturnConsumedCapacity: awscdk.Aws_stepfunctions_tasks.DynamoConsumedCapacity_INDEXES, ReturnItemCollectionMetrics: awscdk.*Aws_stepfunctions_tasks.DynamoItemCollectionMetrics_SIZE, ReturnValues: awscdk.*Aws_stepfunctions_tasks.DynamoReturnValues_NONE, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type DynamoPutItemProps ¶
type DynamoPutItemProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // A map of attribute name/value pairs, one for each attribute. // // Only the primary key attributes are required; // you can optionally provide other attribute name-value pairs for the item. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-Item // Item *map[string]DynamoAttributeValue `field:"required" json:"item" yaml:"item"` // The name of the table where the item should be written . Table awsdynamodb.ITable `field:"required" json:"table" yaml:"table"` // A condition that must be satisfied in order for a conditional PutItem operation to succeed. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ConditionExpression // // Default: - No condition expression. // ConditionExpression *string `field:"optional" json:"conditionExpression" yaml:"conditionExpression"` // One or more substitution tokens for attribute names in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ExpressionAttributeNames // // Default: - No expression attribute names. // ExpressionAttributeNames *map[string]*string `field:"optional" json:"expressionAttributeNames" yaml:"expressionAttributeNames"` // One or more values that can be substituted in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ExpressionAttributeValues // // Default: - No expression attribute values. // ExpressionAttributeValues *map[string]DynamoAttributeValue `field:"optional" json:"expressionAttributeValues" yaml:"expressionAttributeValues"` // Determines the level of detail about provisioned throughput consumption that is returned in the response. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ReturnConsumedCapacity // // Default: DynamoConsumedCapacity.NONE // ReturnConsumedCapacity DynamoConsumedCapacity `field:"optional" json:"returnConsumedCapacity" yaml:"returnConsumedCapacity"` // The item collection metrics to returned in the response. // See: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LSI.html#LSI.ItemCollections // // Default: DynamoItemCollectionMetrics.NONE // ReturnItemCollectionMetrics DynamoItemCollectionMetrics `field:"optional" json:"returnItemCollectionMetrics" yaml:"returnItemCollectionMetrics"` // Use ReturnValues if you want to get the item attributes as they appeared before they were updated with the PutItem request. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-ReturnValues // // Default: DynamoReturnValues.NONE // ReturnValues DynamoReturnValues `field:"optional" json:"returnValues" yaml:"returnValues"` }
Properties for DynamoPutItem Task.
Example:
var myTable table tasks.NewDynamoPutItem(this, jsii.String("PutItem"), &DynamoPutItemProps{ Item: map[string]dynamoAttributeValue{ "MessageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")), "Text": tasks.*dynamoAttributeValue_fromString(sfn.JsonPath_stringAt(jsii.String("$.bar"))), "TotalCount": tasks.*dynamoAttributeValue_fromNumber(jsii.Number(10)), }, Table: myTable, })
type DynamoReturnValues ¶
type DynamoReturnValues string
Use ReturnValues if you want to get the item attributes as they appear before or after they are changed.
const ( // Nothing is returned. DynamoReturnValues_NONE DynamoReturnValues = "NONE" // Returns all of the attributes of the item. DynamoReturnValues_ALL_OLD DynamoReturnValues = "ALL_OLD" // Returns only the updated attributes. DynamoReturnValues_UPDATED_OLD DynamoReturnValues = "UPDATED_OLD" // Returns all of the attributes of the item. DynamoReturnValues_ALL_NEW DynamoReturnValues = "ALL_NEW" // Returns only the updated attributes. DynamoReturnValues_UPDATED_NEW DynamoReturnValues = "UPDATED_NEW" )
type DynamoUpdateItem ¶
type DynamoUpdateItem interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A StepFunctions task to call DynamoUpdateItem.
Example:
var myTable table tasks.NewDynamoUpdateItem(this, jsii.String("UpdateItem"), &DynamoUpdateItemProps{ Key: map[string]dynamoAttributeValue{ "MessageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")), }, Table: myTable, ExpressionAttributeValues: map[string]*dynamoAttributeValue{ ":val": tasks.*dynamoAttributeValue_numberFromString(sfn.JsonPath_stringAt(jsii.String("$.Item.TotalCount.N"))), ":rand": tasks.*dynamoAttributeValue_fromNumber(jsii.Number(20)), }, UpdateExpression: jsii.String("SET TotalCount = :val + :rand"), })
func DynamoUpdateItem_JsonPath ¶ added in v2.178.0
func DynamoUpdateItem_JsonPath(scope constructs.Construct, id *string, props *DynamoUpdateItemJsonPathProps) DynamoUpdateItem
A StepFunctions task using JSONPath to call DynamoUpdateItem.
func DynamoUpdateItem_Jsonata ¶ added in v2.178.0
func DynamoUpdateItem_Jsonata(scope constructs.Construct, id *string, props *DynamoUpdateItemJsonataProps) DynamoUpdateItem
A StepFunctions task using JSONata to call DynamoUpdateItem.
func NewDynamoUpdateItem ¶
func NewDynamoUpdateItem(scope constructs.Construct, id *string, props *DynamoUpdateItemProps) DynamoUpdateItem
type DynamoUpdateItemJsonPathProps ¶ added in v2.178.0
type DynamoUpdateItemJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Primary key of the item to retrieve. // // For the primary key, you must provide all of the attributes. // For example, with a simple primary key, you only need to provide a value for the partition key. // For a composite primary key, you must provide values for both the partition key and the sort key. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-Key // Key *map[string]DynamoAttributeValue `field:"required" json:"key" yaml:"key"` // The name of the table containing the requested item. Table awsdynamodb.ITable `field:"required" json:"table" yaml:"table"` // A condition that must be satisfied in order for a conditional DeleteItem to succeed. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ConditionExpression // // Default: - No condition expression. // ConditionExpression *string `field:"optional" json:"conditionExpression" yaml:"conditionExpression"` // One or more substitution tokens for attribute names in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ExpressionAttributeNames // // Default: - No expression attribute names. // ExpressionAttributeNames *map[string]*string `field:"optional" json:"expressionAttributeNames" yaml:"expressionAttributeNames"` // One or more values that can be substituted in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ExpressionAttributeValues // // Default: - No expression attribute values. // ExpressionAttributeValues *map[string]DynamoAttributeValue `field:"optional" json:"expressionAttributeValues" yaml:"expressionAttributeValues"` // Determines the level of detail about provisioned throughput consumption that is returned in the response. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ReturnConsumedCapacity // // Default: DynamoConsumedCapacity.NONE // ReturnConsumedCapacity DynamoConsumedCapacity `field:"optional" json:"returnConsumedCapacity" yaml:"returnConsumedCapacity"` // Determines whether item collection metrics are returned. // // If set to SIZE, the response includes statistics about item collections, if any, // that were modified during the operation are returned in the response. // If set to NONE (the default), no statistics are returned. // Default: DynamoItemCollectionMetrics.NONE // ReturnItemCollectionMetrics DynamoItemCollectionMetrics `field:"optional" json:"returnItemCollectionMetrics" yaml:"returnItemCollectionMetrics"` // Use ReturnValues if you want to get the item attributes as they appeared before they were deleted. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ReturnValues // // Default: DynamoReturnValues.NONE // ReturnValues DynamoReturnValues `field:"optional" json:"returnValues" yaml:"returnValues"` // An expression that defines one or more attributes to be updated, the action to be performed on them, and new values for them. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-UpdateExpression // // Default: - No update expression. // UpdateExpression *string `field:"optional" json:"updateExpression" yaml:"updateExpression"` }
Properties for DynamoUpdateItem Task using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var dynamoAttributeValue dynamoAttributeValue var resultSelector interface{} var table table var taskRole taskRole var timeout timeout dynamoUpdateItemJsonPathProps := &DynamoUpdateItemJsonPathProps{ Key: map[string]*dynamoAttributeValue{ "keyKey": dynamoAttributeValue, }, Table: table, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), ConditionExpression: jsii.String("conditionExpression"), Credentials: &Credentials{ Role: taskRole, }, ExpressionAttributeNames: map[string]*string{ "expressionAttributeNamesKey": jsii.String("expressionAttributeNames"), }, ExpressionAttributeValues: map[string]*dynamoAttributeValue{ "expressionAttributeValuesKey": dynamoAttributeValue, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, ReturnConsumedCapacity: awscdk.Aws_stepfunctions_tasks.DynamoConsumedCapacity_INDEXES, ReturnItemCollectionMetrics: awscdk.*Aws_stepfunctions_tasks.DynamoItemCollectionMetrics_SIZE, ReturnValues: awscdk.*Aws_stepfunctions_tasks.DynamoReturnValues_NONE, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), UpdateExpression: jsii.String("updateExpression"), }
type DynamoUpdateItemJsonataProps ¶ added in v2.178.0
type DynamoUpdateItemJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Primary key of the item to retrieve. // // For the primary key, you must provide all of the attributes. // For example, with a simple primary key, you only need to provide a value for the partition key. // For a composite primary key, you must provide values for both the partition key and the sort key. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-Key // Key *map[string]DynamoAttributeValue `field:"required" json:"key" yaml:"key"` // The name of the table containing the requested item. Table awsdynamodb.ITable `field:"required" json:"table" yaml:"table"` // A condition that must be satisfied in order for a conditional DeleteItem to succeed. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ConditionExpression // // Default: - No condition expression. // ConditionExpression *string `field:"optional" json:"conditionExpression" yaml:"conditionExpression"` // One or more substitution tokens for attribute names in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ExpressionAttributeNames // // Default: - No expression attribute names. // ExpressionAttributeNames *map[string]*string `field:"optional" json:"expressionAttributeNames" yaml:"expressionAttributeNames"` // One or more values that can be substituted in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ExpressionAttributeValues // // Default: - No expression attribute values. // ExpressionAttributeValues *map[string]DynamoAttributeValue `field:"optional" json:"expressionAttributeValues" yaml:"expressionAttributeValues"` // Determines the level of detail about provisioned throughput consumption that is returned in the response. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ReturnConsumedCapacity // // Default: DynamoConsumedCapacity.NONE // ReturnConsumedCapacity DynamoConsumedCapacity `field:"optional" json:"returnConsumedCapacity" yaml:"returnConsumedCapacity"` // Determines whether item collection metrics are returned. // // If set to SIZE, the response includes statistics about item collections, if any, // that were modified during the operation are returned in the response. // If set to NONE (the default), no statistics are returned. // Default: DynamoItemCollectionMetrics.NONE // ReturnItemCollectionMetrics DynamoItemCollectionMetrics `field:"optional" json:"returnItemCollectionMetrics" yaml:"returnItemCollectionMetrics"` // Use ReturnValues if you want to get the item attributes as they appeared before they were deleted. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ReturnValues // // Default: DynamoReturnValues.NONE // ReturnValues DynamoReturnValues `field:"optional" json:"returnValues" yaml:"returnValues"` // An expression that defines one or more attributes to be updated, the action to be performed on them, and new values for them. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-UpdateExpression // // Default: - No update expression. // UpdateExpression *string `field:"optional" json:"updateExpression" yaml:"updateExpression"` }
Properties for DynamoUpdateItem Task using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var dynamoAttributeValue dynamoAttributeValue var outputs interface{} var table table var taskRole taskRole var timeout timeout dynamoUpdateItemJsonataProps := &DynamoUpdateItemJsonataProps{ Key: map[string]*dynamoAttributeValue{ "keyKey": dynamoAttributeValue, }, Table: table, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), ConditionExpression: jsii.String("conditionExpression"), Credentials: &Credentials{ Role: taskRole, }, ExpressionAttributeNames: map[string]*string{ "expressionAttributeNamesKey": jsii.String("expressionAttributeNames"), }, ExpressionAttributeValues: map[string]*dynamoAttributeValue{ "expressionAttributeValuesKey": dynamoAttributeValue, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ReturnConsumedCapacity: awscdk.Aws_stepfunctions_tasks.DynamoConsumedCapacity_INDEXES, ReturnItemCollectionMetrics: awscdk.*Aws_stepfunctions_tasks.DynamoItemCollectionMetrics_SIZE, ReturnValues: awscdk.*Aws_stepfunctions_tasks.DynamoReturnValues_NONE, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), UpdateExpression: jsii.String("updateExpression"), }
type DynamoUpdateItemProps ¶
type DynamoUpdateItemProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Primary key of the item to retrieve. // // For the primary key, you must provide all of the attributes. // For example, with a simple primary key, you only need to provide a value for the partition key. // For a composite primary key, you must provide values for both the partition key and the sort key. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#DDB-GetItem-request-Key // Key *map[string]DynamoAttributeValue `field:"required" json:"key" yaml:"key"` // The name of the table containing the requested item. Table awsdynamodb.ITable `field:"required" json:"table" yaml:"table"` // A condition that must be satisfied in order for a conditional DeleteItem to succeed. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ConditionExpression // // Default: - No condition expression. // ConditionExpression *string `field:"optional" json:"conditionExpression" yaml:"conditionExpression"` // One or more substitution tokens for attribute names in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ExpressionAttributeNames // // Default: - No expression attribute names. // ExpressionAttributeNames *map[string]*string `field:"optional" json:"expressionAttributeNames" yaml:"expressionAttributeNames"` // One or more values that can be substituted in an expression. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ExpressionAttributeValues // // Default: - No expression attribute values. // ExpressionAttributeValues *map[string]DynamoAttributeValue `field:"optional" json:"expressionAttributeValues" yaml:"expressionAttributeValues"` // Determines the level of detail about provisioned throughput consumption that is returned in the response. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ReturnConsumedCapacity // // Default: DynamoConsumedCapacity.NONE // ReturnConsumedCapacity DynamoConsumedCapacity `field:"optional" json:"returnConsumedCapacity" yaml:"returnConsumedCapacity"` // Determines whether item collection metrics are returned. // // If set to SIZE, the response includes statistics about item collections, if any, // that were modified during the operation are returned in the response. // If set to NONE (the default), no statistics are returned. // Default: DynamoItemCollectionMetrics.NONE // ReturnItemCollectionMetrics DynamoItemCollectionMetrics `field:"optional" json:"returnItemCollectionMetrics" yaml:"returnItemCollectionMetrics"` // Use ReturnValues if you want to get the item attributes as they appeared before they were deleted. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ReturnValues // // Default: DynamoReturnValues.NONE // ReturnValues DynamoReturnValues `field:"optional" json:"returnValues" yaml:"returnValues"` // An expression that defines one or more attributes to be updated, the action to be performed on them, and new values for them. // See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-UpdateExpression // // Default: - No update expression. // UpdateExpression *string `field:"optional" json:"updateExpression" yaml:"updateExpression"` }
Properties for DynamoUpdateItem Task.
Example:
var myTable table tasks.NewDynamoUpdateItem(this, jsii.String("UpdateItem"), &DynamoUpdateItemProps{ Key: map[string]dynamoAttributeValue{ "MessageId": tasks.*dynamoAttributeValue_fromString(jsii.String("message-007")), }, Table: myTable, ExpressionAttributeValues: map[string]*dynamoAttributeValue{ ":val": tasks.*dynamoAttributeValue_numberFromString(sfn.JsonPath_stringAt(jsii.String("$.Item.TotalCount.N"))), ":rand": tasks.*dynamoAttributeValue_fromNumber(jsii.Number(20)), }, UpdateExpression: jsii.String("SET TotalCount = :val + :rand"), })
type EcsEc2LaunchTarget ¶
type EcsEc2LaunchTarget interface { IEcsLaunchTarget // Called when the EC2 launch type is configured on RunTask. Bind(_task EcsRunTask, launchTargetOptions *LaunchTargetBindOptions) *EcsLaunchTargetConfig }
Configuration for running an ECS task on EC2.
Example:
vpc := ec2.Vpc_FromLookup(this, jsii.String("Vpc"), &VpcLookupOptions{ IsDefault: jsii.Boolean(true), }) cluster := ecs.NewCluster(this, jsii.String("Ec2Cluster"), &ClusterProps{ Vpc: Vpc, }) cluster.AddCapacity(jsii.String("DefaultAutoScalingGroup"), &AddCapacityOptions{ InstanceType: ec2.NewInstanceType(jsii.String("t2.micro")), VpcSubnets: &SubnetSelection{ SubnetType: ec2.SubnetType_PUBLIC, }, }) taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TD"), &TaskDefinitionProps{ Compatibility: ecs.Compatibility_EC2, }) taskDefinition.AddContainer(jsii.String("TheContainer"), &ContainerDefinitionOptions{ Image: ecs.ContainerImage_FromRegistry(jsii.String("foo/bar")), MemoryLimitMiB: jsii.Number(256), }) runTask := tasks.NewEcsRunTask(this, jsii.String("Run"), &EcsRunTaskProps{ IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, Cluster: Cluster, TaskDefinition: TaskDefinition, LaunchTarget: tasks.NewEcsEc2LaunchTarget(&EcsEc2LaunchTargetOptions{ PlacementStrategies: []placementStrategy{ ecs.*placementStrategy_SpreadAcrossInstances(), ecs.*placementStrategy_PackedByCpu(), ecs.*placementStrategy_Randomly(), }, PlacementConstraints: []placementConstraint{ ecs.*placementConstraint_MemberOf(jsii.String("blieptuut")), }, }), PropagatedTagSource: ecs.PropagatedTagSource_TASK_DEFINITION, })
See: https://docs.aws.amazon.com/AmazonECS/latest/userguide/launch_types.html#launch-type-ec2
func NewEcsEc2LaunchTarget ¶
func NewEcsEc2LaunchTarget(options *EcsEc2LaunchTargetOptions) EcsEc2LaunchTarget
type EcsEc2LaunchTargetOptions ¶
type EcsEc2LaunchTargetOptions struct { // Placement constraints. // Default: - None. // PlacementConstraints *[]awsecs.PlacementConstraint `field:"optional" json:"placementConstraints" yaml:"placementConstraints"` // Placement strategies. // Default: - None. // PlacementStrategies *[]awsecs.PlacementStrategy `field:"optional" json:"placementStrategies" yaml:"placementStrategies"` }
Options to run an ECS task on EC2 in StepFunctions and ECS.
Example:
vpc := ec2.Vpc_FromLookup(this, jsii.String("Vpc"), &VpcLookupOptions{ IsDefault: jsii.Boolean(true), }) cluster := ecs.NewCluster(this, jsii.String("Ec2Cluster"), &ClusterProps{ Vpc: Vpc, }) cluster.AddCapacity(jsii.String("DefaultAutoScalingGroup"), &AddCapacityOptions{ InstanceType: ec2.NewInstanceType(jsii.String("t2.micro")), VpcSubnets: &SubnetSelection{ SubnetType: ec2.SubnetType_PUBLIC, }, }) taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TD"), &TaskDefinitionProps{ Compatibility: ecs.Compatibility_EC2, }) taskDefinition.AddContainer(jsii.String("TheContainer"), &ContainerDefinitionOptions{ Image: ecs.ContainerImage_FromRegistry(jsii.String("foo/bar")), MemoryLimitMiB: jsii.Number(256), }) runTask := tasks.NewEcsRunTask(this, jsii.String("Run"), &EcsRunTaskProps{ IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, Cluster: Cluster, TaskDefinition: TaskDefinition, LaunchTarget: tasks.NewEcsEc2LaunchTarget(&EcsEc2LaunchTargetOptions{ PlacementStrategies: []placementStrategy{ ecs.*placementStrategy_SpreadAcrossInstances(), ecs.*placementStrategy_PackedByCpu(), ecs.*placementStrategy_Randomly(), }, PlacementConstraints: []placementConstraint{ ecs.*placementConstraint_MemberOf(jsii.String("blieptuut")), }, }), PropagatedTagSource: ecs.PropagatedTagSource_TASK_DEFINITION, })
type EcsFargateLaunchTarget ¶
type EcsFargateLaunchTarget interface { IEcsLaunchTarget // Called when the Fargate launch type configured on RunTask. Bind(_task EcsRunTask, launchTargetOptions *LaunchTargetBindOptions) *EcsLaunchTargetConfig }
Configuration for running an ECS task on Fargate.
Example:
vpc := ec2.Vpc_FromLookup(this, jsii.String("Vpc"), &VpcLookupOptions{ IsDefault: jsii.Boolean(true), }) cluster := ecs.NewCluster(this, jsii.String("FargateCluster"), &ClusterProps{ Vpc: Vpc, }) taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TD"), &TaskDefinitionProps{ MemoryMiB: jsii.String("512"), Cpu: jsii.String("256"), Compatibility: ecs.Compatibility_FARGATE, }) containerDefinition := taskDefinition.AddContainer(jsii.String("TheContainer"), &ContainerDefinitionOptions{ Image: ecs.ContainerImage_FromRegistry(jsii.String("foo/bar")), MemoryLimitMiB: jsii.Number(256), }) runTask := tasks.NewEcsRunTask(this, jsii.String("RunFargate"), &EcsRunTaskProps{ IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, Cluster: Cluster, TaskDefinition: TaskDefinition, AssignPublicIp: jsii.Boolean(true), ContainerOverrides: []containerOverride{ &containerOverride{ ContainerDefinition: *ContainerDefinition, Environment: []taskEnvironmentVariable{ &taskEnvironmentVariable{ Name: jsii.String("SOME_KEY"), Value: sfn.JsonPath_StringAt(jsii.String("$.SomeKey")), }, }, }, }, LaunchTarget: tasks.NewEcsFargateLaunchTarget(), PropagatedTagSource: ecs.PropagatedTagSource_TASK_DEFINITION, })
See: https://docs.aws.amazon.com/AmazonECS/latest/userguide/launch_types.html#launch-type-fargate
func NewEcsFargateLaunchTarget ¶
func NewEcsFargateLaunchTarget(options *EcsFargateLaunchTargetOptions) EcsFargateLaunchTarget
type EcsFargateLaunchTargetOptions ¶
type EcsFargateLaunchTargetOptions struct { // Refers to a specific runtime environment for Fargate task infrastructure. // // Fargate platform version is a combination of the kernel and container runtime versions. // See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html // PlatformVersion awsecs.FargatePlatformVersion `field:"required" json:"platformVersion" yaml:"platformVersion"` }
Properties to define an ECS service.
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" ecsFargateLaunchTargetOptions := &EcsFargateLaunchTargetOptions{ PlatformVersion: awscdk.Aws_ecs.FargatePlatformVersion_LATEST, }
type EcsLaunchTargetConfig ¶
type EcsLaunchTargetConfig struct { // Additional parameters to pass to the base task. // Default: - No additional parameters passed. // Parameters *map[string]interface{} `field:"optional" json:"parameters" yaml:"parameters"` }
Configuration options for the ECS launch type.
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{} ecsLaunchTargetConfig := &EcsLaunchTargetConfig{ Parameters: map[string]interface{}{ "parametersKey": parameters, }, }
type EcsRunTask ¶
type EcsRunTask interface { awsstepfunctions.TaskStateBase awsec2.IConnectable Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string // Manage allowed network traffic for this service. Connections() awsec2.Connections DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Run a Task on ECS or Fargate.
Example:
vpc := ec2.Vpc_FromLookup(this, jsii.String("Vpc"), &VpcLookupOptions{ IsDefault: jsii.Boolean(true), }) cluster := ecs.NewCluster(this, jsii.String("FargateCluster"), &ClusterProps{ Vpc: Vpc, }) taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TD"), &TaskDefinitionProps{ MemoryMiB: jsii.String("512"), Cpu: jsii.String("256"), Compatibility: ecs.Compatibility_FARGATE, }) containerDefinition := taskDefinition.AddContainer(jsii.String("TheContainer"), &ContainerDefinitionOptions{ Image: ecs.ContainerImage_FromRegistry(jsii.String("foo/bar")), MemoryLimitMiB: jsii.Number(256), }) runTask := tasks.NewEcsRunTask(this, jsii.String("RunFargate"), &EcsRunTaskProps{ IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, Cluster: Cluster, TaskDefinition: TaskDefinition, AssignPublicIp: jsii.Boolean(true), ContainerOverrides: []containerOverride{ &containerOverride{ ContainerDefinition: *ContainerDefinition, Environment: []taskEnvironmentVariable{ &taskEnvironmentVariable{ Name: jsii.String("SOME_KEY"), Value: sfn.JsonPath_StringAt(jsii.String("$.SomeKey")), }, }, }, }, LaunchTarget: tasks.NewEcsFargateLaunchTarget(), PropagatedTagSource: ecs.PropagatedTagSource_TASK_DEFINITION, })
func EcsRunTask_JsonPath ¶ added in v2.178.0
func EcsRunTask_JsonPath(scope constructs.Construct, id *string, props *EcsRunTaskJsonPathProps) EcsRunTask
Run a Task that using JSONPath on ECS or Fargate.
func EcsRunTask_Jsonata ¶ added in v2.178.0
func EcsRunTask_Jsonata(scope constructs.Construct, id *string, props *EcsRunTaskJsonataProps) EcsRunTask
Run a Task that using JSONata on ECS or Fargate.
func NewEcsRunTask ¶
func NewEcsRunTask(scope constructs.Construct, id *string, props *EcsRunTaskProps) EcsRunTask
type EcsRunTaskJsonPathProps ¶ added in v2.178.0
type EcsRunTaskJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The ECS cluster to run the task on. Cluster awsecs.ICluster `field:"required" json:"cluster" yaml:"cluster"` // An Amazon ECS launch type determines the type of infrastructure on which your tasks and services are hosted. // See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html // LaunchTarget IEcsLaunchTarget `field:"required" json:"launchTarget" yaml:"launchTarget"` // [disable-awslint:ref-via-interface] Task Definition used for running tasks in the service. // // Note: this must be TaskDefinition, and not ITaskDefinition, // as it requires properties that are not known for imported task definitions // If you want to run a RunTask with an imported task definition, // consider using CustomState. TaskDefinition awsecs.TaskDefinition `field:"required" json:"taskDefinition" yaml:"taskDefinition"` // Assign public IP addresses to each task. // Default: false. // AssignPublicIp *bool `field:"optional" json:"assignPublicIp" yaml:"assignPublicIp"` // Container setting overrides. // // Specify the container to use and the overrides to apply. // Default: - No overrides. // ContainerOverrides *[]*ContainerOverride `field:"optional" json:"containerOverrides" yaml:"containerOverrides"` // Cpu setting override. // See: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskOverride.html // // Default: - No override. // Cpu *string `field:"optional" json:"cpu" yaml:"cpu"` // Whether ECS Exec should be enabled. // See: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html#ECS-RunTask-request-enableExecuteCommand // // Default: false. // EnableExecuteCommand *bool `field:"optional" json:"enableExecuteCommand" yaml:"enableExecuteCommand"` // Memory setting override. // See: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskOverride.html // // Default: - No override. // MemoryMiB *string `field:"optional" json:"memoryMiB" yaml:"memoryMiB"` // Specifies whether to propagate the tags from the task definition to the task. // // An error will be received if you specify the SERVICE option when running a task. // See: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html#ECS-RunTask-request-propagateTags // // Default: - No tags are propagated. // PropagatedTagSource awsecs.PropagatedTagSource `field:"optional" json:"propagatedTagSource" yaml:"propagatedTagSource"` // The revision number of ECS task definition family. // Default: - '$latest'. // RevisionNumber *float64 `field:"optional" json:"revisionNumber" yaml:"revisionNumber"` // Existing security groups to use for the tasks. // Default: - A new security group is created. // SecurityGroups *[]awsec2.ISecurityGroup `field:"optional" json:"securityGroups" yaml:"securityGroups"` // Subnets to place the task's ENIs. // Default: - Public subnets if assignPublicIp is set. Private subnets otherwise. // Subnets *awsec2.SubnetSelection `field:"optional" json:"subnets" yaml:"subnets"` }
Properties for ECS Tasks using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var cluster cluster var containerDefinition containerDefinition var ecsLaunchTarget iEcsLaunchTarget var resultSelector interface{} var securityGroup securityGroup var subnet subnet var subnetFilter subnetFilter var taskDefinition taskDefinition var taskRole taskRole var timeout timeout ecsRunTaskJsonPathProps := &EcsRunTaskJsonPathProps{ Cluster: cluster, LaunchTarget: ecsLaunchTarget, TaskDefinition: taskDefinition, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, AssignPublicIp: jsii.Boolean(false), Comment: jsii.String("comment"), ContainerOverrides: []containerOverride{ &containerOverride{ ContainerDefinition: containerDefinition, // the properties below are optional Command: []*string{ jsii.String("command"), }, Cpu: jsii.Number(123), Environment: []taskEnvironmentVariable{ &taskEnvironmentVariable{ Name: jsii.String("name"), Value: jsii.String("value"), }, }, MemoryLimit: jsii.Number(123), MemoryReservation: jsii.Number(123), }, }, Cpu: jsii.String("cpu"), Credentials: &Credentials{ Role: taskRole, }, EnableExecuteCommand: jsii.Boolean(false), Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, MemoryMiB: jsii.String("memoryMiB"), OutputPath: jsii.String("outputPath"), PropagatedTagSource: awscdk.Aws_ecs.PropagatedTagSource_SERVICE, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, RevisionNumber: jsii.Number(123), SecurityGroups: []iSecurityGroup{ securityGroup, }, StateName: jsii.String("stateName"), Subnets: &SubnetSelection{ AvailabilityZones: []*string{ jsii.String("availabilityZones"), }, OnePerAz: jsii.Boolean(false), SubnetFilters: []*subnetFilter{ subnetFilter, }, SubnetGroupName: jsii.String("subnetGroupName"), Subnets: []iSubnet{ subnet, }, SubnetType: awscdk.Aws_ec2.SubnetType_PRIVATE_ISOLATED, }, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EcsRunTaskJsonataProps ¶ added in v2.178.0
type EcsRunTaskJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The ECS cluster to run the task on. Cluster awsecs.ICluster `field:"required" json:"cluster" yaml:"cluster"` // An Amazon ECS launch type determines the type of infrastructure on which your tasks and services are hosted. // See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html // LaunchTarget IEcsLaunchTarget `field:"required" json:"launchTarget" yaml:"launchTarget"` // [disable-awslint:ref-via-interface] Task Definition used for running tasks in the service. // // Note: this must be TaskDefinition, and not ITaskDefinition, // as it requires properties that are not known for imported task definitions // If you want to run a RunTask with an imported task definition, // consider using CustomState. TaskDefinition awsecs.TaskDefinition `field:"required" json:"taskDefinition" yaml:"taskDefinition"` // Assign public IP addresses to each task. // Default: false. // AssignPublicIp *bool `field:"optional" json:"assignPublicIp" yaml:"assignPublicIp"` // Container setting overrides. // // Specify the container to use and the overrides to apply. // Default: - No overrides. // ContainerOverrides *[]*ContainerOverride `field:"optional" json:"containerOverrides" yaml:"containerOverrides"` // Cpu setting override. // See: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskOverride.html // // Default: - No override. // Cpu *string `field:"optional" json:"cpu" yaml:"cpu"` // Whether ECS Exec should be enabled. // See: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html#ECS-RunTask-request-enableExecuteCommand // // Default: false. // EnableExecuteCommand *bool `field:"optional" json:"enableExecuteCommand" yaml:"enableExecuteCommand"` // Memory setting override. // See: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskOverride.html // // Default: - No override. // MemoryMiB *string `field:"optional" json:"memoryMiB" yaml:"memoryMiB"` // Specifies whether to propagate the tags from the task definition to the task. // // An error will be received if you specify the SERVICE option when running a task. // See: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html#ECS-RunTask-request-propagateTags // // Default: - No tags are propagated. // PropagatedTagSource awsecs.PropagatedTagSource `field:"optional" json:"propagatedTagSource" yaml:"propagatedTagSource"` // The revision number of ECS task definition family. // Default: - '$latest'. // RevisionNumber *float64 `field:"optional" json:"revisionNumber" yaml:"revisionNumber"` // Existing security groups to use for the tasks. // Default: - A new security group is created. // SecurityGroups *[]awsec2.ISecurityGroup `field:"optional" json:"securityGroups" yaml:"securityGroups"` // Subnets to place the task's ENIs. // Default: - Public subnets if assignPublicIp is set. Private subnets otherwise. // Subnets *awsec2.SubnetSelection `field:"optional" json:"subnets" yaml:"subnets"` }
Properties for ECS Tasks using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var cluster cluster var containerDefinition containerDefinition var ecsLaunchTarget iEcsLaunchTarget var outputs interface{} var securityGroup securityGroup var subnet subnet var subnetFilter subnetFilter var taskDefinition taskDefinition var taskRole taskRole var timeout timeout ecsRunTaskJsonataProps := &EcsRunTaskJsonataProps{ Cluster: cluster, LaunchTarget: ecsLaunchTarget, TaskDefinition: taskDefinition, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, AssignPublicIp: jsii.Boolean(false), Comment: jsii.String("comment"), ContainerOverrides: []containerOverride{ &containerOverride{ ContainerDefinition: containerDefinition, // the properties below are optional Command: []*string{ jsii.String("command"), }, Cpu: jsii.Number(123), Environment: []taskEnvironmentVariable{ &taskEnvironmentVariable{ Name: jsii.String("name"), Value: jsii.String("value"), }, }, MemoryLimit: jsii.Number(123), MemoryReservation: jsii.Number(123), }, }, Cpu: jsii.String("cpu"), Credentials: &Credentials{ Role: taskRole, }, EnableExecuteCommand: jsii.Boolean(false), Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, MemoryMiB: jsii.String("memoryMiB"), Outputs: outputs, PropagatedTagSource: awscdk.Aws_ecs.PropagatedTagSource_SERVICE, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, RevisionNumber: jsii.Number(123), SecurityGroups: []iSecurityGroup{ securityGroup, }, StateName: jsii.String("stateName"), Subnets: &SubnetSelection{ AvailabilityZones: []*string{ jsii.String("availabilityZones"), }, OnePerAz: jsii.Boolean(false), SubnetFilters: []*subnetFilter{ subnetFilter, }, SubnetGroupName: jsii.String("subnetGroupName"), Subnets: []iSubnet{ subnet, }, SubnetType: awscdk.Aws_ec2.SubnetType_PRIVATE_ISOLATED, }, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EcsRunTaskProps ¶
type EcsRunTaskProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The ECS cluster to run the task on. Cluster awsecs.ICluster `field:"required" json:"cluster" yaml:"cluster"` // An Amazon ECS launch type determines the type of infrastructure on which your tasks and services are hosted. // See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html // LaunchTarget IEcsLaunchTarget `field:"required" json:"launchTarget" yaml:"launchTarget"` // [disable-awslint:ref-via-interface] Task Definition used for running tasks in the service. // // Note: this must be TaskDefinition, and not ITaskDefinition, // as it requires properties that are not known for imported task definitions // If you want to run a RunTask with an imported task definition, // consider using CustomState. TaskDefinition awsecs.TaskDefinition `field:"required" json:"taskDefinition" yaml:"taskDefinition"` // Assign public IP addresses to each task. // Default: false. // AssignPublicIp *bool `field:"optional" json:"assignPublicIp" yaml:"assignPublicIp"` // Container setting overrides. // // Specify the container to use and the overrides to apply. // Default: - No overrides. // ContainerOverrides *[]*ContainerOverride `field:"optional" json:"containerOverrides" yaml:"containerOverrides"` // Cpu setting override. // See: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskOverride.html // // Default: - No override. // Cpu *string `field:"optional" json:"cpu" yaml:"cpu"` // Whether ECS Exec should be enabled. // See: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html#ECS-RunTask-request-enableExecuteCommand // // Default: false. // EnableExecuteCommand *bool `field:"optional" json:"enableExecuteCommand" yaml:"enableExecuteCommand"` // Memory setting override. // See: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskOverride.html // // Default: - No override. // MemoryMiB *string `field:"optional" json:"memoryMiB" yaml:"memoryMiB"` // Specifies whether to propagate the tags from the task definition to the task. // // An error will be received if you specify the SERVICE option when running a task. // See: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html#ECS-RunTask-request-propagateTags // // Default: - No tags are propagated. // PropagatedTagSource awsecs.PropagatedTagSource `field:"optional" json:"propagatedTagSource" yaml:"propagatedTagSource"` // The revision number of ECS task definition family. // Default: - '$latest'. // RevisionNumber *float64 `field:"optional" json:"revisionNumber" yaml:"revisionNumber"` // Existing security groups to use for the tasks. // Default: - A new security group is created. // SecurityGroups *[]awsec2.ISecurityGroup `field:"optional" json:"securityGroups" yaml:"securityGroups"` // Subnets to place the task's ENIs. // Default: - Public subnets if assignPublicIp is set. Private subnets otherwise. // Subnets *awsec2.SubnetSelection `field:"optional" json:"subnets" yaml:"subnets"` }
Properties for ECS Tasks.
Example:
vpc := ec2.Vpc_FromLookup(this, jsii.String("Vpc"), &VpcLookupOptions{ IsDefault: jsii.Boolean(true), }) cluster := ecs.NewCluster(this, jsii.String("FargateCluster"), &ClusterProps{ Vpc: Vpc, }) taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TD"), &TaskDefinitionProps{ MemoryMiB: jsii.String("512"), Cpu: jsii.String("256"), Compatibility: ecs.Compatibility_FARGATE, }) containerDefinition := taskDefinition.AddContainer(jsii.String("TheContainer"), &ContainerDefinitionOptions{ Image: ecs.ContainerImage_FromRegistry(jsii.String("foo/bar")), MemoryLimitMiB: jsii.Number(256), }) runTask := tasks.NewEcsRunTask(this, jsii.String("RunFargate"), &EcsRunTaskProps{ IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, Cluster: Cluster, TaskDefinition: TaskDefinition, AssignPublicIp: jsii.Boolean(true), ContainerOverrides: []containerOverride{ &containerOverride{ ContainerDefinition: *ContainerDefinition, Environment: []taskEnvironmentVariable{ &taskEnvironmentVariable{ Name: jsii.String("SOME_KEY"), Value: sfn.JsonPath_StringAt(jsii.String("$.SomeKey")), }, }, }, }, LaunchTarget: tasks.NewEcsFargateLaunchTarget(), PropagatedTagSource: ecs.PropagatedTagSource_TASK_DEFINITION, })
type EksCall ¶
type EksCall interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string // No policies are required due to eks:call is an Http service integration and does not call and EKS API directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-eks.html#connect-eks-permissions // TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Call a EKS endpoint as a Task.
Example:
import "github.com/aws/aws-cdk-go/awscdk" import "github.com/cdklabs/awscdk-kubectl-go/kubectlv32" myEksCluster := eks.NewCluster(this, jsii.String("my sample cluster"), &ClusterProps{ Version: eks.KubernetesVersion_V1_32(), ClusterName: jsii.String("myEksCluster"), KubectlLayer: kubectlv32.NewKubectlV32Layer(this, jsii.String("kubectl")), }) tasks.NewEksCall(this, jsii.String("Call a EKS Endpoint"), &EksCallProps{ Cluster: myEksCluster, HttpMethod: tasks.HttpMethods_GET, HttpPath: jsii.String("/api/v1/namespaces/default/pods"), })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-eks.html
func EksCall_JsonPath ¶ added in v2.178.0
func EksCall_JsonPath(scope constructs.Construct, id *string, props *EksCallJsonPathProps) EksCall
Call a EKS endpoint as a Task that using JSONPath. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-eks.html
func EksCall_Jsonata ¶ added in v2.178.0
func EksCall_Jsonata(scope constructs.Construct, id *string, props *EksCallJsonataProps) EksCall
Call a EKS endpoint as a Task that using JSONata. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-eks.html
func NewEksCall ¶
func NewEksCall(scope constructs.Construct, id *string, props *EksCallProps) EksCall
type EksCallJsonPathProps ¶ added in v2.178.0
type EksCallJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The EKS cluster. Cluster awseks.ICluster `field:"required" json:"cluster" yaml:"cluster"` // HTTP method ("GET", "POST", "PUT", ...) part of HTTP request. HttpMethod HttpMethods `field:"required" json:"httpMethod" yaml:"httpMethod"` // HTTP path of the Kubernetes REST API operation For example: /api/v1/namespaces/default/pods. HttpPath *string `field:"required" json:"httpPath" yaml:"httpPath"` // Query Parameters part of HTTP request. // Default: - no query parameters. // QueryParameters *map[string]*[]*string `field:"optional" json:"queryParameters" yaml:"queryParameters"` // Request body part of HTTP request. // Default: - No request body. // RequestBody awsstepfunctions.TaskInput `field:"optional" json:"requestBody" yaml:"requestBody"` }
Properties for calling a EKS endpoint with EksCall using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var cluster cluster var resultSelector interface{} var taskInput taskInput var taskRole taskRole var timeout timeout eksCallJsonPathProps := &EksCallJsonPathProps{ Cluster: cluster, HttpMethod: awscdk.Aws_stepfunctions_tasks.HttpMethods_GET, HttpPath: jsii.String("httpPath"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, QueryParameters: map[string][]*string{ "queryParametersKey": []*string{ jsii.String("queryParameters"), }, }, RequestBody: taskInput, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EksCallJsonataProps ¶ added in v2.178.0
type EksCallJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The EKS cluster. Cluster awseks.ICluster `field:"required" json:"cluster" yaml:"cluster"` // HTTP method ("GET", "POST", "PUT", ...) part of HTTP request. HttpMethod HttpMethods `field:"required" json:"httpMethod" yaml:"httpMethod"` // HTTP path of the Kubernetes REST API operation For example: /api/v1/namespaces/default/pods. HttpPath *string `field:"required" json:"httpPath" yaml:"httpPath"` // Query Parameters part of HTTP request. // Default: - no query parameters. // QueryParameters *map[string]*[]*string `field:"optional" json:"queryParameters" yaml:"queryParameters"` // Request body part of HTTP request. // Default: - No request body. // RequestBody awsstepfunctions.TaskInput `field:"optional" json:"requestBody" yaml:"requestBody"` }
Properties for calling a EKS endpoint with EksCall using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var cluster cluster var outputs interface{} var taskInput taskInput var taskRole taskRole var timeout timeout eksCallJsonataProps := &EksCallJsonataProps{ Cluster: cluster, HttpMethod: awscdk.Aws_stepfunctions_tasks.HttpMethods_GET, HttpPath: jsii.String("httpPath"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, QueryParameters: map[string][]*string{ "queryParametersKey": []*string{ jsii.String("queryParameters"), }, }, RequestBody: taskInput, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EksCallProps ¶
type EksCallProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The EKS cluster. Cluster awseks.ICluster `field:"required" json:"cluster" yaml:"cluster"` // HTTP method ("GET", "POST", "PUT", ...) part of HTTP request. HttpMethod HttpMethods `field:"required" json:"httpMethod" yaml:"httpMethod"` // HTTP path of the Kubernetes REST API operation For example: /api/v1/namespaces/default/pods. HttpPath *string `field:"required" json:"httpPath" yaml:"httpPath"` // Query Parameters part of HTTP request. // Default: - no query parameters. // QueryParameters *map[string]*[]*string `field:"optional" json:"queryParameters" yaml:"queryParameters"` // Request body part of HTTP request. // Default: - No request body. // RequestBody awsstepfunctions.TaskInput `field:"optional" json:"requestBody" yaml:"requestBody"` }
Properties for calling a EKS endpoint with EksCall.
Example:
import "github.com/aws/aws-cdk-go/awscdk" import "github.com/cdklabs/awscdk-kubectl-go/kubectlv32" myEksCluster := eks.NewCluster(this, jsii.String("my sample cluster"), &ClusterProps{ Version: eks.KubernetesVersion_V1_32(), ClusterName: jsii.String("myEksCluster"), KubectlLayer: kubectlv32.NewKubectlV32Layer(this, jsii.String("kubectl")), }) tasks.NewEksCall(this, jsii.String("Call a EKS Endpoint"), &EksCallProps{ Cluster: myEksCluster, HttpMethod: tasks.HttpMethods_GET, HttpPath: jsii.String("/api/v1/namespaces/default/pods"), })
type EksClusterInput ¶ added in v2.1.0
type EksClusterInput interface { // The name of the EKS Cluster. ClusterName() *string }
Class that supports methods which return the EKS cluster name depending on input type.
Example:
tasks.NewEmrContainersCreateVirtualCluster(this, jsii.String("Create a Virtual Cluster"), &EmrContainersCreateVirtualClusterProps{ EksCluster: tasks.EksClusterInput_FromTaskInput(sfn.TaskInput_FromText(jsii.String("clusterId"))), EksNamespace: jsii.String("specified-namespace"), })
func EksClusterInput_FromCluster ¶ added in v2.1.0
func EksClusterInput_FromCluster(cluster awseks.ICluster) EksClusterInput
Specify an existing EKS Cluster as the name for this Cluster.
func EksClusterInput_FromTaskInput ¶ added in v2.1.0
func EksClusterInput_FromTaskInput(taskInput awsstepfunctions.TaskInput) EksClusterInput
Specify a Task Input as the name for this Cluster.
type EmrAddStep ¶
type EmrAddStep interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to add a Step to an EMR Cluster.
The StepConfiguration is defined as Parameters in the state machine definition.
OUTPUT: the StepId.
Example:
tasks.NewEmrAddStep(this, jsii.String("Task"), &EmrAddStepProps{ ClusterId: jsii.String("ClusterId"), Name: jsii.String("StepName"), Jar: jsii.String("Jar"), ActionOnFailure: tasks.ActionOnFailure_CONTINUE, })
func EmrAddStep_JsonPath ¶ added in v2.178.0
func EmrAddStep_JsonPath(scope constructs.Construct, id *string, props *EmrAddStepJsonPathProps) EmrAddStep
A Step Functions Task that using JSONPath to add a Step to an EMR Cluster.
The StepConfiguration is defined as Parameters in the state machine definition.
OUTPUT: the StepId.
func EmrAddStep_Jsonata ¶ added in v2.178.0
func EmrAddStep_Jsonata(scope constructs.Construct, id *string, props *EmrAddStepJsonataProps) EmrAddStep
A Step Functions Task that using JSONata to add a Step to an EMR Cluster.
The StepConfiguration is defined as Parameters in the state machine definition.
OUTPUT: the StepId.
func NewEmrAddStep ¶
func NewEmrAddStep(scope constructs.Construct, id *string, props *EmrAddStepProps) EmrAddStep
type EmrAddStepJsonPathProps ¶ added in v2.178.0
type EmrAddStepJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The ClusterId to add the Step to. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` // A path to a JAR file run during the step. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_HadoopJarStepConfig.html // Jar *string `field:"required" json:"jar" yaml:"jar"` // The name of the Step. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_StepConfig.html // Name *string `field:"required" json:"name" yaml:"name"` // The action to take when the cluster step fails. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_StepConfig.html // // Default: ActionOnFailure.CONTINUE // ActionOnFailure ActionOnFailure `field:"optional" json:"actionOnFailure" yaml:"actionOnFailure"` // A list of command line arguments passed to the JAR file's main function when executed. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_HadoopJarStepConfig.html // // Default: - No args. // Args *[]*string `field:"optional" json:"args" yaml:"args"` // The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_AddJobFlowSteps.html#API_AddJobFlowSteps_RequestSyntax // // Default: - Uses EC2 instance profile role. // ExecutionRoleArn *string `field:"optional" json:"executionRoleArn" yaml:"executionRoleArn"` // The name of the main class in the specified Java file. // // If not specified, the JAR file should specify a Main-Class in its manifest file. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_HadoopJarStepConfig.html // // Default: - No mainClass. // MainClass *string `field:"optional" json:"mainClass" yaml:"mainClass"` // A list of Java properties that are set when the step runs. // // You can use these properties to pass key value pairs to your main function. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_HadoopJarStepConfig.html // // Default: - No properties. // Properties *map[string]*string `field:"optional" json:"properties" yaml:"properties"` }
Properties for EmrAddStep using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var taskRole taskRole var timeout timeout emrAddStepJsonPathProps := &EmrAddStepJsonPathProps{ ClusterId: jsii.String("clusterId"), Jar: jsii.String("jar"), Name: jsii.String("name"), // the properties below are optional ActionOnFailure: awscdk.Aws_stepfunctions_tasks.ActionOnFailure_TERMINATE_CLUSTER, Args: []*string{ jsii.String("args"), }, Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, ExecutionRoleArn: jsii.String("executionRoleArn"), Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, MainClass: jsii.String("mainClass"), OutputPath: jsii.String("outputPath"), Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EmrAddStepJsonataProps ¶ added in v2.178.0
type EmrAddStepJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The ClusterId to add the Step to. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` // A path to a JAR file run during the step. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_HadoopJarStepConfig.html // Jar *string `field:"required" json:"jar" yaml:"jar"` // The name of the Step. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_StepConfig.html // Name *string `field:"required" json:"name" yaml:"name"` // The action to take when the cluster step fails. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_StepConfig.html // // Default: ActionOnFailure.CONTINUE // ActionOnFailure ActionOnFailure `field:"optional" json:"actionOnFailure" yaml:"actionOnFailure"` // A list of command line arguments passed to the JAR file's main function when executed. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_HadoopJarStepConfig.html // // Default: - No args. // Args *[]*string `field:"optional" json:"args" yaml:"args"` // The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_AddJobFlowSteps.html#API_AddJobFlowSteps_RequestSyntax // // Default: - Uses EC2 instance profile role. // ExecutionRoleArn *string `field:"optional" json:"executionRoleArn" yaml:"executionRoleArn"` // The name of the main class in the specified Java file. // // If not specified, the JAR file should specify a Main-Class in its manifest file. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_HadoopJarStepConfig.html // // Default: - No mainClass. // MainClass *string `field:"optional" json:"mainClass" yaml:"mainClass"` // A list of Java properties that are set when the step runs. // // You can use these properties to pass key value pairs to your main function. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_HadoopJarStepConfig.html // // Default: - No properties. // Properties *map[string]*string `field:"optional" json:"properties" yaml:"properties"` }
Properties for EmrAddStep using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var taskRole taskRole var timeout timeout emrAddStepJsonataProps := &EmrAddStepJsonataProps{ ClusterId: jsii.String("clusterId"), Jar: jsii.String("jar"), Name: jsii.String("name"), // the properties below are optional ActionOnFailure: awscdk.Aws_stepfunctions_tasks.ActionOnFailure_TERMINATE_CLUSTER, Args: []*string{ jsii.String("args"), }, Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, ExecutionRoleArn: jsii.String("executionRoleArn"), Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, MainClass: jsii.String("mainClass"), Outputs: outputs, Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EmrAddStepProps ¶
type EmrAddStepProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The ClusterId to add the Step to. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` // A path to a JAR file run during the step. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_HadoopJarStepConfig.html // Jar *string `field:"required" json:"jar" yaml:"jar"` // The name of the Step. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_StepConfig.html // Name *string `field:"required" json:"name" yaml:"name"` // The action to take when the cluster step fails. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_StepConfig.html // // Default: ActionOnFailure.CONTINUE // ActionOnFailure ActionOnFailure `field:"optional" json:"actionOnFailure" yaml:"actionOnFailure"` // A list of command line arguments passed to the JAR file's main function when executed. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_HadoopJarStepConfig.html // // Default: - No args. // Args *[]*string `field:"optional" json:"args" yaml:"args"` // The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_AddJobFlowSteps.html#API_AddJobFlowSteps_RequestSyntax // // Default: - Uses EC2 instance profile role. // ExecutionRoleArn *string `field:"optional" json:"executionRoleArn" yaml:"executionRoleArn"` // The name of the main class in the specified Java file. // // If not specified, the JAR file should specify a Main-Class in its manifest file. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_HadoopJarStepConfig.html // // Default: - No mainClass. // MainClass *string `field:"optional" json:"mainClass" yaml:"mainClass"` // A list of Java properties that are set when the step runs. // // You can use these properties to pass key value pairs to your main function. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_HadoopJarStepConfig.html // // Default: - No properties. // Properties *map[string]*string `field:"optional" json:"properties" yaml:"properties"` }
Properties for EmrAddStep.
Example:
tasks.NewEmrAddStep(this, jsii.String("Task"), &EmrAddStepProps{ ClusterId: jsii.String("ClusterId"), Name: jsii.String("StepName"), Jar: jsii.String("Jar"), ActionOnFailure: tasks.ActionOnFailure_CONTINUE, })
type EmrCancelStep ¶
type EmrCancelStep interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions task to cancel a Step on an EMR Cluster.
Example:
tasks.NewEmrCancelStep(this, jsii.String("Task"), &EmrCancelStepProps{ ClusterId: jsii.String("ClusterId"), StepId: jsii.String("StepId"), })
func EmrCancelStep_JsonPath ¶ added in v2.178.0
func EmrCancelStep_JsonPath(scope constructs.Construct, id *string, props *EmrCancelStepJsonPathProps) EmrCancelStep
A Step Functions task using JSONPath to cancel a Step on an EMR Cluster.
func EmrCancelStep_Jsonata ¶ added in v2.178.0
func EmrCancelStep_Jsonata(scope constructs.Construct, id *string, props *EmrCancelStepJsonataProps) EmrCancelStep
A Step Functions task using JSONata to cancel a Step on an EMR Cluster.
func NewEmrCancelStep ¶
func NewEmrCancelStep(scope constructs.Construct, id *string, props *EmrCancelStepProps) EmrCancelStep
type EmrCancelStepJsonPathProps ¶ added in v2.178.0
type EmrCancelStepJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The ClusterId to update. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` // The StepId to cancel. StepId *string `field:"required" json:"stepId" yaml:"stepId"` }
Properties for calling an EMR CancelStep using JSONPath from your 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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var taskRole taskRole var timeout timeout emrCancelStepJsonPathProps := &EmrCancelStepJsonPathProps{ ClusterId: jsii.String("clusterId"), StepId: jsii.String("stepId"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EmrCancelStepJsonataProps ¶ added in v2.178.0
type EmrCancelStepJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The ClusterId to update. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` // The StepId to cancel. StepId *string `field:"required" json:"stepId" yaml:"stepId"` }
Properties for calling an EMR CancelStep using JSONata from your 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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var taskRole taskRole var timeout timeout emrCancelStepJsonataProps := &EmrCancelStepJsonataProps{ ClusterId: jsii.String("clusterId"), StepId: jsii.String("stepId"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EmrCancelStepProps ¶
type EmrCancelStepProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The ClusterId to update. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` // The StepId to cancel. StepId *string `field:"required" json:"stepId" yaml:"stepId"` }
Properties for calling an EMR CancelStep from your state machine.
Example:
tasks.NewEmrCancelStep(this, jsii.String("Task"), &EmrCancelStepProps{ ClusterId: jsii.String("ClusterId"), StepId: jsii.String("StepId"), })
type EmrContainersCreateVirtualCluster ¶ added in v2.1.0
type EmrContainersCreateVirtualCluster interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Task that creates an EMR Containers virtual cluster from an EKS cluster.
Example:
tasks.NewEmrContainersCreateVirtualCluster(this, jsii.String("Create a Virtual Cluster"), &EmrContainersCreateVirtualClusterProps{ EksCluster: tasks.EksClusterInput_FromTaskInput(sfn.TaskInput_FromText(jsii.String("clusterId"))), EksNamespace: jsii.String("specified-namespace"), })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-emr-eks.html
func EmrContainersCreateVirtualCluster_JsonPath ¶ added in v2.178.0
func EmrContainersCreateVirtualCluster_JsonPath(scope constructs.Construct, id *string, props *EmrContainersCreateVirtualClusterJsonPathProps) EmrContainersCreateVirtualCluster
Task that using JSONPath and creates an EMR Containers virtual cluster from an EKS cluster. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-emr-eks.html
func EmrContainersCreateVirtualCluster_Jsonata ¶ added in v2.178.0
func EmrContainersCreateVirtualCluster_Jsonata(scope constructs.Construct, id *string, props *EmrContainersCreateVirtualClusterJsonataProps) EmrContainersCreateVirtualCluster
Task that using JSONata and that creates an EMR Containers virtual cluster from an EKS cluster. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-emr-eks.html
func NewEmrContainersCreateVirtualCluster ¶ added in v2.1.0
func NewEmrContainersCreateVirtualCluster(scope constructs.Construct, id *string, props *EmrContainersCreateVirtualClusterProps) EmrContainersCreateVirtualCluster
type EmrContainersCreateVirtualClusterJsonPathProps ¶ added in v2.178.0
type EmrContainersCreateVirtualClusterJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // EKS Cluster or task input that contains the name of the cluster. EksCluster EksClusterInput `field:"required" json:"eksCluster" yaml:"eksCluster"` // The namespace of an EKS cluster. // Default: - 'default'. // EksNamespace *string `field:"optional" json:"eksNamespace" yaml:"eksNamespace"` // The tags assigned to the virtual cluster. // Default: {}. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` // Name of the virtual cluster that will be created. // Default: - the name of the state machine execution that runs this task and state name. // VirtualClusterName *string `field:"optional" json:"virtualClusterName" yaml:"virtualClusterName"` }
Properties to define a EMR Containers CreateVirtualCluster Task using JSONPath on an EKS cluster.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var eksClusterInput eksClusterInput var resultSelector interface{} var taskRole taskRole var timeout timeout emrContainersCreateVirtualClusterJsonPathProps := &EmrContainersCreateVirtualClusterJsonPathProps{ EksCluster: eksClusterInput, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, EksNamespace: jsii.String("eksNamespace"), Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), Tags: map[string]*string{ "tagsKey": jsii.String("tags"), }, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), VirtualClusterName: jsii.String("virtualClusterName"), }
type EmrContainersCreateVirtualClusterJsonataProps ¶ added in v2.178.0
type EmrContainersCreateVirtualClusterJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // EKS Cluster or task input that contains the name of the cluster. EksCluster EksClusterInput `field:"required" json:"eksCluster" yaml:"eksCluster"` // The namespace of an EKS cluster. // Default: - 'default'. // EksNamespace *string `field:"optional" json:"eksNamespace" yaml:"eksNamespace"` // The tags assigned to the virtual cluster. // Default: {}. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` // Name of the virtual cluster that will be created. // Default: - the name of the state machine execution that runs this task and state name. // VirtualClusterName *string `field:"optional" json:"virtualClusterName" yaml:"virtualClusterName"` }
Properties to define a EMR Containers CreateVirtualCluster Task using JSONata on an EKS cluster.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var eksClusterInput eksClusterInput var outputs interface{} var taskRole taskRole var timeout timeout emrContainersCreateVirtualClusterJsonataProps := &EmrContainersCreateVirtualClusterJsonataProps{ EksCluster: eksClusterInput, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, EksNamespace: jsii.String("eksNamespace"), Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), Tags: map[string]*string{ "tagsKey": jsii.String("tags"), }, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), VirtualClusterName: jsii.String("virtualClusterName"), }
type EmrContainersCreateVirtualClusterProps ¶ added in v2.1.0
type EmrContainersCreateVirtualClusterProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // EKS Cluster or task input that contains the name of the cluster. EksCluster EksClusterInput `field:"required" json:"eksCluster" yaml:"eksCluster"` // The namespace of an EKS cluster. // Default: - 'default'. // EksNamespace *string `field:"optional" json:"eksNamespace" yaml:"eksNamespace"` // The tags assigned to the virtual cluster. // Default: {}. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` // Name of the virtual cluster that will be created. // Default: - the name of the state machine execution that runs this task and state name. // VirtualClusterName *string `field:"optional" json:"virtualClusterName" yaml:"virtualClusterName"` }
Properties to define a EMR Containers CreateVirtualCluster Task on an EKS cluster.
Example:
tasks.NewEmrContainersCreateVirtualCluster(this, jsii.String("Create a Virtual Cluster"), &EmrContainersCreateVirtualClusterProps{ EksCluster: tasks.EksClusterInput_FromTaskInput(sfn.TaskInput_FromText(jsii.String("clusterId"))), EksNamespace: jsii.String("specified-namespace"), })
type EmrContainersDeleteVirtualCluster ¶ added in v2.1.0
type EmrContainersDeleteVirtualCluster interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Deletes an EMR Containers virtual cluster as a Task.
Example:
tasks.NewEmrContainersDeleteVirtualCluster(this, jsii.String("Delete a Virtual Cluster"), &EmrContainersDeleteVirtualClusterProps{ VirtualClusterId: sfn.TaskInput_FromJsonPathAt(jsii.String("$.virtualCluster")), })
See: https://docs.amazonaws.cn/en_us/step-functions/latest/dg/connect-emr-eks.html
func EmrContainersDeleteVirtualCluster_JsonPath ¶ added in v2.178.0
func EmrContainersDeleteVirtualCluster_JsonPath(scope constructs.Construct, id *string, props *EmrContainersDeleteVirtualClusterJsonPathProps) EmrContainersDeleteVirtualCluster
Deletes an EMR Containers virtual cluster as a Task using JSONPath.
func EmrContainersDeleteVirtualCluster_Jsonata ¶ added in v2.178.0
func EmrContainersDeleteVirtualCluster_Jsonata(scope constructs.Construct, id *string, props *EmrContainersDeleteVirtualClusterJsonataProps) EmrContainersDeleteVirtualCluster
Deletes an EMR Containers virtual cluster as a Task using JSONata.
func NewEmrContainersDeleteVirtualCluster ¶ added in v2.1.0
func NewEmrContainersDeleteVirtualCluster(scope constructs.Construct, id *string, props *EmrContainersDeleteVirtualClusterProps) EmrContainersDeleteVirtualCluster
type EmrContainersDeleteVirtualClusterJsonPathProps ¶ added in v2.178.0
type EmrContainersDeleteVirtualClusterJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The ID of the virtual cluster that will be deleted. VirtualClusterId awsstepfunctions.TaskInput `field:"required" json:"virtualClusterId" yaml:"virtualClusterId"` }
Properties to define a EMR Containers DeleteVirtualCluster Task using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var taskInput taskInput var taskRole taskRole var timeout timeout emrContainersDeleteVirtualClusterJsonPathProps := &EmrContainersDeleteVirtualClusterJsonPathProps{ VirtualClusterId: taskInput, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EmrContainersDeleteVirtualClusterJsonataProps ¶ added in v2.178.0
type EmrContainersDeleteVirtualClusterJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The ID of the virtual cluster that will be deleted. VirtualClusterId awsstepfunctions.TaskInput `field:"required" json:"virtualClusterId" yaml:"virtualClusterId"` }
Properties to define a EMR Containers DeleteVirtualCluster Task using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var taskInput taskInput var taskRole taskRole var timeout timeout emrContainersDeleteVirtualClusterJsonataProps := &EmrContainersDeleteVirtualClusterJsonataProps{ VirtualClusterId: taskInput, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EmrContainersDeleteVirtualClusterProps ¶ added in v2.1.0
type EmrContainersDeleteVirtualClusterProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The ID of the virtual cluster that will be deleted. VirtualClusterId awsstepfunctions.TaskInput `field:"required" json:"virtualClusterId" yaml:"virtualClusterId"` }
Properties to define a EMR Containers DeleteVirtualCluster Task.
Example:
tasks.NewEmrContainersDeleteVirtualCluster(this, jsii.String("Delete a Virtual Cluster"), &EmrContainersDeleteVirtualClusterProps{ VirtualClusterId: sfn.TaskInput_FromJsonPathAt(jsii.String("$.virtualCluster")), })
type EmrContainersStartJobRun ¶ added in v2.1.0
type EmrContainersStartJobRun interface { awsstepfunctions.TaskStateBase awsiam.IGrantable Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // The principal to grant permissions to. GrantPrincipal() awsiam.IPrincipal // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Starts a job run.
A job is a unit of work that you submit to Amazon EMR on EKS for execution. The work performed by the job can be defined by a Spark jar, PySpark script, or SparkSQL query. A job run is an execution of the job on the virtual cluster.
Example:
tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{ VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")), ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(), JobName: jsii.String("EMR-Containers-Job"), JobDriver: &JobDriver{ SparkSubmitJobDriver: &SparkSubmitJobDriver{ EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")), }, }, ApplicationConfig: []applicationConfiguration{ &applicationConfiguration{ Classification: tasks.Classification_SPARK_DEFAULTS(), Properties: map[string]*string{ "spark.executor.instances": jsii.String("1"), "spark.executor.memory": jsii.String("512M"), }, }, }, })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-emr-eks.html
func EmrContainersStartJobRun_JsonPath ¶ added in v2.178.0
func EmrContainersStartJobRun_JsonPath(scope constructs.Construct, id *string, props *EmrContainersStartJobRunJsonPathProps) EmrContainersStartJobRun
Starts a job run Task using JSONPath.
A job is a unit of work that you submit to Amazon EMR on EKS for execution. The work performed by the job can be defined by a Spark jar, PySpark script, or SparkSQL query. A job run is an execution of the job on the virtual cluster. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-emr-eks.html
func EmrContainersStartJobRun_Jsonata ¶ added in v2.178.0
func EmrContainersStartJobRun_Jsonata(scope constructs.Construct, id *string, props *EmrContainersStartJobRunJsonataProps) EmrContainersStartJobRun
Starts a job run Task using JSONata.
A job is a unit of work that you submit to Amazon EMR on EKS for execution. The work performed by the job can be defined by a Spark jar, PySpark script, or SparkSQL query. A job run is an execution of the job on the virtual cluster. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-emr-eks.html
func NewEmrContainersStartJobRun ¶ added in v2.1.0
func NewEmrContainersStartJobRun(scope constructs.Construct, id *string, props *EmrContainersStartJobRunProps) EmrContainersStartJobRun
type EmrContainersStartJobRunJsonPathProps ¶ added in v2.178.0
type EmrContainersStartJobRunJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The job driver for the job run. // See: https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_JobDriver.html // JobDriver *JobDriver `field:"required" json:"jobDriver" yaml:"jobDriver"` // The Amazon EMR release version to use for the job run. ReleaseLabel ReleaseLabel `field:"required" json:"releaseLabel" yaml:"releaseLabel"` // The ID of the virtual cluster where the job will be run. VirtualCluster VirtualClusterInput `field:"required" json:"virtualCluster" yaml:"virtualCluster"` // The configurations for the application running in the job run. // // Maximum of 100 items. // See: https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_Configuration.html // // Default: - No application config. // ApplicationConfig *[]*ApplicationConfiguration `field:"optional" json:"applicationConfig" yaml:"applicationConfig"` // The execution role for the job run. // // If `virtualClusterId` is from a JSON input path, an execution role must be provided. // If an execution role is provided, follow the documentation to update the role trust policy. // See: https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/setting-up-trust-policy.html // // Default: - Automatically generated only when the provided `virtualClusterId` is not an encoded JSON path. // ExecutionRole awsiam.IRole `field:"optional" json:"executionRole" yaml:"executionRole"` // The name of the job run. // Default: - No job run name. // JobName *string `field:"optional" json:"jobName" yaml:"jobName"` // Configuration for monitoring the job run. // See: https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_MonitoringConfiguration.html // // Default: - logging enabled and resources automatically generated if `monitoring.logging` is set to `true` // Monitoring *Monitoring `field:"optional" json:"monitoring" yaml:"monitoring"` // The tags assigned to job runs. // Default: - None. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` }
Properties for calling EMR Containers StartJobRun using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var applicationConfiguration_ applicationConfiguration var assign interface{} var bucket bucket var classification classification var logGroup logGroup var releaseLabel releaseLabel var resultSelector interface{} var role role var taskInput taskInput var taskRole taskRole var timeout timeout var virtualClusterInput virtualClusterInput emrContainersStartJobRunJsonPathProps := &EmrContainersStartJobRunJsonPathProps{ JobDriver: &JobDriver{ SparkSubmitJobDriver: &SparkSubmitJobDriver{ EntryPoint: taskInput, // the properties below are optional EntryPointArguments: taskInput, SparkSubmitParameters: jsii.String("sparkSubmitParameters"), }, }, ReleaseLabel: releaseLabel, VirtualCluster: virtualClusterInput, // the properties below are optional ApplicationConfig: []*applicationConfiguration{ &applicationConfiguration{ Classification: classification, // the properties below are optional NestedConfig: []*applicationConfiguration{ applicationConfiguration_, }, Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, }, }, Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, ExecutionRole: role, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, JobName: jsii.String("jobName"), Monitoring: &Monitoring{ LogBucket: bucket, Logging: jsii.Boolean(false), LogGroup: logGroup, LogStreamNamePrefix: jsii.String("logStreamNamePrefix"), PersistentAppUI: jsii.Boolean(false), }, OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), Tags: map[string]*string{ "tagsKey": jsii.String("tags"), }, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EmrContainersStartJobRunJsonataProps ¶ added in v2.178.0
type EmrContainersStartJobRunJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The job driver for the job run. // See: https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_JobDriver.html // JobDriver *JobDriver `field:"required" json:"jobDriver" yaml:"jobDriver"` // The Amazon EMR release version to use for the job run. ReleaseLabel ReleaseLabel `field:"required" json:"releaseLabel" yaml:"releaseLabel"` // The ID of the virtual cluster where the job will be run. VirtualCluster VirtualClusterInput `field:"required" json:"virtualCluster" yaml:"virtualCluster"` // The configurations for the application running in the job run. // // Maximum of 100 items. // See: https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_Configuration.html // // Default: - No application config. // ApplicationConfig *[]*ApplicationConfiguration `field:"optional" json:"applicationConfig" yaml:"applicationConfig"` // The execution role for the job run. // // If `virtualClusterId` is from a JSON input path, an execution role must be provided. // If an execution role is provided, follow the documentation to update the role trust policy. // See: https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/setting-up-trust-policy.html // // Default: - Automatically generated only when the provided `virtualClusterId` is not an encoded JSON path. // ExecutionRole awsiam.IRole `field:"optional" json:"executionRole" yaml:"executionRole"` // The name of the job run. // Default: - No job run name. // JobName *string `field:"optional" json:"jobName" yaml:"jobName"` // Configuration for monitoring the job run. // See: https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_MonitoringConfiguration.html // // Default: - logging enabled and resources automatically generated if `monitoring.logging` is set to `true` // Monitoring *Monitoring `field:"optional" json:"monitoring" yaml:"monitoring"` // The tags assigned to job runs. // Default: - None. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` }
Properties for calling EMR Containers StartJobRun using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var applicationConfiguration_ applicationConfiguration var assign interface{} var bucket bucket var classification classification var logGroup logGroup var outputs interface{} var releaseLabel releaseLabel var role role var taskInput taskInput var taskRole taskRole var timeout timeout var virtualClusterInput virtualClusterInput emrContainersStartJobRunJsonataProps := &EmrContainersStartJobRunJsonataProps{ JobDriver: &JobDriver{ SparkSubmitJobDriver: &SparkSubmitJobDriver{ EntryPoint: taskInput, // the properties below are optional EntryPointArguments: taskInput, SparkSubmitParameters: jsii.String("sparkSubmitParameters"), }, }, ReleaseLabel: releaseLabel, VirtualCluster: virtualClusterInput, // the properties below are optional ApplicationConfig: []*applicationConfiguration{ &applicationConfiguration{ Classification: classification, // the properties below are optional NestedConfig: []*applicationConfiguration{ applicationConfiguration_, }, Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, }, }, Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, ExecutionRole: role, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, JobName: jsii.String("jobName"), Monitoring: &Monitoring{ LogBucket: bucket, Logging: jsii.Boolean(false), LogGroup: logGroup, LogStreamNamePrefix: jsii.String("logStreamNamePrefix"), PersistentAppUI: jsii.Boolean(false), }, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), Tags: map[string]*string{ "tagsKey": jsii.String("tags"), }, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EmrContainersStartJobRunProps ¶ added in v2.1.0
type EmrContainersStartJobRunProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The job driver for the job run. // See: https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_JobDriver.html // JobDriver *JobDriver `field:"required" json:"jobDriver" yaml:"jobDriver"` // The Amazon EMR release version to use for the job run. ReleaseLabel ReleaseLabel `field:"required" json:"releaseLabel" yaml:"releaseLabel"` // The ID of the virtual cluster where the job will be run. VirtualCluster VirtualClusterInput `field:"required" json:"virtualCluster" yaml:"virtualCluster"` // The configurations for the application running in the job run. // // Maximum of 100 items. // See: https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_Configuration.html // // Default: - No application config. // ApplicationConfig *[]*ApplicationConfiguration `field:"optional" json:"applicationConfig" yaml:"applicationConfig"` // The execution role for the job run. // // If `virtualClusterId` is from a JSON input path, an execution role must be provided. // If an execution role is provided, follow the documentation to update the role trust policy. // See: https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/setting-up-trust-policy.html // // Default: - Automatically generated only when the provided `virtualClusterId` is not an encoded JSON path. // ExecutionRole awsiam.IRole `field:"optional" json:"executionRole" yaml:"executionRole"` // The name of the job run. // Default: - No job run name. // JobName *string `field:"optional" json:"jobName" yaml:"jobName"` // Configuration for monitoring the job run. // See: https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_MonitoringConfiguration.html // // Default: - logging enabled and resources automatically generated if `monitoring.logging` is set to `true` // Monitoring *Monitoring `field:"optional" json:"monitoring" yaml:"monitoring"` // The tags assigned to job runs. // Default: - None. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` }
The props for a EMR Containers StartJobRun Task.
Example:
tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{ VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")), ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(), JobName: jsii.String("EMR-Containers-Job"), JobDriver: &JobDriver{ SparkSubmitJobDriver: &SparkSubmitJobDriver{ EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")), }, }, ApplicationConfig: []applicationConfiguration{ &applicationConfiguration{ Classification: tasks.Classification_SPARK_DEFAULTS(), Properties: map[string]*string{ "spark.executor.instances": jsii.String("1"), "spark.executor.memory": jsii.String("512M"), }, }, }, })
type EmrCreateCluster ¶
type EmrCreateCluster interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} // The autoscaling role for the EMR Cluster. // // Only available after task has been added to a state machine. AutoScalingRole() awsiam.IRole Branches() *[]awsstepfunctions.StateGraph // The instance role for the EMR Cluster. // // Only available after task has been added to a state machine. ClusterRole() awsiam.IRole Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // The service role for the EMR Cluster. // // Only available after task has been added to a state machine. ServiceRole() awsiam.IRole // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to create an EMR Cluster.
The ClusterConfiguration is defined as Parameters in the state machine definition.
OUTPUT: the ClusterId.
Example:
clusterRole := iam.NewRole(this, jsii.String("ClusterRole"), &RoleProps{ AssumedBy: iam.NewServicePrincipal(jsii.String("ec2.amazonaws.com")), }) serviceRole := iam.NewRole(this, jsii.String("ServiceRole"), &RoleProps{ AssumedBy: iam.NewServicePrincipal(jsii.String("elasticmapreduce.amazonaws.com")), }) autoScalingRole := iam.NewRole(this, jsii.String("AutoScalingRole"), &RoleProps{ AssumedBy: iam.NewServicePrincipal(jsii.String("elasticmapreduce.amazonaws.com")), }) autoScalingRole.AssumeRolePolicy.AddStatements( iam.NewPolicyStatement(&PolicyStatementProps{ Effect: iam.Effect_ALLOW, Principals: []iPrincipal{ iam.NewServicePrincipal(jsii.String("application-autoscaling.amazonaws.com")), }, Actions: []*string{ jsii.String("sts:AssumeRole"), }, })) tasks.NewEmrCreateCluster(this, jsii.String("Create Cluster"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ }, ClusterRole: ClusterRole, Name: sfn.TaskInput_FromJsonPathAt(jsii.String("$.ClusterName")).value, ServiceRole: ServiceRole, AutoScalingRole: AutoScalingRole, })
func EmrCreateCluster_JsonPath ¶ added in v2.178.0
func EmrCreateCluster_JsonPath(scope constructs.Construct, id *string, props *EmrCreateClusterJsonPathProps) EmrCreateCluster
A Step Functions task using JSONPath to create an EMR Cluster.
This task creates a Lambda function to call cross-region AWS API and invokes it.
func EmrCreateCluster_Jsonata ¶ added in v2.178.0
func EmrCreateCluster_Jsonata(scope constructs.Construct, id *string, props *EmrCreateClusterJsonataProps) EmrCreateCluster
A Step Functions task using JSONata to create an EMR Cluster.
This task creates a Lambda function to call cross-region AWS API and invokes it.
func NewEmrCreateCluster ¶
func NewEmrCreateCluster(scope constructs.Construct, id *string, props *EmrCreateClusterProps) EmrCreateCluster
type EmrCreateClusterJsonPathProps ¶ added in v2.178.0
type EmrCreateClusterJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // A specification of the number and type of Amazon EC2 instances. Instances *EmrCreateCluster_InstancesConfigProperty `field:"required" json:"instances" yaml:"instances"` // The Name of the Cluster. Name *string `field:"required" json:"name" yaml:"name"` // A JSON string for selecting additional features. // Default: - None. // AdditionalInfo *string `field:"optional" json:"additionalInfo" yaml:"additionalInfo"` // A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. // Default: - EMR selected default. // Applications *[]*EmrCreateCluster_ApplicationConfigProperty `field:"optional" json:"applications" yaml:"applications"` // An IAM role for automatic scaling policies. // Default: - A role will be created. // AutoScalingRole awsiam.IRole `field:"optional" json:"autoScalingRole" yaml:"autoScalingRole"` // The amount of idle time after which the cluster automatically terminates. // // You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days). // Default: - No timeout. // AutoTerminationPolicyIdleTimeout awscdk.Duration `field:"optional" json:"autoTerminationPolicyIdleTimeout" yaml:"autoTerminationPolicyIdleTimeout"` // A list of bootstrap actions to run before Hadoop starts on the cluster nodes. // Default: - None. // BootstrapActions *[]*EmrCreateCluster_BootstrapActionConfigProperty `field:"optional" json:"bootstrapActions" yaml:"bootstrapActions"` // Also called instance profile and EC2 role. // // An IAM role for an EMR cluster. The EC2 instances of the cluster assume this role. // // This attribute has been renamed from jobFlowRole to clusterRole to align with other ERM/StepFunction integration parameters. // Default: - * A Role will be created. // ClusterRole awsiam.IRole `field:"optional" json:"clusterRole" yaml:"clusterRole"` // The list of configurations supplied for the EMR cluster you are creating. // Default: - None. // Configurations *[]*EmrCreateCluster_ConfigurationProperty `field:"optional" json:"configurations" yaml:"configurations"` // The ID of a custom Amazon EBS-backed Linux AMI. // Default: - None. // CustomAmiId *string `field:"optional" json:"customAmiId" yaml:"customAmiId"` // The size of the EBS root device volume of the Linux AMI that is used for each EC2 instance. // Default: - EMR selected default. // EbsRootVolumeSize awscdk.Size `field:"optional" json:"ebsRootVolumeSize" yaml:"ebsRootVolumeSize"` // Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. // Default: - None. // KerberosAttributes *EmrCreateCluster_KerberosAttributesProperty `field:"optional" json:"kerberosAttributes" yaml:"kerberosAttributes"` // The location in Amazon S3 to write the log files of the job flow. // Default: - None. // LogUri *string `field:"optional" json:"logUri" yaml:"logUri"` // The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. // Default: - EMR selected default. // ReleaseLabel *string `field:"optional" json:"releaseLabel" yaml:"releaseLabel"` // Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. // Default: - EMR selected default. // ScaleDownBehavior EmrCreateCluster_EmrClusterScaleDownBehavior `field:"optional" json:"scaleDownBehavior" yaml:"scaleDownBehavior"` // The name of a security configuration to apply to the cluster. // Default: - None. // SecurityConfiguration *string `field:"optional" json:"securityConfiguration" yaml:"securityConfiguration"` // The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf. // Default: - A role will be created that Amazon EMR service can assume. // ServiceRole awsiam.IRole `field:"optional" json:"serviceRole" yaml:"serviceRole"` // Specifies the step concurrency level to allow multiple steps to run in parallel. // // Requires EMR release label 5.28.0 or above. // Must be in range [1, 256]. // Default: 1 - no step concurrency allowed. // StepConcurrencyLevel *float64 `field:"optional" json:"stepConcurrencyLevel" yaml:"stepConcurrencyLevel"` // A list of tags to associate with a cluster and propagate to Amazon EC2 instances. // Default: - None. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` // A value of true indicates that all IAM users in the AWS account can perform cluster actions if they have the proper IAM policy permissions. // Default: true. // VisibleToAllUsers *bool `field:"optional" json:"visibleToAllUsers" yaml:"visibleToAllUsers"` }
Properties for calling an AWS service's API action using JSONPath from your state machine across regions.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var configurationProperty_ configurationProperty var resultSelector interface{} var role role var size size var taskRole taskRole var timeout timeout emrCreateClusterJsonPathProps := &EmrCreateClusterJsonPathProps{ Instances: &InstancesConfigProperty{ AdditionalMasterSecurityGroups: []*string{ jsii.String("additionalMasterSecurityGroups"), }, AdditionalSlaveSecurityGroups: []*string{ jsii.String("additionalSlaveSecurityGroups"), }, Ec2KeyName: jsii.String("ec2KeyName"), Ec2SubnetId: jsii.String("ec2SubnetId"), Ec2SubnetIds: []*string{ jsii.String("ec2SubnetIds"), }, EmrManagedMasterSecurityGroup: jsii.String("emrManagedMasterSecurityGroup"), EmrManagedSlaveSecurityGroup: jsii.String("emrManagedSlaveSecurityGroup"), HadoopVersion: jsii.String("hadoopVersion"), InstanceCount: jsii.Number(123), InstanceFleets: []instanceFleetConfigProperty{ &instanceFleetConfigProperty{ InstanceFleetType: awscdk.Aws_stepfunctions_tasks.EmrCreateCluster.InstanceRoleType_MASTER, // the properties below are optional InstanceTypeConfigs: []instanceTypeConfigProperty{ &instanceTypeConfigProperty{ InstanceType: jsii.String("instanceType"), // the properties below are optional BidPrice: jsii.String("bidPrice"), BidPriceAsPercentageOfOnDemandPrice: jsii.Number(123), Configurations: []*configurationProperty{ &configurationProperty{ Classification: jsii.String("classification"), Configurations: []*configurationProperty{ configurationProperty_, }, Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, }, }, EbsConfiguration: &EbsConfigurationProperty{ EbsBlockDeviceConfigs: []ebsBlockDeviceConfigProperty{ &ebsBlockDeviceConfigProperty{ VolumeSpecification: &VolumeSpecificationProperty{ VolumeSize: size, VolumeType: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType_GP3, // the properties below are optional Iops: jsii.Number(123), }, // the properties below are optional VolumesPerInstance: jsii.Number(123), }, }, EbsOptimized: jsii.Boolean(false), }, WeightedCapacity: jsii.Number(123), }, }, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ OnDemandSpecification: &OnDemandProvisioningSpecificationProperty{ AllocationStrategy: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.OnDemandAllocationStrategy_LOWEST_PRICE, }, SpotSpecification: &SpotProvisioningSpecificationProperty{ TimeoutAction: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.SpotTimeoutAction_SWITCH_TO_ON_DEMAND, // the properties below are optional AllocationStrategy: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.SpotAllocationStrategy_CAPACITY_OPTIMIZED, BlockDurationMinutes: jsii.Number(123), Timeout: cdk.Duration_Minutes(jsii.Number(30)), TimeoutDurationMinutes: jsii.Number(123), }, }, Name: jsii.String("name"), TargetOnDemandCapacity: jsii.Number(123), TargetSpotCapacity: jsii.Number(123), }, }, InstanceGroups: []instanceGroupConfigProperty{ &instanceGroupConfigProperty{ InstanceCount: jsii.Number(123), InstanceRole: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.InstanceRoleType_MASTER, InstanceType: jsii.String("instanceType"), // the properties below are optional AutoScalingPolicy: &AutoScalingPolicyProperty{ Constraints: &ScalingConstraintsProperty{ MaxCapacity: jsii.Number(123), MinCapacity: jsii.Number(123), }, Rules: []scalingRuleProperty{ &scalingRuleProperty{ Action: &ScalingActionProperty{ SimpleScalingPolicyConfiguration: &SimpleScalingPolicyConfigurationProperty{ ScalingAdjustment: jsii.Number(123), // the properties below are optional AdjustmentType: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.ScalingAdjustmentType_CHANGE_IN_CAPACITY, CoolDown: jsii.Number(123), }, // the properties below are optional Market: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.InstanceMarket_ON_DEMAND, }, Name: jsii.String("name"), Trigger: &ScalingTriggerProperty{ CloudWatchAlarmDefinition: &CloudWatchAlarmDefinitionProperty{ ComparisonOperator: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmComparisonOperator_GREATER_THAN_OR_EQUAL, MetricName: jsii.String("metricName"), Period: cdk.Duration_*Minutes(jsii.Number(30)), // the properties below are optional Dimensions: []metricDimensionProperty{ &metricDimensionProperty{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, EvaluationPeriods: jsii.Number(123), Namespace: jsii.String("namespace"), Statistic: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmStatistic_SAMPLE_COUNT, Threshold: jsii.Number(123), Unit: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmUnit_NONE, }, }, // the properties below are optional Description: jsii.String("description"), }, }, }, BidPrice: jsii.String("bidPrice"), Configurations: []*configurationProperty{ &configurationProperty{ Classification: jsii.String("classification"), Configurations: []*configurationProperty{ configurationProperty_, }, Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, }, }, EbsConfiguration: &EbsConfigurationProperty{ EbsBlockDeviceConfigs: []*ebsBlockDeviceConfigProperty{ &ebsBlockDeviceConfigProperty{ VolumeSpecification: &VolumeSpecificationProperty{ VolumeSize: size, VolumeType: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType_GP3, // the properties below are optional Iops: jsii.Number(123), }, // the properties below are optional VolumesPerInstance: jsii.Number(123), }, }, EbsOptimized: jsii.Boolean(false), }, Market: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.InstanceMarket_ON_DEMAND, Name: jsii.String("name"), }, }, MasterInstanceType: jsii.String("masterInstanceType"), Placement: &PlacementTypeProperty{ AvailabilityZone: jsii.String("availabilityZone"), AvailabilityZones: []*string{ jsii.String("availabilityZones"), }, }, ServiceAccessSecurityGroup: jsii.String("serviceAccessSecurityGroup"), SlaveInstanceType: jsii.String("slaveInstanceType"), TerminationProtected: jsii.Boolean(false), }, Name: jsii.String("name"), // the properties below are optional AdditionalInfo: jsii.String("additionalInfo"), Applications: []applicationConfigProperty{ &applicationConfigProperty{ Name: jsii.String("name"), // the properties below are optional AdditionalInfo: map[string]*string{ "additionalInfoKey": jsii.String("additionalInfo"), }, Args: []*string{ jsii.String("args"), }, Version: jsii.String("version"), }, }, Assign: map[string]interface{}{ "assignKey": assign, }, AutoScalingRole: role, AutoTerminationPolicyIdleTimeout: cdk.Duration_*Minutes(jsii.Number(30)), BootstrapActions: []bootstrapActionConfigProperty{ &bootstrapActionConfigProperty{ Name: jsii.String("name"), ScriptBootstrapAction: &ScriptBootstrapActionConfigProperty{ Path: jsii.String("path"), // the properties below are optional Args: []*string{ jsii.String("args"), }, }, }, }, ClusterRole: role, Comment: jsii.String("comment"), Configurations: []*configurationProperty{ &configurationProperty{ Classification: jsii.String("classification"), Configurations: []*configurationProperty{ configurationProperty_, }, Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, }, }, Credentials: &Credentials{ Role: taskRole, }, CustomAmiId: jsii.String("customAmiId"), EbsRootVolumeSize: size, Heartbeat: cdk.Duration_*Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, KerberosAttributes: &KerberosAttributesProperty{ Realm: jsii.String("realm"), // the properties below are optional AdDomainJoinPassword: jsii.String("adDomainJoinPassword"), AdDomainJoinUser: jsii.String("adDomainJoinUser"), CrossRealmTrustPrincipalPassword: jsii.String("crossRealmTrustPrincipalPassword"), KdcAdminPassword: jsii.String("kdcAdminPassword"), }, LogUri: jsii.String("logUri"), OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ReleaseLabel: jsii.String("releaseLabel"), ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, ScaleDownBehavior: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.EmrClusterScaleDownBehavior_TERMINATE_AT_INSTANCE_HOUR, SecurityConfiguration: jsii.String("securityConfiguration"), ServiceRole: role, StateName: jsii.String("stateName"), StepConcurrencyLevel: jsii.Number(123), Tags: map[string]*string{ "tagsKey": jsii.String("tags"), }, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), VisibleToAllUsers: jsii.Boolean(false), }
type EmrCreateClusterJsonataProps ¶ added in v2.178.0
type EmrCreateClusterJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // A specification of the number and type of Amazon EC2 instances. Instances *EmrCreateCluster_InstancesConfigProperty `field:"required" json:"instances" yaml:"instances"` // The Name of the Cluster. Name *string `field:"required" json:"name" yaml:"name"` // A JSON string for selecting additional features. // Default: - None. // AdditionalInfo *string `field:"optional" json:"additionalInfo" yaml:"additionalInfo"` // A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. // Default: - EMR selected default. // Applications *[]*EmrCreateCluster_ApplicationConfigProperty `field:"optional" json:"applications" yaml:"applications"` // An IAM role for automatic scaling policies. // Default: - A role will be created. // AutoScalingRole awsiam.IRole `field:"optional" json:"autoScalingRole" yaml:"autoScalingRole"` // The amount of idle time after which the cluster automatically terminates. // // You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days). // Default: - No timeout. // AutoTerminationPolicyIdleTimeout awscdk.Duration `field:"optional" json:"autoTerminationPolicyIdleTimeout" yaml:"autoTerminationPolicyIdleTimeout"` // A list of bootstrap actions to run before Hadoop starts on the cluster nodes. // Default: - None. // BootstrapActions *[]*EmrCreateCluster_BootstrapActionConfigProperty `field:"optional" json:"bootstrapActions" yaml:"bootstrapActions"` // Also called instance profile and EC2 role. // // An IAM role for an EMR cluster. The EC2 instances of the cluster assume this role. // // This attribute has been renamed from jobFlowRole to clusterRole to align with other ERM/StepFunction integration parameters. // Default: - * A Role will be created. // ClusterRole awsiam.IRole `field:"optional" json:"clusterRole" yaml:"clusterRole"` // The list of configurations supplied for the EMR cluster you are creating. // Default: - None. // Configurations *[]*EmrCreateCluster_ConfigurationProperty `field:"optional" json:"configurations" yaml:"configurations"` // The ID of a custom Amazon EBS-backed Linux AMI. // Default: - None. // CustomAmiId *string `field:"optional" json:"customAmiId" yaml:"customAmiId"` // The size of the EBS root device volume of the Linux AMI that is used for each EC2 instance. // Default: - EMR selected default. // EbsRootVolumeSize awscdk.Size `field:"optional" json:"ebsRootVolumeSize" yaml:"ebsRootVolumeSize"` // Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. // Default: - None. // KerberosAttributes *EmrCreateCluster_KerberosAttributesProperty `field:"optional" json:"kerberosAttributes" yaml:"kerberosAttributes"` // The location in Amazon S3 to write the log files of the job flow. // Default: - None. // LogUri *string `field:"optional" json:"logUri" yaml:"logUri"` // The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. // Default: - EMR selected default. // ReleaseLabel *string `field:"optional" json:"releaseLabel" yaml:"releaseLabel"` // Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. // Default: - EMR selected default. // ScaleDownBehavior EmrCreateCluster_EmrClusterScaleDownBehavior `field:"optional" json:"scaleDownBehavior" yaml:"scaleDownBehavior"` // The name of a security configuration to apply to the cluster. // Default: - None. // SecurityConfiguration *string `field:"optional" json:"securityConfiguration" yaml:"securityConfiguration"` // The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf. // Default: - A role will be created that Amazon EMR service can assume. // ServiceRole awsiam.IRole `field:"optional" json:"serviceRole" yaml:"serviceRole"` // Specifies the step concurrency level to allow multiple steps to run in parallel. // // Requires EMR release label 5.28.0 or above. // Must be in range [1, 256]. // Default: 1 - no step concurrency allowed. // StepConcurrencyLevel *float64 `field:"optional" json:"stepConcurrencyLevel" yaml:"stepConcurrencyLevel"` // A list of tags to associate with a cluster and propagate to Amazon EC2 instances. // Default: - None. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` // A value of true indicates that all IAM users in the AWS account can perform cluster actions if they have the proper IAM policy permissions. // Default: true. // VisibleToAllUsers *bool `field:"optional" json:"visibleToAllUsers" yaml:"visibleToAllUsers"` }
Properties for calling an AWS service's API action using JSONata from your state machine across regions.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var configurationProperty_ configurationProperty var outputs interface{} var role role var size size var taskRole taskRole var timeout timeout emrCreateClusterJsonataProps := &EmrCreateClusterJsonataProps{ Instances: &InstancesConfigProperty{ AdditionalMasterSecurityGroups: []*string{ jsii.String("additionalMasterSecurityGroups"), }, AdditionalSlaveSecurityGroups: []*string{ jsii.String("additionalSlaveSecurityGroups"), }, Ec2KeyName: jsii.String("ec2KeyName"), Ec2SubnetId: jsii.String("ec2SubnetId"), Ec2SubnetIds: []*string{ jsii.String("ec2SubnetIds"), }, EmrManagedMasterSecurityGroup: jsii.String("emrManagedMasterSecurityGroup"), EmrManagedSlaveSecurityGroup: jsii.String("emrManagedSlaveSecurityGroup"), HadoopVersion: jsii.String("hadoopVersion"), InstanceCount: jsii.Number(123), InstanceFleets: []instanceFleetConfigProperty{ &instanceFleetConfigProperty{ InstanceFleetType: awscdk.Aws_stepfunctions_tasks.EmrCreateCluster.InstanceRoleType_MASTER, // the properties below are optional InstanceTypeConfigs: []instanceTypeConfigProperty{ &instanceTypeConfigProperty{ InstanceType: jsii.String("instanceType"), // the properties below are optional BidPrice: jsii.String("bidPrice"), BidPriceAsPercentageOfOnDemandPrice: jsii.Number(123), Configurations: []*configurationProperty{ &configurationProperty{ Classification: jsii.String("classification"), Configurations: []*configurationProperty{ configurationProperty_, }, Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, }, }, EbsConfiguration: &EbsConfigurationProperty{ EbsBlockDeviceConfigs: []ebsBlockDeviceConfigProperty{ &ebsBlockDeviceConfigProperty{ VolumeSpecification: &VolumeSpecificationProperty{ VolumeSize: size, VolumeType: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType_GP3, // the properties below are optional Iops: jsii.Number(123), }, // the properties below are optional VolumesPerInstance: jsii.Number(123), }, }, EbsOptimized: jsii.Boolean(false), }, WeightedCapacity: jsii.Number(123), }, }, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ OnDemandSpecification: &OnDemandProvisioningSpecificationProperty{ AllocationStrategy: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.OnDemandAllocationStrategy_LOWEST_PRICE, }, SpotSpecification: &SpotProvisioningSpecificationProperty{ TimeoutAction: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.SpotTimeoutAction_SWITCH_TO_ON_DEMAND, // the properties below are optional AllocationStrategy: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.SpotAllocationStrategy_CAPACITY_OPTIMIZED, BlockDurationMinutes: jsii.Number(123), Timeout: cdk.Duration_Minutes(jsii.Number(30)), TimeoutDurationMinutes: jsii.Number(123), }, }, Name: jsii.String("name"), TargetOnDemandCapacity: jsii.Number(123), TargetSpotCapacity: jsii.Number(123), }, }, InstanceGroups: []instanceGroupConfigProperty{ &instanceGroupConfigProperty{ InstanceCount: jsii.Number(123), InstanceRole: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.InstanceRoleType_MASTER, InstanceType: jsii.String("instanceType"), // the properties below are optional AutoScalingPolicy: &AutoScalingPolicyProperty{ Constraints: &ScalingConstraintsProperty{ MaxCapacity: jsii.Number(123), MinCapacity: jsii.Number(123), }, Rules: []scalingRuleProperty{ &scalingRuleProperty{ Action: &ScalingActionProperty{ SimpleScalingPolicyConfiguration: &SimpleScalingPolicyConfigurationProperty{ ScalingAdjustment: jsii.Number(123), // the properties below are optional AdjustmentType: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.ScalingAdjustmentType_CHANGE_IN_CAPACITY, CoolDown: jsii.Number(123), }, // the properties below are optional Market: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.InstanceMarket_ON_DEMAND, }, Name: jsii.String("name"), Trigger: &ScalingTriggerProperty{ CloudWatchAlarmDefinition: &CloudWatchAlarmDefinitionProperty{ ComparisonOperator: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmComparisonOperator_GREATER_THAN_OR_EQUAL, MetricName: jsii.String("metricName"), Period: cdk.Duration_*Minutes(jsii.Number(30)), // the properties below are optional Dimensions: []metricDimensionProperty{ &metricDimensionProperty{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, EvaluationPeriods: jsii.Number(123), Namespace: jsii.String("namespace"), Statistic: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmStatistic_SAMPLE_COUNT, Threshold: jsii.Number(123), Unit: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmUnit_NONE, }, }, // the properties below are optional Description: jsii.String("description"), }, }, }, BidPrice: jsii.String("bidPrice"), Configurations: []*configurationProperty{ &configurationProperty{ Classification: jsii.String("classification"), Configurations: []*configurationProperty{ configurationProperty_, }, Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, }, }, EbsConfiguration: &EbsConfigurationProperty{ EbsBlockDeviceConfigs: []*ebsBlockDeviceConfigProperty{ &ebsBlockDeviceConfigProperty{ VolumeSpecification: &VolumeSpecificationProperty{ VolumeSize: size, VolumeType: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType_GP3, // the properties below are optional Iops: jsii.Number(123), }, // the properties below are optional VolumesPerInstance: jsii.Number(123), }, }, EbsOptimized: jsii.Boolean(false), }, Market: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.InstanceMarket_ON_DEMAND, Name: jsii.String("name"), }, }, MasterInstanceType: jsii.String("masterInstanceType"), Placement: &PlacementTypeProperty{ AvailabilityZone: jsii.String("availabilityZone"), AvailabilityZones: []*string{ jsii.String("availabilityZones"), }, }, ServiceAccessSecurityGroup: jsii.String("serviceAccessSecurityGroup"), SlaveInstanceType: jsii.String("slaveInstanceType"), TerminationProtected: jsii.Boolean(false), }, Name: jsii.String("name"), // the properties below are optional AdditionalInfo: jsii.String("additionalInfo"), Applications: []applicationConfigProperty{ &applicationConfigProperty{ Name: jsii.String("name"), // the properties below are optional AdditionalInfo: map[string]*string{ "additionalInfoKey": jsii.String("additionalInfo"), }, Args: []*string{ jsii.String("args"), }, Version: jsii.String("version"), }, }, Assign: map[string]interface{}{ "assignKey": assign, }, AutoScalingRole: role, AutoTerminationPolicyIdleTimeout: cdk.Duration_*Minutes(jsii.Number(30)), BootstrapActions: []bootstrapActionConfigProperty{ &bootstrapActionConfigProperty{ Name: jsii.String("name"), ScriptBootstrapAction: &ScriptBootstrapActionConfigProperty{ Path: jsii.String("path"), // the properties below are optional Args: []*string{ jsii.String("args"), }, }, }, }, ClusterRole: role, Comment: jsii.String("comment"), Configurations: []*configurationProperty{ &configurationProperty{ Classification: jsii.String("classification"), Configurations: []*configurationProperty{ configurationProperty_, }, Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, }, }, Credentials: &Credentials{ Role: taskRole, }, CustomAmiId: jsii.String("customAmiId"), EbsRootVolumeSize: size, Heartbeat: cdk.Duration_*Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, KerberosAttributes: &KerberosAttributesProperty{ Realm: jsii.String("realm"), // the properties below are optional AdDomainJoinPassword: jsii.String("adDomainJoinPassword"), AdDomainJoinUser: jsii.String("adDomainJoinUser"), CrossRealmTrustPrincipalPassword: jsii.String("crossRealmTrustPrincipalPassword"), KdcAdminPassword: jsii.String("kdcAdminPassword"), }, LogUri: jsii.String("logUri"), Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ReleaseLabel: jsii.String("releaseLabel"), ScaleDownBehavior: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.EmrClusterScaleDownBehavior_TERMINATE_AT_INSTANCE_HOUR, SecurityConfiguration: jsii.String("securityConfiguration"), ServiceRole: role, StateName: jsii.String("stateName"), StepConcurrencyLevel: jsii.Number(123), Tags: map[string]*string{ "tagsKey": jsii.String("tags"), }, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), VisibleToAllUsers: jsii.Boolean(false), }
type EmrCreateClusterProps ¶
type EmrCreateClusterProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // A specification of the number and type of Amazon EC2 instances. Instances *EmrCreateCluster_InstancesConfigProperty `field:"required" json:"instances" yaml:"instances"` // The Name of the Cluster. Name *string `field:"required" json:"name" yaml:"name"` // A JSON string for selecting additional features. // Default: - None. // AdditionalInfo *string `field:"optional" json:"additionalInfo" yaml:"additionalInfo"` // A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. // Default: - EMR selected default. // Applications *[]*EmrCreateCluster_ApplicationConfigProperty `field:"optional" json:"applications" yaml:"applications"` // An IAM role for automatic scaling policies. // Default: - A role will be created. // AutoScalingRole awsiam.IRole `field:"optional" json:"autoScalingRole" yaml:"autoScalingRole"` // The amount of idle time after which the cluster automatically terminates. // // You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days). // Default: - No timeout. // AutoTerminationPolicyIdleTimeout awscdk.Duration `field:"optional" json:"autoTerminationPolicyIdleTimeout" yaml:"autoTerminationPolicyIdleTimeout"` // A list of bootstrap actions to run before Hadoop starts on the cluster nodes. // Default: - None. // BootstrapActions *[]*EmrCreateCluster_BootstrapActionConfigProperty `field:"optional" json:"bootstrapActions" yaml:"bootstrapActions"` // Also called instance profile and EC2 role. // // An IAM role for an EMR cluster. The EC2 instances of the cluster assume this role. // // This attribute has been renamed from jobFlowRole to clusterRole to align with other ERM/StepFunction integration parameters. // Default: - * A Role will be created. // ClusterRole awsiam.IRole `field:"optional" json:"clusterRole" yaml:"clusterRole"` // The list of configurations supplied for the EMR cluster you are creating. // Default: - None. // Configurations *[]*EmrCreateCluster_ConfigurationProperty `field:"optional" json:"configurations" yaml:"configurations"` // The ID of a custom Amazon EBS-backed Linux AMI. // Default: - None. // CustomAmiId *string `field:"optional" json:"customAmiId" yaml:"customAmiId"` // The size of the EBS root device volume of the Linux AMI that is used for each EC2 instance. // Default: - EMR selected default. // EbsRootVolumeSize awscdk.Size `field:"optional" json:"ebsRootVolumeSize" yaml:"ebsRootVolumeSize"` // Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. // Default: - None. // KerberosAttributes *EmrCreateCluster_KerberosAttributesProperty `field:"optional" json:"kerberosAttributes" yaml:"kerberosAttributes"` // The location in Amazon S3 to write the log files of the job flow. // Default: - None. // LogUri *string `field:"optional" json:"logUri" yaml:"logUri"` // The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. // Default: - EMR selected default. // ReleaseLabel *string `field:"optional" json:"releaseLabel" yaml:"releaseLabel"` // Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. // Default: - EMR selected default. // ScaleDownBehavior EmrCreateCluster_EmrClusterScaleDownBehavior `field:"optional" json:"scaleDownBehavior" yaml:"scaleDownBehavior"` // The name of a security configuration to apply to the cluster. // Default: - None. // SecurityConfiguration *string `field:"optional" json:"securityConfiguration" yaml:"securityConfiguration"` // The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf. // Default: - A role will be created that Amazon EMR service can assume. // ServiceRole awsiam.IRole `field:"optional" json:"serviceRole" yaml:"serviceRole"` // Specifies the step concurrency level to allow multiple steps to run in parallel. // // Requires EMR release label 5.28.0 or above. // Must be in range [1, 256]. // Default: 1 - no step concurrency allowed. // StepConcurrencyLevel *float64 `field:"optional" json:"stepConcurrencyLevel" yaml:"stepConcurrencyLevel"` // A list of tags to associate with a cluster and propagate to Amazon EC2 instances. // Default: - None. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` // A value of true indicates that all IAM users in the AWS account can perform cluster actions if they have the proper IAM policy permissions. // Default: true. // VisibleToAllUsers *bool `field:"optional" json:"visibleToAllUsers" yaml:"visibleToAllUsers"` }
Properties for calling an AWS service's API action from your state machine across regions.
Example:
clusterRole := iam.NewRole(this, jsii.String("ClusterRole"), &RoleProps{ AssumedBy: iam.NewServicePrincipal(jsii.String("ec2.amazonaws.com")), }) serviceRole := iam.NewRole(this, jsii.String("ServiceRole"), &RoleProps{ AssumedBy: iam.NewServicePrincipal(jsii.String("elasticmapreduce.amazonaws.com")), }) autoScalingRole := iam.NewRole(this, jsii.String("AutoScalingRole"), &RoleProps{ AssumedBy: iam.NewServicePrincipal(jsii.String("elasticmapreduce.amazonaws.com")), }) autoScalingRole.AssumeRolePolicy.AddStatements( iam.NewPolicyStatement(&PolicyStatementProps{ Effect: iam.Effect_ALLOW, Principals: []iPrincipal{ iam.NewServicePrincipal(jsii.String("application-autoscaling.amazonaws.com")), }, Actions: []*string{ jsii.String("sts:AssumeRole"), }, })) tasks.NewEmrCreateCluster(this, jsii.String("Create Cluster"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ }, ClusterRole: ClusterRole, Name: sfn.TaskInput_FromJsonPathAt(jsii.String("$.ClusterName")).value, ServiceRole: ServiceRole, AutoScalingRole: AutoScalingRole, })
type EmrCreateCluster_ApplicationConfigProperty ¶
type EmrCreateCluster_ApplicationConfigProperty struct { // The name of the application. Name *string `field:"required" json:"name" yaml:"name"` // This option is for advanced users only. // // This is meta information about third-party applications that third-party vendors use // for testing purposes. // Default: No additionalInfo. // AdditionalInfo *map[string]*string `field:"optional" json:"additionalInfo" yaml:"additionalInfo"` // Arguments for Amazon EMR to pass to the application. // Default: No args. // Args *[]*string `field:"optional" json:"args" yaml:"args"` // The version of the application. // Default: No version. // Version *string `field:"optional" json:"version" yaml:"version"` }
Properties for the EMR Cluster Applications.
Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster.
See the RunJobFlow API for complete documentation on input parameters.
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" applicationConfigProperty := &ApplicationConfigProperty{ Name: jsii.String("name"), // the properties below are optional AdditionalInfo: map[string]*string{ "additionalInfoKey": jsii.String("additionalInfo"), }, Args: []*string{ jsii.String("args"), }, Version: jsii.String("version"), }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_Application.html
type EmrCreateCluster_AutoScalingPolicyProperty ¶
type EmrCreateCluster_AutoScalingPolicyProperty struct { // The upper and lower EC2 instance limits for an automatic scaling policy. // // Automatic scaling activity will not cause an instance // group to grow above or below these limits. Constraints *EmrCreateCluster_ScalingConstraintsProperty `field:"required" json:"constraints" yaml:"constraints"` // The scale-in and scale-out rules that comprise the automatic scaling policy. Rules *[]*EmrCreateCluster_ScalingRuleProperty `field:"required" json:"rules" yaml:"rules"` }
An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" autoScalingPolicyProperty := &AutoScalingPolicyProperty{ Constraints: &ScalingConstraintsProperty{ MaxCapacity: jsii.Number(123), MinCapacity: jsii.Number(123), }, Rules: []scalingRuleProperty{ &scalingRuleProperty{ Action: &ScalingActionProperty{ SimpleScalingPolicyConfiguration: &SimpleScalingPolicyConfigurationProperty{ ScalingAdjustment: jsii.Number(123), // the properties below are optional AdjustmentType: awscdk.Aws_stepfunctions_tasks.EmrCreateCluster.ScalingAdjustmentType_CHANGE_IN_CAPACITY, CoolDown: jsii.Number(123), }, // the properties below are optional Market: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.InstanceMarket_ON_DEMAND, }, Name: jsii.String("name"), Trigger: &ScalingTriggerProperty{ CloudWatchAlarmDefinition: &CloudWatchAlarmDefinitionProperty{ ComparisonOperator: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmComparisonOperator_GREATER_THAN_OR_EQUAL, MetricName: jsii.String("metricName"), Period: cdk.Duration_Minutes(jsii.Number(30)), // the properties below are optional Dimensions: []metricDimensionProperty{ &metricDimensionProperty{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, EvaluationPeriods: jsii.Number(123), Namespace: jsii.String("namespace"), Statistic: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmStatistic_SAMPLE_COUNT, Threshold: jsii.Number(123), Unit: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmUnit_NONE, }, }, // the properties below are optional Description: jsii.String("description"), }, }, }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_AutoScalingPolicy.html
type EmrCreateCluster_BootstrapActionConfigProperty ¶
type EmrCreateCluster_BootstrapActionConfigProperty struct { // The name of the bootstrap action. Name *string `field:"required" json:"name" yaml:"name"` // The script run by the bootstrap action. ScriptBootstrapAction *EmrCreateCluster_ScriptBootstrapActionConfigProperty `field:"required" json:"scriptBootstrapAction" yaml:"scriptBootstrapAction"` }
Configuration of a bootstrap action.
See the RunJobFlow API for complete documentation on input parameters.
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" bootstrapActionConfigProperty := &BootstrapActionConfigProperty{ Name: jsii.String("name"), ScriptBootstrapAction: &ScriptBootstrapActionConfigProperty{ Path: jsii.String("path"), // the properties below are optional Args: []*string{ jsii.String("args"), }, }, }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_BootstrapActionConfig.html
type EmrCreateCluster_CloudWatchAlarmComparisonOperator ¶
type EmrCreateCluster_CloudWatchAlarmComparisonOperator string
CloudWatch Alarm Comparison Operators.
const ( // GREATER_THAN_OR_EQUAL. EmrCreateCluster_CloudWatchAlarmComparisonOperator_GREATER_THAN_OR_EQUAL EmrCreateCluster_CloudWatchAlarmComparisonOperator = "GREATER_THAN_OR_EQUAL" // GREATER_THAN. EmrCreateCluster_CloudWatchAlarmComparisonOperator_GREATER_THAN EmrCreateCluster_CloudWatchAlarmComparisonOperator = "GREATER_THAN" // LESS_THAN. EmrCreateCluster_CloudWatchAlarmComparisonOperator_LESS_THAN EmrCreateCluster_CloudWatchAlarmComparisonOperator = "LESS_THAN" // LESS_THAN_OR_EQUAL. EmrCreateCluster_CloudWatchAlarmComparisonOperator_LESS_THAN_OR_EQUAL EmrCreateCluster_CloudWatchAlarmComparisonOperator = "LESS_THAN_OR_EQUAL" )
type EmrCreateCluster_CloudWatchAlarmDefinitionProperty ¶
type EmrCreateCluster_CloudWatchAlarmDefinitionProperty struct { // Determines how the metric specified by MetricName is compared to the value specified by Threshold. ComparisonOperator EmrCreateCluster_CloudWatchAlarmComparisonOperator `field:"required" json:"comparisonOperator" yaml:"comparisonOperator"` // The name of the CloudWatch metric that is watched to determine an alarm condition. MetricName *string `field:"required" json:"metricName" yaml:"metricName"` // The period, in seconds, over which the statistic is applied. // // EMR CloudWatch metrics are emitted every five minutes (300 seconds), so if // an EMR CloudWatch metric is specified, specify 300. Period awscdk.Duration `field:"required" json:"period" yaml:"period"` // A CloudWatch metric dimension. // Default: - No dimensions. // Dimensions *[]*EmrCreateCluster_MetricDimensionProperty `field:"optional" json:"dimensions" yaml:"dimensions"` // The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity. // Default: 1. // EvaluationPeriods *float64 `field:"optional" json:"evaluationPeriods" yaml:"evaluationPeriods"` // The namespace for the CloudWatch metric. // Default: 'AWS/ElasticMapReduce'. // Namespace *string `field:"optional" json:"namespace" yaml:"namespace"` // The statistic to apply to the metric associated with the alarm. // Default: CloudWatchAlarmStatistic.AVERAGE // Statistic EmrCreateCluster_CloudWatchAlarmStatistic `field:"optional" json:"statistic" yaml:"statistic"` // The value against which the specified statistic is compared. // Default: - None. // Threshold *float64 `field:"optional" json:"threshold" yaml:"threshold"` // The unit of measure associated with the CloudWatch metric being watched. // // The value specified for Unit must correspond to the units // specified in the CloudWatch metric. // Default: CloudWatchAlarmUnit.NONE // Unit EmrCreateCluster_CloudWatchAlarmUnit `field:"optional" json:"unit" yaml:"unit"` }
The definition of a CloudWatch metric alarm, which determines when an automatic scaling activity is triggered.
When the defined alarm conditions are satisfied, scaling activity begins.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" cloudWatchAlarmDefinitionProperty := &CloudWatchAlarmDefinitionProperty{ ComparisonOperator: awscdk.Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmComparisonOperator_GREATER_THAN_OR_EQUAL, MetricName: jsii.String("metricName"), Period: cdk.Duration_Minutes(jsii.Number(30)), // the properties below are optional Dimensions: []metricDimensionProperty{ &metricDimensionProperty{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, EvaluationPeriods: jsii.Number(123), Namespace: jsii.String("namespace"), Statistic: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmStatistic_SAMPLE_COUNT, Threshold: jsii.Number(123), Unit: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmUnit_NONE, }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_CloudWatchAlarmDefinition.html
type EmrCreateCluster_CloudWatchAlarmStatistic ¶
type EmrCreateCluster_CloudWatchAlarmStatistic string
CloudWatch Alarm Statistics.
const ( // SAMPLE_COUNT. EmrCreateCluster_CloudWatchAlarmStatistic_SAMPLE_COUNT EmrCreateCluster_CloudWatchAlarmStatistic = "SAMPLE_COUNT" // AVERAGE. EmrCreateCluster_CloudWatchAlarmStatistic_AVERAGE EmrCreateCluster_CloudWatchAlarmStatistic = "AVERAGE" // SUM. EmrCreateCluster_CloudWatchAlarmStatistic_SUM EmrCreateCluster_CloudWatchAlarmStatistic = "SUM" // MINIMUM. EmrCreateCluster_CloudWatchAlarmStatistic_MINIMUM EmrCreateCluster_CloudWatchAlarmStatistic = "MINIMUM" // MAXIMUM. EmrCreateCluster_CloudWatchAlarmStatistic_MAXIMUM EmrCreateCluster_CloudWatchAlarmStatistic = "MAXIMUM" )
type EmrCreateCluster_CloudWatchAlarmUnit ¶
type EmrCreateCluster_CloudWatchAlarmUnit string
CloudWatch Alarm Units.
const ( // NONE. EmrCreateCluster_CloudWatchAlarmUnit_NONE EmrCreateCluster_CloudWatchAlarmUnit = "NONE" // SECONDS. EmrCreateCluster_CloudWatchAlarmUnit_SECONDS EmrCreateCluster_CloudWatchAlarmUnit = "SECONDS" // MICRO_SECONDS. EmrCreateCluster_CloudWatchAlarmUnit_MICRO_SECONDS EmrCreateCluster_CloudWatchAlarmUnit = "MICRO_SECONDS" // MILLI_SECONDS. EmrCreateCluster_CloudWatchAlarmUnit_MILLI_SECONDS EmrCreateCluster_CloudWatchAlarmUnit = "MILLI_SECONDS" // BYTES. EmrCreateCluster_CloudWatchAlarmUnit_BYTES EmrCreateCluster_CloudWatchAlarmUnit = "BYTES" // KILO_BYTES. EmrCreateCluster_CloudWatchAlarmUnit_KILO_BYTES EmrCreateCluster_CloudWatchAlarmUnit = "KILO_BYTES" // MEGA_BYTES. EmrCreateCluster_CloudWatchAlarmUnit_MEGA_BYTES EmrCreateCluster_CloudWatchAlarmUnit = "MEGA_BYTES" // GIGA_BYTES. EmrCreateCluster_CloudWatchAlarmUnit_GIGA_BYTES EmrCreateCluster_CloudWatchAlarmUnit = "GIGA_BYTES" // TERA_BYTES. EmrCreateCluster_CloudWatchAlarmUnit_TERA_BYTES EmrCreateCluster_CloudWatchAlarmUnit = "TERA_BYTES" // BITS. EmrCreateCluster_CloudWatchAlarmUnit_BITS EmrCreateCluster_CloudWatchAlarmUnit = "BITS" // KILO_BITS. EmrCreateCluster_CloudWatchAlarmUnit_KILO_BITS EmrCreateCluster_CloudWatchAlarmUnit = "KILO_BITS" // MEGA_BITS. EmrCreateCluster_CloudWatchAlarmUnit_MEGA_BITS EmrCreateCluster_CloudWatchAlarmUnit = "MEGA_BITS" // GIGA_BITS. EmrCreateCluster_CloudWatchAlarmUnit_GIGA_BITS EmrCreateCluster_CloudWatchAlarmUnit = "GIGA_BITS" // TERA_BITS. EmrCreateCluster_CloudWatchAlarmUnit_TERA_BITS EmrCreateCluster_CloudWatchAlarmUnit = "TERA_BITS" // PERCENT. EmrCreateCluster_CloudWatchAlarmUnit_PERCENT EmrCreateCluster_CloudWatchAlarmUnit = "PERCENT" // COUNT. EmrCreateCluster_CloudWatchAlarmUnit_COUNT EmrCreateCluster_CloudWatchAlarmUnit = "COUNT" // BYTES_PER_SECOND. EmrCreateCluster_CloudWatchAlarmUnit_BYTES_PER_SECOND EmrCreateCluster_CloudWatchAlarmUnit = "BYTES_PER_SECOND" // KILO_BYTES_PER_SECOND. EmrCreateCluster_CloudWatchAlarmUnit_KILO_BYTES_PER_SECOND EmrCreateCluster_CloudWatchAlarmUnit = "KILO_BYTES_PER_SECOND" // MEGA_BYTES_PER_SECOND. EmrCreateCluster_CloudWatchAlarmUnit_MEGA_BYTES_PER_SECOND EmrCreateCluster_CloudWatchAlarmUnit = "MEGA_BYTES_PER_SECOND" // GIGA_BYTES_PER_SECOND. EmrCreateCluster_CloudWatchAlarmUnit_GIGA_BYTES_PER_SECOND EmrCreateCluster_CloudWatchAlarmUnit = "GIGA_BYTES_PER_SECOND" // TERA_BYTES_PER_SECOND. EmrCreateCluster_CloudWatchAlarmUnit_TERA_BYTES_PER_SECOND EmrCreateCluster_CloudWatchAlarmUnit = "TERA_BYTES_PER_SECOND" // BITS_PER_SECOND. EmrCreateCluster_CloudWatchAlarmUnit_BITS_PER_SECOND EmrCreateCluster_CloudWatchAlarmUnit = "BITS_PER_SECOND" // KILO_BITS_PER_SECOND. EmrCreateCluster_CloudWatchAlarmUnit_KILO_BITS_PER_SECOND EmrCreateCluster_CloudWatchAlarmUnit = "KILO_BITS_PER_SECOND" // MEGA_BITS_PER_SECOND. EmrCreateCluster_CloudWatchAlarmUnit_MEGA_BITS_PER_SECOND EmrCreateCluster_CloudWatchAlarmUnit = "MEGA_BITS_PER_SECOND" // GIGA_BITS_PER_SECOND. EmrCreateCluster_CloudWatchAlarmUnit_GIGA_BITS_PER_SECOND EmrCreateCluster_CloudWatchAlarmUnit = "GIGA_BITS_PER_SECOND" // TERA_BITS_PER_SECOND. EmrCreateCluster_CloudWatchAlarmUnit_TERA_BITS_PER_SECOND EmrCreateCluster_CloudWatchAlarmUnit = "TERA_BITS_PER_SECOND" // COUNT_PER_SECOND. EmrCreateCluster_CloudWatchAlarmUnit_COUNT_PER_SECOND EmrCreateCluster_CloudWatchAlarmUnit = "COUNT_PER_SECOND" )
type EmrCreateCluster_ConfigurationProperty ¶
type EmrCreateCluster_ConfigurationProperty struct { // The classification within a configuration. // Default: No classification. // Classification *string `field:"optional" json:"classification" yaml:"classification"` // A list of additional configurations to apply within a configuration object. // Default: No configurations. // Configurations *[]*EmrCreateCluster_ConfigurationProperty `field:"optional" json:"configurations" yaml:"configurations"` // A set of properties specified within a configuration classification. // Default: No properties. // Properties *map[string]*string `field:"optional" json:"properties" yaml:"properties"` }
An optional configuration specification to be used when provisioning cluster instances, which can include configurations for applications and software bundled with Amazon EMR.
See the RunJobFlow API for complete documentation on input parameters.
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 configurationProperty_ configurationProperty configurationProperty := &configurationProperty{ Classification: jsii.String("classification"), Configurations: []*configurationProperty{ configurationProperty_, }, Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_Configuration.html
type EmrCreateCluster_EbsBlockDeviceConfigProperty ¶
type EmrCreateCluster_EbsBlockDeviceConfigProperty struct { // EBS volume specifications such as volume type, IOPS, and size (GiB) that will be requested for the EBS volume attached to an EC2 instance in the cluster. VolumeSpecification *EmrCreateCluster_VolumeSpecificationProperty `field:"required" json:"volumeSpecification" yaml:"volumeSpecification"` // Number of EBS volumes with a specific volume configuration that will be associated with every instance in the instance group. // Default: EMR selected default. // VolumesPerInstance *float64 `field:"optional" json:"volumesPerInstance" yaml:"volumesPerInstance"` }
Configuration of requested EBS block device associated with the instance group with count of volumes that will be associated to every instance.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var size size ebsBlockDeviceConfigProperty := &EbsBlockDeviceConfigProperty{ VolumeSpecification: &VolumeSpecificationProperty{ VolumeSize: size, VolumeType: awscdk.Aws_stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType_GP3, // the properties below are optional Iops: jsii.Number(123), }, // the properties below are optional VolumesPerInstance: jsii.Number(123), }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_EbsBlockDeviceConfig.html
type EmrCreateCluster_EbsBlockDeviceVolumeType ¶
type EmrCreateCluster_EbsBlockDeviceVolumeType string
EBS Volume Types. See: https://docs.aws.amazon.com/emr/latest/APIReference/API_VolumeSpecification.html#EMR-Type-VolumeSpecification-VolumeType
const ( // gp3 Volume Type. EmrCreateCluster_EbsBlockDeviceVolumeType_GP3 EmrCreateCluster_EbsBlockDeviceVolumeType = "GP3" // gp2 Volume Type. EmrCreateCluster_EbsBlockDeviceVolumeType_GP2 EmrCreateCluster_EbsBlockDeviceVolumeType = "GP2" // io1 Volume Type. EmrCreateCluster_EbsBlockDeviceVolumeType_IO1 EmrCreateCluster_EbsBlockDeviceVolumeType = "IO1" // st1 Volume Type. EmrCreateCluster_EbsBlockDeviceVolumeType_ST1 EmrCreateCluster_EbsBlockDeviceVolumeType = "ST1" // sc1 Volume Type. EmrCreateCluster_EbsBlockDeviceVolumeType_SC1 EmrCreateCluster_EbsBlockDeviceVolumeType = "SC1" // Standard Volume Type. EmrCreateCluster_EbsBlockDeviceVolumeType_STANDARD EmrCreateCluster_EbsBlockDeviceVolumeType = "STANDARD" )
type EmrCreateCluster_EbsConfigurationProperty ¶
type EmrCreateCluster_EbsConfigurationProperty struct { // An array of Amazon EBS volume specifications attached to a cluster instance. // Default: - None. // EbsBlockDeviceConfigs *[]*EmrCreateCluster_EbsBlockDeviceConfigProperty `field:"optional" json:"ebsBlockDeviceConfigs" yaml:"ebsBlockDeviceConfigs"` // Indicates whether an Amazon EBS volume is EBS-optimized. // Default: - EMR selected default. // EbsOptimized *bool `field:"optional" json:"ebsOptimized" yaml:"ebsOptimized"` }
The Amazon EBS configuration of a cluster instance.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var size size ebsConfigurationProperty := &EbsConfigurationProperty{ EbsBlockDeviceConfigs: []ebsBlockDeviceConfigProperty{ &ebsBlockDeviceConfigProperty{ VolumeSpecification: &VolumeSpecificationProperty{ VolumeSize: size, VolumeType: awscdk.Aws_stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType_GP3, // the properties below are optional Iops: jsii.Number(123), }, // the properties below are optional VolumesPerInstance: jsii.Number(123), }, }, EbsOptimized: jsii.Boolean(false), }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_EbsConfiguration.html
type EmrCreateCluster_EmrClusterScaleDownBehavior ¶
type EmrCreateCluster_EmrClusterScaleDownBehavior string
The Cluster ScaleDownBehavior specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. See: https://docs.aws.amazon.com/emr/latest/APIReference/API_RunJobFlow.html#EMR-RunJobFlow-request-ScaleDownBehavior
const ( // Indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. // // This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version EmrCreateCluster_EmrClusterScaleDownBehavior_TERMINATE_AT_INSTANCE_HOUR EmrCreateCluster_EmrClusterScaleDownBehavior = "TERMINATE_AT_INSTANCE_HOUR" // Indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. EmrCreateCluster_EmrClusterScaleDownBehavior_TERMINATE_AT_TASK_COMPLETION EmrCreateCluster_EmrClusterScaleDownBehavior = "TERMINATE_AT_TASK_COMPLETION" )
type EmrCreateCluster_InstanceFleetConfigProperty ¶
type EmrCreateCluster_InstanceFleetConfigProperty struct { // The node type that the instance fleet hosts. // // Valid values are MASTER,CORE,and TASK. InstanceFleetType EmrCreateCluster_InstanceRoleType `field:"required" json:"instanceFleetType" yaml:"instanceFleetType"` // The instance type configurations that define the EC2 instances in the instance fleet. // Default: No instanceTpeConfigs. // InstanceTypeConfigs *[]*EmrCreateCluster_InstanceTypeConfigProperty `field:"optional" json:"instanceTypeConfigs" yaml:"instanceTypeConfigs"` // The launch specification for the instance fleet. // Default: No launchSpecifications. // LaunchSpecifications *EmrCreateCluster_InstanceFleetProvisioningSpecificationsProperty `field:"optional" json:"launchSpecifications" yaml:"launchSpecifications"` // The friendly name of the instance fleet. // Default: No name. // Name *string `field:"optional" json:"name" yaml:"name"` // The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision. // // If not specified or set to 0, only Spot Instances are provisioned for the instance fleet using `targetSpotCapacity`. // // At least one of `targetSpotCapacity` and `targetOnDemandCapacity` should be greater than 0. // For a master instance fleet, only one of `targetSpotCapacity` and `targetOnDemandCapacity` can be specified, and its value // must be 1. // Default: No targetOnDemandCapacity. // TargetOnDemandCapacity *float64 `field:"optional" json:"targetOnDemandCapacity" yaml:"targetOnDemandCapacity"` // The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision. // // If not specified or set to 0, only On-Demand Instances are provisioned for the instance fleet using `targetOnDemandCapacity`. // // At least one of `targetSpotCapacity` and `targetOnDemandCapacity` should be greater than 0. // For a master instance fleet, only one of `targetSpotCapacity` and `targetOnDemandCapacity` can be specified, and its value // must be 1. // Default: No targetSpotCapacity. // TargetSpotCapacity *float64 `field:"optional" json:"targetSpotCapacity" yaml:"targetSpotCapacity"` }
The configuration that defines an instance fleet.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var configurationProperty_ configurationProperty var size size instanceFleetConfigProperty := &InstanceFleetConfigProperty{ InstanceFleetType: awscdk.Aws_stepfunctions_tasks.EmrCreateCluster.InstanceRoleType_MASTER, // the properties below are optional InstanceTypeConfigs: []instanceTypeConfigProperty{ &instanceTypeConfigProperty{ InstanceType: jsii.String("instanceType"), // the properties below are optional BidPrice: jsii.String("bidPrice"), BidPriceAsPercentageOfOnDemandPrice: jsii.Number(123), Configurations: []*configurationProperty{ &configurationProperty{ Classification: jsii.String("classification"), Configurations: []*configurationProperty{ configurationProperty_, }, Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, }, }, EbsConfiguration: &EbsConfigurationProperty{ EbsBlockDeviceConfigs: []ebsBlockDeviceConfigProperty{ &ebsBlockDeviceConfigProperty{ VolumeSpecification: &VolumeSpecificationProperty{ VolumeSize: size, VolumeType: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType_GP3, // the properties below are optional Iops: jsii.Number(123), }, // the properties below are optional VolumesPerInstance: jsii.Number(123), }, }, EbsOptimized: jsii.Boolean(false), }, WeightedCapacity: jsii.Number(123), }, }, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ OnDemandSpecification: &OnDemandProvisioningSpecificationProperty{ AllocationStrategy: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.OnDemandAllocationStrategy_LOWEST_PRICE, }, SpotSpecification: &SpotProvisioningSpecificationProperty{ TimeoutAction: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.SpotTimeoutAction_SWITCH_TO_ON_DEMAND, // the properties below are optional AllocationStrategy: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.SpotAllocationStrategy_CAPACITY_OPTIMIZED, BlockDurationMinutes: jsii.Number(123), Timeout: cdk.Duration_Minutes(jsii.Number(30)), TimeoutDurationMinutes: jsii.Number(123), }, }, Name: jsii.String("name"), TargetOnDemandCapacity: jsii.Number(123), TargetSpotCapacity: jsii.Number(123), }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceFleetConfig.html
type EmrCreateCluster_InstanceFleetProvisioningSpecificationsProperty ¶
type EmrCreateCluster_InstanceFleetProvisioningSpecificationsProperty struct { // The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy. // // The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions. // On-Demand Instances allocation strategy is available in Amazon EMR releases 5.12.1 and later. // Default: - no on-demand specification. // OnDemandSpecification *EmrCreateCluster_OnDemandProvisioningSpecificationProperty `field:"optional" json:"onDemandSpecification" yaml:"onDemandSpecification"` // The launch specification for Spot instances in the fleet, which determines the defined duration and provisioning timeout behavior. // Default: - no spot specification. // SpotSpecification *EmrCreateCluster_SpotProvisioningSpecificationProperty `field:"optional" json:"spotSpecification" yaml:"spotSpecification"` }
The launch specification for On-Demand and Spot instances in the fleet, which determines the defined duration and provisioning timeout behavior, and allocation strategy.
The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions. On-Demand and Spot instance allocation strategies are available in Amazon EMR releases 5.12.1 and later.
Example:
tasks.NewEmrCreateCluster(this, jsii.String("OnDemandSpecification"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ InstanceFleets: []instanceFleetConfigProperty{ &instanceFleetConfigProperty{ InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ OnDemandSpecification: &OnDemandProvisioningSpecificationProperty{ AllocationStrategy: tasks.EmrCreateCluster.OnDemandAllocationStrategy_LOWEST_PRICE, }, }, }, }, }, Name: jsii.String("OnDemandCluster"), IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, }) tasks.NewEmrCreateCluster(this, jsii.String("SpotSpecification"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ InstanceFleets: []*instanceFleetConfigProperty{ &instanceFleetConfigProperty{ InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ SpotSpecification: &SpotProvisioningSpecificationProperty{ AllocationStrategy: tasks.EmrCreateCluster.SpotAllocationStrategy_CAPACITY_OPTIMIZED, TimeoutAction: tasks.EmrCreateCluster.SpotTimeoutAction_TERMINATE_CLUSTER, Timeout: awscdk.Duration_Minutes(jsii.Number(5)), }, }, }, }, }, Name: jsii.String("SpotCluster"), IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, })
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceFleetProvisioningSpecifications.html
type EmrCreateCluster_InstanceGroupConfigProperty ¶
type EmrCreateCluster_InstanceGroupConfigProperty struct { // Target number of instances for the instance group. InstanceCount *float64 `field:"required" json:"instanceCount" yaml:"instanceCount"` // The role of the instance group in the cluster. InstanceRole EmrCreateCluster_InstanceRoleType `field:"required" json:"instanceRole" yaml:"instanceRole"` // The EC2 instance type for all instances in the instance group. InstanceType *string `field:"required" json:"instanceType" yaml:"instanceType"` // An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. // Default: - None. // AutoScalingPolicy *EmrCreateCluster_AutoScalingPolicyProperty `field:"optional" json:"autoScalingPolicy" yaml:"autoScalingPolicy"` // The bid price for each EC2 Spot instance type as defined by InstanceType. // // Expressed in USD. // Default: - None. // BidPrice *string `field:"optional" json:"bidPrice" yaml:"bidPrice"` // The list of configurations supplied for an EMR cluster instance group. // Default: - None. // Configurations *[]*EmrCreateCluster_ConfigurationProperty `field:"optional" json:"configurations" yaml:"configurations"` // EBS configurations that will be attached to each EC2 instance in the instance group. // Default: - None. // EbsConfiguration *EmrCreateCluster_EbsConfigurationProperty `field:"optional" json:"ebsConfiguration" yaml:"ebsConfiguration"` // Market type of the EC2 instances used to create a cluster node. // Default: - EMR selected default. // Market EmrCreateCluster_InstanceMarket `field:"optional" json:"market" yaml:"market"` // Friendly name given to the instance group. // Default: - None. // Name *string `field:"optional" json:"name" yaml:"name"` }
Configuration defining a new instance group.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var configurationProperty_ configurationProperty var size size instanceGroupConfigProperty := &InstanceGroupConfigProperty{ InstanceCount: jsii.Number(123), InstanceRole: awscdk.Aws_stepfunctions_tasks.EmrCreateCluster.InstanceRoleType_MASTER, InstanceType: jsii.String("instanceType"), // the properties below are optional AutoScalingPolicy: &AutoScalingPolicyProperty{ Constraints: &ScalingConstraintsProperty{ MaxCapacity: jsii.Number(123), MinCapacity: jsii.Number(123), }, Rules: []scalingRuleProperty{ &scalingRuleProperty{ Action: &ScalingActionProperty{ SimpleScalingPolicyConfiguration: &SimpleScalingPolicyConfigurationProperty{ ScalingAdjustment: jsii.Number(123), // the properties below are optional AdjustmentType: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.ScalingAdjustmentType_CHANGE_IN_CAPACITY, CoolDown: jsii.Number(123), }, // the properties below are optional Market: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.InstanceMarket_ON_DEMAND, }, Name: jsii.String("name"), Trigger: &ScalingTriggerProperty{ CloudWatchAlarmDefinition: &CloudWatchAlarmDefinitionProperty{ ComparisonOperator: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmComparisonOperator_GREATER_THAN_OR_EQUAL, MetricName: jsii.String("metricName"), Period: cdk.Duration_Minutes(jsii.Number(30)), // the properties below are optional Dimensions: []metricDimensionProperty{ &metricDimensionProperty{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, EvaluationPeriods: jsii.Number(123), Namespace: jsii.String("namespace"), Statistic: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmStatistic_SAMPLE_COUNT, Threshold: jsii.Number(123), Unit: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmUnit_NONE, }, }, // the properties below are optional Description: jsii.String("description"), }, }, }, BidPrice: jsii.String("bidPrice"), Configurations: []*configurationProperty{ &configurationProperty{ Classification: jsii.String("classification"), Configurations: []*configurationProperty{ configurationProperty_, }, Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, }, }, EbsConfiguration: &EbsConfigurationProperty{ EbsBlockDeviceConfigs: []ebsBlockDeviceConfigProperty{ &ebsBlockDeviceConfigProperty{ VolumeSpecification: &VolumeSpecificationProperty{ VolumeSize: size, VolumeType: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType_GP3, // the properties below are optional Iops: jsii.Number(123), }, // the properties below are optional VolumesPerInstance: jsii.Number(123), }, }, EbsOptimized: jsii.Boolean(false), }, Market: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.InstanceMarket_ON_DEMAND, Name: jsii.String("name"), }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceGroupConfig.html
type EmrCreateCluster_InstanceMarket ¶
type EmrCreateCluster_InstanceMarket string
EC2 Instance Market.
const ( // On Demand Instance. EmrCreateCluster_InstanceMarket_ON_DEMAND EmrCreateCluster_InstanceMarket = "ON_DEMAND" // Spot Instance. EmrCreateCluster_InstanceMarket_SPOT EmrCreateCluster_InstanceMarket = "SPOT" )
type EmrCreateCluster_InstanceRoleType ¶
type EmrCreateCluster_InstanceRoleType string
Instance Role Types.
Example:
tasks.NewEmrCreateCluster(this, jsii.String("OnDemandSpecification"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ InstanceFleets: []instanceFleetConfigProperty{ &instanceFleetConfigProperty{ InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ OnDemandSpecification: &OnDemandProvisioningSpecificationProperty{ AllocationStrategy: tasks.EmrCreateCluster.OnDemandAllocationStrategy_LOWEST_PRICE, }, }, }, }, }, Name: jsii.String("OnDemandCluster"), IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, }) tasks.NewEmrCreateCluster(this, jsii.String("SpotSpecification"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ InstanceFleets: []*instanceFleetConfigProperty{ &instanceFleetConfigProperty{ InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ SpotSpecification: &SpotProvisioningSpecificationProperty{ AllocationStrategy: tasks.EmrCreateCluster.SpotAllocationStrategy_CAPACITY_OPTIMIZED, TimeoutAction: tasks.EmrCreateCluster.SpotTimeoutAction_TERMINATE_CLUSTER, Timeout: awscdk.Duration_Minutes(jsii.Number(5)), }, }, }, }, }, Name: jsii.String("SpotCluster"), IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, })
const ( // Master Node. EmrCreateCluster_InstanceRoleType_MASTER EmrCreateCluster_InstanceRoleType = "MASTER" // Core Node. EmrCreateCluster_InstanceRoleType_CORE EmrCreateCluster_InstanceRoleType = "CORE" // Task Node. EmrCreateCluster_InstanceRoleType_TASK EmrCreateCluster_InstanceRoleType = "TASK" )
type EmrCreateCluster_InstanceTypeConfigProperty ¶
type EmrCreateCluster_InstanceTypeConfigProperty struct { // An EC2 instance type. InstanceType *string `field:"required" json:"instanceType" yaml:"instanceType"` // The bid price for each EC2 Spot instance type as defined by InstanceType. Expressed in USD. // // Cannot specify both `bidPrice` and `bidPriceAsPercentageOfOnDemandPrice`. // Default: - None. // BidPrice *string `field:"optional" json:"bidPrice" yaml:"bidPrice"` // The bid price, as a percentage of On-Demand price. // // Cannot specify both `bidPrice` and `bidPriceAsPercentageOfOnDemandPrice`. // Default: - None. // BidPriceAsPercentageOfOnDemandPrice *float64 `field:"optional" json:"bidPriceAsPercentageOfOnDemandPrice" yaml:"bidPriceAsPercentageOfOnDemandPrice"` // A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. // Default: - None. // Configurations *[]*EmrCreateCluster_ConfigurationProperty `field:"optional" json:"configurations" yaml:"configurations"` // The configuration of Amazon Elastic Block Storage (EBS) attached to each instance as defined by InstanceType. // Default: - None. // EbsConfiguration *EmrCreateCluster_EbsConfigurationProperty `field:"optional" json:"ebsConfiguration" yaml:"ebsConfiguration"` // The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in the InstanceFleetConfig. // Default: - None. // WeightedCapacity *float64 `field:"optional" json:"weightedCapacity" yaml:"weightedCapacity"` }
An instance type configuration for each instance type in an instance fleet, which determines the EC2 instances Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var configurationProperty_ configurationProperty var size size instanceTypeConfigProperty := &InstanceTypeConfigProperty{ InstanceType: jsii.String("instanceType"), // the properties below are optional BidPrice: jsii.String("bidPrice"), BidPriceAsPercentageOfOnDemandPrice: jsii.Number(123), Configurations: []*configurationProperty{ &configurationProperty{ Classification: jsii.String("classification"), Configurations: []*configurationProperty{ configurationProperty_, }, Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, }, }, EbsConfiguration: &EbsConfigurationProperty{ EbsBlockDeviceConfigs: []ebsBlockDeviceConfigProperty{ &ebsBlockDeviceConfigProperty{ VolumeSpecification: &VolumeSpecificationProperty{ VolumeSize: size, VolumeType: awscdk.Aws_stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType_GP3, // the properties below are optional Iops: jsii.Number(123), }, // the properties below are optional VolumesPerInstance: jsii.Number(123), }, }, EbsOptimized: jsii.Boolean(false), }, WeightedCapacity: jsii.Number(123), }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceTypeConfig.html
type EmrCreateCluster_InstancesConfigProperty ¶
type EmrCreateCluster_InstancesConfigProperty struct { // A list of additional Amazon EC2 security group IDs for the master node. // Default: - None. // AdditionalMasterSecurityGroups *[]*string `field:"optional" json:"additionalMasterSecurityGroups" yaml:"additionalMasterSecurityGroups"` // A list of additional Amazon EC2 security group IDs for the core and task nodes. // Default: - None. // AdditionalSlaveSecurityGroups *[]*string `field:"optional" json:"additionalSlaveSecurityGroups" yaml:"additionalSlaveSecurityGroups"` // The name of the EC2 key pair that can be used to ssh to the master node as the user called "hadoop.". // Default: - None. // Ec2KeyName *string `field:"optional" json:"ec2KeyName" yaml:"ec2KeyName"` // Applies to clusters that use the uniform instance group configuration. // // To launch the cluster in Amazon Virtual Private Cloud (Amazon VPC), // set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. // Default: EMR selected default. // Ec2SubnetId *string `field:"optional" json:"ec2SubnetId" yaml:"ec2SubnetId"` // Applies to clusters that use the instance fleet configuration. // // When multiple EC2 subnet IDs are specified, Amazon EMR evaluates them and // launches instances in the optimal subnet. // Default: EMR selected default. // Ec2SubnetIds *[]*string `field:"optional" json:"ec2SubnetIds" yaml:"ec2SubnetIds"` // The identifier of the Amazon EC2 security group for the master node. // Default: - None. // EmrManagedMasterSecurityGroup *string `field:"optional" json:"emrManagedMasterSecurityGroup" yaml:"emrManagedMasterSecurityGroup"` // The identifier of the Amazon EC2 security group for the core and task nodes. // Default: - None. // EmrManagedSlaveSecurityGroup *string `field:"optional" json:"emrManagedSlaveSecurityGroup" yaml:"emrManagedSlaveSecurityGroup"` // Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. // Default: - 0.18 if the AmiVersion parameter is not set. If AmiVersion is set, the version of Hadoop for that AMI version is used. // HadoopVersion *string `field:"optional" json:"hadoopVersion" yaml:"hadoopVersion"` // The number of EC2 instances in the cluster. // Default: 0. // InstanceCount *float64 `field:"optional" json:"instanceCount" yaml:"instanceCount"` // Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration. // // The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. // Default: - None. // InstanceFleets *[]*EmrCreateCluster_InstanceFleetConfigProperty `field:"optional" json:"instanceFleets" yaml:"instanceFleets"` // Configuration for the instance groups in a cluster. // Default: - None. // InstanceGroups *[]*EmrCreateCluster_InstanceGroupConfigProperty `field:"optional" json:"instanceGroups" yaml:"instanceGroups"` // The EC2 instance type of the master node. // Default: - None. // MasterInstanceType *string `field:"optional" json:"masterInstanceType" yaml:"masterInstanceType"` // The Availability Zone in which the cluster runs. // Default: - EMR selected default. // Placement *EmrCreateCluster_PlacementTypeProperty `field:"optional" json:"placement" yaml:"placement"` // The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets. // Default: - None. // ServiceAccessSecurityGroup *string `field:"optional" json:"serviceAccessSecurityGroup" yaml:"serviceAccessSecurityGroup"` // The EC2 instance type of the core and task nodes. // Default: - None. // SlaveInstanceType *string `field:"optional" json:"slaveInstanceType" yaml:"slaveInstanceType"` // Specifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error. // Default: false. // TerminationProtected *bool `field:"optional" json:"terminationProtected" yaml:"terminationProtected"` }
A specification of the number and type of Amazon EC2 instances.
See the RunJobFlow API for complete documentation on input parameters.
Example:
clusterRole := iam.NewRole(this, jsii.String("ClusterRole"), &RoleProps{ AssumedBy: iam.NewServicePrincipal(jsii.String("ec2.amazonaws.com")), }) serviceRole := iam.NewRole(this, jsii.String("ServiceRole"), &RoleProps{ AssumedBy: iam.NewServicePrincipal(jsii.String("elasticmapreduce.amazonaws.com")), }) autoScalingRole := iam.NewRole(this, jsii.String("AutoScalingRole"), &RoleProps{ AssumedBy: iam.NewServicePrincipal(jsii.String("elasticmapreduce.amazonaws.com")), }) autoScalingRole.AssumeRolePolicy.AddStatements( iam.NewPolicyStatement(&PolicyStatementProps{ Effect: iam.Effect_ALLOW, Principals: []iPrincipal{ iam.NewServicePrincipal(jsii.String("application-autoscaling.amazonaws.com")), }, Actions: []*string{ jsii.String("sts:AssumeRole"), }, })) tasks.NewEmrCreateCluster(this, jsii.String("Create Cluster"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ }, ClusterRole: ClusterRole, Name: sfn.TaskInput_FromJsonPathAt(jsii.String("$.ClusterName")).value, ServiceRole: ServiceRole, AutoScalingRole: AutoScalingRole, })
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_JobFlowInstancesConfig.html
type EmrCreateCluster_KerberosAttributesProperty ¶
type EmrCreateCluster_KerberosAttributesProperty struct { // The name of the Kerberos realm to which all nodes in a cluster belong. // // For example, EC2.INTERNAL. Realm *string `field:"required" json:"realm" yaml:"realm"` // The Active Directory password for ADDomainJoinUser. // Default: No adDomainJoinPassword. // AdDomainJoinPassword *string `field:"optional" json:"adDomainJoinPassword" yaml:"adDomainJoinPassword"` // Required only when establishing a cross-realm trust with an Active Directory domain. // // A user with sufficient privileges to join // resources to the domain. // Default: No adDomainJoinUser. // AdDomainJoinUser *string `field:"optional" json:"adDomainJoinUser" yaml:"adDomainJoinUser"` // Required only when establishing a cross-realm trust with a KDC in a different realm. // // The cross-realm principal password, which // must be identical across realms. // Default: No crossRealmTrustPrincipalPassword. // CrossRealmTrustPrincipalPassword *string `field:"optional" json:"crossRealmTrustPrincipalPassword" yaml:"crossRealmTrustPrincipalPassword"` // The password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster. // Default: No kdcAdminPassword. // KdcAdminPassword *string `field:"optional" json:"kdcAdminPassword" yaml:"kdcAdminPassword"` }
Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration.
See the RunJobFlow API for complete documentation on input parameters.
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" kerberosAttributesProperty := &KerberosAttributesProperty{ Realm: jsii.String("realm"), // the properties below are optional AdDomainJoinPassword: jsii.String("adDomainJoinPassword"), AdDomainJoinUser: jsii.String("adDomainJoinUser"), CrossRealmTrustPrincipalPassword: jsii.String("crossRealmTrustPrincipalPassword"), KdcAdminPassword: jsii.String("kdcAdminPassword"), }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_KerberosAttributes.html
type EmrCreateCluster_MetricDimensionProperty ¶
type EmrCreateCluster_MetricDimensionProperty struct { // The dimension name. Key *string `field:"required" json:"key" yaml:"key"` // The dimension value. Value *string `field:"required" json:"value" yaml:"value"` }
A CloudWatch dimension, which is specified using a Key (known as a Name in CloudWatch), Value pair.
By default, Amazon EMR uses one dimension whose Key is JobFlowID and Value is a variable representing the cluster ID, which is ${emr.clusterId}. This enables the rule to bootstrap when the cluster ID becomes available.
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" metricDimensionProperty := &MetricDimensionProperty{ Key: jsii.String("key"), Value: jsii.String("value"), }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_MetricDimension.html
type EmrCreateCluster_OnDemandAllocationStrategy ¶ added in v2.116.0
type EmrCreateCluster_OnDemandAllocationStrategy string
On-Demand Allocation Strategies.
Specifies the strategy to use in launching On-Demand instance fleets. Currently, the only option is "lowest-price" (the default), which launches the lowest price first.
Example:
tasks.NewEmrCreateCluster(this, jsii.String("OnDemandSpecification"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ InstanceFleets: []instanceFleetConfigProperty{ &instanceFleetConfigProperty{ InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ OnDemandSpecification: &OnDemandProvisioningSpecificationProperty{ AllocationStrategy: tasks.EmrCreateCluster.OnDemandAllocationStrategy_LOWEST_PRICE, }, }, }, }, }, Name: jsii.String("OnDemandCluster"), IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, }) tasks.NewEmrCreateCluster(this, jsii.String("SpotSpecification"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ InstanceFleets: []*instanceFleetConfigProperty{ &instanceFleetConfigProperty{ InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ SpotSpecification: &SpotProvisioningSpecificationProperty{ AllocationStrategy: tasks.EmrCreateCluster.SpotAllocationStrategy_CAPACITY_OPTIMIZED, TimeoutAction: tasks.EmrCreateCluster.SpotTimeoutAction_TERMINATE_CLUSTER, Timeout: awscdk.Duration_Minutes(jsii.Number(5)), }, }, }, }, }, Name: jsii.String("SpotCluster"), IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, })
const ( // Lowest-price, which launches instances from the lowest priced pool that has available capacity. EmrCreateCluster_OnDemandAllocationStrategy_LOWEST_PRICE EmrCreateCluster_OnDemandAllocationStrategy = "LOWEST_PRICE" )
type EmrCreateCluster_OnDemandProvisioningSpecificationProperty ¶ added in v2.116.0
type EmrCreateCluster_OnDemandProvisioningSpecificationProperty struct { // Specifies the strategy to use in launching On-Demand instance fleets. // // Currently, the only option is lowest-price (the default), which launches the lowest price first. AllocationStrategy EmrCreateCluster_OnDemandAllocationStrategy `field:"required" json:"allocationStrategy" yaml:"allocationStrategy"` }
The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.
Example:
tasks.NewEmrCreateCluster(this, jsii.String("OnDemandSpecification"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ InstanceFleets: []instanceFleetConfigProperty{ &instanceFleetConfigProperty{ InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ OnDemandSpecification: &OnDemandProvisioningSpecificationProperty{ AllocationStrategy: tasks.EmrCreateCluster.OnDemandAllocationStrategy_LOWEST_PRICE, }, }, }, }, }, Name: jsii.String("OnDemandCluster"), IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, }) tasks.NewEmrCreateCluster(this, jsii.String("SpotSpecification"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ InstanceFleets: []*instanceFleetConfigProperty{ &instanceFleetConfigProperty{ InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ SpotSpecification: &SpotProvisioningSpecificationProperty{ AllocationStrategy: tasks.EmrCreateCluster.SpotAllocationStrategy_CAPACITY_OPTIMIZED, TimeoutAction: tasks.EmrCreateCluster.SpotTimeoutAction_TERMINATE_CLUSTER, Timeout: awscdk.Duration_Minutes(jsii.Number(5)), }, }, }, }, }, Name: jsii.String("SpotCluster"), IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, })
type EmrCreateCluster_PlacementTypeProperty ¶
type EmrCreateCluster_PlacementTypeProperty struct { // The Amazon EC2 Availability Zone for the cluster. // // AvailabilityZone is used for uniform instance groups, while AvailabilityZones // (plural) is used for instance fleets. // Default: - EMR selected default. // AvailabilityZone *string `field:"optional" json:"availabilityZone" yaml:"availabilityZone"` // When multiple Availability Zones are specified, Amazon EMR evaluates them and launches instances in the optimal Availability Zone. // // AvailabilityZones is used for instance fleets, while AvailabilityZone (singular) is used for uniform instance groups. // Default: - EMR selected default. // AvailabilityZones *[]*string `field:"optional" json:"availabilityZones" yaml:"availabilityZones"` }
The Amazon EC2 Availability Zone configuration of the cluster (job flow).
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" placementTypeProperty := &PlacementTypeProperty{ AvailabilityZone: jsii.String("availabilityZone"), AvailabilityZones: []*string{ jsii.String("availabilityZones"), }, }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_PlacementType.html
type EmrCreateCluster_ScalingActionProperty ¶
type EmrCreateCluster_ScalingActionProperty struct { // The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment. SimpleScalingPolicyConfiguration *EmrCreateCluster_SimpleScalingPolicyConfigurationProperty `field:"required" json:"simpleScalingPolicyConfiguration" yaml:"simpleScalingPolicyConfiguration"` // Not available for instance groups. // // Instance groups use the market type specified for the group. // Default: - EMR selected default. // Market EmrCreateCluster_InstanceMarket `field:"optional" json:"market" yaml:"market"` }
The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.
And an automatic scaling configuration, which describes how the policy adds or removes instances, the cooldown period, and the number of EC2 instances that will be added each time the CloudWatch metric alarm condition is satisfied.
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" scalingActionProperty := &ScalingActionProperty{ SimpleScalingPolicyConfiguration: &SimpleScalingPolicyConfigurationProperty{ ScalingAdjustment: jsii.Number(123), // the properties below are optional AdjustmentType: awscdk.Aws_stepfunctions_tasks.EmrCreateCluster.ScalingAdjustmentType_CHANGE_IN_CAPACITY, CoolDown: jsii.Number(123), }, // the properties below are optional Market: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.InstanceMarket_ON_DEMAND, }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_ScalingAction.html
type EmrCreateCluster_ScalingAdjustmentType ¶
type EmrCreateCluster_ScalingAdjustmentType string
AutoScaling Adjustment Type.
const ( // CHANGE_IN_CAPACITY. EmrCreateCluster_ScalingAdjustmentType_CHANGE_IN_CAPACITY EmrCreateCluster_ScalingAdjustmentType = "CHANGE_IN_CAPACITY" // PERCENT_CHANGE_IN_CAPACITY. EmrCreateCluster_ScalingAdjustmentType_PERCENT_CHANGE_IN_CAPACITY EmrCreateCluster_ScalingAdjustmentType = "PERCENT_CHANGE_IN_CAPACITY" // EXACT_CAPACITY. EmrCreateCluster_ScalingAdjustmentType_EXACT_CAPACITY EmrCreateCluster_ScalingAdjustmentType = "EXACT_CAPACITY" )
type EmrCreateCluster_ScalingConstraintsProperty ¶
type EmrCreateCluster_ScalingConstraintsProperty struct { // The upper boundary of EC2 instances in an instance group beyond which scaling activities are not allowed to grow. // // Scale-out // activities will not add instances beyond this boundary. MaxCapacity *float64 `field:"required" json:"maxCapacity" yaml:"maxCapacity"` // The lower boundary of EC2 instances in an instance group below which scaling activities are not allowed to shrink. // // Scale-in // activities will not terminate instances below this boundary. MinCapacity *float64 `field:"required" json:"minCapacity" yaml:"minCapacity"` }
The upper and lower EC2 instance limits for an automatic scaling policy.
Automatic scaling activities triggered by automatic scaling rules will not cause an instance group to grow above or below these limits.
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" scalingConstraintsProperty := &ScalingConstraintsProperty{ MaxCapacity: jsii.Number(123), MinCapacity: jsii.Number(123), }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_ScalingConstraints.html
type EmrCreateCluster_ScalingRuleProperty ¶
type EmrCreateCluster_ScalingRuleProperty struct { // The conditions that trigger an automatic scaling activity. Action *EmrCreateCluster_ScalingActionProperty `field:"required" json:"action" yaml:"action"` // The name used to identify an automatic scaling rule. // // Rule names must be unique within a scaling policy. Name *string `field:"required" json:"name" yaml:"name"` // The CloudWatch alarm definition that determines when automatic scaling activity is triggered. Trigger *EmrCreateCluster_ScalingTriggerProperty `field:"required" json:"trigger" yaml:"trigger"` // A friendly, more verbose description of the automatic scaling rule. // Default: - None. // Description *string `field:"optional" json:"description" yaml:"description"` }
A scale-in or scale-out rule that defines scaling activity, including the CloudWatch metric alarm that triggers activity, how EC2 instances are added or removed, and the periodicity of adjustments.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" scalingRuleProperty := &ScalingRuleProperty{ Action: &ScalingActionProperty{ SimpleScalingPolicyConfiguration: &SimpleScalingPolicyConfigurationProperty{ ScalingAdjustment: jsii.Number(123), // the properties below are optional AdjustmentType: awscdk.Aws_stepfunctions_tasks.EmrCreateCluster.ScalingAdjustmentType_CHANGE_IN_CAPACITY, CoolDown: jsii.Number(123), }, // the properties below are optional Market: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.InstanceMarket_ON_DEMAND, }, Name: jsii.String("name"), Trigger: &ScalingTriggerProperty{ CloudWatchAlarmDefinition: &CloudWatchAlarmDefinitionProperty{ ComparisonOperator: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmComparisonOperator_GREATER_THAN_OR_EQUAL, MetricName: jsii.String("metricName"), Period: cdk.Duration_Minutes(jsii.Number(30)), // the properties below are optional Dimensions: []metricDimensionProperty{ &metricDimensionProperty{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, EvaluationPeriods: jsii.Number(123), Namespace: jsii.String("namespace"), Statistic: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmStatistic_SAMPLE_COUNT, Threshold: jsii.Number(123), Unit: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmUnit_NONE, }, }, // the properties below are optional Description: jsii.String("description"), }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_ScalingRule.html
type EmrCreateCluster_ScalingTriggerProperty ¶
type EmrCreateCluster_ScalingTriggerProperty struct { // The definition of a CloudWatch metric alarm. // // When the defined alarm conditions are met along with other trigger parameters, // scaling activity begins. CloudWatchAlarmDefinition *EmrCreateCluster_CloudWatchAlarmDefinitionProperty `field:"required" json:"cloudWatchAlarmDefinition" yaml:"cloudWatchAlarmDefinition"` }
The conditions that trigger an automatic scaling activity and the definition of a CloudWatch metric alarm.
When the defined alarm conditions are met along with other trigger parameters, scaling activity begins.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" scalingTriggerProperty := &ScalingTriggerProperty{ CloudWatchAlarmDefinition: &CloudWatchAlarmDefinitionProperty{ ComparisonOperator: awscdk.Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmComparisonOperator_GREATER_THAN_OR_EQUAL, MetricName: jsii.String("metricName"), Period: cdk.Duration_Minutes(jsii.Number(30)), // the properties below are optional Dimensions: []metricDimensionProperty{ &metricDimensionProperty{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, EvaluationPeriods: jsii.Number(123), Namespace: jsii.String("namespace"), Statistic: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmStatistic_SAMPLE_COUNT, Threshold: jsii.Number(123), Unit: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmUnit_NONE, }, }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_ScalingTrigger.html
type EmrCreateCluster_ScriptBootstrapActionConfigProperty ¶
type EmrCreateCluster_ScriptBootstrapActionConfigProperty struct { // Location of the script to run during a bootstrap action. // // Can be either a location in Amazon S3 or on a local file system. Path *string `field:"required" json:"path" yaml:"path"` // A list of command line arguments to pass to the bootstrap action script. // Default: No args. // Args *[]*string `field:"optional" json:"args" yaml:"args"` }
Configuration of the script to run during a bootstrap action.
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" scriptBootstrapActionConfigProperty := &ScriptBootstrapActionConfigProperty{ Path: jsii.String("path"), // the properties below are optional Args: []*string{ jsii.String("args"), }, }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_ScriptBootstrapActionConfig.html
type EmrCreateCluster_SimpleScalingPolicyConfigurationProperty ¶
type EmrCreateCluster_SimpleScalingPolicyConfigurationProperty struct { // The amount by which to scale in or scale out, based on the specified AdjustmentType. // // A positive value adds to the instance group's // EC2 instance count while a negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY, the number should only be // a positive integer. ScalingAdjustment *float64 `field:"required" json:"scalingAdjustment" yaml:"scalingAdjustment"` // The way in which EC2 instances are added (if ScalingAdjustment is a positive number) or terminated (if ScalingAdjustment is a negative number) each time the scaling activity is triggered. // Default: - None. // AdjustmentType EmrCreateCluster_ScalingAdjustmentType `field:"optional" json:"adjustmentType" yaml:"adjustmentType"` // The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. // Default: 0. // CoolDown *float64 `field:"optional" json:"coolDown" yaml:"coolDown"` }
An automatic scaling configuration, which describes how the policy adds or removes instances, the cooldown period, and the number of EC2 instances that will be added each time the CloudWatch metric alarm condition is satisfied.
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" simpleScalingPolicyConfigurationProperty := &SimpleScalingPolicyConfigurationProperty{ ScalingAdjustment: jsii.Number(123), // the properties below are optional AdjustmentType: awscdk.Aws_stepfunctions_tasks.EmrCreateCluster.ScalingAdjustmentType_CHANGE_IN_CAPACITY, CoolDown: jsii.Number(123), }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_SimpleScalingPolicyConfiguration.html
type EmrCreateCluster_SpotAllocationStrategy ¶
type EmrCreateCluster_SpotAllocationStrategy string
Spot Allocation Strategies.
Specifies the strategy to use in launching Spot Instance fleets. For example, "capacity-optimized" launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching.
Example:
tasks.NewEmrCreateCluster(this, jsii.String("OnDemandSpecification"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ InstanceFleets: []instanceFleetConfigProperty{ &instanceFleetConfigProperty{ InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ OnDemandSpecification: &OnDemandProvisioningSpecificationProperty{ AllocationStrategy: tasks.EmrCreateCluster.OnDemandAllocationStrategy_LOWEST_PRICE, }, }, }, }, }, Name: jsii.String("OnDemandCluster"), IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, }) tasks.NewEmrCreateCluster(this, jsii.String("SpotSpecification"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ InstanceFleets: []*instanceFleetConfigProperty{ &instanceFleetConfigProperty{ InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ SpotSpecification: &SpotProvisioningSpecificationProperty{ AllocationStrategy: tasks.EmrCreateCluster.SpotAllocationStrategy_CAPACITY_OPTIMIZED, TimeoutAction: tasks.EmrCreateCluster.SpotTimeoutAction_TERMINATE_CLUSTER, Timeout: awscdk.Duration_Minutes(jsii.Number(5)), }, }, }, }, }, Name: jsii.String("SpotCluster"), IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, })
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_SpotProvisioningSpecification.html
const ( // Capacity-optimized, which launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching. EmrCreateCluster_SpotAllocationStrategy_CAPACITY_OPTIMIZED EmrCreateCluster_SpotAllocationStrategy = "CAPACITY_OPTIMIZED" // Price-capacity-optimized, which launches instances from Spot Instance pools with the highest capacity availability for the number of instances that are launching. // // Recommended. EmrCreateCluster_SpotAllocationStrategy_PRICE_CAPACITY_OPTIMIZED EmrCreateCluster_SpotAllocationStrategy = "PRICE_CAPACITY_OPTIMIZED" // Lowest-price, which launches instances from the lowest priced pool that has available capacity. EmrCreateCluster_SpotAllocationStrategy_LOWEST_PRICE EmrCreateCluster_SpotAllocationStrategy = "LOWEST_PRICE" // Diversified, which launches instances across all Spot capacity pools. EmrCreateCluster_SpotAllocationStrategy_DIVERSIFIED EmrCreateCluster_SpotAllocationStrategy = "DIVERSIFIED" )
type EmrCreateCluster_SpotProvisioningSpecificationProperty ¶
type EmrCreateCluster_SpotProvisioningSpecificationProperty struct { // The action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired. TimeoutAction EmrCreateCluster_SpotTimeoutAction `field:"required" json:"timeoutAction" yaml:"timeoutAction"` // Specifies the strategy to use in launching Spot Instance fleets. // Default: - No allocation strategy, i.e. spot instance type will be chosen based on current price only // AllocationStrategy EmrCreateCluster_SpotAllocationStrategy `field:"optional" json:"allocationStrategy" yaml:"allocationStrategy"` // The defined duration for Spot instances (also known as Spot blocks) in minutes. // Default: - No blockDurationMinutes. // // Deprecated: - Spot Instances with a defined duration (also known as Spot blocks) are no longer available to new customers from July 1, 2021. // For customers who have previously used the feature, we will continue to support Spot Instances with a defined duration until December 31, 2022. BlockDurationMinutes *float64 `field:"optional" json:"blockDurationMinutes" yaml:"blockDurationMinutes"` // The spot provisioning timeout period in minutes. // // The value must be between 5 and 1440 minutes. // // You must specify one of `timeout` and `timeoutDurationMinutes`. // Default: - The value in `timeoutDurationMinutes` is used. // Timeout awscdk.Duration `field:"optional" json:"timeout" yaml:"timeout"` // The spot provisioning timeout period in minutes. // // The value must be between 5 and 1440 minutes. // // You must specify one of `timeout` and `timeoutDurationMinutes`. // Default: - The value in `timeout` is used. // // Deprecated: - Use `timeout`. TimeoutDurationMinutes *float64 `field:"optional" json:"timeoutDurationMinutes" yaml:"timeoutDurationMinutes"` }
The launch specification for Spot instances in the instance fleet, which determines the defined duration and provisioning timeout behavior.
Example:
tasks.NewEmrCreateCluster(this, jsii.String("OnDemandSpecification"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ InstanceFleets: []instanceFleetConfigProperty{ &instanceFleetConfigProperty{ InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ OnDemandSpecification: &OnDemandProvisioningSpecificationProperty{ AllocationStrategy: tasks.EmrCreateCluster.OnDemandAllocationStrategy_LOWEST_PRICE, }, }, }, }, }, Name: jsii.String("OnDemandCluster"), IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, }) tasks.NewEmrCreateCluster(this, jsii.String("SpotSpecification"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ InstanceFleets: []*instanceFleetConfigProperty{ &instanceFleetConfigProperty{ InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ SpotSpecification: &SpotProvisioningSpecificationProperty{ AllocationStrategy: tasks.EmrCreateCluster.SpotAllocationStrategy_CAPACITY_OPTIMIZED, TimeoutAction: tasks.EmrCreateCluster.SpotTimeoutAction_TERMINATE_CLUSTER, Timeout: awscdk.Duration_Minutes(jsii.Number(5)), }, }, }, }, }, Name: jsii.String("SpotCluster"), IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, })
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_SpotProvisioningSpecification.html
type EmrCreateCluster_SpotTimeoutAction ¶
type EmrCreateCluster_SpotTimeoutAction string
Spot Timeout Actions.
Example:
tasks.NewEmrCreateCluster(this, jsii.String("OnDemandSpecification"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ InstanceFleets: []instanceFleetConfigProperty{ &instanceFleetConfigProperty{ InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ OnDemandSpecification: &OnDemandProvisioningSpecificationProperty{ AllocationStrategy: tasks.EmrCreateCluster.OnDemandAllocationStrategy_LOWEST_PRICE, }, }, }, }, }, Name: jsii.String("OnDemandCluster"), IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, }) tasks.NewEmrCreateCluster(this, jsii.String("SpotSpecification"), &EmrCreateClusterProps{ Instances: &InstancesConfigProperty{ InstanceFleets: []*instanceFleetConfigProperty{ &instanceFleetConfigProperty{ InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER, LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{ SpotSpecification: &SpotProvisioningSpecificationProperty{ AllocationStrategy: tasks.EmrCreateCluster.SpotAllocationStrategy_CAPACITY_OPTIMIZED, TimeoutAction: tasks.EmrCreateCluster.SpotTimeoutAction_TERMINATE_CLUSTER, Timeout: awscdk.Duration_Minutes(jsii.Number(5)), }, }, }, }, }, Name: jsii.String("SpotCluster"), IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, })
const ( // SWITCH_TO_ON_DEMAND. EmrCreateCluster_SpotTimeoutAction_SWITCH_TO_ON_DEMAND EmrCreateCluster_SpotTimeoutAction = "SWITCH_TO_ON_DEMAND" // TERMINATE_CLUSTER. EmrCreateCluster_SpotTimeoutAction_TERMINATE_CLUSTER EmrCreateCluster_SpotTimeoutAction = "TERMINATE_CLUSTER" )
type EmrCreateCluster_VolumeSpecificationProperty ¶
type EmrCreateCluster_VolumeSpecificationProperty struct { // The volume size. // // If the volume type is EBS-optimized, the minimum value is 10GiB. // Maximum size is 1TiB. VolumeSize awscdk.Size `field:"required" json:"volumeSize" yaml:"volumeSize"` // The volume type. // // Volume types supported are gp2, io1, standard. VolumeType EmrCreateCluster_EbsBlockDeviceVolumeType `field:"required" json:"volumeType" yaml:"volumeType"` // The number of I/O operations per second (IOPS) that the volume supports. // Default: - EMR selected default. // Iops *float64 `field:"optional" json:"iops" yaml:"iops"` }
EBS volume specifications such as volume type, IOPS, and size (GiB) that will be requested for the EBS volume attached to an EC2 instance in the cluster.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var size size volumeSpecificationProperty := &VolumeSpecificationProperty{ VolumeSize: size, VolumeType: awscdk.Aws_stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType_GP3, // the properties below are optional Iops: jsii.Number(123), }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_VolumeSpecification.html
type EmrModifyInstanceFleetByName ¶
type EmrModifyInstanceFleetByName interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to to modify an InstanceFleet on an EMR Cluster.
Example:
tasks.NewEmrModifyInstanceFleetByName(this, jsii.String("Task"), &EmrModifyInstanceFleetByNameProps{ ClusterId: jsii.String("ClusterId"), InstanceFleetName: jsii.String("InstanceFleetName"), TargetOnDemandCapacity: jsii.Number(2), TargetSpotCapacity: jsii.Number(0), })
func EmrModifyInstanceFleetByName_JsonPath ¶ added in v2.178.0
func EmrModifyInstanceFleetByName_JsonPath(scope constructs.Construct, id *string, props *EmrModifyInstanceFleetByNameJsonPathProps) EmrModifyInstanceFleetByName
A Step Functions Task using JSONPath to to modify an InstanceFleet on an EMR Cluster.
func EmrModifyInstanceFleetByName_Jsonata ¶ added in v2.178.0
func EmrModifyInstanceFleetByName_Jsonata(scope constructs.Construct, id *string, props *EmrModifyInstanceFleetByNameJsonataProps) EmrModifyInstanceFleetByName
A Step Functions Task using JSONata to to modify an InstanceFleet on an EMR Cluster.
func NewEmrModifyInstanceFleetByName ¶
func NewEmrModifyInstanceFleetByName(scope constructs.Construct, id *string, props *EmrModifyInstanceFleetByNameProps) EmrModifyInstanceFleetByName
type EmrModifyInstanceFleetByNameJsonPathProps ¶ added in v2.178.0
type EmrModifyInstanceFleetByNameJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The ClusterId to update. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` // The InstanceFleetName to update. InstanceFleetName *string `field:"required" json:"instanceFleetName" yaml:"instanceFleetName"` // The target capacity of On-Demand units for the instance fleet. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceFleetModifyConfig.html // // Default: - None. // TargetOnDemandCapacity *float64 `field:"required" json:"targetOnDemandCapacity" yaml:"targetOnDemandCapacity"` // The target capacity of Spot units for the instance fleet. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceFleetModifyConfig.html // // Default: - None. // TargetSpotCapacity *float64 `field:"required" json:"targetSpotCapacity" yaml:"targetSpotCapacity"` }
Properties for EmrModifyInstanceFleetByName using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var taskRole taskRole var timeout timeout emrModifyInstanceFleetByNameJsonPathProps := &EmrModifyInstanceFleetByNameJsonPathProps{ ClusterId: jsii.String("clusterId"), InstanceFleetName: jsii.String("instanceFleetName"), TargetOnDemandCapacity: jsii.Number(123), TargetSpotCapacity: jsii.Number(123), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EmrModifyInstanceFleetByNameJsonataProps ¶ added in v2.178.0
type EmrModifyInstanceFleetByNameJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The ClusterId to update. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` // The InstanceFleetName to update. InstanceFleetName *string `field:"required" json:"instanceFleetName" yaml:"instanceFleetName"` // The target capacity of On-Demand units for the instance fleet. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceFleetModifyConfig.html // // Default: - None. // TargetOnDemandCapacity *float64 `field:"required" json:"targetOnDemandCapacity" yaml:"targetOnDemandCapacity"` // The target capacity of Spot units for the instance fleet. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceFleetModifyConfig.html // // Default: - None. // TargetSpotCapacity *float64 `field:"required" json:"targetSpotCapacity" yaml:"targetSpotCapacity"` }
Properties for EmrModifyInstanceFleetByName using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var taskRole taskRole var timeout timeout emrModifyInstanceFleetByNameJsonataProps := &EmrModifyInstanceFleetByNameJsonataProps{ ClusterId: jsii.String("clusterId"), InstanceFleetName: jsii.String("instanceFleetName"), TargetOnDemandCapacity: jsii.Number(123), TargetSpotCapacity: jsii.Number(123), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EmrModifyInstanceFleetByNameProps ¶
type EmrModifyInstanceFleetByNameProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The ClusterId to update. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` // The InstanceFleetName to update. InstanceFleetName *string `field:"required" json:"instanceFleetName" yaml:"instanceFleetName"` // The target capacity of On-Demand units for the instance fleet. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceFleetModifyConfig.html // // Default: - None. // TargetOnDemandCapacity *float64 `field:"required" json:"targetOnDemandCapacity" yaml:"targetOnDemandCapacity"` // The target capacity of Spot units for the instance fleet. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceFleetModifyConfig.html // // Default: - None. // TargetSpotCapacity *float64 `field:"required" json:"targetSpotCapacity" yaml:"targetSpotCapacity"` }
Properties for EmrModifyInstanceFleetByName.
Example:
tasks.NewEmrModifyInstanceFleetByName(this, jsii.String("Task"), &EmrModifyInstanceFleetByNameProps{ ClusterId: jsii.String("ClusterId"), InstanceFleetName: jsii.String("InstanceFleetName"), TargetOnDemandCapacity: jsii.Number(2), TargetSpotCapacity: jsii.Number(0), })
type EmrModifyInstanceGroupByName ¶
type EmrModifyInstanceGroupByName interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to to modify an InstanceGroup on an EMR Cluster.
Example:
tasks.NewEmrModifyInstanceGroupByName(this, jsii.String("Task"), &EmrModifyInstanceGroupByNameProps{ ClusterId: jsii.String("ClusterId"), InstanceGroupName: sfn.JsonPath_StringAt(jsii.String("$.InstanceGroupName")), InstanceGroup: &InstanceGroupModifyConfigProperty{ InstanceCount: jsii.Number(1), }, })
func EmrModifyInstanceGroupByName_JsonPath ¶ added in v2.178.0
func EmrModifyInstanceGroupByName_JsonPath(scope constructs.Construct, id *string, props *EmrModifyInstanceGroupByNameJsonPathProps) EmrModifyInstanceGroupByName
A Step Functions Task using JSONPath to modify an InstanceGroup on an EMR Cluster.
func EmrModifyInstanceGroupByName_Jsonata ¶ added in v2.178.0
func EmrModifyInstanceGroupByName_Jsonata(scope constructs.Construct, id *string, props *EmrModifyInstanceGroupByNameJsonataProps) EmrModifyInstanceGroupByName
A Step Functions Task using JSONata to modify an InstanceGroup on an EMR Cluster.
func NewEmrModifyInstanceGroupByName ¶
func NewEmrModifyInstanceGroupByName(scope constructs.Construct, id *string, props *EmrModifyInstanceGroupByNameProps) EmrModifyInstanceGroupByName
type EmrModifyInstanceGroupByNameJsonPathProps ¶ added in v2.178.0
type EmrModifyInstanceGroupByNameJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The ClusterId to update. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` // The JSON that you want to provide to your ModifyInstanceGroup call as input. // // This uses the same syntax as the ModifyInstanceGroups API. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_ModifyInstanceGroups.html // InstanceGroup *EmrModifyInstanceGroupByName_InstanceGroupModifyConfigProperty `field:"required" json:"instanceGroup" yaml:"instanceGroup"` // The InstanceGroupName to update. InstanceGroupName *string `field:"required" json:"instanceGroupName" yaml:"instanceGroupName"` }
Properties for EmrModifyInstanceGroupByName using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var configurationProperty_ configurationProperty var resultSelector interface{} var taskRole taskRole var timeout timeout emrModifyInstanceGroupByNameJsonPathProps := &EmrModifyInstanceGroupByNameJsonPathProps{ ClusterId: jsii.String("clusterId"), InstanceGroup: &InstanceGroupModifyConfigProperty{ Configurations: []*configurationProperty{ &configurationProperty{ Classification: jsii.String("classification"), Configurations: []*configurationProperty{ configurationProperty_, }, Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, }, }, EC2InstanceIdsToTerminate: []*string{ jsii.String("eC2InstanceIdsToTerminate"), }, InstanceCount: jsii.Number(123), ShrinkPolicy: &ShrinkPolicyProperty{ DecommissionTimeout: cdk.Duration_Minutes(jsii.Number(30)), InstanceResizePolicy: &InstanceResizePolicyProperty{ InstancesToProtect: []*string{ jsii.String("instancesToProtect"), }, InstancesToTerminate: []*string{ jsii.String("instancesToTerminate"), }, InstanceTerminationTimeout: cdk.Duration_*Minutes(jsii.Number(30)), }, }, }, InstanceGroupName: jsii.String("instanceGroupName"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EmrModifyInstanceGroupByNameJsonataProps ¶ added in v2.178.0
type EmrModifyInstanceGroupByNameJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The ClusterId to update. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` // The JSON that you want to provide to your ModifyInstanceGroup call as input. // // This uses the same syntax as the ModifyInstanceGroups API. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_ModifyInstanceGroups.html // InstanceGroup *EmrModifyInstanceGroupByName_InstanceGroupModifyConfigProperty `field:"required" json:"instanceGroup" yaml:"instanceGroup"` // The InstanceGroupName to update. InstanceGroupName *string `field:"required" json:"instanceGroupName" yaml:"instanceGroupName"` }
Properties for EmrModifyInstanceGroupByName using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var configurationProperty_ configurationProperty var outputs interface{} var taskRole taskRole var timeout timeout emrModifyInstanceGroupByNameJsonataProps := &EmrModifyInstanceGroupByNameJsonataProps{ ClusterId: jsii.String("clusterId"), InstanceGroup: &InstanceGroupModifyConfigProperty{ Configurations: []*configurationProperty{ &configurationProperty{ Classification: jsii.String("classification"), Configurations: []*configurationProperty{ configurationProperty_, }, Properties: map[string]*string{ "propertiesKey": jsii.String("properties"), }, }, }, EC2InstanceIdsToTerminate: []*string{ jsii.String("eC2InstanceIdsToTerminate"), }, InstanceCount: jsii.Number(123), ShrinkPolicy: &ShrinkPolicyProperty{ DecommissionTimeout: cdk.Duration_Minutes(jsii.Number(30)), InstanceResizePolicy: &InstanceResizePolicyProperty{ InstancesToProtect: []*string{ jsii.String("instancesToProtect"), }, InstancesToTerminate: []*string{ jsii.String("instancesToTerminate"), }, InstanceTerminationTimeout: cdk.Duration_*Minutes(jsii.Number(30)), }, }, }, InstanceGroupName: jsii.String("instanceGroupName"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_*Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EmrModifyInstanceGroupByNameProps ¶
type EmrModifyInstanceGroupByNameProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The ClusterId to update. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` // The JSON that you want to provide to your ModifyInstanceGroup call as input. // // This uses the same syntax as the ModifyInstanceGroups API. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_ModifyInstanceGroups.html // InstanceGroup *EmrModifyInstanceGroupByName_InstanceGroupModifyConfigProperty `field:"required" json:"instanceGroup" yaml:"instanceGroup"` // The InstanceGroupName to update. InstanceGroupName *string `field:"required" json:"instanceGroupName" yaml:"instanceGroupName"` }
Properties for EmrModifyInstanceGroupByName.
Example:
tasks.NewEmrModifyInstanceGroupByName(this, jsii.String("Task"), &EmrModifyInstanceGroupByNameProps{ ClusterId: jsii.String("ClusterId"), InstanceGroupName: sfn.JsonPath_StringAt(jsii.String("$.InstanceGroupName")), InstanceGroup: &InstanceGroupModifyConfigProperty{ InstanceCount: jsii.Number(1), }, })
type EmrModifyInstanceGroupByName_InstanceGroupModifyConfigProperty ¶
type EmrModifyInstanceGroupByName_InstanceGroupModifyConfigProperty struct { // A list of new or modified configurations to apply for an instance group. // Default: - None. // Configurations *[]*EmrCreateCluster_ConfigurationProperty `field:"optional" json:"configurations" yaml:"configurations"` // The EC2 InstanceIds to terminate. // // After you terminate the instances, the instance group will not return to its original requested size. // Default: - None. // EC2InstanceIdsToTerminate *[]*string `field:"optional" json:"eC2InstanceIdsToTerminate" yaml:"eC2InstanceIdsToTerminate"` // Target size for the instance group. // Default: - None. // InstanceCount *float64 `field:"optional" json:"instanceCount" yaml:"instanceCount"` // Policy for customizing shrink operations. // See: https://docs.aws.amazon.com/emr/latest/APIReference/API_ShrinkPolicy.html // // Default: - None. // ShrinkPolicy *EmrModifyInstanceGroupByName_ShrinkPolicyProperty `field:"optional" json:"shrinkPolicy" yaml:"shrinkPolicy"` }
Modify the size or configurations of an instance group.
Example:
tasks.NewEmrModifyInstanceGroupByName(this, jsii.String("Task"), &EmrModifyInstanceGroupByNameProps{ ClusterId: jsii.String("ClusterId"), InstanceGroupName: sfn.JsonPath_StringAt(jsii.String("$.InstanceGroupName")), InstanceGroup: &InstanceGroupModifyConfigProperty{ InstanceCount: jsii.Number(1), }, })
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceGroupModifyConfig.html
type EmrModifyInstanceGroupByName_InstanceResizePolicyProperty ¶
type EmrModifyInstanceGroupByName_InstanceResizePolicyProperty struct { // Specific list of instances to be protected when shrinking an instance group. // Default: - No instances will be protected when shrinking an instance group. // InstancesToProtect *[]*string `field:"optional" json:"instancesToProtect" yaml:"instancesToProtect"` // Specific list of instances to be terminated when shrinking an instance group. // Default: - No instances will be terminated when shrinking an instance group. // InstancesToTerminate *[]*string `field:"optional" json:"instancesToTerminate" yaml:"instancesToTerminate"` // Decommissioning timeout override for the specific list of instances to be terminated. // Default: cdk.Duration.seconds // InstanceTerminationTimeout awscdk.Duration `field:"optional" json:"instanceTerminationTimeout" yaml:"instanceTerminationTimeout"` }
Custom policy for requesting termination protection or termination of specific instances when shrinking an instance group.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" instanceResizePolicyProperty := &InstanceResizePolicyProperty{ InstancesToProtect: []*string{ jsii.String("instancesToProtect"), }, InstancesToTerminate: []*string{ jsii.String("instancesToTerminate"), }, InstanceTerminationTimeout: cdk.Duration_Minutes(jsii.Number(30)), }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_InstanceResizePolicy.html
type EmrModifyInstanceGroupByName_ShrinkPolicyProperty ¶
type EmrModifyInstanceGroupByName_ShrinkPolicyProperty struct { // The desired timeout for decommissioning an instance. // // Overrides the default YARN decommissioning timeout. // Default: - EMR selected default. // DecommissionTimeout awscdk.Duration `field:"optional" json:"decommissionTimeout" yaml:"decommissionTimeout"` // Custom policy for requesting termination protection or termination of specific instances when shrinking an instance group. // Default: - None. // InstanceResizePolicy *EmrModifyInstanceGroupByName_InstanceResizePolicyProperty `field:"optional" json:"instanceResizePolicy" yaml:"instanceResizePolicy"` }
Policy for customizing shrink operations.
Allows configuration of decommissioning timeout and targeted instance shrinking.
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" shrinkPolicyProperty := &ShrinkPolicyProperty{ DecommissionTimeout: cdk.Duration_Minutes(jsii.Number(30)), InstanceResizePolicy: &InstanceResizePolicyProperty{ InstancesToProtect: []*string{ jsii.String("instancesToProtect"), }, InstancesToTerminate: []*string{ jsii.String("instancesToTerminate"), }, InstanceTerminationTimeout: cdk.Duration_*Minutes(jsii.Number(30)), }, }
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_ShrinkPolicy.html
type EmrSetClusterTerminationProtection ¶
type EmrSetClusterTerminationProtection interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to to set Termination Protection on an EMR Cluster.
Example:
tasks.NewEmrSetClusterTerminationProtection(this, jsii.String("Task"), &EmrSetClusterTerminationProtectionProps{ ClusterId: jsii.String("ClusterId"), TerminationProtected: jsii.Boolean(false), })
func EmrSetClusterTerminationProtection_JsonPath ¶ added in v2.178.0
func EmrSetClusterTerminationProtection_JsonPath(scope constructs.Construct, id *string, props *EmrSetClusterTerminationProtectionJsonPathProps) EmrSetClusterTerminationProtection
A Step Functions Task using JSONPath to set Termination Protection on an EMR Cluster.
func EmrSetClusterTerminationProtection_Jsonata ¶ added in v2.178.0
func EmrSetClusterTerminationProtection_Jsonata(scope constructs.Construct, id *string, props *EmrSetClusterTerminationProtectionJsonataProps) EmrSetClusterTerminationProtection
A Step Functions Task using JSONata to set Termination Protection on an EMR Cluster.
func NewEmrSetClusterTerminationProtection ¶
func NewEmrSetClusterTerminationProtection(scope constructs.Construct, id *string, props *EmrSetClusterTerminationProtectionProps) EmrSetClusterTerminationProtection
type EmrSetClusterTerminationProtectionJsonPathProps ¶ added in v2.178.0
type EmrSetClusterTerminationProtectionJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The ClusterId to update. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` // Termination protection indicator. TerminationProtected *bool `field:"required" json:"terminationProtected" yaml:"terminationProtected"` }
Properties for EmrSetClusterTerminationProtection using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var taskRole taskRole var timeout timeout emrSetClusterTerminationProtectionJsonPathProps := &EmrSetClusterTerminationProtectionJsonPathProps{ ClusterId: jsii.String("clusterId"), TerminationProtected: jsii.Boolean(false), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EmrSetClusterTerminationProtectionJsonataProps ¶ added in v2.178.0
type EmrSetClusterTerminationProtectionJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The ClusterId to update. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` // Termination protection indicator. TerminationProtected *bool `field:"required" json:"terminationProtected" yaml:"terminationProtected"` }
Properties for EmrSetClusterTerminationProtection using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var taskRole taskRole var timeout timeout emrSetClusterTerminationProtectionJsonataProps := &EmrSetClusterTerminationProtectionJsonataProps{ ClusterId: jsii.String("clusterId"), TerminationProtected: jsii.Boolean(false), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EmrSetClusterTerminationProtectionProps ¶
type EmrSetClusterTerminationProtectionProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The ClusterId to update. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` // Termination protection indicator. TerminationProtected *bool `field:"required" json:"terminationProtected" yaml:"terminationProtected"` }
Properties for EmrSetClusterTerminationProtection.
Example:
tasks.NewEmrSetClusterTerminationProtection(this, jsii.String("Task"), &EmrSetClusterTerminationProtectionProps{ ClusterId: jsii.String("ClusterId"), TerminationProtected: jsii.Boolean(false), })
type EmrTerminateCluster ¶
type EmrTerminateCluster interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to terminate an EMR Cluster.
Example:
tasks.NewEmrTerminateCluster(this, jsii.String("Task"), &EmrTerminateClusterProps{ ClusterId: jsii.String("ClusterId"), })
func EmrTerminateCluster_JsonPath ¶ added in v2.178.0
func EmrTerminateCluster_JsonPath(scope constructs.Construct, id *string, props *EmrTerminateClusterJsonPathProps) EmrTerminateCluster
A Step Functions Task using JSONPath to terminate an EMR Cluster.
func EmrTerminateCluster_Jsonata ¶ added in v2.178.0
func EmrTerminateCluster_Jsonata(scope constructs.Construct, id *string, props *EmrTerminateClusterJsonataProps) EmrTerminateCluster
A Step Functions Task using JSONata to terminate an EMR Cluster.
func NewEmrTerminateCluster ¶
func NewEmrTerminateCluster(scope constructs.Construct, id *string, props *EmrTerminateClusterProps) EmrTerminateCluster
type EmrTerminateClusterJsonPathProps ¶ added in v2.178.0
type EmrTerminateClusterJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The ClusterId to terminate. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` }
Properties for EmrTerminateCluster using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var taskRole taskRole var timeout timeout emrTerminateClusterJsonPathProps := &EmrTerminateClusterJsonPathProps{ ClusterId: jsii.String("clusterId"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EmrTerminateClusterJsonataProps ¶ added in v2.178.0
type EmrTerminateClusterJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The ClusterId to terminate. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` }
Properties for EmrTerminateCluster using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var taskRole taskRole var timeout timeout emrTerminateClusterJsonataProps := &EmrTerminateClusterJsonataProps{ ClusterId: jsii.String("clusterId"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EmrTerminateClusterProps ¶
type EmrTerminateClusterProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The ClusterId to terminate. ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"` }
Properties for EmrTerminateCluster.
Example:
tasks.NewEmrTerminateCluster(this, jsii.String("Task"), &EmrTerminateClusterProps{ ClusterId: jsii.String("ClusterId"), })
type EncryptionConfiguration ¶
type EncryptionConfiguration struct { // Type of S3 server-side encryption enabled. // Default: EncryptionOption.S3_MANAGED // EncryptionOption EncryptionOption `field:"required" json:"encryptionOption" yaml:"encryptionOption"` // KMS key ARN or ID. // Default: - No KMS key for Encryption Option SSE_S3 and default master key for Encryption Option SSE_KMS and CSE_KMS. // EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"` }
Encryption Configuration of the S3 bucket.
Example:
startQueryExecutionJob := tasks.NewAthenaStartQueryExecution(this, jsii.String("Start Athena Query"), &AthenaStartQueryExecutionProps{ QueryString: sfn.JsonPath_StringAt(jsii.String("$.queryString")), QueryExecutionContext: &QueryExecutionContext{ DatabaseName: jsii.String("mydatabase"), }, ResultConfiguration: &ResultConfiguration{ EncryptionConfiguration: &EncryptionConfiguration{ EncryptionOption: tasks.EncryptionOption_S3_MANAGED, }, OutputLocation: &Location{ BucketName: jsii.String("amzn-s3-demo-bucket"), ObjectKey: jsii.String("folder"), }, }, ExecutionParameters: []*string{ jsii.String("param1"), jsii.String("param2"), }, })
See: https://docs.aws.amazon.com/athena/latest/APIReference/API_EncryptionConfiguration.html
type EncryptionOption ¶
type EncryptionOption string
Encryption Options of the S3 bucket.
Example:
startQueryExecutionJob := tasks.NewAthenaStartQueryExecution(this, jsii.String("Start Athena Query"), &AthenaStartQueryExecutionProps{ QueryString: sfn.JsonPath_StringAt(jsii.String("$.queryString")), QueryExecutionContext: &QueryExecutionContext{ DatabaseName: jsii.String("mydatabase"), }, ResultConfiguration: &ResultConfiguration{ EncryptionConfiguration: &EncryptionConfiguration{ EncryptionOption: tasks.EncryptionOption_S3_MANAGED, }, OutputLocation: &Location{ BucketName: jsii.String("amzn-s3-demo-bucket"), ObjectKey: jsii.String("folder"), }, }, ExecutionParameters: []*string{ jsii.String("param1"), jsii.String("param2"), }, })
const ( // Server side encryption (SSE) with an Amazon S3-managed key. // See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html // EncryptionOption_S3_MANAGED EncryptionOption = "S3_MANAGED" // Server-side encryption (SSE) with an AWS KMS key managed by the account owner. // See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html // EncryptionOption_KMS EncryptionOption = "KMS" // Client-side encryption (CSE) with an AWS KMS key managed by the account owner. // See: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html // EncryptionOption_CLIENT_SIDE_KMS EncryptionOption = "CLIENT_SIDE_KMS" )
type EvaluateExpression ¶
type EvaluateExpression interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to evaluate an expression.
OUTPUT: the output of this task is the evaluated expression.
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 NewEvaluateExpression ¶
func NewEvaluateExpression(scope constructs.Construct, id *string, props *EvaluateExpressionProps) EvaluateExpression
type EvaluateExpressionProps ¶
type EvaluateExpressionProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The expression to evaluate. The expression may contain state paths. // // Example value: `'$.a + $.b'` Expression *string `field:"required" json:"expression" yaml:"expression"` // The runtime language to use to evaluate the expression. // Default: - the latest Lambda node runtime available in your region. // Runtime awslambda.Runtime `field:"optional" json:"runtime" yaml:"runtime"` }
Properties for EvaluateExpression.
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 EventBridgePutEvents ¶
type EventBridgePutEvents interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A StepFunctions Task to send events to an EventBridge event bus.
Example:
import events "github.com/aws/aws-cdk-go/awscdk" myEventBus := events.NewEventBus(this, jsii.String("EventBus"), &EventBusProps{ EventBusName: jsii.String("MyEventBus1"), }) tasks.NewEventBridgePutEvents(this, jsii.String("Send an event to EventBridge"), &EventBridgePutEventsProps{ Entries: []eventBridgePutEventsEntry{ &eventBridgePutEventsEntry{ Detail: sfn.TaskInput_FromObject(map[string]interface{}{ "Message": jsii.String("Hello from Step Functions!"), }), EventBus: myEventBus, DetailType: jsii.String("MessageFromStepFunctions"), Source: jsii.String("step.functions"), }, }, })
func EventBridgePutEvents_JsonPath ¶ added in v2.178.0
func EventBridgePutEvents_JsonPath(scope constructs.Construct, id *string, props *EventBridgePutEventsJsonPathProps) EventBridgePutEvents
A StepFunctions Task using JSONPath to send events to an EventBridge event bus.
func EventBridgePutEvents_Jsonata ¶ added in v2.178.0
func EventBridgePutEvents_Jsonata(scope constructs.Construct, id *string, props *EventBridgePutEventsJsonataProps) EventBridgePutEvents
A StepFunctions Task using JSONata to send events to an EventBridge event bus.
func NewEventBridgePutEvents ¶
func NewEventBridgePutEvents(scope constructs.Construct, id *string, props *EventBridgePutEventsProps) EventBridgePutEvents
type EventBridgePutEventsEntry ¶
type EventBridgePutEventsEntry struct { // The event body. // // Can either be provided as an object or as a JSON-serialized string. // // Example: // sfn.TaskInput_FromText(jsii.String("{\"instance-id\": \"i-1234567890abcdef0\", \"state\": \"terminated\"}")) // sfn.TaskInput_FromObject(map[string]interface{}{ // "Message": jsii.String("Hello from Step Functions"), // }) // sfn.TaskInput_FromJsonPathAt(jsii.String("$.EventDetail")) // Detail awsstepfunctions.TaskInput `field:"required" json:"detail" yaml:"detail"` // Used along with the source field to help identify the fields and values expected in the detail field. // // For example, events by CloudTrail have detail type "AWS API Call via CloudTrail". // See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html // DetailType *string `field:"required" json:"detailType" yaml:"detailType"` // The service or application that caused this event to be generated. // // Example value: `com.example.service` // See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html // Source *string `field:"required" json:"source" yaml:"source"` // The event bus the entry will be sent to. // Default: - event is sent to account's default event bus. // EventBus awsevents.IEventBus `field:"optional" json:"eventBus" yaml:"eventBus"` }
An entry to be sent to EventBridge.
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" import "github.com/aws/aws-cdk-go/awscdk" var eventBus eventBus var taskInput taskInput eventBridgePutEventsEntry := &EventBridgePutEventsEntry{ Detail: taskInput, DetailType: jsii.String("detailType"), Source: jsii.String("source"), // the properties below are optional EventBus: eventBus, }
See: https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEventsRequestEntry.html
type EventBridgePutEventsJsonPathProps ¶ added in v2.178.0
type EventBridgePutEventsJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The entries that will be sent. // // Minimum number of entries is 1 and maximum is 10, // unless [PutEvents API limit](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html#API_PutEvents_RequestSyntax) has changed. Entries *[]*EventBridgePutEventsEntry `field:"required" json:"entries" yaml:"entries"` }
Properties for sending events with PutEvents using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var eventBus eventBus var resultSelector interface{} var taskInput taskInput var taskRole taskRole var timeout timeout eventBridgePutEventsJsonPathProps := &EventBridgePutEventsJsonPathProps{ Entries: []eventBridgePutEventsEntry{ &eventBridgePutEventsEntry{ Detail: taskInput, DetailType: jsii.String("detailType"), Source: jsii.String("source"), // the properties below are optional EventBus: eventBus, }, }, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EventBridgePutEventsJsonataProps ¶ added in v2.178.0
type EventBridgePutEventsJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The entries that will be sent. // // Minimum number of entries is 1 and maximum is 10, // unless [PutEvents API limit](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html#API_PutEvents_RequestSyntax) has changed. Entries *[]*EventBridgePutEventsEntry `field:"required" json:"entries" yaml:"entries"` }
Properties for sending events with PutEvents using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var eventBus eventBus var outputs interface{} var taskInput taskInput var taskRole taskRole var timeout timeout eventBridgePutEventsJsonataProps := &EventBridgePutEventsJsonataProps{ Entries: []eventBridgePutEventsEntry{ &eventBridgePutEventsEntry{ Detail: taskInput, DetailType: jsii.String("detailType"), Source: jsii.String("source"), // the properties below are optional EventBus: eventBus, }, }, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type EventBridgePutEventsProps ¶
type EventBridgePutEventsProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The entries that will be sent. // // Minimum number of entries is 1 and maximum is 10, // unless [PutEvents API limit](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html#API_PutEvents_RequestSyntax) has changed. Entries *[]*EventBridgePutEventsEntry `field:"required" json:"entries" yaml:"entries"` }
Properties for sending events with PutEvents.
Example:
import events "github.com/aws/aws-cdk-go/awscdk" myEventBus := events.NewEventBus(this, jsii.String("EventBus"), &EventBusProps{ EventBusName: jsii.String("MyEventBus1"), }) tasks.NewEventBridgePutEvents(this, jsii.String("Send an event to EventBridge"), &EventBridgePutEventsProps{ Entries: []eventBridgePutEventsEntry{ &eventBridgePutEventsEntry{ Detail: sfn.TaskInput_FromObject(map[string]interface{}{ "Message": jsii.String("Hello from Step Functions!"), }), EventBus: myEventBus, DetailType: jsii.String("MessageFromStepFunctions"), Source: jsii.String("step.functions"), }, }, })
type EventBridgeSchedulerCreateScheduleTask ¶ added in v2.168.0
type EventBridgeSchedulerCreateScheduleTask interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Create a new AWS EventBridge Scheduler schedule.
Example:
import scheduler "github.com/aws/aws-cdk-go/awscdk" import kms "github.com/aws/aws-cdk-go/awscdk" var key key var scheduleGroup cfnScheduleGroup var targetQueue queue var deadLetterQueue queue schedulerRole := iam.NewRole(this, jsii.String("SchedulerRole"), &RoleProps{ AssumedBy: iam.NewServicePrincipal(jsii.String("scheduler.amazonaws.com")), }) // To send the message to the queue // This policy changes depending on the type of target. schedulerRole.AddToPrincipalPolicy(iam.NewPolicyStatement(&PolicyStatementProps{ Actions: []*string{ jsii.String("sqs:SendMessage"), }, Resources: []*string{ targetQueue.QueueArn, }, })) createScheduleTask1 := tasks.NewEventBridgeSchedulerCreateScheduleTask(this, jsii.String("createSchedule"), &EventBridgeSchedulerCreateScheduleTaskProps{ ScheduleName: jsii.String("TestSchedule"), ActionAfterCompletion: tasks.ActionAfterCompletion_NONE, ClientToken: jsii.String("testToken"), Description: jsii.String("TestDescription"), StartDate: NewDate(), EndDate: NewDate(NewDate().getTime() + 1000 * 60 * 60), FlexibleTimeWindow: awscdk.Duration_Minutes(jsii.Number(5)), GroupName: scheduleGroup.ref, KmsKey: key, Schedule: tasks.Schedule_Rate(awscdk.Duration_*Minutes(jsii.Number(5))), Timezone: jsii.String("UTC"), Enabled: jsii.Boolean(true), Target: tasks.NewEventBridgeSchedulerTarget(&EventBridgeSchedulerTargetProps{ Arn: targetQueue.*QueueArn, Role: schedulerRole, RetryPolicy: &RetryPolicy{ MaximumRetryAttempts: jsii.Number(2), MaximumEventAge: awscdk.Duration_*Minutes(jsii.Number(5)), }, DeadLetterQueue: *DeadLetterQueue, }), })
See: https://docs.aws.amazon.com/scheduler/latest/APIReference/API_CreateSchedule.html
func EventBridgeSchedulerCreateScheduleTask_JsonPath ¶ added in v2.178.0
func EventBridgeSchedulerCreateScheduleTask_JsonPath(scope constructs.Construct, id *string, props *EventBridgeSchedulerCreateScheduleTaskJsonPathProps) EventBridgeSchedulerCreateScheduleTask
Create an AWS EventBridge Scheduler schedule using JSONPath.
func EventBridgeSchedulerCreateScheduleTask_Jsonata ¶ added in v2.178.0
func EventBridgeSchedulerCreateScheduleTask_Jsonata(scope constructs.Construct, id *string, props *EventBridgeSchedulerCreateScheduleTaskJsonataProps) EventBridgeSchedulerCreateScheduleTask
Create an AWS EventBridge Scheduler schedule using JSONata.
func NewEventBridgeSchedulerCreateScheduleTask ¶ added in v2.168.0
func NewEventBridgeSchedulerCreateScheduleTask(scope constructs.Construct, id *string, props *EventBridgeSchedulerCreateScheduleTaskProps) EventBridgeSchedulerCreateScheduleTask
type EventBridgeSchedulerCreateScheduleTaskJsonPathProps ¶ added in v2.178.0
type EventBridgeSchedulerCreateScheduleTaskJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The schedule that defines when the schedule will trigger. // See: https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html // Schedule Schedule `field:"required" json:"schedule" yaml:"schedule"` // Schedule name. ScheduleName *string `field:"required" json:"scheduleName" yaml:"scheduleName"` // The schedule's target. Target EventBridgeSchedulerTarget `field:"required" json:"target" yaml:"target"` // Specifies the action that EventBridge Scheduler applies to the schedule after the schedule completes invoking the target. // Default: ActionAfterCompletion.NONE // ActionAfterCompletion ActionAfterCompletion `field:"optional" json:"actionAfterCompletion" yaml:"actionAfterCompletion"` // Unique, case-sensitive identifier to ensure the idempotency of the request. // Default: - Automatically generated. // ClientToken *string `field:"optional" json:"clientToken" yaml:"clientToken"` // The description for the schedule. // Default: - No description. // Description *string `field:"optional" json:"description" yaml:"description"` // Specifies whether the schedule is enabled or disabled. // Default: true. // Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"` // The date, in UTC, before which the schedule can invoke its target. // // Depending on the schedule's recurrence expression, invocations might stop on, or before, the EndDate you specify. // EventBridge Scheduler ignores EndDate for one-time schedules. // Default: - No end date. // EndDate *time.Time `field:"optional" json:"endDate" yaml:"endDate"` // The maximum time window during which a schedule can be invoked. // // Minimum value is 1 minute. // Maximum value is 1440 minutes (1 day). // Default: - Flexible time window is not enabled. // FlexibleTimeWindow awscdk.Duration `field:"optional" json:"flexibleTimeWindow" yaml:"flexibleTimeWindow"` // The name of the schedule group to associate with this schedule. // Default: - The default schedule group is used. // GroupName *string `field:"optional" json:"groupName" yaml:"groupName"` // The customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt payload. // See: https://docs.aws.amazon.com/scheduler/latest/UserGuide/encryption-rest.html // // Default: - Use automatically generated KMS key. // KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The date, in UTC, after which the schedule can begin invoking its target. // // Depending on the schedule's recurrence expression, invocations might occur on, or after, the StartDate you specify. // EventBridge Scheduler ignores StartDate for one-time schedules. // Default: - No start date. // StartDate *time.Time `field:"optional" json:"startDate" yaml:"startDate"` // The timezone in which the scheduling expression is evaluated. // Default: - UTC. // Timezone *string `field:"optional" json:"timezone" yaml:"timezone"` }
Properties for creating an AWS EventBridge Scheduler schedule using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var eventBridgeSchedulerTarget eventBridgeSchedulerTarget var key key var resultSelector interface{} var schedule schedule var taskRole taskRole var timeout timeout eventBridgeSchedulerCreateScheduleTaskJsonPathProps := &EventBridgeSchedulerCreateScheduleTaskJsonPathProps{ Schedule: schedule, ScheduleName: jsii.String("scheduleName"), Target: eventBridgeSchedulerTarget, // the properties below are optional ActionAfterCompletion: awscdk.Aws_stepfunctions_tasks.ActionAfterCompletion_NONE, Assign: map[string]interface{}{ "assignKey": assign, }, ClientToken: jsii.String("clientToken"), Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Description: jsii.String("description"), Enabled: jsii.Boolean(false), EndDate: NewDate(), FlexibleTimeWindow: cdk.Duration_Minutes(jsii.Number(30)), GroupName: jsii.String("groupName"), Heartbeat: cdk.Duration_*Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, KmsKey: key, OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StartDate: NewDate(), StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), Timezone: jsii.String("timezone"), }
type EventBridgeSchedulerCreateScheduleTaskJsonataProps ¶ added in v2.178.0
type EventBridgeSchedulerCreateScheduleTaskJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The schedule that defines when the schedule will trigger. // See: https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html // Schedule Schedule `field:"required" json:"schedule" yaml:"schedule"` // Schedule name. ScheduleName *string `field:"required" json:"scheduleName" yaml:"scheduleName"` // The schedule's target. Target EventBridgeSchedulerTarget `field:"required" json:"target" yaml:"target"` // Specifies the action that EventBridge Scheduler applies to the schedule after the schedule completes invoking the target. // Default: ActionAfterCompletion.NONE // ActionAfterCompletion ActionAfterCompletion `field:"optional" json:"actionAfterCompletion" yaml:"actionAfterCompletion"` // Unique, case-sensitive identifier to ensure the idempotency of the request. // Default: - Automatically generated. // ClientToken *string `field:"optional" json:"clientToken" yaml:"clientToken"` // The description for the schedule. // Default: - No description. // Description *string `field:"optional" json:"description" yaml:"description"` // Specifies whether the schedule is enabled or disabled. // Default: true. // Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"` // The date, in UTC, before which the schedule can invoke its target. // // Depending on the schedule's recurrence expression, invocations might stop on, or before, the EndDate you specify. // EventBridge Scheduler ignores EndDate for one-time schedules. // Default: - No end date. // EndDate *time.Time `field:"optional" json:"endDate" yaml:"endDate"` // The maximum time window during which a schedule can be invoked. // // Minimum value is 1 minute. // Maximum value is 1440 minutes (1 day). // Default: - Flexible time window is not enabled. // FlexibleTimeWindow awscdk.Duration `field:"optional" json:"flexibleTimeWindow" yaml:"flexibleTimeWindow"` // The name of the schedule group to associate with this schedule. // Default: - The default schedule group is used. // GroupName *string `field:"optional" json:"groupName" yaml:"groupName"` // The customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt payload. // See: https://docs.aws.amazon.com/scheduler/latest/UserGuide/encryption-rest.html // // Default: - Use automatically generated KMS key. // KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The date, in UTC, after which the schedule can begin invoking its target. // // Depending on the schedule's recurrence expression, invocations might occur on, or after, the StartDate you specify. // EventBridge Scheduler ignores StartDate for one-time schedules. // Default: - No start date. // StartDate *time.Time `field:"optional" json:"startDate" yaml:"startDate"` // The timezone in which the scheduling expression is evaluated. // Default: - UTC. // Timezone *string `field:"optional" json:"timezone" yaml:"timezone"` }
Properties for creating an AWS EventBridge Scheduler schedule using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var eventBridgeSchedulerTarget eventBridgeSchedulerTarget var key key var outputs interface{} var schedule schedule var taskRole taskRole var timeout timeout eventBridgeSchedulerCreateScheduleTaskJsonataProps := &EventBridgeSchedulerCreateScheduleTaskJsonataProps{ Schedule: schedule, ScheduleName: jsii.String("scheduleName"), Target: eventBridgeSchedulerTarget, // the properties below are optional ActionAfterCompletion: awscdk.Aws_stepfunctions_tasks.ActionAfterCompletion_NONE, Assign: map[string]interface{}{ "assignKey": assign, }, ClientToken: jsii.String("clientToken"), Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Description: jsii.String("description"), Enabled: jsii.Boolean(false), EndDate: NewDate(), FlexibleTimeWindow: cdk.Duration_Minutes(jsii.Number(30)), GroupName: jsii.String("groupName"), Heartbeat: cdk.Duration_*Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, KmsKey: key, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StartDate: NewDate(), StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), Timezone: jsii.String("timezone"), }
type EventBridgeSchedulerCreateScheduleTaskProps ¶ added in v2.168.0
type EventBridgeSchedulerCreateScheduleTaskProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The schedule that defines when the schedule will trigger. // See: https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html // Schedule Schedule `field:"required" json:"schedule" yaml:"schedule"` // Schedule name. ScheduleName *string `field:"required" json:"scheduleName" yaml:"scheduleName"` // The schedule's target. Target EventBridgeSchedulerTarget `field:"required" json:"target" yaml:"target"` // Specifies the action that EventBridge Scheduler applies to the schedule after the schedule completes invoking the target. // Default: ActionAfterCompletion.NONE // ActionAfterCompletion ActionAfterCompletion `field:"optional" json:"actionAfterCompletion" yaml:"actionAfterCompletion"` // Unique, case-sensitive identifier to ensure the idempotency of the request. // Default: - Automatically generated. // ClientToken *string `field:"optional" json:"clientToken" yaml:"clientToken"` // The description for the schedule. // Default: - No description. // Description *string `field:"optional" json:"description" yaml:"description"` // Specifies whether the schedule is enabled or disabled. // Default: true. // Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"` // The date, in UTC, before which the schedule can invoke its target. // // Depending on the schedule's recurrence expression, invocations might stop on, or before, the EndDate you specify. // EventBridge Scheduler ignores EndDate for one-time schedules. // Default: - No end date. // EndDate *time.Time `field:"optional" json:"endDate" yaml:"endDate"` // The maximum time window during which a schedule can be invoked. // // Minimum value is 1 minute. // Maximum value is 1440 minutes (1 day). // Default: - Flexible time window is not enabled. // FlexibleTimeWindow awscdk.Duration `field:"optional" json:"flexibleTimeWindow" yaml:"flexibleTimeWindow"` // The name of the schedule group to associate with this schedule. // Default: - The default schedule group is used. // GroupName *string `field:"optional" json:"groupName" yaml:"groupName"` // The customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt payload. // See: https://docs.aws.amazon.com/scheduler/latest/UserGuide/encryption-rest.html // // Default: - Use automatically generated KMS key. // KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The date, in UTC, after which the schedule can begin invoking its target. // // Depending on the schedule's recurrence expression, invocations might occur on, or after, the StartDate you specify. // EventBridge Scheduler ignores StartDate for one-time schedules. // Default: - No start date. // StartDate *time.Time `field:"optional" json:"startDate" yaml:"startDate"` // The timezone in which the scheduling expression is evaluated. // Default: - UTC. // Timezone *string `field:"optional" json:"timezone" yaml:"timezone"` }
Properties for creating an AWS EventBridge Scheduler schedule.
Example:
import scheduler "github.com/aws/aws-cdk-go/awscdk" import kms "github.com/aws/aws-cdk-go/awscdk" var key key var scheduleGroup cfnScheduleGroup var targetQueue queue var deadLetterQueue queue schedulerRole := iam.NewRole(this, jsii.String("SchedulerRole"), &RoleProps{ AssumedBy: iam.NewServicePrincipal(jsii.String("scheduler.amazonaws.com")), }) // To send the message to the queue // This policy changes depending on the type of target. schedulerRole.AddToPrincipalPolicy(iam.NewPolicyStatement(&PolicyStatementProps{ Actions: []*string{ jsii.String("sqs:SendMessage"), }, Resources: []*string{ targetQueue.QueueArn, }, })) createScheduleTask1 := tasks.NewEventBridgeSchedulerCreateScheduleTask(this, jsii.String("createSchedule"), &EventBridgeSchedulerCreateScheduleTaskProps{ ScheduleName: jsii.String("TestSchedule"), ActionAfterCompletion: tasks.ActionAfterCompletion_NONE, ClientToken: jsii.String("testToken"), Description: jsii.String("TestDescription"), StartDate: NewDate(), EndDate: NewDate(NewDate().getTime() + 1000 * 60 * 60), FlexibleTimeWindow: awscdk.Duration_Minutes(jsii.Number(5)), GroupName: scheduleGroup.ref, KmsKey: key, Schedule: tasks.Schedule_Rate(awscdk.Duration_*Minutes(jsii.Number(5))), Timezone: jsii.String("UTC"), Enabled: jsii.Boolean(true), Target: tasks.NewEventBridgeSchedulerTarget(&EventBridgeSchedulerTargetProps{ Arn: targetQueue.*QueueArn, Role: schedulerRole, RetryPolicy: &RetryPolicy{ MaximumRetryAttempts: jsii.Number(2), MaximumEventAge: awscdk.Duration_*Minutes(jsii.Number(5)), }, DeadLetterQueue: *DeadLetterQueue, }), })
type EventBridgeSchedulerTarget ¶ added in v2.168.0
type EventBridgeSchedulerTarget interface { // The Amazon Resource Name (ARN) of the target. Arn() *string SetArn(val *string) // Dead letter queue for failed events. DeadLetterQueue() awssqs.IQueue SetDeadLetterQueue(val awssqs.IQueue) // The input to the target. Input() *string SetInput(val *string) // The retry policy settings. RetryPolicy() *RetryPolicy SetRetryPolicy(val *RetryPolicy) // The IAM role that EventBridge Scheduler will use for this target when the schedule is invoked. Role() awsiam.IRole SetRole(val awsiam.IRole) // return the target object for the EventBridge Scheduler. RenderTargetObject() interface{} }
The target that EventBridge Scheduler will invoke.
Example:
import scheduler "github.com/aws/aws-cdk-go/awscdk" import kms "github.com/aws/aws-cdk-go/awscdk" var key key var scheduleGroup cfnScheduleGroup var targetQueue queue var deadLetterQueue queue schedulerRole := iam.NewRole(this, jsii.String("SchedulerRole"), &RoleProps{ AssumedBy: iam.NewServicePrincipal(jsii.String("scheduler.amazonaws.com")), }) // To send the message to the queue // This policy changes depending on the type of target. schedulerRole.AddToPrincipalPolicy(iam.NewPolicyStatement(&PolicyStatementProps{ Actions: []*string{ jsii.String("sqs:SendMessage"), }, Resources: []*string{ targetQueue.QueueArn, }, })) createScheduleTask1 := tasks.NewEventBridgeSchedulerCreateScheduleTask(this, jsii.String("createSchedule"), &EventBridgeSchedulerCreateScheduleTaskProps{ ScheduleName: jsii.String("TestSchedule"), ActionAfterCompletion: tasks.ActionAfterCompletion_NONE, ClientToken: jsii.String("testToken"), Description: jsii.String("TestDescription"), StartDate: NewDate(), EndDate: NewDate(NewDate().getTime() + 1000 * 60 * 60), FlexibleTimeWindow: awscdk.Duration_Minutes(jsii.Number(5)), GroupName: scheduleGroup.ref, KmsKey: key, Schedule: tasks.Schedule_Rate(awscdk.Duration_*Minutes(jsii.Number(5))), Timezone: jsii.String("UTC"), Enabled: jsii.Boolean(true), Target: tasks.NewEventBridgeSchedulerTarget(&EventBridgeSchedulerTargetProps{ Arn: targetQueue.*QueueArn, Role: schedulerRole, RetryPolicy: &RetryPolicy{ MaximumRetryAttempts: jsii.Number(2), MaximumEventAge: awscdk.Duration_*Minutes(jsii.Number(5)), }, DeadLetterQueue: *DeadLetterQueue, }), })
func NewEventBridgeSchedulerTarget ¶ added in v2.168.0
func NewEventBridgeSchedulerTarget(props *EventBridgeSchedulerTargetProps) EventBridgeSchedulerTarget
type EventBridgeSchedulerTargetProps ¶ added in v2.168.0
type EventBridgeSchedulerTargetProps struct { // The Amazon Resource Name (ARN) of the target. // See: https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-targets.html // Arn *string `field:"required" json:"arn" yaml:"arn"` // The IAM role that EventBridge Scheduler will use for this target when the schedule is invoked. Role awsiam.IRole `field:"required" json:"role" yaml:"role"` // Dead letter queue for failed events. // Default: - No dead letter queue. // DeadLetterQueue awssqs.IQueue `field:"optional" json:"deadLetterQueue" yaml:"deadLetterQueue"` // The input to the target. // Default: - EventBridge Scheduler delivers a default notification to the target. // Input *string `field:"optional" json:"input" yaml:"input"` // The retry policy settings. // Default: - Do not retry. // RetryPolicy *RetryPolicy `field:"optional" json:"retryPolicy" yaml:"retryPolicy"` }
Properties for `EventBridgeSchedulerTarget`.
Example:
import scheduler "github.com/aws/aws-cdk-go/awscdk" import kms "github.com/aws/aws-cdk-go/awscdk" var key key var scheduleGroup cfnScheduleGroup var targetQueue queue var deadLetterQueue queue schedulerRole := iam.NewRole(this, jsii.String("SchedulerRole"), &RoleProps{ AssumedBy: iam.NewServicePrincipal(jsii.String("scheduler.amazonaws.com")), }) // To send the message to the queue // This policy changes depending on the type of target. schedulerRole.AddToPrincipalPolicy(iam.NewPolicyStatement(&PolicyStatementProps{ Actions: []*string{ jsii.String("sqs:SendMessage"), }, Resources: []*string{ targetQueue.QueueArn, }, })) createScheduleTask1 := tasks.NewEventBridgeSchedulerCreateScheduleTask(this, jsii.String("createSchedule"), &EventBridgeSchedulerCreateScheduleTaskProps{ ScheduleName: jsii.String("TestSchedule"), ActionAfterCompletion: tasks.ActionAfterCompletion_NONE, ClientToken: jsii.String("testToken"), Description: jsii.String("TestDescription"), StartDate: NewDate(), EndDate: NewDate(NewDate().getTime() + 1000 * 60 * 60), FlexibleTimeWindow: awscdk.Duration_Minutes(jsii.Number(5)), GroupName: scheduleGroup.ref, KmsKey: key, Schedule: tasks.Schedule_Rate(awscdk.Duration_*Minutes(jsii.Number(5))), Timezone: jsii.String("UTC"), Enabled: jsii.Boolean(true), Target: tasks.NewEventBridgeSchedulerTarget(&EventBridgeSchedulerTargetProps{ Arn: targetQueue.*QueueArn, Role: schedulerRole, RetryPolicy: &RetryPolicy{ MaximumRetryAttempts: jsii.Number(2), MaximumEventAge: awscdk.Duration_*Minutes(jsii.Number(5)), }, DeadLetterQueue: *DeadLetterQueue, }), })
See: https://docs.aws.amazon.com/scheduler/latest/APIReference/API_Target.html#API_Target_Contents
type ExecutionClass ¶ added in v2.147.0
type ExecutionClass string
The excecution class of the job.
Example:
tasks.NewGlueStartJobRun(this, jsii.String("Task"), &GlueStartJobRunProps{ GlueJobName: jsii.String("my-glue-job"), ExecutionClass: tasks.ExecutionClass_FLEX, })
const ( // The flexible execution class is appropriate for time-insensitive jobs whose start and completion times may vary. // // Only jobs with AWS Glue version 3.0 and above and command type `glueetl` will be allowed to set `ExecutionClass` to `FLEX`. // The flexible execution class is available for Spark jobs. ExecutionClass_FLEX ExecutionClass = "FLEX" // The standard execution class is ideal for time-sensitive workloads that require fast job startup and dedicated resources. ExecutionClass_STANDARD ExecutionClass = "STANDARD" )
type GlueDataBrewStartJobRun ¶
type GlueDataBrewStartJobRun interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Start a Job run as a Task.
Example:
tasks.NewGlueDataBrewStartJobRun(this, jsii.String("Task"), &GlueDataBrewStartJobRunProps{ Name: jsii.String("databrew-job"), })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-databrew.html
func GlueDataBrewStartJobRun_JsonPath ¶ added in v2.178.0
func GlueDataBrewStartJobRun_JsonPath(scope constructs.Construct, id *string, props *GlueDataBrewStartJobRunJsonPathProps) GlueDataBrewStartJobRun
Start a Job run as a Task using JSONPath. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-databrew.html
func GlueDataBrewStartJobRun_Jsonata ¶ added in v2.178.0
func GlueDataBrewStartJobRun_Jsonata(scope constructs.Construct, id *string, props *GlueDataBrewStartJobRunJsonataProps) GlueDataBrewStartJobRun
Start a Job run as a Task using JSONata. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-databrew.html
func NewGlueDataBrewStartJobRun ¶
func NewGlueDataBrewStartJobRun(scope constructs.Construct, id *string, props *GlueDataBrewStartJobRunProps) GlueDataBrewStartJobRun
type GlueDataBrewStartJobRunJsonPathProps ¶ added in v2.178.0
type GlueDataBrewStartJobRunJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Glue DataBrew Job to run. Name *string `field:"required" json:"name" yaml:"name"` }
Properties for starting a job run with StartJobRun using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var taskRole taskRole var timeout timeout glueDataBrewStartJobRunJsonPathProps := &GlueDataBrewStartJobRunJsonPathProps{ Name: jsii.String("name"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type GlueDataBrewStartJobRunJsonataProps ¶ added in v2.178.0
type GlueDataBrewStartJobRunJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Glue DataBrew Job to run. Name *string `field:"required" json:"name" yaml:"name"` }
Properties for starting a job run with StartJobRun using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var taskRole taskRole var timeout timeout glueDataBrewStartJobRunJsonataProps := &GlueDataBrewStartJobRunJsonataProps{ Name: jsii.String("name"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type GlueDataBrewStartJobRunProps ¶
type GlueDataBrewStartJobRunProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Glue DataBrew Job to run. Name *string `field:"required" json:"name" yaml:"name"` }
Properties for starting a job run with StartJobRun.
Example:
tasks.NewGlueDataBrewStartJobRun(this, jsii.String("Task"), &GlueDataBrewStartJobRunProps{ Name: jsii.String("databrew-job"), })
type GlueStartCrawlerRun ¶ added in v2.133.0
type GlueStartCrawlerRun interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Starts an AWS Glue Crawler in a Task state.
Example:
import glue "github.com/aws/aws-cdk-go/awscdk" var myCrawler cfnCrawler // You can get the crawler name from `crawler.ref` // You can get the crawler name from `crawler.ref` tasks.NewGlueStartCrawlerRun(this, jsii.String("Task1"), &GlueStartCrawlerRunProps{ CrawlerName: myCrawler.ref, }) // Of course, you can also specify the crawler name directly. // Of course, you can also specify the crawler name directly. tasks.NewGlueStartCrawlerRun(this, jsii.String("Task2"), &GlueStartCrawlerRunProps{ CrawlerName: jsii.String("my-crawler-job"), })
func GlueStartCrawlerRun_JsonPath ¶ added in v2.178.0
func GlueStartCrawlerRun_JsonPath(scope constructs.Construct, id *string, props *GlueStartCrawlerRunJsonPathProps) GlueStartCrawlerRun
Starts an AWS Glue Crawler using JSONPath in a Task state. See: https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-crawler-crawling.html#aws-glue-api-crawler-crawling-StartCrawler
func GlueStartCrawlerRun_Jsonata ¶ added in v2.178.0
func GlueStartCrawlerRun_Jsonata(scope constructs.Construct, id *string, props *GlueStartCrawlerRunJsonataProps) GlueStartCrawlerRun
Starts an AWS Glue Crawler using JSONata in a Task state. See: https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-crawler-crawling.html#aws-glue-api-crawler-crawling-StartCrawler
func NewGlueStartCrawlerRun ¶ added in v2.133.0
func NewGlueStartCrawlerRun(scope constructs.Construct, id *string, props *GlueStartCrawlerRunProps) GlueStartCrawlerRun
type GlueStartCrawlerRunJsonPathProps ¶ added in v2.178.0
type GlueStartCrawlerRunJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Glue crawler name. CrawlerName *string `field:"required" json:"crawlerName" yaml:"crawlerName"` }
Properties for starting an AWS Glue Crawler as a task that using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var taskRole taskRole var timeout timeout glueStartCrawlerRunJsonPathProps := &GlueStartCrawlerRunJsonPathProps{ CrawlerName: jsii.String("crawlerName"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type GlueStartCrawlerRunJsonataProps ¶ added in v2.178.0
type GlueStartCrawlerRunJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Glue crawler name. CrawlerName *string `field:"required" json:"crawlerName" yaml:"crawlerName"` }
Properties for starting an AWS Glue Crawler as a task that using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var taskRole taskRole var timeout timeout glueStartCrawlerRunJsonataProps := &GlueStartCrawlerRunJsonataProps{ CrawlerName: jsii.String("crawlerName"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type GlueStartCrawlerRunProps ¶ added in v2.133.0
type GlueStartCrawlerRunProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Glue crawler name. CrawlerName *string `field:"required" json:"crawlerName" yaml:"crawlerName"` }
Properties for starting an AWS Glue Crawler as a task.
Example:
import glue "github.com/aws/aws-cdk-go/awscdk" var myCrawler cfnCrawler // You can get the crawler name from `crawler.ref` // You can get the crawler name from `crawler.ref` tasks.NewGlueStartCrawlerRun(this, jsii.String("Task1"), &GlueStartCrawlerRunProps{ CrawlerName: myCrawler.ref, }) // Of course, you can also specify the crawler name directly. // Of course, you can also specify the crawler name directly. tasks.NewGlueStartCrawlerRun(this, jsii.String("Task2"), &GlueStartCrawlerRunProps{ CrawlerName: jsii.String("my-crawler-job"), })
type GlueStartJobRun ¶
type GlueStartJobRun interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Starts an AWS Glue job in a Task state.
OUTPUT: the output of this task is a JobRun structure, for details consult https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-runs.html#aws-glue-api-jobs-runs-JobRun
Example:
tasks.NewGlueStartJobRun(this, jsii.String("Task"), &GlueStartJobRunProps{ GlueJobName: jsii.String("my-glue-job"), WorkerConfiguration: &WorkerConfigurationProperty{ WorkerTypeV2: tasks.WorkerTypeV2_G_1X(), // Worker type NumberOfWorkers: jsii.Number(2), }, })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-glue.html
func GlueStartJobRun_JsonPath ¶ added in v2.178.0
func GlueStartJobRun_JsonPath(scope constructs.Construct, id *string, props *GlueStartJobRunJsonPathProps) GlueStartJobRun
Starts an AWS Glue job in a Task state using JSONPath.
OUTPUT: the output of this task is a JobRun structure, for details consult https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-runs.html#aws-glue-api-jobs-runs-JobRun See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-glue.html
func GlueStartJobRun_Jsonata ¶ added in v2.178.0
func GlueStartJobRun_Jsonata(scope constructs.Construct, id *string, props *GlueStartJobRunJsonataProps) GlueStartJobRun
Starts an AWS Glue job in a Task state using JSONata.
OUTPUT: the output of this task is a JobRun structure, for details consult https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-runs.html#aws-glue-api-jobs-runs-JobRun See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-glue.html
func NewGlueStartJobRun ¶
func NewGlueStartJobRun(scope constructs.Construct, id *string, props *GlueStartJobRunProps) GlueStartJobRun
type GlueStartJobRunJsonPathProps ¶ added in v2.178.0
type GlueStartJobRunJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Glue job name. GlueJobName *string `field:"required" json:"glueJobName" yaml:"glueJobName"` // The job arguments specifically for this run. // // For this job run, they replace the default arguments set in the job // definition itself. // Default: - Default arguments set in the job definition. // Arguments awsstepfunctions.TaskInput `field:"optional" json:"arguments" yaml:"arguments"` // The excecution class of the job. // Default: - STANDARD. // ExecutionClass ExecutionClass `field:"optional" json:"executionClass" yaml:"executionClass"` // After a job run starts, the number of minutes to wait before sending a job run delay notification. // // Must be at least 1 minute. // Default: - Default delay set in the job definition. // NotifyDelayAfter awscdk.Duration `field:"optional" json:"notifyDelayAfter" yaml:"notifyDelayAfter"` // The name of the SecurityConfiguration structure to be used with this job run. // // This must match the Glue API. // See: https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-common.html#aws-glue-api-regex-oneLine // // Default: - Default configuration set in the job definition. // SecurityConfiguration *string `field:"optional" json:"securityConfiguration" yaml:"securityConfiguration"` // The worker configuration for this run. // Default: - Default worker configuration in the job definition. // WorkerConfiguration *WorkerConfigurationProperty `field:"optional" json:"workerConfiguration" yaml:"workerConfiguration"` }
Properties for starting an AWS Glue job as a task.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var taskInput taskInput var taskRole taskRole var timeout timeout var workerTypeV2 workerTypeV2 glueStartJobRunJsonPathProps := &GlueStartJobRunJsonPathProps{ GlueJobName: jsii.String("glueJobName"), // the properties below are optional Arguments: taskInput, Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, ExecutionClass: awscdk.Aws_stepfunctions_tasks.ExecutionClass_FLEX, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, NotifyDelayAfter: cdk.Duration_*Minutes(jsii.Number(30)), OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, SecurityConfiguration: jsii.String("securityConfiguration"), StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), WorkerConfiguration: &WorkerConfigurationProperty{ NumberOfWorkers: jsii.Number(123), // the properties below are optional WorkerType: awscdk.*Aws_stepfunctions_tasks.WorkerType_STANDARD, WorkerTypeV2: workerTypeV2, }, }
type GlueStartJobRunJsonataProps ¶ added in v2.178.0
type GlueStartJobRunJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Glue job name. GlueJobName *string `field:"required" json:"glueJobName" yaml:"glueJobName"` // The job arguments specifically for this run. // // For this job run, they replace the default arguments set in the job // definition itself. // Default: - Default arguments set in the job definition. // Arguments awsstepfunctions.TaskInput `field:"optional" json:"arguments" yaml:"arguments"` // The excecution class of the job. // Default: - STANDARD. // ExecutionClass ExecutionClass `field:"optional" json:"executionClass" yaml:"executionClass"` // After a job run starts, the number of minutes to wait before sending a job run delay notification. // // Must be at least 1 minute. // Default: - Default delay set in the job definition. // NotifyDelayAfter awscdk.Duration `field:"optional" json:"notifyDelayAfter" yaml:"notifyDelayAfter"` // The name of the SecurityConfiguration structure to be used with this job run. // // This must match the Glue API. // See: https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-common.html#aws-glue-api-regex-oneLine // // Default: - Default configuration set in the job definition. // SecurityConfiguration *string `field:"optional" json:"securityConfiguration" yaml:"securityConfiguration"` // The worker configuration for this run. // Default: - Default worker configuration in the job definition. // WorkerConfiguration *WorkerConfigurationProperty `field:"optional" json:"workerConfiguration" yaml:"workerConfiguration"` }
Properties for starting an AWS Glue job as a task.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var taskInput taskInput var taskRole taskRole var timeout timeout var workerTypeV2 workerTypeV2 glueStartJobRunJsonataProps := &GlueStartJobRunJsonataProps{ GlueJobName: jsii.String("glueJobName"), // the properties below are optional Arguments: taskInput, Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, ExecutionClass: awscdk.Aws_stepfunctions_tasks.ExecutionClass_FLEX, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, NotifyDelayAfter: cdk.Duration_*Minutes(jsii.Number(30)), Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, SecurityConfiguration: jsii.String("securityConfiguration"), StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), WorkerConfiguration: &WorkerConfigurationProperty{ NumberOfWorkers: jsii.Number(123), // the properties below are optional WorkerType: awscdk.*Aws_stepfunctions_tasks.WorkerType_STANDARD, WorkerTypeV2: workerTypeV2, }, }
type GlueStartJobRunProps ¶
type GlueStartJobRunProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Glue job name. GlueJobName *string `field:"required" json:"glueJobName" yaml:"glueJobName"` // The job arguments specifically for this run. // // For this job run, they replace the default arguments set in the job // definition itself. // Default: - Default arguments set in the job definition. // Arguments awsstepfunctions.TaskInput `field:"optional" json:"arguments" yaml:"arguments"` // The excecution class of the job. // Default: - STANDARD. // ExecutionClass ExecutionClass `field:"optional" json:"executionClass" yaml:"executionClass"` // After a job run starts, the number of minutes to wait before sending a job run delay notification. // // Must be at least 1 minute. // Default: - Default delay set in the job definition. // NotifyDelayAfter awscdk.Duration `field:"optional" json:"notifyDelayAfter" yaml:"notifyDelayAfter"` // The name of the SecurityConfiguration structure to be used with this job run. // // This must match the Glue API. // See: https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-common.html#aws-glue-api-regex-oneLine // // Default: - Default configuration set in the job definition. // SecurityConfiguration *string `field:"optional" json:"securityConfiguration" yaml:"securityConfiguration"` // The worker configuration for this run. // Default: - Default worker configuration in the job definition. // WorkerConfiguration *WorkerConfigurationProperty `field:"optional" json:"workerConfiguration" yaml:"workerConfiguration"` }
Properties for starting an AWS Glue job as a task.
Example:
tasks.NewGlueStartJobRun(this, jsii.String("Task"), &GlueStartJobRunProps{ GlueJobName: jsii.String("my-glue-job"), WorkerConfiguration: &WorkerConfigurationProperty{ WorkerTypeV2: tasks.WorkerTypeV2_G_1X(), // Worker type NumberOfWorkers: jsii.Number(2), }, })
type Guardrail ¶ added in v2.149.0
type Guardrail interface { // The identitifier of guardrail. GuardrailIdentifier() *string // The version of guardrail. GuardrailVersion() *string }
Guradrail settings for BedrockInvokeModel.
Example:
import "github.com/aws/aws-cdk-go/awscdk" model := bedrock.FoundationModel_FromFoundationModelId(this, jsii.String("Model"), bedrock.FoundationModelIdentifier_AMAZON_TITAN_TEXT_G1_EXPRESS_V1()) task := tasks.NewBedrockInvokeModel(this, jsii.String("Prompt Model with guardrail"), &BedrockInvokeModelProps{ Model: Model, Body: sfn.TaskInput_FromObject(map[string]interface{}{ "inputText": jsii.String("Generate a list of five first names."), "textGenerationConfig": map[string]*f64{ "maxTokenCount": jsii.Number(100), "temperature": jsii.Number(1), }, }), Guardrail: tasks.Guardrail_Enable(jsii.String("guardrailId"), jsii.Number(1)), ResultSelector: map[string]interface{}{ "names": sfn.JsonPath_stringAt(jsii.String("$.Body.results[0].outputText")), }, })
func Guardrail_Enable ¶ added in v2.149.0
Enable guardrail.
func Guardrail_EnableDraft ¶ added in v2.149.0
Enable guardrail with DRAFT version.
type HttpInvoke ¶ added in v2.138.0
type HttpInvoke interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) BuildTaskPolicyStatements() *[]awsiam.PolicyStatement // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to call a public third-party API.
Example:
import events "github.com/aws/aws-cdk-go/awscdk" var connection connection getIssue := tasks.HttpInvoke_Jsonata(this, jsii.String("Get Issue"), &HttpInvokeJsonataProps{ Connection: Connection, ApiRoot: jsii.String("{% 'https://' & $states.input.hostname %}"), ApiEndpoint: sfn.TaskInput_FromText(jsii.String("{% 'issues/' & $states.input.issue.id %}")), Method: sfn.TaskInput_*FromText(jsii.String("GET")), // Parse the API call result to object and set to the variables Assign: map[string]interface{}{ "hostname": jsii.String("{% $states.input.hostname %}"), "issue": jsii.String("{% $parse($states.result.ResponseBody) %}"), }, }) updateLabels := tasks.HttpInvoke_Jsonata(this, jsii.String("Update Issue Labels"), &HttpInvokeJsonataProps{ Connection: Connection, ApiRoot: jsii.String("{% 'https://' & $states.input.hostname %}"), ApiEndpoint: sfn.TaskInput_*FromText(jsii.String("{% 'issues/' & $states.input.issue.id & 'labels' %}")), Method: sfn.TaskInput_*FromText(jsii.String("POST")), Body: sfn.TaskInput_FromObject(map[string]interface{}{ "labels": jsii.String("{% [$type, $component] %}"), }), }) notMatchTitleTemplate := sfn.Pass_Jsonata(this, jsii.String("Not Match Title Template")) definition := getIssue.Next(sfn.Choice_Jsonata(this, jsii.String("Match Title Template?")).When(sfn.Condition_Jsonata(jsii.String("{% $contains($issue.title, /(feat)|(fix)|(chore)(w*):.*/) %}")), updateLabels, &ChoiceTransitionOptions{ Assign: map[string]interface{}{ "type": jsii.String("{% $match($states.input.title, /(w*)((.*))/).groups[0] %}"), "component": jsii.String("{% $match($states.input.title, /(w*)((.*))/).groups[1] %}"), }, }).Otherwise(notMatchTitleTemplate)) sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{ DefinitionBody: sfn.DefinitionBody_FromChainable(definition), Timeout: awscdk.Duration_Minutes(jsii.Number(5)), Comment: jsii.String("automate issue labeling state machine"), })
func HttpInvoke_JsonPath ¶ added in v2.178.0
func HttpInvoke_JsonPath(scope constructs.Construct, id *string, props *HttpInvokeJsonPathProps) HttpInvoke
A Step Functions Task to call a public third-party API using JSONPath.
func HttpInvoke_Jsonata ¶ added in v2.178.0
func HttpInvoke_Jsonata(scope constructs.Construct, id *string, props *HttpInvokeJsonataProps) HttpInvoke
A Step Functions Task to call a public third-party API using JSONata.
func NewHttpInvoke ¶ added in v2.138.0
func NewHttpInvoke(scope constructs.Construct, id *string, props *HttpInvokeProps) HttpInvoke
type HttpInvokeJsonPathProps ¶ added in v2.178.0
type HttpInvokeJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The API endpoint to call, relative to `apiRoot`. // // Example: // sfn.TaskInput_FromText(jsii.String("path/to/resource")) // ApiEndpoint awsstepfunctions.TaskInput `field:"required" json:"apiEndpoint" yaml:"apiEndpoint"` // Permissions are granted to call all resources under this path. // // Example: // "https://api.example.com" // ApiRoot *string `field:"required" json:"apiRoot" yaml:"apiRoot"` // The EventBridge Connection to use for authentication. Connection awsevents.IConnection `field:"required" json:"connection" yaml:"connection"` // The HTTP method to use. // // Example: // sfn.TaskInput_FromText(jsii.String("GET")) // Method awsstepfunctions.TaskInput `field:"required" json:"method" yaml:"method"` // The body to send to the HTTP endpoint. // Default: - No body is sent with the request. // Body awsstepfunctions.TaskInput `field:"optional" json:"body" yaml:"body"` // The headers to send to the HTTP endpoint. // // Example: // sfn.TaskInput_FromObject(map[string]interface{}{ // "Content-Type": jsii.String("application/json"), // }) // // Default: - No additional headers are added to the request. // Headers awsstepfunctions.TaskInput `field:"optional" json:"headers" yaml:"headers"` // The query string parameters to send to the HTTP endpoint. // Default: - No query string parameters are sent in the request. // QueryStringParameters awsstepfunctions.TaskInput `field:"optional" json:"queryStringParameters" yaml:"queryStringParameters"` // Determines whether to apply URL encoding to the request body, and which array encoding format to use. // // `URLEncodingFormat.NONE` passes the JSON-serialized `RequestBody` field as the HTTP request body. // Otherwise, the HTTP request body is the URL-encoded form data of the `RequestBody` field using the // specified array encoding format, and the `Content-Type` header is set to `application/x-www-form-urlencoded`. // Default: - URLEncodingFormat.NONE // UrlEncodingFormat URLEncodingFormat `field:"optional" json:"urlEncodingFormat" yaml:"urlEncodingFormat"` }
Properties for calling an external HTTP endpoint with HttpInvoke using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var connection connection var resultSelector interface{} var taskInput taskInput var taskRole taskRole var timeout timeout httpInvokeJsonPathProps := &HttpInvokeJsonPathProps{ ApiEndpoint: taskInput, ApiRoot: jsii.String("apiRoot"), Connection: connection, Method: taskInput, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Body: taskInput, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Headers: taskInput, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, QueryStringParameters: taskInput, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), UrlEncodingFormat: awscdk.Aws_stepfunctions_tasks.URLEncodingFormat_BRACKETS, }
type HttpInvokeJsonataProps ¶ added in v2.178.0
type HttpInvokeJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The API endpoint to call, relative to `apiRoot`. // // Example: // sfn.TaskInput_FromText(jsii.String("path/to/resource")) // ApiEndpoint awsstepfunctions.TaskInput `field:"required" json:"apiEndpoint" yaml:"apiEndpoint"` // Permissions are granted to call all resources under this path. // // Example: // "https://api.example.com" // ApiRoot *string `field:"required" json:"apiRoot" yaml:"apiRoot"` // The EventBridge Connection to use for authentication. Connection awsevents.IConnection `field:"required" json:"connection" yaml:"connection"` // The HTTP method to use. // // Example: // sfn.TaskInput_FromText(jsii.String("GET")) // Method awsstepfunctions.TaskInput `field:"required" json:"method" yaml:"method"` // The body to send to the HTTP endpoint. // Default: - No body is sent with the request. // Body awsstepfunctions.TaskInput `field:"optional" json:"body" yaml:"body"` // The headers to send to the HTTP endpoint. // // Example: // sfn.TaskInput_FromObject(map[string]interface{}{ // "Content-Type": jsii.String("application/json"), // }) // // Default: - No additional headers are added to the request. // Headers awsstepfunctions.TaskInput `field:"optional" json:"headers" yaml:"headers"` // The query string parameters to send to the HTTP endpoint. // Default: - No query string parameters are sent in the request. // QueryStringParameters awsstepfunctions.TaskInput `field:"optional" json:"queryStringParameters" yaml:"queryStringParameters"` // Determines whether to apply URL encoding to the request body, and which array encoding format to use. // // `URLEncodingFormat.NONE` passes the JSON-serialized `RequestBody` field as the HTTP request body. // Otherwise, the HTTP request body is the URL-encoded form data of the `RequestBody` field using the // specified array encoding format, and the `Content-Type` header is set to `application/x-www-form-urlencoded`. // Default: - URLEncodingFormat.NONE // UrlEncodingFormat URLEncodingFormat `field:"optional" json:"urlEncodingFormat" yaml:"urlEncodingFormat"` }
Properties for calling an external HTTP endpoint with HttpInvoke using JSONata.
Example:
import events "github.com/aws/aws-cdk-go/awscdk" var connection connection getIssue := tasks.HttpInvoke_Jsonata(this, jsii.String("Get Issue"), &HttpInvokeJsonataProps{ Connection: Connection, ApiRoot: jsii.String("{% 'https://' & $states.input.hostname %}"), ApiEndpoint: sfn.TaskInput_FromText(jsii.String("{% 'issues/' & $states.input.issue.id %}")), Method: sfn.TaskInput_*FromText(jsii.String("GET")), // Parse the API call result to object and set to the variables Assign: map[string]interface{}{ "hostname": jsii.String("{% $states.input.hostname %}"), "issue": jsii.String("{% $parse($states.result.ResponseBody) %}"), }, }) updateLabels := tasks.HttpInvoke_Jsonata(this, jsii.String("Update Issue Labels"), &HttpInvokeJsonataProps{ Connection: Connection, ApiRoot: jsii.String("{% 'https://' & $states.input.hostname %}"), ApiEndpoint: sfn.TaskInput_*FromText(jsii.String("{% 'issues/' & $states.input.issue.id & 'labels' %}")), Method: sfn.TaskInput_*FromText(jsii.String("POST")), Body: sfn.TaskInput_FromObject(map[string]interface{}{ "labels": jsii.String("{% [$type, $component] %}"), }), }) notMatchTitleTemplate := sfn.Pass_Jsonata(this, jsii.String("Not Match Title Template")) definition := getIssue.Next(sfn.Choice_Jsonata(this, jsii.String("Match Title Template?")).When(sfn.Condition_Jsonata(jsii.String("{% $contains($issue.title, /(feat)|(fix)|(chore)(w*):.*/) %}")), updateLabels, &ChoiceTransitionOptions{ Assign: map[string]interface{}{ "type": jsii.String("{% $match($states.input.title, /(w*)((.*))/).groups[0] %}"), "component": jsii.String("{% $match($states.input.title, /(w*)((.*))/).groups[1] %}"), }, }).Otherwise(notMatchTitleTemplate)) sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{ DefinitionBody: sfn.DefinitionBody_FromChainable(definition), Timeout: awscdk.Duration_Minutes(jsii.Number(5)), Comment: jsii.String("automate issue labeling state machine"), })
type HttpInvokeProps ¶ added in v2.138.0
type HttpInvokeProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The API endpoint to call, relative to `apiRoot`. // // Example: // sfn.TaskInput_FromText(jsii.String("path/to/resource")) // ApiEndpoint awsstepfunctions.TaskInput `field:"required" json:"apiEndpoint" yaml:"apiEndpoint"` // Permissions are granted to call all resources under this path. // // Example: // "https://api.example.com" // ApiRoot *string `field:"required" json:"apiRoot" yaml:"apiRoot"` // The EventBridge Connection to use for authentication. Connection awsevents.IConnection `field:"required" json:"connection" yaml:"connection"` // The HTTP method to use. // // Example: // sfn.TaskInput_FromText(jsii.String("GET")) // Method awsstepfunctions.TaskInput `field:"required" json:"method" yaml:"method"` // The body to send to the HTTP endpoint. // Default: - No body is sent with the request. // Body awsstepfunctions.TaskInput `field:"optional" json:"body" yaml:"body"` // The headers to send to the HTTP endpoint. // // Example: // sfn.TaskInput_FromObject(map[string]interface{}{ // "Content-Type": jsii.String("application/json"), // }) // // Default: - No additional headers are added to the request. // Headers awsstepfunctions.TaskInput `field:"optional" json:"headers" yaml:"headers"` // The query string parameters to send to the HTTP endpoint. // Default: - No query string parameters are sent in the request. // QueryStringParameters awsstepfunctions.TaskInput `field:"optional" json:"queryStringParameters" yaml:"queryStringParameters"` // Determines whether to apply URL encoding to the request body, and which array encoding format to use. // // `URLEncodingFormat.NONE` passes the JSON-serialized `RequestBody` field as the HTTP request body. // Otherwise, the HTTP request body is the URL-encoded form data of the `RequestBody` field using the // specified array encoding format, and the `Content-Type` header is set to `application/x-www-form-urlencoded`. // Default: - URLEncodingFormat.NONE // UrlEncodingFormat URLEncodingFormat `field:"optional" json:"urlEncodingFormat" yaml:"urlEncodingFormat"` }
Properties for calling an external HTTP endpoint with HttpInvoke.
Example:
import "github.com/aws/aws-cdk-go/awscdk" connection := events.NewConnection(this, jsii.String("Connection"), &ConnectionProps{ Authorization: events.Authorization_Basic(jsii.String("username"), awscdk.SecretValue_UnsafePlainText(jsii.String("password"))), }) tasks.NewHttpInvoke(this, jsii.String("Invoke HTTP API"), &HttpInvokeProps{ ApiRoot: jsii.String("https://api.example.com"), ApiEndpoint: sfn.TaskInput_FromText(jsii.String("path/to/resource")), Body: sfn.TaskInput_FromObject(map[string]interface{}{ "foo": jsii.String("bar"), }), Connection: Connection, Headers: sfn.TaskInput_*FromObject(map[string]interface{}{ "Content-Type": jsii.String("application/json"), }), Method: sfn.TaskInput_*FromText(jsii.String("POST")), QueryStringParameters: sfn.TaskInput_*FromObject(map[string]interface{}{ "id": jsii.String("123"), }), UrlEncodingFormat: tasks.URLEncodingFormat_BRACKETS, })
type HttpMethod ¶
type HttpMethod string
Http Methods that API Gateway supports.
Example:
import apigateway "github.com/aws/aws-cdk-go/awscdk" var api restApi tasks.CallApiGatewayRestApiEndpoint_Jsonata(this, jsii.String("Endpoint"), &CallApiGatewayRestApiEndpointJsonataProps{ Api: Api, StageName: jsii.String("Stage"), Method: tasks.HttpMethod_PUT, IntegrationPattern: sfn.IntegrationPattern_WAIT_FOR_TASK_TOKEN, Headers: sfn.TaskInput_FromObject(map[string]interface{}{ "TaskToken": jsii.String("{% States.Array($states.context.taskToken) %}"), }), })
const ( // Retrieve data from a server at the specified resource. HttpMethod_GET HttpMethod = "GET" // Send data to the API endpoint to create or udpate a resource. HttpMethod_POST HttpMethod = "POST" // Send data to the API endpoint to update or create a resource. HttpMethod_PUT HttpMethod = "PUT" // Delete the resource at the specified endpoint. HttpMethod_DELETE HttpMethod = "DELETE" // Apply partial modifications to the resource. HttpMethod_PATCH HttpMethod = "PATCH" // Retrieve data from a server at the specified resource without the response body. HttpMethod_HEAD HttpMethod = "HEAD" // Return data describing what other methods and operations the server supports. HttpMethod_OPTIONS HttpMethod = "OPTIONS" )
type HttpMethods ¶
type HttpMethods string
Method type of a EKS call.
Example:
import "github.com/aws/aws-cdk-go/awscdk" import "github.com/cdklabs/awscdk-kubectl-go/kubectlv32" myEksCluster := eks.NewCluster(this, jsii.String("my sample cluster"), &ClusterProps{ Version: eks.KubernetesVersion_V1_32(), ClusterName: jsii.String("myEksCluster"), KubectlLayer: kubectlv32.NewKubectlV32Layer(this, jsii.String("kubectl")), }) tasks.NewEksCall(this, jsii.String("Call a EKS Endpoint"), &EksCallProps{ Cluster: myEksCluster, HttpMethod: tasks.HttpMethods_GET, HttpPath: jsii.String("/api/v1/namespaces/default/pods"), })
const ( // Retrieve data from a server at the specified resource. HttpMethods_GET HttpMethods = "GET" // Send data to the API endpoint to create or update a resource. HttpMethods_POST HttpMethods = "POST" // Send data to the API endpoint to update or create a resource. HttpMethods_PUT HttpMethods = "PUT" // Delete the resource at the specified endpoint. HttpMethods_DELETE HttpMethods = "DELETE" // Apply partial modifications to the resource. HttpMethods_PATCH HttpMethods = "PATCH" // Retrieve data from a server at the specified resource without the response body. HttpMethods_HEAD HttpMethods = "HEAD" )
type IContainerDefinition ¶
type IContainerDefinition interface { // Called when the ContainerDefinition is used by a SageMaker task. Bind(task ISageMakerTask) *ContainerDefinitionConfig }
Configuration of the container used to host the model. See: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ContainerDefinition.html
type IEcsLaunchTarget ¶
type IEcsLaunchTarget interface { // called when the ECS launch target is configured on RunTask. Bind(task EcsRunTask, launchTargetOptions *LaunchTargetBindOptions) *EcsLaunchTargetConfig }
An Amazon ECS launch type determines the type of infrastructure on which your tasks and services are hosted. See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html
type ISageMakerTask ¶
type ISageMakerTask interface { awsiam.IGrantable }
Task to train a machine learning model using Amazon SageMaker.
type InputMode ¶
type InputMode string
Input mode that the algorithm supports.
Example:
tasks.NewSageMakerCreateTrainingJob(this, jsii.String("TrainSagemaker"), &SageMakerCreateTrainingJobProps{ TrainingJobName: sfn.JsonPath_StringAt(jsii.String("$.JobName")), AlgorithmSpecification: &AlgorithmSpecification{ AlgorithmName: jsii.String("BlazingText"), TrainingInputMode: tasks.InputMode_FILE, }, InputDataConfig: []channel{ &channel{ ChannelName: jsii.String("train"), DataSource: &DataSource{ S3DataSource: &S3DataSource{ S3DataType: tasks.S3DataType_S3_PREFIX, S3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.S3Bucket")), }, }, }, }, OutputDataConfig: &OutputDataConfig{ S3OutputLocation: tasks.S3Location_FromBucket(s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("amzn-s3-demo-bucket")), jsii.String("myoutputpath")), }, ResourceConfig: &ResourceConfig{ InstanceCount: jsii.Number(1), InstanceType: ec2.NewInstanceType(sfn.JsonPath_*StringAt(jsii.String("$.InstanceType"))), VolumeSize: awscdk.Size_Gibibytes(jsii.Number(50)), }, // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume StoppingCondition: &StoppingCondition{ MaxRuntime: awscdk.Duration_Hours(jsii.Number(2)), }, })
type JobDependency ¶
type JobDependency struct { // The job ID of the AWS Batch job associated with this dependency. // Default: - No jobId. // JobId *string `field:"optional" json:"jobId" yaml:"jobId"` // The type of the job dependency. // Default: - No type. // Type *string `field:"optional" json:"type" yaml:"type"` }
An object representing an AWS Batch job dependency.
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" jobDependency := &JobDependency{ JobId: jsii.String("jobId"), Type: jsii.String("type"), }
type JobDriver ¶ added in v2.1.0
type JobDriver struct { // The job driver parameters specified for spark submit. // See: https://docs.aws.amazon.com/emr-on-eks/latest/APIReference/API_SparkSubmitJobDriver.html // SparkSubmitJobDriver *SparkSubmitJobDriver `field:"required" json:"sparkSubmitJobDriver" yaml:"sparkSubmitJobDriver"` }
Specify the driver that the EMR Containers job runs on.
The job driver is used to provide an input for the job that will be run.
Example:
tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{ VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")), ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(), JobName: jsii.String("EMR-Containers-Job"), JobDriver: &JobDriver{ SparkSubmitJobDriver: &SparkSubmitJobDriver{ EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")), }, }, ApplicationConfig: []applicationConfiguration{ &applicationConfiguration{ Classification: tasks.Classification_SPARK_DEFAULTS(), Properties: map[string]*string{ "spark.executor.instances": jsii.String("1"), "spark.executor.memory": jsii.String("512M"), }, }, }, })
type LambdaInvocationType ¶
type LambdaInvocationType string
Invocation type of a Lambda.
const ( // Invoke the function synchronously. // // Keep the connection open until the function returns a response or times out. // The API response includes the function response and additional data. LambdaInvocationType_REQUEST_RESPONSE LambdaInvocationType = "REQUEST_RESPONSE" // Invoke the function asynchronously. // // Send events that fail multiple times to the function's dead-letter queue (if it's configured). // The API response only includes a status code. LambdaInvocationType_EVENT LambdaInvocationType = "EVENT" // Validate parameter values and verify that the user or role has permission to invoke the function. LambdaInvocationType_DRY_RUN LambdaInvocationType = "DRY_RUN" )
type LambdaInvoke ¶
type LambdaInvoke interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Invoke a Lambda function as a Task.
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")), }), })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-lambda.html
func LambdaInvoke_JsonPath ¶ added in v2.178.0
func LambdaInvoke_JsonPath(scope constructs.Construct, id *string, props *LambdaInvokeJsonPathProps) LambdaInvoke
Invoke a Lambda function as a Task using JSONPath. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-lambda.html
func LambdaInvoke_Jsonata ¶ added in v2.178.0
func LambdaInvoke_Jsonata(scope constructs.Construct, id *string, props *LambdaInvokeJsonataProps) LambdaInvoke
Invoke a Lambda function as a Task using JSONata. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-lambda.html
func NewLambdaInvoke ¶
func NewLambdaInvoke(scope constructs.Construct, id *string, props *LambdaInvokeProps) LambdaInvoke
type LambdaInvokeJsonPathProps ¶ added in v2.178.0
type LambdaInvokeJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Lambda function to invoke. LambdaFunction awslambda.IFunction `field:"required" json:"lambdaFunction" yaml:"lambdaFunction"` // Up to 3583 bytes of base64-encoded data about the invoking client to pass to the function. // Default: - No context. // ClientContext *string `field:"optional" json:"clientContext" yaml:"clientContext"` // Invocation type of the Lambda function. // Default: InvocationType.REQUEST_RESPONSE // InvocationType LambdaInvocationType `field:"optional" json:"invocationType" yaml:"invocationType"` // The JSON that will be supplied as input to the Lambda function. // Default: - The state input (JSONata: '{% $states.input %}', JSONPath: '$') // Payload awsstepfunctions.TaskInput `field:"optional" json:"payload" yaml:"payload"` // Invoke the Lambda in a way that only returns the payload response without additional metadata. // // The `payloadResponseOnly` property cannot be used if `integrationPattern`, `invocationType`, // `clientContext`, or `qualifier` are specified. // It always uses the REQUEST_RESPONSE behavior. // Default: false. // PayloadResponseOnly *bool `field:"optional" json:"payloadResponseOnly" yaml:"payloadResponseOnly"` // Version or alias to invoke a published version of the function. // // You only need to supply this if you want the version of the Lambda Function to depend // on data in the state machine state. If not, you can pass the appropriate Alias or Version object // directly as the `lambdaFunction` argument. // Default: - Version or alias inherent to the `lambdaFunction` object. // // Deprecated: pass a Version or Alias object as lambdaFunction instead. Qualifier *string `field:"optional" json:"qualifier" yaml:"qualifier"` // Whether to retry on Lambda service exceptions. // // This handles `Lambda.ServiceException`, `Lambda.AWSLambdaException`, // `Lambda.SdkClientException`, and `Lambda.ClientExecutionTimeoutException` // with an interval of 2 seconds, a back-off rate // of 2 and 6 maximum attempts. // See: https://docs.aws.amazon.com/step-functions/latest/dg/bp-lambda-serviceexception.html // // Default: true. // RetryOnServiceExceptions *bool `field:"optional" json:"retryOnServiceExceptions" yaml:"retryOnServiceExceptions"` }
Properties for invoking a Lambda function with LambdaInvoke using JsonPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var function_ function var resultSelector interface{} var taskInput taskInput var taskRole taskRole var timeout timeout lambdaInvokeJsonPathProps := &LambdaInvokeJsonPathProps{ LambdaFunction: function_, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, ClientContext: jsii.String("clientContext"), 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, InvocationType: awscdk.Aws_stepfunctions_tasks.LambdaInvocationType_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), Payload: taskInput, PayloadResponseOnly: jsii.Boolean(false), Qualifier: jsii.String("qualifier"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, RetryOnServiceExceptions: jsii.Boolean(false), StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type LambdaInvokeJsonataProps ¶ added in v2.178.0
type LambdaInvokeJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Lambda function to invoke. LambdaFunction awslambda.IFunction `field:"required" json:"lambdaFunction" yaml:"lambdaFunction"` // Up to 3583 bytes of base64-encoded data about the invoking client to pass to the function. // Default: - No context. // ClientContext *string `field:"optional" json:"clientContext" yaml:"clientContext"` // Invocation type of the Lambda function. // Default: InvocationType.REQUEST_RESPONSE // InvocationType LambdaInvocationType `field:"optional" json:"invocationType" yaml:"invocationType"` // The JSON that will be supplied as input to the Lambda function. // Default: - The state input (JSONata: '{% $states.input %}', JSONPath: '$') // Payload awsstepfunctions.TaskInput `field:"optional" json:"payload" yaml:"payload"` // Invoke the Lambda in a way that only returns the payload response without additional metadata. // // The `payloadResponseOnly` property cannot be used if `integrationPattern`, `invocationType`, // `clientContext`, or `qualifier` are specified. // It always uses the REQUEST_RESPONSE behavior. // Default: false. // PayloadResponseOnly *bool `field:"optional" json:"payloadResponseOnly" yaml:"payloadResponseOnly"` // Version or alias to invoke a published version of the function. // // You only need to supply this if you want the version of the Lambda Function to depend // on data in the state machine state. If not, you can pass the appropriate Alias or Version object // directly as the `lambdaFunction` argument. // Default: - Version or alias inherent to the `lambdaFunction` object. // // Deprecated: pass a Version or Alias object as lambdaFunction instead. Qualifier *string `field:"optional" json:"qualifier" yaml:"qualifier"` // Whether to retry on Lambda service exceptions. // // This handles `Lambda.ServiceException`, `Lambda.AWSLambdaException`, // `Lambda.SdkClientException`, and `Lambda.ClientExecutionTimeoutException` // with an interval of 2 seconds, a back-off rate // of 2 and 6 maximum attempts. // See: https://docs.aws.amazon.com/step-functions/latest/dg/bp-lambda-serviceexception.html // // Default: true. // RetryOnServiceExceptions *bool `field:"optional" json:"retryOnServiceExceptions" yaml:"retryOnServiceExceptions"` }
Properties for invoking a Lambda function with LambdaInvoke using Jsonata.
Example:
import lambda "github.com/aws/aws-cdk-go/awscdk" var callApiFunc function var useVariableFunc function step1 := tasks.LambdaInvoke_Jsonata(this, jsii.String("Step 1"), &LambdaInvokeJsonataProps{ LambdaFunction: callApiFunc, Assign: map[string]interface{}{ "x": jsii.String("{% $states.result.Payload.x %}"), }, }) step2 := sfn.Pass_Jsonata(this, jsii.String("Step 2")) step3 := sfn.Pass_Jsonata(this, jsii.String("Step 3")) step4 := sfn.Pass_Jsonata(this, jsii.String("Step 4")) step5 := tasks.LambdaInvoke_Jsonata(this, jsii.String("Step 5"), &LambdaInvokeJsonataProps{ LambdaFunction: useVariableFunc, Payload: sfn.TaskInput_FromObject(map[string]interface{}{ "x": jsii.String("{% $x %}"), }), })
type LambdaInvokeProps ¶
type LambdaInvokeProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Lambda function to invoke. LambdaFunction awslambda.IFunction `field:"required" json:"lambdaFunction" yaml:"lambdaFunction"` // Up to 3583 bytes of base64-encoded data about the invoking client to pass to the function. // Default: - No context. // ClientContext *string `field:"optional" json:"clientContext" yaml:"clientContext"` // Invocation type of the Lambda function. // Default: InvocationType.REQUEST_RESPONSE // InvocationType LambdaInvocationType `field:"optional" json:"invocationType" yaml:"invocationType"` // The JSON that will be supplied as input to the Lambda function. // Default: - The state input (JSONata: '{% $states.input %}', JSONPath: '$') // Payload awsstepfunctions.TaskInput `field:"optional" json:"payload" yaml:"payload"` // Invoke the Lambda in a way that only returns the payload response without additional metadata. // // The `payloadResponseOnly` property cannot be used if `integrationPattern`, `invocationType`, // `clientContext`, or `qualifier` are specified. // It always uses the REQUEST_RESPONSE behavior. // Default: false. // PayloadResponseOnly *bool `field:"optional" json:"payloadResponseOnly" yaml:"payloadResponseOnly"` // Version or alias to invoke a published version of the function. // // You only need to supply this if you want the version of the Lambda Function to depend // on data in the state machine state. If not, you can pass the appropriate Alias or Version object // directly as the `lambdaFunction` argument. // Default: - Version or alias inherent to the `lambdaFunction` object. // // Deprecated: pass a Version or Alias object as lambdaFunction instead. Qualifier *string `field:"optional" json:"qualifier" yaml:"qualifier"` // Whether to retry on Lambda service exceptions. // // This handles `Lambda.ServiceException`, `Lambda.AWSLambdaException`, // `Lambda.SdkClientException`, and `Lambda.ClientExecutionTimeoutException` // with an interval of 2 seconds, a back-off rate // of 2 and 6 maximum attempts. // See: https://docs.aws.amazon.com/step-functions/latest/dg/bp-lambda-serviceexception.html // // Default: true. // RetryOnServiceExceptions *bool `field:"optional" json:"retryOnServiceExceptions" yaml:"retryOnServiceExceptions"` }
Properties for invoking a Lambda function with LambdaInvoke.
Example:
var fn function tasks.NewLambdaInvoke(this, jsii.String("Invoke with empty object as payload"), &LambdaInvokeProps{ LambdaFunction: fn, Payload: sfn.TaskInput_FromObject(map[string]interface{}{ }), }) // use the output of fn as input // use the output of fn as input tasks.NewLambdaInvoke(this, jsii.String("Invoke with payload field in the state input"), &LambdaInvokeProps{ LambdaFunction: fn, Payload: sfn.TaskInput_FromJsonPathAt(jsii.String("$.Payload")), })
type LaunchTargetBindOptions ¶
type LaunchTargetBindOptions struct { // Task definition to run Docker containers in Amazon ECS. TaskDefinition awsecs.ITaskDefinition `field:"required" json:"taskDefinition" yaml:"taskDefinition"` // A regional grouping of one or more container instances on which you can run tasks and services. // Default: - No cluster. // Cluster awsecs.ICluster `field:"optional" json:"cluster" yaml:"cluster"` }
Options for binding a launch target to an ECS run job task.
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 cluster cluster var taskDefinition taskDefinition launchTargetBindOptions := &LaunchTargetBindOptions{ TaskDefinition: taskDefinition, // the properties below are optional Cluster: cluster, }
type MediaConvertCreateJob ¶ added in v2.144.0
type MediaConvertCreateJob interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to create a job in MediaConvert.
The JobConfiguration/Request Syntax is defined in the Parameters in the Task State.
Example:
tasks.NewMediaConvertCreateJob(this, jsii.String("CreateJob"), &MediaConvertCreateJobProps{ CreateJobRequest: map[string]interface{}{ "Role": jsii.String("arn:aws:iam::123456789012:role/MediaConvertRole"), "Settings": map[string][]map[string]interface{}{ "OutputGroups": []map[string]interface{}{ map[string]interface{}{ "Outputs": []map[string]interface{}{ map[string]interface{}{ "ContainerSettings": map[string]*string{ "Container": jsii.String("MP4"), }, "VideoDescription": map[string]map[string]interface{}{ "CodecSettings": map[string]interface{}{ "Codec": jsii.String("H_264"), "H264Settings": map[string]interface{}{ "MaxBitrate": jsii.Number(1000), "RateControlMode": jsii.String("QVBR"), "SceneChangeDetect": jsii.String("TRANSITION_DETECTION"), }, }, }, "AudioDescriptions": []map[string]map[string]interface{}{ map[string]map[string]interface{}{ "CodecSettings": map[string]interface{}{ "Codec": jsii.String("AAC"), "AacSettings": map[string]interface{}{ "Bitrate": jsii.Number(96000), "CodingMode": jsii.String("CODING_MODE_2_0"), "SampleRate": jsii.Number(48000), }, }, }, }, }, }, "OutputGroupSettings": map[string]interface{}{ "Type": jsii.String("FILE_GROUP_SETTINGS"), "FileGroupSettings": map[string]*string{ "Destination": jsii.String("s3://EXAMPLE-DESTINATION-BUCKET/"), }, }, }, }, "Inputs": []map[string]interface{}{ map[string]interface{}{ "AudioSelectors": map[string]map[string]*string{ "Audio Selector 1": map[string]*string{ "DefaultSelection": jsii.String("DEFAULT"), }, }, "FileInput": jsii.String("s3://EXAMPLE-SOURCE-BUCKET/EXAMPLE-SOURCE_FILE"), }, }, }, }, IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-mediaconvert.html
Response syntax: see CreateJobResponse schema https://docs.aws.amazon.com/mediaconvert/latest/apireference/jobs.html#jobs-response-examples
func MediaConvertCreateJob_JsonPath ¶ added in v2.178.0
func MediaConvertCreateJob_JsonPath(scope constructs.Construct, id *string, props *MediaConvertCreateJobJsonPathProps) MediaConvertCreateJob
A Step Functions Task to create a job in MediaConvert using JSONPath.
func MediaConvertCreateJob_Jsonata ¶ added in v2.178.0
func MediaConvertCreateJob_Jsonata(scope constructs.Construct, id *string, props *MediaConvertCreateJobJsonataProps) MediaConvertCreateJob
A Step Functions Task to create a job in MediaConvert using JSONata.
func NewMediaConvertCreateJob ¶ added in v2.144.0
func NewMediaConvertCreateJob(scope constructs.Construct, id *string, props *MediaConvertCreateJobProps) MediaConvertCreateJob
type MediaConvertCreateJobJsonPathProps ¶ added in v2.178.0
type MediaConvertCreateJobJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The input data for the MediaConvert Create Job invocation. CreateJobRequest *map[string]interface{} `field:"required" json:"createJobRequest" yaml:"createJobRequest"` }
Properties for creating a MediaConvert Job using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var createJobRequest interface{} var resultSelector interface{} var taskRole taskRole var timeout timeout mediaConvertCreateJobJsonPathProps := &MediaConvertCreateJobJsonPathProps{ CreateJobRequest: map[string]interface{}{ "createJobRequestKey": createJobRequest, }, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type MediaConvertCreateJobJsonataProps ¶ added in v2.178.0
type MediaConvertCreateJobJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The input data for the MediaConvert Create Job invocation. CreateJobRequest *map[string]interface{} `field:"required" json:"createJobRequest" yaml:"createJobRequest"` }
Properties for creating a MediaConvert Job using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var createJobRequest interface{} var outputs interface{} var taskRole taskRole var timeout timeout mediaConvertCreateJobJsonataProps := &MediaConvertCreateJobJsonataProps{ CreateJobRequest: map[string]interface{}{ "createJobRequestKey": createJobRequest, }, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type MediaConvertCreateJobProps ¶ added in v2.144.0
type MediaConvertCreateJobProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The input data for the MediaConvert Create Job invocation. CreateJobRequest *map[string]interface{} `field:"required" json:"createJobRequest" yaml:"createJobRequest"` }
Properties for creating a MediaConvert Job.
See the CreateJob API for complete documentation.
Example:
tasks.NewMediaConvertCreateJob(this, jsii.String("CreateJob"), &MediaConvertCreateJobProps{ CreateJobRequest: map[string]interface{}{ "Role": jsii.String("arn:aws:iam::123456789012:role/MediaConvertRole"), "Settings": map[string][]map[string]interface{}{ "OutputGroups": []map[string]interface{}{ map[string]interface{}{ "Outputs": []map[string]interface{}{ map[string]interface{}{ "ContainerSettings": map[string]*string{ "Container": jsii.String("MP4"), }, "VideoDescription": map[string]map[string]interface{}{ "CodecSettings": map[string]interface{}{ "Codec": jsii.String("H_264"), "H264Settings": map[string]interface{}{ "MaxBitrate": jsii.Number(1000), "RateControlMode": jsii.String("QVBR"), "SceneChangeDetect": jsii.String("TRANSITION_DETECTION"), }, }, }, "AudioDescriptions": []map[string]map[string]interface{}{ map[string]map[string]interface{}{ "CodecSettings": map[string]interface{}{ "Codec": jsii.String("AAC"), "AacSettings": map[string]interface{}{ "Bitrate": jsii.Number(96000), "CodingMode": jsii.String("CODING_MODE_2_0"), "SampleRate": jsii.Number(48000), }, }, }, }, }, }, "OutputGroupSettings": map[string]interface{}{ "Type": jsii.String("FILE_GROUP_SETTINGS"), "FileGroupSettings": map[string]*string{ "Destination": jsii.String("s3://EXAMPLE-DESTINATION-BUCKET/"), }, }, }, }, "Inputs": []map[string]interface{}{ map[string]interface{}{ "AudioSelectors": map[string]map[string]*string{ "Audio Selector 1": map[string]*string{ "DefaultSelection": jsii.String("DEFAULT"), }, }, "FileInput": jsii.String("s3://EXAMPLE-SOURCE-BUCKET/EXAMPLE-SOURCE_FILE"), }, }, }, }, IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, })
See: https://docs.aws.amazon.com/mediaconvert/latest/apireference/jobs.html#jobspost
type MessageAttribute ¶
type MessageAttribute struct { // The value of the attribute. Value interface{} `field:"required" json:"value" yaml:"value"` // The data type for the attribute. // See: https://docs.aws.amazon.com/sns/latest/dg/sns-message-attributes.html#SNSMessageAttributes.DataTypes // // Default: determined by type inspection if possible, fallback is String. // DataType MessageAttributeDataType `field:"optional" json:"dataType" yaml:"dataType"` }
A message attribute to add to the SNS message.
Example:
topic := sns.NewTopic(this, jsii.String("Topic")) // Use a field from the execution data as message. task1 := tasks.NewSnsPublish(this, jsii.String("Publish1"), &SnsPublishProps{ Topic: Topic, IntegrationPattern: sfn.IntegrationPattern_REQUEST_RESPONSE, Message: sfn.TaskInput_FromDataAt(jsii.String("$.state.message")), MessageAttributes: map[string]messageAttribute{ "place": &messageAttribute{ "value": sfn.JsonPath_stringAt(jsii.String("$.place")), }, "pic": &messageAttribute{ // BINARY must be explicitly set "dataType": tasks.MessageAttributeDataType_BINARY, "value": sfn.JsonPath_stringAt(jsii.String("$.pic")), }, "people": &messageAttribute{ "value": jsii.Number(4), }, "handles": &messageAttribute{ "value": []interface{}{ jsii.String("@kslater"), jsii.String("@jjf"), nil, jsii.String("@mfanning"), }, }, }, }) // Combine a field from the execution data with // a literal object. task2 := tasks.NewSnsPublish(this, jsii.String("Publish2"), &SnsPublishProps{ Topic: Topic, Message: sfn.TaskInput_FromObject(map[string]interface{}{ "field1": jsii.String("somedata"), "field2": sfn.JsonPath_stringAt(jsii.String("$.field2")), }), })
See: https://docs.aws.amazon.com/sns/latest/dg/sns-message-attributes.html
type MessageAttributeDataType ¶
type MessageAttributeDataType string
The data type set for the SNS message attributes.
Example:
topic := sns.NewTopic(this, jsii.String("Topic")) // Use a field from the execution data as message. task1 := tasks.NewSnsPublish(this, jsii.String("Publish1"), &SnsPublishProps{ Topic: Topic, IntegrationPattern: sfn.IntegrationPattern_REQUEST_RESPONSE, Message: sfn.TaskInput_FromDataAt(jsii.String("$.state.message")), MessageAttributes: map[string]messageAttribute{ "place": &messageAttribute{ "value": sfn.JsonPath_stringAt(jsii.String("$.place")), }, "pic": &messageAttribute{ // BINARY must be explicitly set "dataType": tasks.MessageAttributeDataType_BINARY, "value": sfn.JsonPath_stringAt(jsii.String("$.pic")), }, "people": &messageAttribute{ "value": jsii.Number(4), }, "handles": &messageAttribute{ "value": []interface{}{ jsii.String("@kslater"), jsii.String("@jjf"), nil, jsii.String("@mfanning"), }, }, }, }) // Combine a field from the execution data with // a literal object. task2 := tasks.NewSnsPublish(this, jsii.String("Publish2"), &SnsPublishProps{ Topic: Topic, Message: sfn.TaskInput_FromObject(map[string]interface{}{ "field1": jsii.String("somedata"), "field2": sfn.JsonPath_stringAt(jsii.String("$.field2")), }), })
See: https://docs.aws.amazon.com/sns/latest/dg/sns-message-attributes.html#SNSMessageAttributes.DataTypes
const ( // Strings are Unicode with UTF-8 binary encoding. MessageAttributeDataType_STRING MessageAttributeDataType = "STRING" // An array, formatted as a string. // See: https://docs.aws.amazon.com/sns/latest/dg/sns-message-attributes.html#SNSMessageAttributes.DataTypes // MessageAttributeDataType_STRING_ARRAY MessageAttributeDataType = "STRING_ARRAY" // Numbers are positive or negative integers or floating-point numbers. // See: https://docs.aws.amazon.com/sns/latest/dg/sns-message-attributes.html#SNSMessageAttributes.DataTypes // MessageAttributeDataType_NUMBER MessageAttributeDataType = "NUMBER" // Binary type attributes can store any binary data. // See: https://docs.aws.amazon.com/sns/latest/dg/sns-message-attributes.html#SNSMessageAttributes.DataTypes // MessageAttributeDataType_BINARY MessageAttributeDataType = "BINARY" )
type MetricDefinition ¶
type MetricDefinition struct { // Name of the metric. Name *string `field:"required" json:"name" yaml:"name"` // Regular expression that searches the output of a training job and gets the value of the metric. Regex *string `field:"required" json:"regex" yaml:"regex"` }
Specifies the metric name and regular expressions used to parse algorithm logs.
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" metricDefinition := &MetricDefinition{ Name: jsii.String("name"), Regex: jsii.String("regex"), }
type Mode ¶
type Mode string
Specifies how many models the container hosts.
Example:
tasks.NewSageMakerCreateModel(this, jsii.String("Sagemaker"), &SageMakerCreateModelProps{ ModelName: jsii.String("MyModel"), PrimaryContainer: tasks.NewContainerDefinition(&ContainerDefinitionOptions{ Image: tasks.DockerImage_FromJsonExpression(sfn.JsonPath_StringAt(jsii.String("$.Model.imageName"))), Mode: tasks.Mode_SINGLE_MODEL, ModelS3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.TrainingJob.ModelArtifacts.S3ModelArtifacts")), }), })
const ( // Container hosts a single model. Mode_SINGLE_MODEL Mode = "SINGLE_MODEL" // Container hosts multiple models. // See: https://docs.aws.amazon.com/sagemaker/latest/dg/multi-model-endpoints.html // Mode_MULTI_MODEL Mode = "MULTI_MODEL" )
type ModelClientOptions ¶
type ModelClientOptions struct { // The maximum number of retries when invocation requests are failing. // Default: 0. // InvocationsMaxRetries *float64 `field:"optional" json:"invocationsMaxRetries" yaml:"invocationsMaxRetries"` // The timeout duration for an invocation request. // Default: Duration.minutes(1) // InvocationsTimeout awscdk.Duration `field:"optional" json:"invocationsTimeout" yaml:"invocationsTimeout"` }
Configures the timeout and maximum number of retries for processing a transform job invocation.
Example:
tasks.NewSageMakerCreateTransformJob(this, jsii.String("Batch Inference"), &SageMakerCreateTransformJobProps{ TransformJobName: jsii.String("MyTransformJob"), ModelName: jsii.String("MyModelName"), ModelClientOptions: &ModelClientOptions{ InvocationsMaxRetries: jsii.Number(3), // default is 0 InvocationsTimeout: awscdk.Duration_Minutes(jsii.Number(5)), }, TransformInput: &TransformInput{ TransformDataSource: &TransformDataSource{ S3DataSource: &TransformS3DataSource{ S3Uri: jsii.String("s3://inputbucket/train"), S3DataType: tasks.S3DataType_S3_PREFIX, }, }, }, TransformOutput: &TransformOutput{ S3OutputPath: jsii.String("s3://outputbucket/TransformJobOutputPath"), }, TransformResources: &TransformResources{ InstanceCount: jsii.Number(1), InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_M4, ec2.InstanceSize_XLARGE), }, })
type Monitoring ¶ added in v2.1.0
type Monitoring struct { // Amazon S3 Bucket for monitoring log publishing. // // You can configure your jobs to send log information to Amazon S3. // Default: - if `logging` is manually set to `true` and a `logBucket` is not provided, a `logBucket` will be automatically generated`. // LogBucket awss3.IBucket `field:"optional" json:"logBucket" yaml:"logBucket"` // Enable logging for this job. // // If set to true, will automatically create a Cloudwatch Log Group and S3 bucket. // This will be set to `true` implicitly if values are provided for `logGroup` or `logBucket`. // Default: true - true if values are provided for `logGroup` or `logBucket`, false otherwise. // Logging *bool `field:"optional" json:"logging" yaml:"logging"` // A log group for CloudWatch monitoring. // // You can configure your jobs to send log information to CloudWatch Logs. // Default: - if `logging` is manually set to `true` and a `logGroup` is not provided, a `logGroup` will be automatically generated`. // LogGroup awslogs.ILogGroup `field:"optional" json:"logGroup" yaml:"logGroup"` // A log stream name prefix for Cloudwatch monitoring. // Default: - Log streams created in this log group have no default prefix. // LogStreamNamePrefix *string `field:"optional" json:"logStreamNamePrefix" yaml:"logStreamNamePrefix"` // Monitoring configurations for the persistent application UI. // Default: true. // PersistentAppUI *bool `field:"optional" json:"persistentAppUI" yaml:"persistentAppUI"` }
Configuration setting for monitoring.
Example:
tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{ VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")), ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(), JobDriver: &JobDriver{ SparkSubmitJobDriver: &SparkSubmitJobDriver{ EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")), SparkSubmitParameters: jsii.String("--conf spark.executor.instances=2 --conf spark.executor.memory=2G --conf spark.executor.cores=2 --conf spark.driver.cores=1"), }, }, Monitoring: &Monitoring{ Logging: jsii.Boolean(true), }, })
type OutputDataConfig ¶
type OutputDataConfig struct { // Identifies the S3 path where you want Amazon SageMaker to store the model artifacts. S3OutputLocation S3Location `field:"required" json:"s3OutputLocation" yaml:"s3OutputLocation"` // Optional KMS encryption key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. // Default: - Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. // EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"` }
Configures the S3 bucket where SageMaker will save the result of model training.
Example:
tasks.NewSageMakerCreateTrainingJob(this, jsii.String("TrainSagemaker"), &SageMakerCreateTrainingJobProps{ TrainingJobName: sfn.JsonPath_StringAt(jsii.String("$.JobName")), AlgorithmSpecification: &AlgorithmSpecification{ AlgorithmName: jsii.String("BlazingText"), TrainingInputMode: tasks.InputMode_FILE, }, InputDataConfig: []channel{ &channel{ ChannelName: jsii.String("train"), DataSource: &DataSource{ S3DataSource: &S3DataSource{ S3DataType: tasks.S3DataType_S3_PREFIX, S3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.S3Bucket")), }, }, }, }, OutputDataConfig: &OutputDataConfig{ S3OutputLocation: tasks.S3Location_FromBucket(s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("amzn-s3-demo-bucket")), jsii.String("myoutputpath")), }, ResourceConfig: &ResourceConfig{ InstanceCount: jsii.Number(1), InstanceType: ec2.NewInstanceType(sfn.JsonPath_*StringAt(jsii.String("$.InstanceType"))), VolumeSize: awscdk.Size_Gibibytes(jsii.Number(50)), }, // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume StoppingCondition: &StoppingCondition{ MaxRuntime: awscdk.Duration_Hours(jsii.Number(2)), }, })
type ProductionVariant ¶
type ProductionVariant struct { // The ML compute instance type. InstanceType awsec2.InstanceType `field:"required" json:"instanceType" yaml:"instanceType"` // The name of the model that you want to host. // // This is the name that you specified when creating the model. ModelName *string `field:"required" json:"modelName" yaml:"modelName"` // The name of the production variant. VariantName *string `field:"required" json:"variantName" yaml:"variantName"` // The size of the Elastic Inference (EI) instance to use for the production variant. // Default: - None. // AcceleratorType AcceleratorType `field:"optional" json:"acceleratorType" yaml:"acceleratorType"` // Number of instances to launch initially. // Default: - 1. // InitialInstanceCount *float64 `field:"optional" json:"initialInstanceCount" yaml:"initialInstanceCount"` // Determines initial traffic distribution among all of the models that you specify in the endpoint configuration. // Default: - 1.0 // InitialVariantWeight *float64 `field:"optional" json:"initialVariantWeight" yaml:"initialVariantWeight"` }
Identifies a model that you want to host and the resources to deploy for hosting it.
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 acceleratorType acceleratorType var instanceType instanceType productionVariant := &ProductionVariant{ InstanceType: instanceType, ModelName: jsii.String("modelName"), VariantName: jsii.String("variantName"), // the properties below are optional AcceleratorType: acceleratorType, InitialInstanceCount: jsii.Number(123), InitialVariantWeight: jsii.Number(123), }
See: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ProductionVariant.html
type QueryExecutionContext ¶
type QueryExecutionContext struct { // Name of catalog used in query execution. // Default: - No catalog. // CatalogName *string `field:"optional" json:"catalogName" yaml:"catalogName"` // Name of database used in query execution. // Default: - No database. // DatabaseName *string `field:"optional" json:"databaseName" yaml:"databaseName"` }
Database and data catalog context in which the query execution occurs.
Example:
startQueryExecutionJob := tasks.NewAthenaStartQueryExecution(this, jsii.String("Start Athena Query"), &AthenaStartQueryExecutionProps{ QueryString: sfn.JsonPath_StringAt(jsii.String("$.queryString")), QueryExecutionContext: &QueryExecutionContext{ DatabaseName: jsii.String("mydatabase"), }, ResultConfiguration: &ResultConfiguration{ EncryptionConfiguration: &EncryptionConfiguration{ EncryptionOption: tasks.EncryptionOption_S3_MANAGED, }, OutputLocation: &Location{ BucketName: jsii.String("amzn-s3-demo-bucket"), ObjectKey: jsii.String("folder"), }, }, ExecutionParameters: []*string{ jsii.String("param1"), jsii.String("param2"), }, })
See: https://docs.aws.amazon.com/athena/latest/APIReference/API_QueryExecutionContext.html
type RecordWrapperType ¶
type RecordWrapperType string
Define the format of the input data.
const ( // None record wrapper type. RecordWrapperType_NONE RecordWrapperType = "NONE" // RecordIO record wrapper type. RecordWrapperType_RECORD_IO RecordWrapperType = "RECORD_IO" )
type ReleaseLabel ¶ added in v2.1.0
type ReleaseLabel interface { // A literal string that contains the release-version ex. // // 'emr-x.x.x-latest' Label() *string }
The Amazon EMR release version to use for the job run.
Can be extended to include new EMR releases ¶
For example, `new ReleaseLabel('emr-x.xx.x-latest');`
Example:
tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{ VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")), ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(), JobName: jsii.String("EMR-Containers-Job"), JobDriver: &JobDriver{ SparkSubmitJobDriver: &SparkSubmitJobDriver{ EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")), }, }, ApplicationConfig: []applicationConfiguration{ &applicationConfiguration{ Classification: tasks.Classification_SPARK_DEFAULTS(), Properties: map[string]*string{ "spark.executor.instances": jsii.String("1"), "spark.executor.memory": jsii.String("512M"), }, }, }, })
func NewReleaseLabel ¶ added in v2.1.0
func NewReleaseLabel(label *string) ReleaseLabel
Initializes the label string.
func ReleaseLabel_EMR_5_32_0 ¶ added in v2.1.0
func ReleaseLabel_EMR_5_32_0() ReleaseLabel
func ReleaseLabel_EMR_5_33_0 ¶ added in v2.1.0
func ReleaseLabel_EMR_5_33_0() ReleaseLabel
func ReleaseLabel_EMR_6_2_0 ¶ added in v2.1.0
func ReleaseLabel_EMR_6_2_0() ReleaseLabel
func ReleaseLabel_EMR_6_3_0 ¶ added in v2.1.0
func ReleaseLabel_EMR_6_3_0() ReleaseLabel
type ResourceConfig ¶
type ResourceConfig struct { // The number of ML compute instances to use. // Default: 1 instance. // InstanceCount *float64 `field:"required" json:"instanceCount" yaml:"instanceCount"` // ML compute instance type. // // To provide an instance type from the task input, supply an instance type in the following way // where the value in the task input is an EC2 instance type prepended with "ml.": // // “`ts // new ec2.InstanceType(sfn.JsonPath.stringAt('$.path.to.instanceType')); // “`. // See: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ResourceConfig.html#sagemaker-Type-ResourceConfig-InstanceType // // Default: ec2.InstanceType(ec2.InstanceClass.M4, ec2.InstanceType.XLARGE) // InstanceType awsec2.InstanceType `field:"required" json:"instanceType" yaml:"instanceType"` // Size of the ML storage volume that you want to provision. // Default: 10 GB EBS volume. // VolumeSize awscdk.Size `field:"required" json:"volumeSize" yaml:"volumeSize"` // KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the training job. // Default: - Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. // VolumeEncryptionKey awskms.IKey `field:"optional" json:"volumeEncryptionKey" yaml:"volumeEncryptionKey"` }
Specifies the resources, ML compute instances, and ML storage volumes to deploy for model training.
Example:
tasks.NewSageMakerCreateTrainingJob(this, jsii.String("TrainSagemaker"), &SageMakerCreateTrainingJobProps{ TrainingJobName: sfn.JsonPath_StringAt(jsii.String("$.JobName")), AlgorithmSpecification: &AlgorithmSpecification{ AlgorithmName: jsii.String("BlazingText"), TrainingInputMode: tasks.InputMode_FILE, }, InputDataConfig: []channel{ &channel{ ChannelName: jsii.String("train"), DataSource: &DataSource{ S3DataSource: &S3DataSource{ S3DataType: tasks.S3DataType_S3_PREFIX, S3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.S3Bucket")), }, }, }, }, OutputDataConfig: &OutputDataConfig{ S3OutputLocation: tasks.S3Location_FromBucket(s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("amzn-s3-demo-bucket")), jsii.String("myoutputpath")), }, ResourceConfig: &ResourceConfig{ InstanceCount: jsii.Number(1), InstanceType: ec2.NewInstanceType(sfn.JsonPath_*StringAt(jsii.String("$.InstanceType"))), VolumeSize: awscdk.Size_Gibibytes(jsii.Number(50)), }, // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume StoppingCondition: &StoppingCondition{ MaxRuntime: awscdk.Duration_Hours(jsii.Number(2)), }, })
type ResultConfiguration ¶
type ResultConfiguration struct { // Encryption option used if enabled in S3. // Default: - SSE_S3 encryption is enabled with default encryption key. // EncryptionConfiguration *EncryptionConfiguration `field:"optional" json:"encryptionConfiguration" yaml:"encryptionConfiguration"` // S3 path of query results. // // Example value: `s3://query-results-bucket/folder/`. // Default: - Query Result Location set in Athena settings for this workgroup. // OutputLocation *awss3.Location `field:"optional" json:"outputLocation" yaml:"outputLocation"` }
Location of query result along with S3 bucket configuration.
Example:
startQueryExecutionJob := tasks.NewAthenaStartQueryExecution(this, jsii.String("Start Athena Query"), &AthenaStartQueryExecutionProps{ QueryString: sfn.JsonPath_StringAt(jsii.String("$.queryString")), QueryExecutionContext: &QueryExecutionContext{ DatabaseName: jsii.String("mydatabase"), }, ResultConfiguration: &ResultConfiguration{ EncryptionConfiguration: &EncryptionConfiguration{ EncryptionOption: tasks.EncryptionOption_S3_MANAGED, }, OutputLocation: &Location{ BucketName: jsii.String("amzn-s3-demo-bucket"), ObjectKey: jsii.String("folder"), }, }, ExecutionParameters: []*string{ jsii.String("param1"), jsii.String("param2"), }, })
See: https://docs.aws.amazon.com/athena/latest/APIReference/API_ResultConfiguration.html
type RetryPolicy ¶ added in v2.168.0
type RetryPolicy struct { // The maximum amount of time to continue to make retry attempts. MaximumEventAge awscdk.Duration `field:"required" json:"maximumEventAge" yaml:"maximumEventAge"` // The maximum number of retry attempts to make before the request fails. MaximumRetryAttempts *float64 `field:"required" json:"maximumRetryAttempts" yaml:"maximumRetryAttempts"` }
The information about the retry policy settings.
Example:
import scheduler "github.com/aws/aws-cdk-go/awscdk" import kms "github.com/aws/aws-cdk-go/awscdk" var key key var scheduleGroup cfnScheduleGroup var targetQueue queue var deadLetterQueue queue schedulerRole := iam.NewRole(this, jsii.String("SchedulerRole"), &RoleProps{ AssumedBy: iam.NewServicePrincipal(jsii.String("scheduler.amazonaws.com")), }) // To send the message to the queue // This policy changes depending on the type of target. schedulerRole.AddToPrincipalPolicy(iam.NewPolicyStatement(&PolicyStatementProps{ Actions: []*string{ jsii.String("sqs:SendMessage"), }, Resources: []*string{ targetQueue.QueueArn, }, })) createScheduleTask1 := tasks.NewEventBridgeSchedulerCreateScheduleTask(this, jsii.String("createSchedule"), &EventBridgeSchedulerCreateScheduleTaskProps{ ScheduleName: jsii.String("TestSchedule"), ActionAfterCompletion: tasks.ActionAfterCompletion_NONE, ClientToken: jsii.String("testToken"), Description: jsii.String("TestDescription"), StartDate: NewDate(), EndDate: NewDate(NewDate().getTime() + 1000 * 60 * 60), FlexibleTimeWindow: awscdk.Duration_Minutes(jsii.Number(5)), GroupName: scheduleGroup.ref, KmsKey: key, Schedule: tasks.Schedule_Rate(awscdk.Duration_*Minutes(jsii.Number(5))), Timezone: jsii.String("UTC"), Enabled: jsii.Boolean(true), Target: tasks.NewEventBridgeSchedulerTarget(&EventBridgeSchedulerTargetProps{ Arn: targetQueue.*QueueArn, Role: schedulerRole, RetryPolicy: &RetryPolicy{ MaximumRetryAttempts: jsii.Number(2), MaximumEventAge: awscdk.Duration_*Minutes(jsii.Number(5)), }, DeadLetterQueue: *DeadLetterQueue, }), })
type S3DataDistributionType ¶
type S3DataDistributionType string
S3 Data Distribution Type.
const ( // Fully replicated S3 Data Distribution Type. S3DataDistributionType_FULLY_REPLICATED S3DataDistributionType = "FULLY_REPLICATED" // Sharded By S3 Key Data Distribution Type. S3DataDistributionType_SHARDED_BY_S3_KEY S3DataDistributionType = "SHARDED_BY_S3_KEY" )
type S3DataSource ¶
type S3DataSource struct { // S3 Uri. S3Location S3Location `field:"required" json:"s3Location" yaml:"s3Location"` // List of one or more attribute names to use that are found in a specified augmented manifest file. // Default: - No attribute names. // AttributeNames *[]*string `field:"optional" json:"attributeNames" yaml:"attributeNames"` // S3 Data Distribution Type. // Default: - None. // S3DataDistributionType S3DataDistributionType `field:"optional" json:"s3DataDistributionType" yaml:"s3DataDistributionType"` // S3 Data Type. // Default: S3_PREFIX. // S3DataType S3DataType `field:"optional" json:"s3DataType" yaml:"s3DataType"` }
S3 location of the channel data.
Example:
tasks.NewSageMakerCreateTrainingJob(this, jsii.String("TrainSagemaker"), &SageMakerCreateTrainingJobProps{ TrainingJobName: sfn.JsonPath_StringAt(jsii.String("$.JobName")), AlgorithmSpecification: &AlgorithmSpecification{ AlgorithmName: jsii.String("BlazingText"), TrainingInputMode: tasks.InputMode_FILE, }, InputDataConfig: []channel{ &channel{ ChannelName: jsii.String("train"), DataSource: &DataSource{ S3DataSource: &S3DataSource{ S3DataType: tasks.S3DataType_S3_PREFIX, S3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.S3Bucket")), }, }, }, }, OutputDataConfig: &OutputDataConfig{ S3OutputLocation: tasks.S3Location_FromBucket(s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("amzn-s3-demo-bucket")), jsii.String("myoutputpath")), }, ResourceConfig: &ResourceConfig{ InstanceCount: jsii.Number(1), InstanceType: ec2.NewInstanceType(sfn.JsonPath_*StringAt(jsii.String("$.InstanceType"))), VolumeSize: awscdk.Size_Gibibytes(jsii.Number(50)), }, // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume StoppingCondition: &StoppingCondition{ MaxRuntime: awscdk.Duration_Hours(jsii.Number(2)), }, })
See: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_S3DataSource.html
type S3DataType ¶
type S3DataType string
S3 Data Type.
Example:
tasks.NewSageMakerCreateTrainingJob(this, jsii.String("TrainSagemaker"), &SageMakerCreateTrainingJobProps{ TrainingJobName: sfn.JsonPath_StringAt(jsii.String("$.JobName")), AlgorithmSpecification: &AlgorithmSpecification{ AlgorithmName: jsii.String("BlazingText"), TrainingInputMode: tasks.InputMode_FILE, }, InputDataConfig: []channel{ &channel{ ChannelName: jsii.String("train"), DataSource: &DataSource{ S3DataSource: &S3DataSource{ S3DataType: tasks.S3DataType_S3_PREFIX, S3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.S3Bucket")), }, }, }, }, OutputDataConfig: &OutputDataConfig{ S3OutputLocation: tasks.S3Location_FromBucket(s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("amzn-s3-demo-bucket")), jsii.String("myoutputpath")), }, ResourceConfig: &ResourceConfig{ InstanceCount: jsii.Number(1), InstanceType: ec2.NewInstanceType(sfn.JsonPath_*StringAt(jsii.String("$.InstanceType"))), VolumeSize: awscdk.Size_Gibibytes(jsii.Number(50)), }, // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume StoppingCondition: &StoppingCondition{ MaxRuntime: awscdk.Duration_Hours(jsii.Number(2)), }, })
const ( // Manifest File Data Type. S3DataType_MANIFEST_FILE S3DataType = "MANIFEST_FILE" // S3 Prefix Data Type. S3DataType_S3_PREFIX S3DataType = "S3_PREFIX" // Augmented Manifest File Data Type. S3DataType_AUGMENTED_MANIFEST_FILE S3DataType = "AUGMENTED_MANIFEST_FILE" )
type S3Location ¶
type S3Location interface { // Called when the S3Location is bound to a StepFunctions task. Bind(task ISageMakerTask, opts *S3LocationBindOptions) *S3LocationConfig }
Constructs `IS3Location` objects.
Example:
tasks.NewSageMakerCreateTrainingJob(this, jsii.String("TrainSagemaker"), &SageMakerCreateTrainingJobProps{ TrainingJobName: sfn.JsonPath_StringAt(jsii.String("$.JobName")), AlgorithmSpecification: &AlgorithmSpecification{ AlgorithmName: jsii.String("BlazingText"), TrainingInputMode: tasks.InputMode_FILE, }, InputDataConfig: []channel{ &channel{ ChannelName: jsii.String("train"), DataSource: &DataSource{ S3DataSource: &S3DataSource{ S3DataType: tasks.S3DataType_S3_PREFIX, S3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.S3Bucket")), }, }, }, }, OutputDataConfig: &OutputDataConfig{ S3OutputLocation: tasks.S3Location_FromBucket(s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("amzn-s3-demo-bucket")), jsii.String("myoutputpath")), }, ResourceConfig: &ResourceConfig{ InstanceCount: jsii.Number(1), InstanceType: ec2.NewInstanceType(sfn.JsonPath_*StringAt(jsii.String("$.InstanceType"))), VolumeSize: awscdk.Size_Gibibytes(jsii.Number(50)), }, // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume StoppingCondition: &StoppingCondition{ MaxRuntime: awscdk.Duration_Hours(jsii.Number(2)), }, })
func S3Location_FromBucket ¶
func S3Location_FromBucket(bucket awss3.IBucket, keyPrefix *string) S3Location
An `IS3Location` built with a determined bucket and key prefix.
func S3Location_FromJsonExpression ¶
func S3Location_FromJsonExpression(expression *string) S3Location
An `IS3Location` determined fully by a JSONata expression or JSON Path from the task input.
Due to the dynamic nature of those locations, the IAM grants that will be set by `grantRead` and `grantWrite` apply to the `*` resource.
type S3LocationBindOptions ¶
type S3LocationBindOptions struct { // Allow reading from the S3 Location. // Default: false. // ForReading *bool `field:"optional" json:"forReading" yaml:"forReading"` // Allow writing to the S3 Location. // Default: false. // ForWriting *bool `field:"optional" json:"forWriting" yaml:"forWriting"` }
Options for binding an S3 Location.
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" s3LocationBindOptions := &S3LocationBindOptions{ ForReading: jsii.Boolean(false), ForWriting: jsii.Boolean(false), }
type S3LocationConfig ¶
type S3LocationConfig struct { // Uniquely identifies the resource in Amazon S3. Uri *string `field:"required" json:"uri" yaml:"uri"` }
Stores information about the location of an object in Amazon 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" s3LocationConfig := &S3LocationConfig{ Uri: jsii.String("uri"), }
type SageMakerCreateEndpoint ¶
type SageMakerCreateEndpoint interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to create a SageMaker endpoint.
Example:
tasks.NewSageMakerCreateEndpoint(this, jsii.String("SagemakerEndpoint"), &SageMakerCreateEndpointProps{ EndpointName: sfn.JsonPath_StringAt(jsii.String("$.EndpointName")), EndpointConfigName: sfn.JsonPath_*StringAt(jsii.String("$.EndpointConfigName")), })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
func NewSageMakerCreateEndpoint ¶
func NewSageMakerCreateEndpoint(scope constructs.Construct, id *string, props *SageMakerCreateEndpointProps) SageMakerCreateEndpoint
func SageMakerCreateEndpoint_JsonPath ¶ added in v2.178.0
func SageMakerCreateEndpoint_JsonPath(scope constructs.Construct, id *string, props *SageMakerCreateEndpointJsonPathProps) SageMakerCreateEndpoint
A Step Functions Task using JSONPath to create a SageMaker endpoint. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
func SageMakerCreateEndpoint_Jsonata ¶ added in v2.178.0
func SageMakerCreateEndpoint_Jsonata(scope constructs.Construct, id *string, props *SageMakerCreateEndpointJsonataProps) SageMakerCreateEndpoint
A Step Functions Task using JSONata to create a SageMaker endpoint. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
type SageMakerCreateEndpointConfig ¶
type SageMakerCreateEndpointConfig interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to create a SageMaker endpoint configuration.
Example:
tasks.NewSageMakerCreateEndpointConfig(this, jsii.String("SagemakerEndpointConfig"), &SageMakerCreateEndpointConfigProps{ EndpointConfigName: jsii.String("MyEndpointConfig"), ProductionVariants: []productionVariant{ &productionVariant{ InitialInstanceCount: jsii.Number(2), InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_M5, ec2.InstanceSize_XLARGE), ModelName: jsii.String("MyModel"), VariantName: jsii.String("awesome-variant"), }, }, })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
func NewSageMakerCreateEndpointConfig ¶
func NewSageMakerCreateEndpointConfig(scope constructs.Construct, id *string, props *SageMakerCreateEndpointConfigProps) SageMakerCreateEndpointConfig
func SageMakerCreateEndpointConfig_JsonPath ¶ added in v2.178.0
func SageMakerCreateEndpointConfig_JsonPath(scope constructs.Construct, id *string, props *SageMakerCreateEndpointConfigJsonPathProps) SageMakerCreateEndpointConfig
A Step Functions Task using JSONPath to create a SageMaker endpoint configuration. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
func SageMakerCreateEndpointConfig_Jsonata ¶ added in v2.178.0
func SageMakerCreateEndpointConfig_Jsonata(scope constructs.Construct, id *string, props *SageMakerCreateEndpointConfigJsonataProps) SageMakerCreateEndpointConfig
A Step Functions Task using JSONata to create a SageMaker endpoint configuration. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
type SageMakerCreateEndpointConfigJsonPathProps ¶ added in v2.178.0
type SageMakerCreateEndpointConfigJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The name of the endpoint configuration. EndpointConfigName *string `field:"required" json:"endpointConfigName" yaml:"endpointConfigName"` // An list of ProductionVariant objects, one for each model that you want to host at this endpoint. // // Identifies a model that you want to host and the resources to deploy for hosting it. // If you are deploying multiple models, tell Amazon SageMaker how to distribute traffic among the models by specifying variant weights. ProductionVariants *[]*ProductionVariant `field:"required" json:"productionVariants" yaml:"productionVariants"` // AWS Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. // Default: - None. // KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // Tags to be applied to the endpoint configuration. // Default: - No tags. // Tags awsstepfunctions.TaskInput `field:"optional" json:"tags" yaml:"tags"` }
Properties for creating an Amazon SageMaker endpoint configuration using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var acceleratorType acceleratorType var assign interface{} var instanceType instanceType var key key var resultSelector interface{} var taskInput taskInput var taskRole taskRole var timeout timeout sageMakerCreateEndpointConfigJsonPathProps := &SageMakerCreateEndpointConfigJsonPathProps{ EndpointConfigName: jsii.String("endpointConfigName"), ProductionVariants: []productionVariant{ &productionVariant{ InstanceType: instanceType, ModelName: jsii.String("modelName"), VariantName: jsii.String("variantName"), // the properties below are optional AcceleratorType: acceleratorType, InitialInstanceCount: jsii.Number(123), InitialVariantWeight: jsii.Number(123), }, }, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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, KmsKey: key, OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), Tags: taskInput, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
type SageMakerCreateEndpointConfigJsonataProps ¶ added in v2.178.0
type SageMakerCreateEndpointConfigJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The name of the endpoint configuration. EndpointConfigName *string `field:"required" json:"endpointConfigName" yaml:"endpointConfigName"` // An list of ProductionVariant objects, one for each model that you want to host at this endpoint. // // Identifies a model that you want to host and the resources to deploy for hosting it. // If you are deploying multiple models, tell Amazon SageMaker how to distribute traffic among the models by specifying variant weights. ProductionVariants *[]*ProductionVariant `field:"required" json:"productionVariants" yaml:"productionVariants"` // AWS Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. // Default: - None. // KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // Tags to be applied to the endpoint configuration. // Default: - No tags. // Tags awsstepfunctions.TaskInput `field:"optional" json:"tags" yaml:"tags"` }
Properties for creating an Amazon SageMaker endpoint configuration using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var acceleratorType acceleratorType var assign interface{} var instanceType instanceType var key key var outputs interface{} var taskInput taskInput var taskRole taskRole var timeout timeout sageMakerCreateEndpointConfigJsonataProps := &SageMakerCreateEndpointConfigJsonataProps{ EndpointConfigName: jsii.String("endpointConfigName"), ProductionVariants: []productionVariant{ &productionVariant{ InstanceType: instanceType, ModelName: jsii.String("modelName"), VariantName: jsii.String("variantName"), // the properties below are optional AcceleratorType: acceleratorType, InitialInstanceCount: jsii.Number(123), InitialVariantWeight: jsii.Number(123), }, }, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, KmsKey: key, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), Tags: taskInput, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
type SageMakerCreateEndpointConfigProps ¶
type SageMakerCreateEndpointConfigProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The name of the endpoint configuration. EndpointConfigName *string `field:"required" json:"endpointConfigName" yaml:"endpointConfigName"` // An list of ProductionVariant objects, one for each model that you want to host at this endpoint. // // Identifies a model that you want to host and the resources to deploy for hosting it. // If you are deploying multiple models, tell Amazon SageMaker how to distribute traffic among the models by specifying variant weights. ProductionVariants *[]*ProductionVariant `field:"required" json:"productionVariants" yaml:"productionVariants"` // AWS Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. // Default: - None. // KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // Tags to be applied to the endpoint configuration. // Default: - No tags. // Tags awsstepfunctions.TaskInput `field:"optional" json:"tags" yaml:"tags"` }
Properties for creating an Amazon SageMaker endpoint configuration.
Example:
tasks.NewSageMakerCreateEndpointConfig(this, jsii.String("SagemakerEndpointConfig"), &SageMakerCreateEndpointConfigProps{ EndpointConfigName: jsii.String("MyEndpointConfig"), ProductionVariants: []productionVariant{ &productionVariant{ InitialInstanceCount: jsii.Number(2), InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_M5, ec2.InstanceSize_XLARGE), ModelName: jsii.String("MyModel"), VariantName: jsii.String("awesome-variant"), }, }, })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
type SageMakerCreateEndpointJsonPathProps ¶ added in v2.178.0
type SageMakerCreateEndpointJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The name of an endpoint configuration. EndpointConfigName *string `field:"required" json:"endpointConfigName" yaml:"endpointConfigName"` // The name of the endpoint. // // The name must be unique within an AWS Region in your AWS account. EndpointName *string `field:"required" json:"endpointName" yaml:"endpointName"` // Tags to be applied to the endpoint. // Default: - No tags. // Tags awsstepfunctions.TaskInput `field:"optional" json:"tags" yaml:"tags"` }
Properties for creating an Amazon SageMaker endpoint using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var taskInput taskInput var taskRole taskRole var timeout timeout sageMakerCreateEndpointJsonPathProps := &SageMakerCreateEndpointJsonPathProps{ EndpointConfigName: jsii.String("endpointConfigName"), EndpointName: jsii.String("endpointName"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), Tags: taskInput, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
type SageMakerCreateEndpointJsonataProps ¶ added in v2.178.0
type SageMakerCreateEndpointJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The name of an endpoint configuration. EndpointConfigName *string `field:"required" json:"endpointConfigName" yaml:"endpointConfigName"` // The name of the endpoint. // // The name must be unique within an AWS Region in your AWS account. EndpointName *string `field:"required" json:"endpointName" yaml:"endpointName"` // Tags to be applied to the endpoint. // Default: - No tags. // Tags awsstepfunctions.TaskInput `field:"optional" json:"tags" yaml:"tags"` }
Properties for creating an Amazon SageMaker endpoint using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var taskInput taskInput var taskRole taskRole var timeout timeout sageMakerCreateEndpointJsonataProps := &SageMakerCreateEndpointJsonataProps{ EndpointConfigName: jsii.String("endpointConfigName"), EndpointName: jsii.String("endpointName"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), Tags: taskInput, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
type SageMakerCreateEndpointProps ¶
type SageMakerCreateEndpointProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The name of an endpoint configuration. EndpointConfigName *string `field:"required" json:"endpointConfigName" yaml:"endpointConfigName"` // The name of the endpoint. // // The name must be unique within an AWS Region in your AWS account. EndpointName *string `field:"required" json:"endpointName" yaml:"endpointName"` // Tags to be applied to the endpoint. // Default: - No tags. // Tags awsstepfunctions.TaskInput `field:"optional" json:"tags" yaml:"tags"` }
Properties for creating an Amazon SageMaker endpoint.
Example:
tasks.NewSageMakerCreateEndpoint(this, jsii.String("SagemakerEndpoint"), &SageMakerCreateEndpointProps{ EndpointName: sfn.JsonPath_StringAt(jsii.String("$.EndpointName")), EndpointConfigName: sfn.JsonPath_*StringAt(jsii.String("$.EndpointConfigName")), })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
type SageMakerCreateModel ¶
type SageMakerCreateModel interface { awsstepfunctions.TaskStateBase awsec2.IConnectable awsiam.IGrantable Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string // Allows specify security group connections for instances of this fleet. Connections() awsec2.Connections DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // The principal to grant permissions to. GrantPrincipal() awsiam.IPrincipal // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // The execution role for the Sagemaker Create Model API. Role() awsiam.IRole // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.TaskStateBase // Add the security group to all instances via the launch configuration security groups array. AddSecurityGroup(securityGroup awsec2.ISecurityGroup) // 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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to create a SageMaker model.
Example:
tasks.NewSageMakerCreateModel(this, jsii.String("Sagemaker"), &SageMakerCreateModelProps{ ModelName: jsii.String("MyModel"), PrimaryContainer: tasks.NewContainerDefinition(&ContainerDefinitionOptions{ Image: tasks.DockerImage_FromJsonExpression(sfn.JsonPath_StringAt(jsii.String("$.Model.imageName"))), Mode: tasks.Mode_SINGLE_MODEL, ModelS3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.TrainingJob.ModelArtifacts.S3ModelArtifacts")), }), })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
func NewSageMakerCreateModel ¶
func NewSageMakerCreateModel(scope constructs.Construct, id *string, props *SageMakerCreateModelProps) SageMakerCreateModel
func SageMakerCreateModel_JsonPath ¶ added in v2.178.0
func SageMakerCreateModel_JsonPath(scope constructs.Construct, id *string, props *SageMakerCreateModelJsonPathProps) SageMakerCreateModel
A Step Functions Task using JSONPath to create a SageMaker model. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
func SageMakerCreateModel_Jsonata ¶ added in v2.178.0
func SageMakerCreateModel_Jsonata(scope constructs.Construct, id *string, props *SageMakerCreateModelJsonataProps) SageMakerCreateModel
A Step Functions Task using JSONata to create a SageMaker model. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
type SageMakerCreateModelJsonPathProps ¶ added in v2.178.0
type SageMakerCreateModelJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The name of the new model. ModelName *string `field:"required" json:"modelName" yaml:"modelName"` // The definition of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed for predictions. PrimaryContainer IContainerDefinition `field:"required" json:"primaryContainer" yaml:"primaryContainer"` // Specifies the containers in the inference pipeline. // Default: - None. // Containers *[]IContainerDefinition `field:"optional" json:"containers" yaml:"containers"` // Isolates the model container. // // No inbound or outbound network calls can be made to or from the model container. // Default: false. // EnableNetworkIsolation *bool `field:"optional" json:"enableNetworkIsolation" yaml:"enableNetworkIsolation"` // An execution role that you can pass in a CreateModel API request. // Default: - a role will be created. // Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // The subnets of the VPC to which the hosted model is connected (Note this parameter is only used when VPC is provided). // Default: - Private Subnets are selected. // SubnetSelection *awsec2.SubnetSelection `field:"optional" json:"subnetSelection" yaml:"subnetSelection"` // Tags to be applied to the model. // Default: - No tags. // Tags awsstepfunctions.TaskInput `field:"optional" json:"tags" yaml:"tags"` // The VPC that is accessible by the hosted model. // Default: - None. // Vpc awsec2.IVpc `field:"optional" json:"vpc" yaml:"vpc"` }
Properties for creating an Amazon SageMaker model using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var containerDefinition containerDefinition var resultSelector interface{} var role role var subnet subnet var subnetFilter subnetFilter var taskInput taskInput var taskRole taskRole var timeout timeout var vpc vpc sageMakerCreateModelJsonPathProps := &SageMakerCreateModelJsonPathProps{ ModelName: jsii.String("modelName"), PrimaryContainer: containerDefinition, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Containers: []iContainerDefinition{ containerDefinition, }, Credentials: &Credentials{ Role: taskRole, }, EnableNetworkIsolation: jsii.Boolean(false), Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, Role: role, StateName: jsii.String("stateName"), SubnetSelection: &SubnetSelection{ AvailabilityZones: []*string{ jsii.String("availabilityZones"), }, OnePerAz: jsii.Boolean(false), SubnetFilters: []*subnetFilter{ subnetFilter, }, SubnetGroupName: jsii.String("subnetGroupName"), Subnets: []iSubnet{ subnet, }, SubnetType: awscdk.Aws_ec2.SubnetType_PRIVATE_ISOLATED, }, Tags: taskInput, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), Vpc: vpc, }
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
type SageMakerCreateModelJsonataProps ¶ added in v2.178.0
type SageMakerCreateModelJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The name of the new model. ModelName *string `field:"required" json:"modelName" yaml:"modelName"` // The definition of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed for predictions. PrimaryContainer IContainerDefinition `field:"required" json:"primaryContainer" yaml:"primaryContainer"` // Specifies the containers in the inference pipeline. // Default: - None. // Containers *[]IContainerDefinition `field:"optional" json:"containers" yaml:"containers"` // Isolates the model container. // // No inbound or outbound network calls can be made to or from the model container. // Default: false. // EnableNetworkIsolation *bool `field:"optional" json:"enableNetworkIsolation" yaml:"enableNetworkIsolation"` // An execution role that you can pass in a CreateModel API request. // Default: - a role will be created. // Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // The subnets of the VPC to which the hosted model is connected (Note this parameter is only used when VPC is provided). // Default: - Private Subnets are selected. // SubnetSelection *awsec2.SubnetSelection `field:"optional" json:"subnetSelection" yaml:"subnetSelection"` // Tags to be applied to the model. // Default: - No tags. // Tags awsstepfunctions.TaskInput `field:"optional" json:"tags" yaml:"tags"` // The VPC that is accessible by the hosted model. // Default: - None. // Vpc awsec2.IVpc `field:"optional" json:"vpc" yaml:"vpc"` }
Properties for creating an Amazon SageMaker model using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var containerDefinition containerDefinition var outputs interface{} var role role var subnet subnet var subnetFilter subnetFilter var taskInput taskInput var taskRole taskRole var timeout timeout var vpc vpc sageMakerCreateModelJsonataProps := &SageMakerCreateModelJsonataProps{ ModelName: jsii.String("modelName"), PrimaryContainer: containerDefinition, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Containers: []iContainerDefinition{ containerDefinition, }, Credentials: &Credentials{ Role: taskRole, }, EnableNetworkIsolation: jsii.Boolean(false), Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, Role: role, StateName: jsii.String("stateName"), SubnetSelection: &SubnetSelection{ AvailabilityZones: []*string{ jsii.String("availabilityZones"), }, OnePerAz: jsii.Boolean(false), SubnetFilters: []*subnetFilter{ subnetFilter, }, SubnetGroupName: jsii.String("subnetGroupName"), Subnets: []iSubnet{ subnet, }, SubnetType: awscdk.Aws_ec2.SubnetType_PRIVATE_ISOLATED, }, Tags: taskInput, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), Vpc: vpc, }
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
type SageMakerCreateModelProps ¶
type SageMakerCreateModelProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The name of the new model. ModelName *string `field:"required" json:"modelName" yaml:"modelName"` // The definition of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed for predictions. PrimaryContainer IContainerDefinition `field:"required" json:"primaryContainer" yaml:"primaryContainer"` // Specifies the containers in the inference pipeline. // Default: - None. // Containers *[]IContainerDefinition `field:"optional" json:"containers" yaml:"containers"` // Isolates the model container. // // No inbound or outbound network calls can be made to or from the model container. // Default: false. // EnableNetworkIsolation *bool `field:"optional" json:"enableNetworkIsolation" yaml:"enableNetworkIsolation"` // An execution role that you can pass in a CreateModel API request. // Default: - a role will be created. // Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // The subnets of the VPC to which the hosted model is connected (Note this parameter is only used when VPC is provided). // Default: - Private Subnets are selected. // SubnetSelection *awsec2.SubnetSelection `field:"optional" json:"subnetSelection" yaml:"subnetSelection"` // Tags to be applied to the model. // Default: - No tags. // Tags awsstepfunctions.TaskInput `field:"optional" json:"tags" yaml:"tags"` // The VPC that is accessible by the hosted model. // Default: - None. // Vpc awsec2.IVpc `field:"optional" json:"vpc" yaml:"vpc"` }
Properties for creating an Amazon SageMaker model.
Example:
tasks.NewSageMakerCreateModel(this, jsii.String("Sagemaker"), &SageMakerCreateModelProps{ ModelName: jsii.String("MyModel"), PrimaryContainer: tasks.NewContainerDefinition(&ContainerDefinitionOptions{ Image: tasks.DockerImage_FromJsonExpression(sfn.JsonPath_StringAt(jsii.String("$.Model.imageName"))), Mode: tasks.Mode_SINGLE_MODEL, ModelS3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.TrainingJob.ModelArtifacts.S3ModelArtifacts")), }), })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
type SageMakerCreateTrainingJob ¶
type SageMakerCreateTrainingJob interface { awsstepfunctions.TaskStateBase awsec2.IConnectable awsiam.IGrantable Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string // Allows specify security group connections for instances of this fleet. Connections() awsec2.Connections DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // The principal to grant permissions to. GrantPrincipal() awsiam.IPrincipal // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // The execution role for the Sagemaker training job. // // Only available after task has been added to a state machine. Role() awsiam.IRole // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.TaskStateBase // Add the security group to all instances via the launch configuration security groups array. AddSecurityGroup(securityGroup awsec2.ISecurityGroup) // 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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Class representing the SageMaker Create Training Job task.
Example:
tasks.NewSageMakerCreateTrainingJob(this, jsii.String("TrainSagemaker"), &SageMakerCreateTrainingJobProps{ TrainingJobName: sfn.JsonPath_StringAt(jsii.String("$.JobName")), AlgorithmSpecification: &AlgorithmSpecification{ AlgorithmName: jsii.String("BlazingText"), TrainingInputMode: tasks.InputMode_FILE, }, InputDataConfig: []channel{ &channel{ ChannelName: jsii.String("train"), DataSource: &DataSource{ S3DataSource: &S3DataSource{ S3DataType: tasks.S3DataType_S3_PREFIX, S3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.S3Bucket")), }, }, }, }, OutputDataConfig: &OutputDataConfig{ S3OutputLocation: tasks.S3Location_FromBucket(s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("amzn-s3-demo-bucket")), jsii.String("myoutputpath")), }, ResourceConfig: &ResourceConfig{ InstanceCount: jsii.Number(1), InstanceType: ec2.NewInstanceType(sfn.JsonPath_*StringAt(jsii.String("$.InstanceType"))), VolumeSize: awscdk.Size_Gibibytes(jsii.Number(50)), }, // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume StoppingCondition: &StoppingCondition{ MaxRuntime: awscdk.Duration_Hours(jsii.Number(2)), }, })
func NewSageMakerCreateTrainingJob ¶
func NewSageMakerCreateTrainingJob(scope constructs.Construct, id *string, props *SageMakerCreateTrainingJobProps) SageMakerCreateTrainingJob
func SageMakerCreateTrainingJob_JsonPath ¶ added in v2.178.0
func SageMakerCreateTrainingJob_JsonPath(scope constructs.Construct, id *string, props *SageMakerCreateTrainingJobJsonPathProps) SageMakerCreateTrainingJob
A Step Functions Task using JSONPath to create a SageMaker training job.
func SageMakerCreateTrainingJob_Jsonata ¶ added in v2.178.0
func SageMakerCreateTrainingJob_Jsonata(scope constructs.Construct, id *string, props *SageMakerCreateTrainingJobJsonataProps) SageMakerCreateTrainingJob
A Step Functions Task using JSONata to create a SageMaker training job.
type SageMakerCreateTrainingJobJsonPathProps ¶ added in v2.178.0
type SageMakerCreateTrainingJobJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Identifies the training algorithm to use. AlgorithmSpecification *AlgorithmSpecification `field:"required" json:"algorithmSpecification" yaml:"algorithmSpecification"` // Identifies the Amazon S3 location where you want Amazon SageMaker to save the results of model training. OutputDataConfig *OutputDataConfig `field:"required" json:"outputDataConfig" yaml:"outputDataConfig"` // Training Job Name. TrainingJobName *string `field:"required" json:"trainingJobName" yaml:"trainingJobName"` // Isolates the training container. // // No inbound or outbound network calls can be made to or from the training container. // Default: false. // EnableNetworkIsolation *bool `field:"optional" json:"enableNetworkIsolation" yaml:"enableNetworkIsolation"` // Environment variables to set in the Docker container. // Default: - No environment variables. // Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // Algorithm-specific parameters that influence the quality of the model. // // Set hyperparameters before you start the learning process. // For a list of hyperparameters provided by Amazon SageMaker. // See: https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html // // Default: - No hyperparameters. // Hyperparameters *map[string]interface{} `field:"optional" json:"hyperparameters" yaml:"hyperparameters"` // Describes the various datasets (e.g. train, validation, test) and the Amazon S3 location where stored. // Default: - No inputDataConfig. // InputDataConfig *[]*Channel `field:"optional" json:"inputDataConfig" yaml:"inputDataConfig"` // Specifies the resources, ML compute instances, and ML storage volumes to deploy for model training. // Default: - 1 instance of EC2 `M4.XLarge` with `10GB` volume // ResourceConfig *ResourceConfig `field:"optional" json:"resourceConfig" yaml:"resourceConfig"` // Role for the Training Job. // // The role must be granted all necessary permissions for the SageMaker training job to // be able to operate. // // See https://docs.aws.amazon.com/fr_fr/sagemaker/latest/dg/sagemaker-roles.html#sagemaker-roles-createtrainingjob-perms // Default: - a role will be created. // Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // Sets a time limit for training. // Default: - max runtime of 1 hour. // StoppingCondition *StoppingCondition `field:"optional" json:"stoppingCondition" yaml:"stoppingCondition"` // Tags to be applied to the train job. // Default: - No tags. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` // Specifies the VPC that you want your training job to connect to. // Default: - No VPC. // VpcConfig *VpcConfig `field:"optional" json:"vpcConfig" yaml:"vpcConfig"` }
Properties for creating an Amazon SageMaker training job using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var dockerImage dockerImage var hyperparameters interface{} var instanceType instanceType var key key var resultSelector interface{} var role role var s3Location s3Location var size size var subnet subnet var subnetFilter subnetFilter var taskRole taskRole var timeout timeout var vpc vpc sageMakerCreateTrainingJobJsonPathProps := &SageMakerCreateTrainingJobJsonPathProps{ AlgorithmSpecification: &AlgorithmSpecification{ AlgorithmName: jsii.String("algorithmName"), MetricDefinitions: []metricDefinition{ &metricDefinition{ Name: jsii.String("name"), Regex: jsii.String("regex"), }, }, TrainingImage: dockerImage, TrainingInputMode: awscdk.Aws_stepfunctions_tasks.InputMode_PIPE, }, OutputDataConfig: &OutputDataConfig{ S3OutputLocation: s3Location, // the properties below are optional EncryptionKey: key, }, TrainingJobName: jsii.String("trainingJobName"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, EnableNetworkIsolation: jsii.Boolean(false), Environment: map[string]*string{ "environmentKey": jsii.String("environment"), }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, Hyperparameters: map[string]interface{}{ "hyperparametersKey": hyperparameters, }, InputDataConfig: []channel{ &channel{ ChannelName: jsii.String("channelName"), DataSource: &DataSource{ S3DataSource: &S3DataSource{ S3Location: s3Location, // the properties below are optional AttributeNames: []*string{ jsii.String("attributeNames"), }, S3DataDistributionType: awscdk.*Aws_stepfunctions_tasks.S3DataDistributionType_FULLY_REPLICATED, S3DataType: awscdk.*Aws_stepfunctions_tasks.S3DataType_MANIFEST_FILE, }, }, // the properties below are optional CompressionType: awscdk.*Aws_stepfunctions_tasks.CompressionType_NONE, ContentType: jsii.String("contentType"), InputMode: awscdk.*Aws_stepfunctions_tasks.InputMode_PIPE, RecordWrapperType: awscdk.*Aws_stepfunctions_tasks.RecordWrapperType_NONE, ShuffleConfig: &ShuffleConfig{ Seed: jsii.Number(123), }, }, }, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResourceConfig: &ResourceConfig{ InstanceCount: jsii.Number(123), InstanceType: instanceType, VolumeSize: size, // the properties below are optional VolumeEncryptionKey: key, }, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, Role: role, StateName: jsii.String("stateName"), StoppingCondition: &StoppingCondition{ MaxRuntime: cdk.Duration_*Minutes(jsii.Number(30)), }, Tags: map[string]*string{ "tagsKey": jsii.String("tags"), }, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), VpcConfig: &VpcConfig{ Vpc: vpc, // the properties below are optional Subnets: &SubnetSelection{ AvailabilityZones: []*string{ jsii.String("availabilityZones"), }, OnePerAz: jsii.Boolean(false), SubnetFilters: []*subnetFilter{ subnetFilter, }, SubnetGroupName: jsii.String("subnetGroupName"), Subnets: []iSubnet{ subnet, }, SubnetType: awscdk.Aws_ec2.SubnetType_PRIVATE_ISOLATED, }, }, }
type SageMakerCreateTrainingJobJsonataProps ¶ added in v2.178.0
type SageMakerCreateTrainingJobJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Identifies the training algorithm to use. AlgorithmSpecification *AlgorithmSpecification `field:"required" json:"algorithmSpecification" yaml:"algorithmSpecification"` // Identifies the Amazon S3 location where you want Amazon SageMaker to save the results of model training. OutputDataConfig *OutputDataConfig `field:"required" json:"outputDataConfig" yaml:"outputDataConfig"` // Training Job Name. TrainingJobName *string `field:"required" json:"trainingJobName" yaml:"trainingJobName"` // Isolates the training container. // // No inbound or outbound network calls can be made to or from the training container. // Default: false. // EnableNetworkIsolation *bool `field:"optional" json:"enableNetworkIsolation" yaml:"enableNetworkIsolation"` // Environment variables to set in the Docker container. // Default: - No environment variables. // Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // Algorithm-specific parameters that influence the quality of the model. // // Set hyperparameters before you start the learning process. // For a list of hyperparameters provided by Amazon SageMaker. // See: https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html // // Default: - No hyperparameters. // Hyperparameters *map[string]interface{} `field:"optional" json:"hyperparameters" yaml:"hyperparameters"` // Describes the various datasets (e.g. train, validation, test) and the Amazon S3 location where stored. // Default: - No inputDataConfig. // InputDataConfig *[]*Channel `field:"optional" json:"inputDataConfig" yaml:"inputDataConfig"` // Specifies the resources, ML compute instances, and ML storage volumes to deploy for model training. // Default: - 1 instance of EC2 `M4.XLarge` with `10GB` volume // ResourceConfig *ResourceConfig `field:"optional" json:"resourceConfig" yaml:"resourceConfig"` // Role for the Training Job. // // The role must be granted all necessary permissions for the SageMaker training job to // be able to operate. // // See https://docs.aws.amazon.com/fr_fr/sagemaker/latest/dg/sagemaker-roles.html#sagemaker-roles-createtrainingjob-perms // Default: - a role will be created. // Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // Sets a time limit for training. // Default: - max runtime of 1 hour. // StoppingCondition *StoppingCondition `field:"optional" json:"stoppingCondition" yaml:"stoppingCondition"` // Tags to be applied to the train job. // Default: - No tags. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` // Specifies the VPC that you want your training job to connect to. // Default: - No VPC. // VpcConfig *VpcConfig `field:"optional" json:"vpcConfig" yaml:"vpcConfig"` }
Properties for creating an Amazon SageMaker training job using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var dockerImage dockerImage var hyperparameters interface{} var instanceType instanceType var key key var outputs interface{} var role role var s3Location s3Location var size size var subnet subnet var subnetFilter subnetFilter var taskRole taskRole var timeout timeout var vpc vpc sageMakerCreateTrainingJobJsonataProps := &SageMakerCreateTrainingJobJsonataProps{ AlgorithmSpecification: &AlgorithmSpecification{ AlgorithmName: jsii.String("algorithmName"), MetricDefinitions: []metricDefinition{ &metricDefinition{ Name: jsii.String("name"), Regex: jsii.String("regex"), }, }, TrainingImage: dockerImage, TrainingInputMode: awscdk.Aws_stepfunctions_tasks.InputMode_PIPE, }, OutputDataConfig: &OutputDataConfig{ S3OutputLocation: s3Location, // the properties below are optional EncryptionKey: key, }, TrainingJobName: jsii.String("trainingJobName"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, EnableNetworkIsolation: jsii.Boolean(false), Environment: map[string]*string{ "environmentKey": jsii.String("environment"), }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, Hyperparameters: map[string]interface{}{ "hyperparametersKey": hyperparameters, }, InputDataConfig: []channel{ &channel{ ChannelName: jsii.String("channelName"), DataSource: &DataSource{ S3DataSource: &S3DataSource{ S3Location: s3Location, // the properties below are optional AttributeNames: []*string{ jsii.String("attributeNames"), }, S3DataDistributionType: awscdk.*Aws_stepfunctions_tasks.S3DataDistributionType_FULLY_REPLICATED, S3DataType: awscdk.*Aws_stepfunctions_tasks.S3DataType_MANIFEST_FILE, }, }, // the properties below are optional CompressionType: awscdk.*Aws_stepfunctions_tasks.CompressionType_NONE, ContentType: jsii.String("contentType"), InputMode: awscdk.*Aws_stepfunctions_tasks.InputMode_PIPE, RecordWrapperType: awscdk.*Aws_stepfunctions_tasks.RecordWrapperType_NONE, ShuffleConfig: &ShuffleConfig{ Seed: jsii.Number(123), }, }, }, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResourceConfig: &ResourceConfig{ InstanceCount: jsii.Number(123), InstanceType: instanceType, VolumeSize: size, // the properties below are optional VolumeEncryptionKey: key, }, Role: role, StateName: jsii.String("stateName"), StoppingCondition: &StoppingCondition{ MaxRuntime: cdk.Duration_*Minutes(jsii.Number(30)), }, Tags: map[string]*string{ "tagsKey": jsii.String("tags"), }, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), VpcConfig: &VpcConfig{ Vpc: vpc, // the properties below are optional Subnets: &SubnetSelection{ AvailabilityZones: []*string{ jsii.String("availabilityZones"), }, OnePerAz: jsii.Boolean(false), SubnetFilters: []*subnetFilter{ subnetFilter, }, SubnetGroupName: jsii.String("subnetGroupName"), Subnets: []iSubnet{ subnet, }, SubnetType: awscdk.Aws_ec2.SubnetType_PRIVATE_ISOLATED, }, }, }
type SageMakerCreateTrainingJobProps ¶
type SageMakerCreateTrainingJobProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Identifies the training algorithm to use. AlgorithmSpecification *AlgorithmSpecification `field:"required" json:"algorithmSpecification" yaml:"algorithmSpecification"` // Identifies the Amazon S3 location where you want Amazon SageMaker to save the results of model training. OutputDataConfig *OutputDataConfig `field:"required" json:"outputDataConfig" yaml:"outputDataConfig"` // Training Job Name. TrainingJobName *string `field:"required" json:"trainingJobName" yaml:"trainingJobName"` // Isolates the training container. // // No inbound or outbound network calls can be made to or from the training container. // Default: false. // EnableNetworkIsolation *bool `field:"optional" json:"enableNetworkIsolation" yaml:"enableNetworkIsolation"` // Environment variables to set in the Docker container. // Default: - No environment variables. // Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // Algorithm-specific parameters that influence the quality of the model. // // Set hyperparameters before you start the learning process. // For a list of hyperparameters provided by Amazon SageMaker. // See: https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html // // Default: - No hyperparameters. // Hyperparameters *map[string]interface{} `field:"optional" json:"hyperparameters" yaml:"hyperparameters"` // Describes the various datasets (e.g. train, validation, test) and the Amazon S3 location where stored. // Default: - No inputDataConfig. // InputDataConfig *[]*Channel `field:"optional" json:"inputDataConfig" yaml:"inputDataConfig"` // Specifies the resources, ML compute instances, and ML storage volumes to deploy for model training. // Default: - 1 instance of EC2 `M4.XLarge` with `10GB` volume // ResourceConfig *ResourceConfig `field:"optional" json:"resourceConfig" yaml:"resourceConfig"` // Role for the Training Job. // // The role must be granted all necessary permissions for the SageMaker training job to // be able to operate. // // See https://docs.aws.amazon.com/fr_fr/sagemaker/latest/dg/sagemaker-roles.html#sagemaker-roles-createtrainingjob-perms // Default: - a role will be created. // Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // Sets a time limit for training. // Default: - max runtime of 1 hour. // StoppingCondition *StoppingCondition `field:"optional" json:"stoppingCondition" yaml:"stoppingCondition"` // Tags to be applied to the train job. // Default: - No tags. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` // Specifies the VPC that you want your training job to connect to. // Default: - No VPC. // VpcConfig *VpcConfig `field:"optional" json:"vpcConfig" yaml:"vpcConfig"` }
Properties for creating an Amazon SageMaker training job.
Example:
tasks.NewSageMakerCreateTrainingJob(this, jsii.String("TrainSagemaker"), &SageMakerCreateTrainingJobProps{ TrainingJobName: sfn.JsonPath_StringAt(jsii.String("$.JobName")), AlgorithmSpecification: &AlgorithmSpecification{ AlgorithmName: jsii.String("BlazingText"), TrainingInputMode: tasks.InputMode_FILE, }, InputDataConfig: []channel{ &channel{ ChannelName: jsii.String("train"), DataSource: &DataSource{ S3DataSource: &S3DataSource{ S3DataType: tasks.S3DataType_S3_PREFIX, S3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.S3Bucket")), }, }, }, }, OutputDataConfig: &OutputDataConfig{ S3OutputLocation: tasks.S3Location_FromBucket(s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("amzn-s3-demo-bucket")), jsii.String("myoutputpath")), }, ResourceConfig: &ResourceConfig{ InstanceCount: jsii.Number(1), InstanceType: ec2.NewInstanceType(sfn.JsonPath_*StringAt(jsii.String("$.InstanceType"))), VolumeSize: awscdk.Size_Gibibytes(jsii.Number(50)), }, // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume StoppingCondition: &StoppingCondition{ MaxRuntime: awscdk.Duration_Hours(jsii.Number(2)), }, })
type SageMakerCreateTransformJob ¶
type SageMakerCreateTransformJob interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // The execution role for the Sagemaker transform job. // // Only available after task has been added to a state machine. Role() awsiam.IRole // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
Class representing the SageMaker Create Transform Job task.
Example:
tasks.NewSageMakerCreateTransformJob(this, jsii.String("Batch Inference"), &SageMakerCreateTransformJobProps{ TransformJobName: jsii.String("MyTransformJob"), ModelName: jsii.String("MyModelName"), ModelClientOptions: &ModelClientOptions{ InvocationsMaxRetries: jsii.Number(3), // default is 0 InvocationsTimeout: awscdk.Duration_Minutes(jsii.Number(5)), }, TransformInput: &TransformInput{ TransformDataSource: &TransformDataSource{ S3DataSource: &TransformS3DataSource{ S3Uri: jsii.String("s3://inputbucket/train"), S3DataType: tasks.S3DataType_S3_PREFIX, }, }, }, TransformOutput: &TransformOutput{ S3OutputPath: jsii.String("s3://outputbucket/TransformJobOutputPath"), }, TransformResources: &TransformResources{ InstanceCount: jsii.Number(1), InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_M4, ec2.InstanceSize_XLARGE), }, })
func NewSageMakerCreateTransformJob ¶
func NewSageMakerCreateTransformJob(scope constructs.Construct, id *string, props *SageMakerCreateTransformJobProps) SageMakerCreateTransformJob
func SageMakerCreateTransformJob_JsonPath ¶ added in v2.178.0
func SageMakerCreateTransformJob_JsonPath(scope constructs.Construct, id *string, props *SageMakerCreateTransformJobJsonPathProps) SageMakerCreateTransformJob
Class representing the SageMaker Create Transform Job task using JSONPath.
func SageMakerCreateTransformJob_Jsonata ¶ added in v2.178.0
func SageMakerCreateTransformJob_Jsonata(scope constructs.Construct, id *string, props *SageMakerCreateTransformJobJsonataProps) SageMakerCreateTransformJob
Class representing the SageMaker Create Transform Job task using JSONata.
type SageMakerCreateTransformJobJsonPathProps ¶ added in v2.178.0
type SageMakerCreateTransformJobJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Name of the model that you want to use for the transform job. ModelName *string `field:"required" json:"modelName" yaml:"modelName"` // Dataset to be transformed and the Amazon S3 location where it is stored. TransformInput *TransformInput `field:"required" json:"transformInput" yaml:"transformInput"` // Transform Job Name. TransformJobName *string `field:"required" json:"transformJobName" yaml:"transformJobName"` // S3 location where you want Amazon SageMaker to save the results from the transform job. TransformOutput *TransformOutput `field:"required" json:"transformOutput" yaml:"transformOutput"` // Number of records to include in a mini-batch for an HTTP inference request. // Default: - No batch strategy. // BatchStrategy BatchStrategy `field:"optional" json:"batchStrategy" yaml:"batchStrategy"` // Environment variables to set in the Docker container. // Default: - No environment variables. // Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // Maximum number of parallel requests that can be sent to each instance in a transform job. // Default: - Amazon SageMaker checks the optional execution-parameters to determine the settings for your chosen algorithm. // If the execution-parameters endpoint is not enabled, the default value is 1. // MaxConcurrentTransforms *float64 `field:"optional" json:"maxConcurrentTransforms" yaml:"maxConcurrentTransforms"` // Maximum allowed size of the payload, in MB. // Default: 6. // MaxPayload awscdk.Size `field:"optional" json:"maxPayload" yaml:"maxPayload"` // Configures the timeout and maximum number of retries for processing a transform job invocation. // Default: - 0 retries and 60 seconds of timeout. // ModelClientOptions *ModelClientOptions `field:"optional" json:"modelClientOptions" yaml:"modelClientOptions"` // Role for the Transform Job. // Default: - A role is created with `AmazonSageMakerFullAccess` managed policy. // Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // Tags to be applied to the train job. // Default: - No tags. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` // ML compute instances for the transform job. // Default: - 1 instance of type M4.XLarge // TransformResources *TransformResources `field:"optional" json:"transformResources" yaml:"transformResources"` }
Properties for creating an Amazon SageMaker transform job task using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var instanceType instanceType var key key var resultSelector interface{} var role role var size size var taskRole taskRole var timeout timeout sageMakerCreateTransformJobJsonPathProps := &SageMakerCreateTransformJobJsonPathProps{ ModelName: jsii.String("modelName"), TransformInput: &TransformInput{ TransformDataSource: &TransformDataSource{ S3DataSource: &TransformS3DataSource{ S3Uri: jsii.String("s3Uri"), // the properties below are optional S3DataType: awscdk.Aws_stepfunctions_tasks.S3DataType_MANIFEST_FILE, }, }, // the properties below are optional CompressionType: awscdk.*Aws_stepfunctions_tasks.CompressionType_NONE, ContentType: jsii.String("contentType"), SplitType: awscdk.*Aws_stepfunctions_tasks.SplitType_NONE, }, TransformJobName: jsii.String("transformJobName"), TransformOutput: &TransformOutput{ S3OutputPath: jsii.String("s3OutputPath"), // the properties below are optional Accept: jsii.String("accept"), AssembleWith: awscdk.*Aws_stepfunctions_tasks.AssembleWith_NONE, EncryptionKey: key, }, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, BatchStrategy: awscdk.*Aws_stepfunctions_tasks.BatchStrategy_MULTI_RECORD, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Environment: map[string]*string{ "environmentKey": jsii.String("environment"), }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, MaxConcurrentTransforms: jsii.Number(123), MaxPayload: size, ModelClientOptions: &ModelClientOptions{ InvocationsMaxRetries: jsii.Number(123), InvocationsTimeout: cdk.Duration_*Minutes(jsii.Number(30)), }, OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, Role: role, StateName: jsii.String("stateName"), Tags: map[string]*string{ "tagsKey": jsii.String("tags"), }, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), TransformResources: &TransformResources{ InstanceCount: jsii.Number(123), InstanceType: instanceType, // the properties below are optional VolumeEncryptionKey: key, }, }
type SageMakerCreateTransformJobJsonataProps ¶ added in v2.178.0
type SageMakerCreateTransformJobJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Name of the model that you want to use for the transform job. ModelName *string `field:"required" json:"modelName" yaml:"modelName"` // Dataset to be transformed and the Amazon S3 location where it is stored. TransformInput *TransformInput `field:"required" json:"transformInput" yaml:"transformInput"` // Transform Job Name. TransformJobName *string `field:"required" json:"transformJobName" yaml:"transformJobName"` // S3 location where you want Amazon SageMaker to save the results from the transform job. TransformOutput *TransformOutput `field:"required" json:"transformOutput" yaml:"transformOutput"` // Number of records to include in a mini-batch for an HTTP inference request. // Default: - No batch strategy. // BatchStrategy BatchStrategy `field:"optional" json:"batchStrategy" yaml:"batchStrategy"` // Environment variables to set in the Docker container. // Default: - No environment variables. // Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // Maximum number of parallel requests that can be sent to each instance in a transform job. // Default: - Amazon SageMaker checks the optional execution-parameters to determine the settings for your chosen algorithm. // If the execution-parameters endpoint is not enabled, the default value is 1. // MaxConcurrentTransforms *float64 `field:"optional" json:"maxConcurrentTransforms" yaml:"maxConcurrentTransforms"` // Maximum allowed size of the payload, in MB. // Default: 6. // MaxPayload awscdk.Size `field:"optional" json:"maxPayload" yaml:"maxPayload"` // Configures the timeout and maximum number of retries for processing a transform job invocation. // Default: - 0 retries and 60 seconds of timeout. // ModelClientOptions *ModelClientOptions `field:"optional" json:"modelClientOptions" yaml:"modelClientOptions"` // Role for the Transform Job. // Default: - A role is created with `AmazonSageMakerFullAccess` managed policy. // Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // Tags to be applied to the train job. // Default: - No tags. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` // ML compute instances for the transform job. // Default: - 1 instance of type M4.XLarge // TransformResources *TransformResources `field:"optional" json:"transformResources" yaml:"transformResources"` }
Properties for creating an Amazon SageMaker transform job task using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var instanceType instanceType var key key var outputs interface{} var role role var size size var taskRole taskRole var timeout timeout sageMakerCreateTransformJobJsonataProps := &SageMakerCreateTransformJobJsonataProps{ ModelName: jsii.String("modelName"), TransformInput: &TransformInput{ TransformDataSource: &TransformDataSource{ S3DataSource: &TransformS3DataSource{ S3Uri: jsii.String("s3Uri"), // the properties below are optional S3DataType: awscdk.Aws_stepfunctions_tasks.S3DataType_MANIFEST_FILE, }, }, // the properties below are optional CompressionType: awscdk.*Aws_stepfunctions_tasks.CompressionType_NONE, ContentType: jsii.String("contentType"), SplitType: awscdk.*Aws_stepfunctions_tasks.SplitType_NONE, }, TransformJobName: jsii.String("transformJobName"), TransformOutput: &TransformOutput{ S3OutputPath: jsii.String("s3OutputPath"), // the properties below are optional Accept: jsii.String("accept"), AssembleWith: awscdk.*Aws_stepfunctions_tasks.AssembleWith_NONE, EncryptionKey: key, }, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, BatchStrategy: awscdk.*Aws_stepfunctions_tasks.BatchStrategy_MULTI_RECORD, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Environment: map[string]*string{ "environmentKey": jsii.String("environment"), }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, MaxConcurrentTransforms: jsii.Number(123), MaxPayload: size, ModelClientOptions: &ModelClientOptions{ InvocationsMaxRetries: jsii.Number(123), InvocationsTimeout: cdk.Duration_*Minutes(jsii.Number(30)), }, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, Role: role, StateName: jsii.String("stateName"), Tags: map[string]*string{ "tagsKey": jsii.String("tags"), }, TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), TransformResources: &TransformResources{ InstanceCount: jsii.Number(123), InstanceType: instanceType, // the properties below are optional VolumeEncryptionKey: key, }, }
type SageMakerCreateTransformJobProps ¶
type SageMakerCreateTransformJobProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Name of the model that you want to use for the transform job. ModelName *string `field:"required" json:"modelName" yaml:"modelName"` // Dataset to be transformed and the Amazon S3 location where it is stored. TransformInput *TransformInput `field:"required" json:"transformInput" yaml:"transformInput"` // Transform Job Name. TransformJobName *string `field:"required" json:"transformJobName" yaml:"transformJobName"` // S3 location where you want Amazon SageMaker to save the results from the transform job. TransformOutput *TransformOutput `field:"required" json:"transformOutput" yaml:"transformOutput"` // Number of records to include in a mini-batch for an HTTP inference request. // Default: - No batch strategy. // BatchStrategy BatchStrategy `field:"optional" json:"batchStrategy" yaml:"batchStrategy"` // Environment variables to set in the Docker container. // Default: - No environment variables. // Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // Maximum number of parallel requests that can be sent to each instance in a transform job. // Default: - Amazon SageMaker checks the optional execution-parameters to determine the settings for your chosen algorithm. // If the execution-parameters endpoint is not enabled, the default value is 1. // MaxConcurrentTransforms *float64 `field:"optional" json:"maxConcurrentTransforms" yaml:"maxConcurrentTransforms"` // Maximum allowed size of the payload, in MB. // Default: 6. // MaxPayload awscdk.Size `field:"optional" json:"maxPayload" yaml:"maxPayload"` // Configures the timeout and maximum number of retries for processing a transform job invocation. // Default: - 0 retries and 60 seconds of timeout. // ModelClientOptions *ModelClientOptions `field:"optional" json:"modelClientOptions" yaml:"modelClientOptions"` // Role for the Transform Job. // Default: - A role is created with `AmazonSageMakerFullAccess` managed policy. // Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // Tags to be applied to the train job. // Default: - No tags. // Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"` // ML compute instances for the transform job. // Default: - 1 instance of type M4.XLarge // TransformResources *TransformResources `field:"optional" json:"transformResources" yaml:"transformResources"` }
Properties for creating an Amazon SageMaker transform job task.
Example:
tasks.NewSageMakerCreateTransformJob(this, jsii.String("Batch Inference"), &SageMakerCreateTransformJobProps{ TransformJobName: jsii.String("MyTransformJob"), ModelName: jsii.String("MyModelName"), ModelClientOptions: &ModelClientOptions{ InvocationsMaxRetries: jsii.Number(3), // default is 0 InvocationsTimeout: awscdk.Duration_Minutes(jsii.Number(5)), }, TransformInput: &TransformInput{ TransformDataSource: &TransformDataSource{ S3DataSource: &TransformS3DataSource{ S3Uri: jsii.String("s3://inputbucket/train"), S3DataType: tasks.S3DataType_S3_PREFIX, }, }, }, TransformOutput: &TransformOutput{ S3OutputPath: jsii.String("s3://outputbucket/TransformJobOutputPath"), }, TransformResources: &TransformResources{ InstanceCount: jsii.Number(1), InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_M4, ec2.InstanceSize_XLARGE), }, })
type SageMakerUpdateEndpoint ¶
type SageMakerUpdateEndpoint interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to update a SageMaker endpoint.
Example:
tasks.NewSageMakerUpdateEndpoint(this, jsii.String("SagemakerEndpoint"), &SageMakerUpdateEndpointProps{ EndpointName: sfn.JsonPath_StringAt(jsii.String("$.Endpoint.Name")), EndpointConfigName: sfn.JsonPath_*StringAt(jsii.String("$.Endpoint.EndpointConfig")), })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
func NewSageMakerUpdateEndpoint ¶
func NewSageMakerUpdateEndpoint(scope constructs.Construct, id *string, props *SageMakerUpdateEndpointProps) SageMakerUpdateEndpoint
func SageMakerUpdateEndpoint_JsonPath ¶ added in v2.178.0
func SageMakerUpdateEndpoint_JsonPath(scope constructs.Construct, id *string, props *SageMakerUpdateEndpointJsonPathProps) SageMakerUpdateEndpoint
A Step Functions Task using JSONPath to update a SageMaker endpoint. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
func SageMakerUpdateEndpoint_Jsonata ¶ added in v2.178.0
func SageMakerUpdateEndpoint_Jsonata(scope constructs.Construct, id *string, props *SageMakerUpdateEndpointJsonataProps) SageMakerUpdateEndpoint
A Step Functions Task using JSONata to update a SageMaker endpoint. See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
type SageMakerUpdateEndpointJsonPathProps ¶ added in v2.178.0
type SageMakerUpdateEndpointJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The name of the new endpoint configuration. EndpointConfigName *string `field:"required" json:"endpointConfigName" yaml:"endpointConfigName"` // The name of the endpoint whose configuration you want to update. EndpointName *string `field:"required" json:"endpointName" yaml:"endpointName"` }
Properties for updating Amazon SageMaker endpoint using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var taskRole taskRole var timeout timeout sageMakerUpdateEndpointJsonPathProps := &SageMakerUpdateEndpointJsonPathProps{ EndpointConfigName: jsii.String("endpointConfigName"), EndpointName: jsii.String("endpointName"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
type SageMakerUpdateEndpointJsonataProps ¶ added in v2.178.0
type SageMakerUpdateEndpointJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The name of the new endpoint configuration. EndpointConfigName *string `field:"required" json:"endpointConfigName" yaml:"endpointConfigName"` // The name of the endpoint whose configuration you want to update. EndpointName *string `field:"required" json:"endpointName" yaml:"endpointName"` }
Properties for updating Amazon SageMaker endpoint using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var taskRole taskRole var timeout timeout sageMakerUpdateEndpointJsonataProps := &SageMakerUpdateEndpointJsonataProps{ EndpointConfigName: jsii.String("endpointConfigName"), EndpointName: jsii.String("endpointName"), // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
type SageMakerUpdateEndpointProps ¶
type SageMakerUpdateEndpointProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The name of the new endpoint configuration. EndpointConfigName *string `field:"required" json:"endpointConfigName" yaml:"endpointConfigName"` // The name of the endpoint whose configuration you want to update. EndpointName *string `field:"required" json:"endpointName" yaml:"endpointName"` }
Properties for updating Amazon SageMaker endpoint.
Example:
tasks.NewSageMakerUpdateEndpoint(this, jsii.String("SagemakerEndpoint"), &SageMakerUpdateEndpointProps{ EndpointName: sfn.JsonPath_StringAt(jsii.String("$.Endpoint.Name")), EndpointConfigName: sfn.JsonPath_*StringAt(jsii.String("$.Endpoint.EndpointConfig")), })
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
type Schedule ¶ added in v2.168.0
type Schedule interface { // The Schedule expression. ExpressionString() *string }
Schedule for EventBridge Scheduler.
Example:
import scheduler "github.com/aws/aws-cdk-go/awscdk" import kms "github.com/aws/aws-cdk-go/awscdk" var key key var scheduleGroup cfnScheduleGroup var targetQueue queue var deadLetterQueue queue schedulerRole := iam.NewRole(this, jsii.String("SchedulerRole"), &RoleProps{ AssumedBy: iam.NewServicePrincipal(jsii.String("scheduler.amazonaws.com")), }) // To send the message to the queue // This policy changes depending on the type of target. schedulerRole.AddToPrincipalPolicy(iam.NewPolicyStatement(&PolicyStatementProps{ Actions: []*string{ jsii.String("sqs:SendMessage"), }, Resources: []*string{ targetQueue.QueueArn, }, })) createScheduleTask1 := tasks.NewEventBridgeSchedulerCreateScheduleTask(this, jsii.String("createSchedule"), &EventBridgeSchedulerCreateScheduleTaskProps{ ScheduleName: jsii.String("TestSchedule"), ActionAfterCompletion: tasks.ActionAfterCompletion_NONE, ClientToken: jsii.String("testToken"), Description: jsii.String("TestDescription"), StartDate: NewDate(), EndDate: NewDate(NewDate().getTime() + 1000 * 60 * 60), FlexibleTimeWindow: awscdk.Duration_Minutes(jsii.Number(5)), GroupName: scheduleGroup.ref, KmsKey: key, Schedule: tasks.Schedule_Rate(awscdk.Duration_*Minutes(jsii.Number(5))), Timezone: jsii.String("UTC"), Enabled: jsii.Boolean(true), Target: tasks.NewEventBridgeSchedulerTarget(&EventBridgeSchedulerTargetProps{ Arn: targetQueue.*QueueArn, Role: schedulerRole, RetryPolicy: &RetryPolicy{ MaximumRetryAttempts: jsii.Number(2), MaximumEventAge: awscdk.Duration_*Minutes(jsii.Number(5)), }, DeadLetterQueue: *DeadLetterQueue, }), })
func Schedule_Cron ¶ added in v2.168.0
func Schedule_Cron(options *CronOptions) Schedule
Create a cron-based schedule from a set of cron fields.
func Schedule_OneTime ¶ added in v2.168.0
Construct a one-time schedule from a Date.
func Schedule_Rate ¶ added in v2.168.0
func Schedule_Rate(duration awscdk.Duration) Schedule
Construct a rate-based schedule from an interval.
The minimum interval is 1 minute.
type ShuffleConfig ¶
type ShuffleConfig struct { // Determines the shuffling order. Seed *float64 `field:"required" json:"seed" yaml:"seed"` }
Configuration for a shuffle option for input data in a channel.
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" shuffleConfig := &ShuffleConfig{ Seed: jsii.Number(123), }
type SnsPublish ¶
type SnsPublish interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to publish messages to SNS topic.
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 NewSnsPublish ¶
func NewSnsPublish(scope constructs.Construct, id *string, props *SnsPublishProps) SnsPublish
func SnsPublish_JsonPath ¶ added in v2.178.0
func SnsPublish_JsonPath(scope constructs.Construct, id *string, props *SnsPublishJsonPathProps) SnsPublish
A Step Functions Task to publish messages to SNS topic using JSONPath.
func SnsPublish_Jsonata ¶ added in v2.178.0
func SnsPublish_Jsonata(scope constructs.Construct, id *string, props *SnsPublishJsonataProps) SnsPublish
A Step Functions Task to publish messages to SNS topic using JSONata.
type SnsPublishJsonPathProps ¶ added in v2.178.0
type SnsPublishJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The message you want to send. // // With the exception of SMS, messages must be UTF-8 encoded strings and // at most 256 KB in size. // For SMS, each message can contain up to 140 characters. Message awsstepfunctions.TaskInput `field:"required" json:"message" yaml:"message"` // The SNS topic that the task will publish to. Topic awssns.ITopic `field:"required" json:"topic" yaml:"topic"` // Add message attributes when publishing. // // These attributes carry additional metadata about the message and may be used // for subscription filters. // See: https://docs.aws.amazon.com/sns/latest/dg/sns-message-attributes.html // // Default: {}. // MessageAttributes *map[string]*MessageAttribute `field:"optional" json:"messageAttributes" yaml:"messageAttributes"` // This parameter applies only to FIFO topics. // // Every message must have a unique MessageDeduplicationId, which is a token used for deduplication of sent messages. // If a message with a particular MessageDeduplicationId is sent successfully, any message sent with the same MessageDeduplicationId // during the 5-minute deduplication interval is treated as a duplicate. // // If the topic has ContentBasedDeduplication set, the system generates a MessageDeduplicationId // based on the contents of the message. Your MessageDeduplicationId overrides the generated one. // Default: - Not used for standard topics, required for FIFO topics with ContentBasedDeduplication disabled. // MessageDeduplicationId *string `field:"optional" json:"messageDeduplicationId" yaml:"messageDeduplicationId"` // This parameter applies only to FIFO topics. // // The MessageGroupId is a tag that specifies that a message belongs to a specific message group. // Messages that belong to the same message group are processed in a FIFO manner // (however, messages in different message groups might be processed out of order). // Every message must include a MessageGroupId. // Default: - Not used for standard topics, required for FIFO topics. // MessageGroupId *string `field:"optional" json:"messageGroupId" yaml:"messageGroupId"` // Send different messages for each transport protocol. // // For example, you might want to send a shorter message to SMS subscribers // and a more verbose message to email and SQS subscribers. // // Your message must be a JSON object with a top-level JSON key of // "default" with a value that is a string // You can define other top-level keys that define the message you want to // send to a specific transport protocol (i.e. "sqs", "email", "http", etc) // See: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html#API_Publish_RequestParameters // // Default: false. // MessagePerSubscriptionType *bool `field:"optional" json:"messagePerSubscriptionType" yaml:"messagePerSubscriptionType"` // Used as the "Subject" line when the message is delivered to email endpoints. // // This field will also be included, if present, in the standard JSON messages // delivered to other endpoints. // Default: - No subject. // Subject *string `field:"optional" json:"subject" yaml:"subject"` }
Properties for publishing a message to an SNS topic using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var taskInput taskInput var taskRole taskRole var timeout timeout var topic topic var value interface{} snsPublishJsonPathProps := &SnsPublishJsonPathProps{ Message: taskInput, Topic: topic, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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, MessageAttributes: map[string]messageAttribute{ "messageAttributesKey": &messageAttribute{ "value": value, // the properties below are optional "dataType": awscdk.aws_stepfunctions_tasks.MessageAttributeDataType_STRING, }, }, MessageDeduplicationId: jsii.String("messageDeduplicationId"), MessageGroupId: jsii.String("messageGroupId"), MessagePerSubscriptionType: jsii.Boolean(false), OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), Subject: jsii.String("subject"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type SnsPublishJsonataProps ¶ added in v2.178.0
type SnsPublishJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The message you want to send. // // With the exception of SMS, messages must be UTF-8 encoded strings and // at most 256 KB in size. // For SMS, each message can contain up to 140 characters. Message awsstepfunctions.TaskInput `field:"required" json:"message" yaml:"message"` // The SNS topic that the task will publish to. Topic awssns.ITopic `field:"required" json:"topic" yaml:"topic"` // Add message attributes when publishing. // // These attributes carry additional metadata about the message and may be used // for subscription filters. // See: https://docs.aws.amazon.com/sns/latest/dg/sns-message-attributes.html // // Default: {}. // MessageAttributes *map[string]*MessageAttribute `field:"optional" json:"messageAttributes" yaml:"messageAttributes"` // This parameter applies only to FIFO topics. // // Every message must have a unique MessageDeduplicationId, which is a token used for deduplication of sent messages. // If a message with a particular MessageDeduplicationId is sent successfully, any message sent with the same MessageDeduplicationId // during the 5-minute deduplication interval is treated as a duplicate. // // If the topic has ContentBasedDeduplication set, the system generates a MessageDeduplicationId // based on the contents of the message. Your MessageDeduplicationId overrides the generated one. // Default: - Not used for standard topics, required for FIFO topics with ContentBasedDeduplication disabled. // MessageDeduplicationId *string `field:"optional" json:"messageDeduplicationId" yaml:"messageDeduplicationId"` // This parameter applies only to FIFO topics. // // The MessageGroupId is a tag that specifies that a message belongs to a specific message group. // Messages that belong to the same message group are processed in a FIFO manner // (however, messages in different message groups might be processed out of order). // Every message must include a MessageGroupId. // Default: - Not used for standard topics, required for FIFO topics. // MessageGroupId *string `field:"optional" json:"messageGroupId" yaml:"messageGroupId"` // Send different messages for each transport protocol. // // For example, you might want to send a shorter message to SMS subscribers // and a more verbose message to email and SQS subscribers. // // Your message must be a JSON object with a top-level JSON key of // "default" with a value that is a string // You can define other top-level keys that define the message you want to // send to a specific transport protocol (i.e. "sqs", "email", "http", etc) // See: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html#API_Publish_RequestParameters // // Default: false. // MessagePerSubscriptionType *bool `field:"optional" json:"messagePerSubscriptionType" yaml:"messagePerSubscriptionType"` // Used as the "Subject" line when the message is delivered to email endpoints. // // This field will also be included, if present, in the standard JSON messages // delivered to other endpoints. // Default: - No subject. // Subject *string `field:"optional" json:"subject" yaml:"subject"` }
Properties for publishing a message to an SNS topic using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var taskInput taskInput var taskRole taskRole var timeout timeout var topic topic var value interface{} snsPublishJsonataProps := &SnsPublishJsonataProps{ Message: taskInput, Topic: topic, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, MessageAttributes: map[string]messageAttribute{ "messageAttributesKey": &messageAttribute{ "value": value, // the properties below are optional "dataType": awscdk.aws_stepfunctions_tasks.MessageAttributeDataType_STRING, }, }, MessageDeduplicationId: jsii.String("messageDeduplicationId"), MessageGroupId: jsii.String("messageGroupId"), MessagePerSubscriptionType: jsii.Boolean(false), Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), Subject: jsii.String("subject"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type SnsPublishProps ¶
type SnsPublishProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The message you want to send. // // With the exception of SMS, messages must be UTF-8 encoded strings and // at most 256 KB in size. // For SMS, each message can contain up to 140 characters. Message awsstepfunctions.TaskInput `field:"required" json:"message" yaml:"message"` // The SNS topic that the task will publish to. Topic awssns.ITopic `field:"required" json:"topic" yaml:"topic"` // Add message attributes when publishing. // // These attributes carry additional metadata about the message and may be used // for subscription filters. // See: https://docs.aws.amazon.com/sns/latest/dg/sns-message-attributes.html // // Default: {}. // MessageAttributes *map[string]*MessageAttribute `field:"optional" json:"messageAttributes" yaml:"messageAttributes"` // This parameter applies only to FIFO topics. // // Every message must have a unique MessageDeduplicationId, which is a token used for deduplication of sent messages. // If a message with a particular MessageDeduplicationId is sent successfully, any message sent with the same MessageDeduplicationId // during the 5-minute deduplication interval is treated as a duplicate. // // If the topic has ContentBasedDeduplication set, the system generates a MessageDeduplicationId // based on the contents of the message. Your MessageDeduplicationId overrides the generated one. // Default: - Not used for standard topics, required for FIFO topics with ContentBasedDeduplication disabled. // MessageDeduplicationId *string `field:"optional" json:"messageDeduplicationId" yaml:"messageDeduplicationId"` // This parameter applies only to FIFO topics. // // The MessageGroupId is a tag that specifies that a message belongs to a specific message group. // Messages that belong to the same message group are processed in a FIFO manner // (however, messages in different message groups might be processed out of order). // Every message must include a MessageGroupId. // Default: - Not used for standard topics, required for FIFO topics. // MessageGroupId *string `field:"optional" json:"messageGroupId" yaml:"messageGroupId"` // Send different messages for each transport protocol. // // For example, you might want to send a shorter message to SMS subscribers // and a more verbose message to email and SQS subscribers. // // Your message must be a JSON object with a top-level JSON key of // "default" with a value that is a string // You can define other top-level keys that define the message you want to // send to a specific transport protocol (i.e. "sqs", "email", "http", etc) // See: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html#API_Publish_RequestParameters // // Default: false. // MessagePerSubscriptionType *bool `field:"optional" json:"messagePerSubscriptionType" yaml:"messagePerSubscriptionType"` // Used as the "Subject" line when the message is delivered to email endpoints. // // This field will also be included, if present, in the standard JSON messages // delivered to other endpoints. // Default: - No subject. // Subject *string `field:"optional" json:"subject" yaml:"subject"` }
Properties for publishing a message to an SNS topic.
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 SparkSubmitJobDriver ¶ added in v2.1.0
type SparkSubmitJobDriver struct { // The entry point of job application. // // Length Constraints: Minimum length of 1. Maximum length of 256. EntryPoint awsstepfunctions.TaskInput `field:"required" json:"entryPoint" yaml:"entryPoint"` // The arguments for a job application in a task input object containing an array of strings. // // Length Constraints: Minimum length of 1. Maximum length of 10280. // Default: - No arguments defined. // EntryPointArguments awsstepfunctions.TaskInput `field:"optional" json:"entryPointArguments" yaml:"entryPointArguments"` // The Spark submit parameters that are used for job runs. // // Length Constraints: Minimum length of 1. Maximum length of 102400. // Default: - No spark submit parameters. // SparkSubmitParameters *string `field:"optional" json:"sparkSubmitParameters" yaml:"sparkSubmitParameters"` }
The information about job driver for Spark submit.
Example:
tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{ VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")), ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(), JobName: jsii.String("EMR-Containers-Job"), JobDriver: &JobDriver{ SparkSubmitJobDriver: &SparkSubmitJobDriver{ EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")), }, }, ApplicationConfig: []applicationConfiguration{ &applicationConfiguration{ Classification: tasks.Classification_SPARK_DEFAULTS(), Properties: map[string]*string{ "spark.executor.instances": jsii.String("1"), "spark.executor.memory": jsii.String("512M"), }, }, }, })
type SplitType ¶
type SplitType string
Method to use to split the transform job's data files into smaller batches.
const ( // Input data files are not split,. SplitType_NONE SplitType = "NONE" // Split records on a newline character boundary. SplitType_LINE SplitType = "LINE" // Split using MXNet RecordIO format. SplitType_RECORD_IO SplitType = "RECORD_IO" // Split using TensorFlow TFRecord format. SplitType_TF_RECORD SplitType = "TF_RECORD" )
type SqsSendMessage ¶
type SqsSendMessage interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A StepFunctions Task to send messages to SQS queue.
Example:
queue := sqs.NewQueue(this, jsii.String("Queue")) // Use a field from the execution data as message. task1 := tasks.NewSqsSendMessage(this, jsii.String("Send1"), &SqsSendMessageProps{ Queue: Queue, MessageBody: sfn.TaskInput_FromJsonPathAt(jsii.String("$.message")), }) // Combine a field from the execution data with // a literal object. task2 := tasks.NewSqsSendMessage(this, jsii.String("Send2"), &SqsSendMessageProps{ Queue: Queue, MessageBody: sfn.TaskInput_FromObject(map[string]interface{}{ "field1": jsii.String("somedata"), "field2": sfn.JsonPath_stringAt(jsii.String("$.field2")), }), })
func NewSqsSendMessage ¶
func NewSqsSendMessage(scope constructs.Construct, id *string, props *SqsSendMessageProps) SqsSendMessage
func SqsSendMessage_JsonPath ¶ added in v2.178.0
func SqsSendMessage_JsonPath(scope constructs.Construct, id *string, props *SqsSendMessageJsonPathProps) SqsSendMessage
A StepFunctions Task to send messages to SQS queue using JSONPath.
func SqsSendMessage_Jsonata ¶ added in v2.178.0
func SqsSendMessage_Jsonata(scope constructs.Construct, id *string, props *SqsSendMessageJsonataProps) SqsSendMessage
A StepFunctions Task to send messages to SQS queue using JSONata.
type SqsSendMessageJsonPathProps ¶ added in v2.178.0
type SqsSendMessageJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The text message to send to the queue. MessageBody awsstepfunctions.TaskInput `field:"required" json:"messageBody" yaml:"messageBody"` // The SQS queue that messages will be sent to. Queue awssqs.IQueue `field:"required" json:"queue" yaml:"queue"` // The length of time, for which to delay a message. // // Messages that you send to the queue remain invisible to consumers for the duration // of the delay period. The maximum allowed delay is 15 minutes. // Default: - delay set on the queue. If a delay is not set on the queue, // messages are sent immediately (0 seconds). // Delay awscdk.Duration `field:"optional" json:"delay" yaml:"delay"` // The token used for deduplication of sent messages. // // Any messages sent with the same deduplication ID are accepted successfully, // but aren't delivered during the 5-minute deduplication interval. // Default: - None. // MessageDeduplicationId *string `field:"optional" json:"messageDeduplicationId" yaml:"messageDeduplicationId"` // The tag that specifies that a message belongs to a specific message group. // // Messages that belong to the same message group are processed in a FIFO manner. // Messages in different message groups might be processed out of order. // Default: - None. // MessageGroupId *string `field:"optional" json:"messageGroupId" yaml:"messageGroupId"` }
Properties for sending a message to an SQS queue using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var queue queue var resultSelector interface{} var taskInput taskInput var taskRole taskRole var timeout timeout sqsSendMessageJsonPathProps := &SqsSendMessageJsonPathProps{ MessageBody: taskInput, Queue: queue, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Delay: cdk.Duration_Minutes(jsii.Number(30)), Heartbeat: cdk.Duration_*Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, MessageDeduplicationId: jsii.String("messageDeduplicationId"), MessageGroupId: jsii.String("messageGroupId"), OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type SqsSendMessageJsonataProps ¶ added in v2.178.0
type SqsSendMessageJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The text message to send to the queue. MessageBody awsstepfunctions.TaskInput `field:"required" json:"messageBody" yaml:"messageBody"` // The SQS queue that messages will be sent to. Queue awssqs.IQueue `field:"required" json:"queue" yaml:"queue"` // The length of time, for which to delay a message. // // Messages that you send to the queue remain invisible to consumers for the duration // of the delay period. The maximum allowed delay is 15 minutes. // Default: - delay set on the queue. If a delay is not set on the queue, // messages are sent immediately (0 seconds). // Delay awscdk.Duration `field:"optional" json:"delay" yaml:"delay"` // The token used for deduplication of sent messages. // // Any messages sent with the same deduplication ID are accepted successfully, // but aren't delivered during the 5-minute deduplication interval. // Default: - None. // MessageDeduplicationId *string `field:"optional" json:"messageDeduplicationId" yaml:"messageDeduplicationId"` // The tag that specifies that a message belongs to a specific message group. // // Messages that belong to the same message group are processed in a FIFO manner. // Messages in different message groups might be processed out of order. // Default: - None. // MessageGroupId *string `field:"optional" json:"messageGroupId" yaml:"messageGroupId"` }
Properties for sending a message to an SQS queue using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var queue queue var taskInput taskInput var taskRole taskRole var timeout timeout sqsSendMessageJsonataProps := &SqsSendMessageJsonataProps{ MessageBody: taskInput, Queue: queue, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Delay: cdk.Duration_Minutes(jsii.Number(30)), Heartbeat: cdk.Duration_*Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, MessageDeduplicationId: jsii.String("messageDeduplicationId"), MessageGroupId: jsii.String("messageGroupId"), Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type SqsSendMessageProps ¶
type SqsSendMessageProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The text message to send to the queue. MessageBody awsstepfunctions.TaskInput `field:"required" json:"messageBody" yaml:"messageBody"` // The SQS queue that messages will be sent to. Queue awssqs.IQueue `field:"required" json:"queue" yaml:"queue"` // The length of time, for which to delay a message. // // Messages that you send to the queue remain invisible to consumers for the duration // of the delay period. The maximum allowed delay is 15 minutes. // Default: - delay set on the queue. If a delay is not set on the queue, // messages are sent immediately (0 seconds). // Delay awscdk.Duration `field:"optional" json:"delay" yaml:"delay"` // The token used for deduplication of sent messages. // // Any messages sent with the same deduplication ID are accepted successfully, // but aren't delivered during the 5-minute deduplication interval. // Default: - None. // MessageDeduplicationId *string `field:"optional" json:"messageDeduplicationId" yaml:"messageDeduplicationId"` // The tag that specifies that a message belongs to a specific message group. // // Messages that belong to the same message group are processed in a FIFO manner. // Messages in different message groups might be processed out of order. // Default: - None. // MessageGroupId *string `field:"optional" json:"messageGroupId" yaml:"messageGroupId"` }
Properties for sending a message to an SQS queue.
Example:
queue := sqs.NewQueue(this, jsii.String("Queue")) // Use a field from the execution data as message. task1 := tasks.NewSqsSendMessage(this, jsii.String("Send1"), &SqsSendMessageProps{ Queue: Queue, MessageBody: sfn.TaskInput_FromJsonPathAt(jsii.String("$.message")), }) // Combine a field from the execution data with // a literal object. task2 := tasks.NewSqsSendMessage(this, jsii.String("Send2"), &SqsSendMessageProps{ Queue: Queue, MessageBody: sfn.TaskInput_FromObject(map[string]interface{}{ "field1": jsii.String("somedata"), "field2": sfn.JsonPath_stringAt(jsii.String("$.field2")), }), })
type StepFunctionsInvokeActivity ¶
type StepFunctionsInvokeActivity interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to invoke an Activity worker.
An Activity can be used directly as a Resource.
Example:
submitJobActivity := sfn.NewActivity(this, jsii.String("SubmitJob")) tasks.NewStepFunctionsInvokeActivity(this, jsii.String("Submit Job"), &StepFunctionsInvokeActivityProps{ Activity: submitJobActivity, })
func NewStepFunctionsInvokeActivity ¶
func NewStepFunctionsInvokeActivity(scope constructs.Construct, id *string, props *StepFunctionsInvokeActivityProps) StepFunctionsInvokeActivity
func StepFunctionsInvokeActivity_JsonPath ¶ added in v2.178.0
func StepFunctionsInvokeActivity_JsonPath(scope constructs.Construct, id *string, props *StepFunctionsInvokeActivityJsonPathProps) StepFunctionsInvokeActivity
A Step Functions Task using JSONPath to invoke an Activity worker.
An Activity can be used directly as a Resource.
func StepFunctionsInvokeActivity_Jsonata ¶ added in v2.178.0
func StepFunctionsInvokeActivity_Jsonata(scope constructs.Construct, id *string, props *StepFunctionsInvokeActivityJsonataProps) StepFunctionsInvokeActivity
A Step Functions Task using JSONata to invoke an Activity worker.
An Activity can be used directly as a Resource.
type StepFunctionsInvokeActivityJsonPathProps ¶ added in v2.178.0
type StepFunctionsInvokeActivityJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Step Functions Activity to invoke. Activity awsstepfunctions.IActivity `field:"required" json:"activity" yaml:"activity"` // 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"` }
Properties for invoking an Activity worker using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var activity activity var assign interface{} var parameters interface{} var resultSelector interface{} var taskRole taskRole var timeout timeout stepFunctionsInvokeActivityJsonPathProps := &StepFunctionsInvokeActivityJsonPathProps{ Activity: activity, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, 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"), Parameters: map[string]interface{}{ "parametersKey": parameters, }, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type StepFunctionsInvokeActivityJsonataProps ¶ added in v2.178.0
type StepFunctionsInvokeActivityJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // Parameters pass a collection of key-value pairs, either static values or JSONata expressions that select from the input. // See: https://docs.aws.amazon.com/step-functions/latest/dg/transforming-data.html // // Default: - No arguments. // Arguments interface{} `field:"optional" json:"arguments" yaml:"arguments"` // Step Functions Activity to invoke. Activity awsstepfunctions.IActivity `field:"required" json:"activity" yaml:"activity"` }
Properties for invoking an Activity worker using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var activity activity var arguments_ interface{} var assign interface{} var outputs interface{} var taskRole taskRole var timeout timeout stepFunctionsInvokeActivityJsonataProps := &StepFunctionsInvokeActivityJsonataProps{ Activity: activity, // the properties below are optional Arguments: arguments_, Assign: map[string]interface{}{ "assignKey": assign, }, Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type StepFunctionsInvokeActivityProps ¶
type StepFunctionsInvokeActivityProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // Parameters pass a collection of key-value pairs, either static values or JSONata expressions that select from the input. // See: https://docs.aws.amazon.com/step-functions/latest/dg/transforming-data.html // // Default: - No arguments. // Arguments interface{} `field:"optional" json:"arguments" yaml:"arguments"` // Step Functions Activity to invoke. Activity awsstepfunctions.IActivity `field:"required" json:"activity" yaml:"activity"` // 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"` }
Properties for invoking an Activity worker.
Example:
submitJobActivity := sfn.NewActivity(this, jsii.String("SubmitJob")) tasks.NewStepFunctionsInvokeActivity(this, jsii.String("Submit Job"), &StepFunctionsInvokeActivityProps{ Activity: submitJobActivity, })
type StepFunctionsStartExecution ¶
type StepFunctionsStartExecution interface { awsstepfunctions.TaskStateBase Arguments() *map[string]interface{} Assign() *map[string]interface{} Branches() *[]awsstepfunctions.StateGraph Comment() *string DefaultChoice() awsstepfunctions.State SetDefaultChoice(val awsstepfunctions.State) // Continuable states of this Chainable. EndStates() *[]awsstepfunctions.INextable // Descriptive identifier for this chainable. Id() *string InputPath() *string Iteration() awsstepfunctions.StateGraph SetIteration(val awsstepfunctions.StateGraph) // The tree node. Node() constructs.Node OutputPath() *string Outputs() *map[string]interface{} Parameters() *map[string]interface{} Processor() awsstepfunctions.StateGraph SetProcessor(val awsstepfunctions.StateGraph) ProcessorConfig() *awsstepfunctions.ProcessorConfig SetProcessorConfig(val *awsstepfunctions.ProcessorConfig) ProcessorMode() awsstepfunctions.ProcessorMode SetProcessorMode(val awsstepfunctions.ProcessorMode) QueryLanguage() awsstepfunctions.QueryLanguage ResultPath() *string ResultSelector() *map[string]interface{} // First state of this Chainable. StartState() awsstepfunctions.State // Tokenized string that evaluates to the state's ID. StateId() *string StateName() *string TaskMetrics() *awsstepfunctions.TaskMetricsConfig TaskPolicies() *[]awsiam.PolicyStatement // Add a parallel branch to this state. AddBranch(branch awsstepfunctions.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 awsstepfunctions.IChainable, props *awsstepfunctions.CatchProps) awsstepfunctions.TaskStateBase // Add a choice branch to this state. AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State, options *awsstepfunctions.ChoiceTransitionOptions) // Add a item processor to this state. AddItemProcessor(processor awsstepfunctions.StateGraph, config *awsstepfunctions.ProcessorConfig) // Add a map iterator to this state. AddIterator(iteration awsstepfunctions.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 *awsstepfunctions.RetryProps) awsstepfunctions.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 awsstepfunctions.StateGraph) // Make the indicated state the default choice transition of this state. MakeDefault(def awsstepfunctions.State) // Make the indicated state the default transition of this state. MakeNext(next awsstepfunctions.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 awsstepfunctions.IChainable) awsstepfunctions.Chain // Render the assign in ASL JSON format. RenderAssign(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render parallel branches in ASL JSON format. RenderBranches() interface{} // Render the choices in ASL JSON format. RenderChoices(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render InputPath/Parameters/OutputPath/Arguments/Output 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 QueryLanguage in ASL JSON format if needed. RenderQueryLanguage(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Render ResultSelector in ASL JSON format. RenderResultSelector() interface{} // Render error recovery options in ASL JSON format. RenderRetryCatch(topLevelQueryLanguage awsstepfunctions.QueryLanguage) interface{} // Return the Amazon States Language object for this state. ToStateJson(topLevelQueryLanguage awsstepfunctions.QueryLanguage) *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 awsstepfunctions.StateGraph) }
A Step Functions Task to call StartExecution on another state machine.
It supports three service integration patterns: REQUEST_RESPONSE, RUN_JOB, and WAIT_FOR_TASK_TOKEN.
Example:
// Define a state machine with one Pass state child := sfn.NewStateMachine(this, jsii.String("ChildStateMachine"), &StateMachineProps{ Definition: sfn.Chain_Start(sfn.NewPass(this, jsii.String("PassState"))), }) // Include the state machine in a Task state with callback pattern task := tasks.NewStepFunctionsStartExecution(this, jsii.String("ChildTask"), &StepFunctionsStartExecutionProps{ StateMachine: child, IntegrationPattern: sfn.IntegrationPattern_WAIT_FOR_TASK_TOKEN, Input: sfn.TaskInput_FromObject(map[string]interface{}{ "token": sfn.JsonPath_taskToken(), "foo": jsii.String("bar"), }), Name: jsii.String("MyExecutionName"), }) // Define a second state machine with the Task state above // Define a second state machine with the Task state above sfn.NewStateMachine(this, jsii.String("ParentStateMachine"), &StateMachineProps{ Definition: task, })
func NewStepFunctionsStartExecution ¶
func NewStepFunctionsStartExecution(scope constructs.Construct, id *string, props *StepFunctionsStartExecutionProps) StepFunctionsStartExecution
func StepFunctionsStartExecution_JsonPath ¶ added in v2.178.0
func StepFunctionsStartExecution_JsonPath(scope constructs.Construct, id *string, props *StepFunctionsStartExecutionJsonPathProps) StepFunctionsStartExecution
A Step Functions Task using JSONPath to call StartExecution on another state machine.
It supports three service integration patterns: REQUEST_RESPONSE, RUN_JOB, and WAIT_FOR_TASK_TOKEN.
func StepFunctionsStartExecution_Jsonata ¶ added in v2.178.0
func StepFunctionsStartExecution_Jsonata(scope constructs.Construct, id *string, props *StepFunctionsStartExecutionJsonataProps) StepFunctionsStartExecution
A Step Functions Task using JSONata to call StartExecution on another state machine.
It supports three service integration patterns: REQUEST_RESPONSE, RUN_JOB, and WAIT_FOR_TASK_TOKEN.
type StepFunctionsStartExecutionJsonPathProps ¶ added in v2.178.0
type StepFunctionsStartExecutionJsonPathProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // The Step Functions state machine to start the execution on. StateMachine awsstepfunctions.IStateMachine `field:"required" json:"stateMachine" yaml:"stateMachine"` // Pass the execution ID from the context object to the execution input. // // This allows the Step Functions UI to link child executions from parent executions, making it easier to trace execution flow across state machines. // // If you set this property to `true`, the `input` property must be an object (provided by `sfn.TaskInput.fromObject`) or omitted entirely. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-nested-workflows.html#nested-execution-startid // // Default: - false. // AssociateWithParent *bool `field:"optional" json:"associateWithParent" yaml:"associateWithParent"` // The JSON input for the execution, same as that of StartExecution. // See: https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html // // Default: - The state input (JSON path '$'). // Input awsstepfunctions.TaskInput `field:"optional" json:"input" yaml:"input"` // The name of the execution, same as that of StartExecution. // See: https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html // // Default: - None. // Name *string `field:"optional" json:"name" yaml:"name"` }
Properties for StartExecution using JSONPath.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var resultSelector interface{} var stateMachine stateMachine var taskInput taskInput var taskRole taskRole var timeout timeout stepFunctionsStartExecutionJsonPathProps := &StepFunctionsStartExecutionJsonPathProps{ StateMachine: stateMachine, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, AssociateWithParent: jsii.Boolean(false), Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, Input: taskInput, InputPath: jsii.String("inputPath"), IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Name: jsii.String("name"), OutputPath: jsii.String("outputPath"), QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, ResultPath: jsii.String("resultPath"), ResultSelector: map[string]interface{}{ "resultSelectorKey": resultSelector, }, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type StepFunctionsStartExecutionJsonataProps ¶ added in v2.178.0
type StepFunctionsStartExecutionJsonataProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // The Step Functions state machine to start the execution on. StateMachine awsstepfunctions.IStateMachine `field:"required" json:"stateMachine" yaml:"stateMachine"` // Pass the execution ID from the context object to the execution input. // // This allows the Step Functions UI to link child executions from parent executions, making it easier to trace execution flow across state machines. // // If you set this property to `true`, the `input` property must be an object (provided by `sfn.TaskInput.fromObject`) or omitted entirely. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-nested-workflows.html#nested-execution-startid // // Default: - false. // AssociateWithParent *bool `field:"optional" json:"associateWithParent" yaml:"associateWithParent"` // The JSON input for the execution, same as that of StartExecution. // See: https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html // // Default: - The state input (JSON path '$'). // Input awsstepfunctions.TaskInput `field:"optional" json:"input" yaml:"input"` // The name of the execution, same as that of StartExecution. // See: https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html // // Default: - None. // Name *string `field:"optional" json:"name" yaml:"name"` }
Properties for StartExecution using JSONata.
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" import "github.com/aws/aws-cdk-go/awscdk" var assign interface{} var outputs interface{} var stateMachine stateMachine var taskInput taskInput var taskRole taskRole var timeout timeout stepFunctionsStartExecutionJsonataProps := &StepFunctionsStartExecutionJsonataProps{ StateMachine: stateMachine, // the properties below are optional Assign: map[string]interface{}{ "assignKey": assign, }, AssociateWithParent: jsii.Boolean(false), Comment: jsii.String("comment"), Credentials: &Credentials{ Role: taskRole, }, Heartbeat: cdk.Duration_Minutes(jsii.Number(30)), HeartbeatTimeout: timeout, Input: taskInput, IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE, Name: jsii.String("name"), Outputs: outputs, QueryLanguage: awscdk.*Aws_stepfunctions.QueryLanguage_JSON_PATH, StateName: jsii.String("stateName"), TaskTimeout: timeout, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), }
type StepFunctionsStartExecutionProps ¶
type StepFunctionsStartExecutionProps struct { // A comment describing this state. // Default: No comment. // Comment *string `field:"optional" json:"comment" yaml:"comment"` // The name of the query language used by the state. // // If the state does not contain a `queryLanguage` field, // then it will use the query language specified in the top-level `queryLanguage` field. // Default: - JSONPath. // QueryLanguage awsstepfunctions.QueryLanguage `field:"optional" json:"queryLanguage" yaml:"queryLanguage"` // Optional name for this state. // Default: - The construct ID will be used as state name. // StateName *string `field:"optional" json:"stateName" yaml:"stateName"` // 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 *awsstepfunctions.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 awsstepfunctions.Timeout `field:"optional" json:"heartbeatTimeout" yaml:"heartbeatTimeout"` // 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 awsstepfunctions.IntegrationPattern `field:"optional" json:"integrationPattern" yaml:"integrationPattern"` // 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 awsstepfunctions.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"` // Workflow variables to store in this step. // // Using workflow variables, you can store data in a step and retrieve that data in future steps. // See: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html // // Default: - Not assign variables. // Assign *map[string]interface{} `field:"optional" json:"assign" yaml:"assign"` // 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"` // Used to specify and transform output from the state. // // When specified, the value overrides the state output default. // The output field accepts any JSON value (object, array, string, number, boolean, null). // Any string value, including those inside objects or arrays, // will be evaluated as JSONata if surrounded by {% %} characters. // Output also accepts a JSONata expression directly. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html // // Default: - $states.result or $states.errorOutput // Outputs interface{} `field:"optional" json:"outputs" yaml:"outputs"` // 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"` // The Step Functions state machine to start the execution on. StateMachine awsstepfunctions.IStateMachine `field:"required" json:"stateMachine" yaml:"stateMachine"` // Pass the execution ID from the context object to the execution input. // // This allows the Step Functions UI to link child executions from parent executions, making it easier to trace execution flow across state machines. // // If you set this property to `true`, the `input` property must be an object (provided by `sfn.TaskInput.fromObject`) or omitted entirely. // See: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-nested-workflows.html#nested-execution-startid // // Default: - false. // AssociateWithParent *bool `field:"optional" json:"associateWithParent" yaml:"associateWithParent"` // The JSON input for the execution, same as that of StartExecution. // See: https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html // // Default: - The state input (JSON path '$'). // Input awsstepfunctions.TaskInput `field:"optional" json:"input" yaml:"input"` // The name of the execution, same as that of StartExecution. // See: https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html // // Default: - None. // Name *string `field:"optional" json:"name" yaml:"name"` }
Properties for StartExecution.
Example:
// Define a state machine with one Pass state child := sfn.NewStateMachine(this, jsii.String("ChildStateMachine"), &StateMachineProps{ Definition: sfn.Chain_Start(sfn.NewPass(this, jsii.String("PassState"))), }) // Include the state machine in a Task state with callback pattern task := tasks.NewStepFunctionsStartExecution(this, jsii.String("ChildTask"), &StepFunctionsStartExecutionProps{ StateMachine: child, IntegrationPattern: sfn.IntegrationPattern_WAIT_FOR_TASK_TOKEN, Input: sfn.TaskInput_FromObject(map[string]interface{}{ "token": sfn.JsonPath_taskToken(), "foo": jsii.String("bar"), }), Name: jsii.String("MyExecutionName"), }) // Define a second state machine with the Task state above // Define a second state machine with the Task state above sfn.NewStateMachine(this, jsii.String("ParentStateMachine"), &StateMachineProps{ Definition: task, })
type StoppingCondition ¶
type StoppingCondition struct { // The maximum length of time, in seconds, that the training or compilation job can run. // Default: - 1 hour. // MaxRuntime awscdk.Duration `field:"optional" json:"maxRuntime" yaml:"maxRuntime"` }
Specifies a limit to how long a model training job can run.
When the job reaches the time limit, Amazon SageMaker ends the training job.
Example:
tasks.NewSageMakerCreateTrainingJob(this, jsii.String("TrainSagemaker"), &SageMakerCreateTrainingJobProps{ TrainingJobName: sfn.JsonPath_StringAt(jsii.String("$.JobName")), AlgorithmSpecification: &AlgorithmSpecification{ AlgorithmName: jsii.String("BlazingText"), TrainingInputMode: tasks.InputMode_FILE, }, InputDataConfig: []channel{ &channel{ ChannelName: jsii.String("train"), DataSource: &DataSource{ S3DataSource: &S3DataSource{ S3DataType: tasks.S3DataType_S3_PREFIX, S3Location: tasks.S3Location_FromJsonExpression(jsii.String("$.S3Bucket")), }, }, }, }, OutputDataConfig: &OutputDataConfig{ S3OutputLocation: tasks.S3Location_FromBucket(s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("amzn-s3-demo-bucket")), jsii.String("myoutputpath")), }, ResourceConfig: &ResourceConfig{ InstanceCount: jsii.Number(1), InstanceType: ec2.NewInstanceType(sfn.JsonPath_*StringAt(jsii.String("$.InstanceType"))), VolumeSize: awscdk.Size_Gibibytes(jsii.Number(50)), }, // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume StoppingCondition: &StoppingCondition{ MaxRuntime: awscdk.Duration_Hours(jsii.Number(2)), }, })
type TaskEnvironmentVariable ¶
type TaskEnvironmentVariable struct { // Name for the environment variable. // // Use `JsonPath` class's static methods to specify name from a JSON path. Name *string `field:"required" json:"name" yaml:"name"` // Value of the environment variable. // // Use `JsonPath` class's static methods to specify value from a JSON path. Value *string `field:"required" json:"value" yaml:"value"` }
An environment variable to be set in the container run as a task.
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" taskEnvironmentVariable := &TaskEnvironmentVariable{ Name: jsii.String("name"), Value: jsii.String("value"), }
type TransformDataSource ¶
type TransformDataSource struct { // S3 location of the input data. S3DataSource *TransformS3DataSource `field:"required" json:"s3DataSource" yaml:"s3DataSource"` }
S3 location of the input data that the model can consume.
Example:
tasks.NewSageMakerCreateTransformJob(this, jsii.String("Batch Inference"), &SageMakerCreateTransformJobProps{ TransformJobName: jsii.String("MyTransformJob"), ModelName: jsii.String("MyModelName"), ModelClientOptions: &ModelClientOptions{ InvocationsMaxRetries: jsii.Number(3), // default is 0 InvocationsTimeout: awscdk.Duration_Minutes(jsii.Number(5)), }, TransformInput: &TransformInput{ TransformDataSource: &TransformDataSource{ S3DataSource: &TransformS3DataSource{ S3Uri: jsii.String("s3://inputbucket/train"), S3DataType: tasks.S3DataType_S3_PREFIX, }, }, }, TransformOutput: &TransformOutput{ S3OutputPath: jsii.String("s3://outputbucket/TransformJobOutputPath"), }, TransformResources: &TransformResources{ InstanceCount: jsii.Number(1), InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_M4, ec2.InstanceSize_XLARGE), }, })
type TransformInput ¶
type TransformInput struct { // S3 location of the channel data. TransformDataSource *TransformDataSource `field:"required" json:"transformDataSource" yaml:"transformDataSource"` // The compression type of the transform data. // Default: NONE. // CompressionType CompressionType `field:"optional" json:"compressionType" yaml:"compressionType"` // Multipurpose internet mail extension (MIME) type of the data. // Default: - None. // ContentType *string `field:"optional" json:"contentType" yaml:"contentType"` // Method to use to split the transform job's data files into smaller batches. // Default: NONE. // SplitType SplitType `field:"optional" json:"splitType" yaml:"splitType"` }
Dataset to be transformed and the Amazon S3 location where it is stored.
Example:
tasks.NewSageMakerCreateTransformJob(this, jsii.String("Batch Inference"), &SageMakerCreateTransformJobProps{ TransformJobName: jsii.String("MyTransformJob"), ModelName: jsii.String("MyModelName"), ModelClientOptions: &ModelClientOptions{ InvocationsMaxRetries: jsii.Number(3), // default is 0 InvocationsTimeout: awscdk.Duration_Minutes(jsii.Number(5)), }, TransformInput: &TransformInput{ TransformDataSource: &TransformDataSource{ S3DataSource: &TransformS3DataSource{ S3Uri: jsii.String("s3://inputbucket/train"), S3DataType: tasks.S3DataType_S3_PREFIX, }, }, }, TransformOutput: &TransformOutput{ S3OutputPath: jsii.String("s3://outputbucket/TransformJobOutputPath"), }, TransformResources: &TransformResources{ InstanceCount: jsii.Number(1), InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_M4, ec2.InstanceSize_XLARGE), }, })
type TransformOutput ¶
type TransformOutput struct { // S3 path where you want Amazon SageMaker to store the results of the transform job. S3OutputPath *string `field:"required" json:"s3OutputPath" yaml:"s3OutputPath"` // MIME type used to specify the output data. // Default: - None. // Accept *string `field:"optional" json:"accept" yaml:"accept"` // Defines how to assemble the results of the transform job as a single S3 object. // Default: - None. // AssembleWith AssembleWith `field:"optional" json:"assembleWith" yaml:"assembleWith"` // AWS KMS key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. // Default: - default KMS key for Amazon S3 for your role's account. // EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"` }
S3 location where you want Amazon SageMaker to save the results from the transform job.
Example:
tasks.NewSageMakerCreateTransformJob(this, jsii.String("Batch Inference"), &SageMakerCreateTransformJobProps{ TransformJobName: jsii.String("MyTransformJob"), ModelName: jsii.String("MyModelName"), ModelClientOptions: &ModelClientOptions{ InvocationsMaxRetries: jsii.Number(3), // default is 0 InvocationsTimeout: awscdk.Duration_Minutes(jsii.Number(5)), }, TransformInput: &TransformInput{ TransformDataSource: &TransformDataSource{ S3DataSource: &TransformS3DataSource{ S3Uri: jsii.String("s3://inputbucket/train"), S3DataType: tasks.S3DataType_S3_PREFIX, }, }, }, TransformOutput: &TransformOutput{ S3OutputPath: jsii.String("s3://outputbucket/TransformJobOutputPath"), }, TransformResources: &TransformResources{ InstanceCount: jsii.Number(1), InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_M4, ec2.InstanceSize_XLARGE), }, })
type TransformResources ¶
type TransformResources struct { // Number of ML compute instances to use in the transform job. InstanceCount *float64 `field:"required" json:"instanceCount" yaml:"instanceCount"` // ML compute instance type for the transform job. InstanceType awsec2.InstanceType `field:"required" json:"instanceType" yaml:"instanceType"` // AWS KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s). // Default: - None. // VolumeEncryptionKey awskms.IKey `field:"optional" json:"volumeEncryptionKey" yaml:"volumeEncryptionKey"` }
ML compute instances for the transform job.
Example:
tasks.NewSageMakerCreateTransformJob(this, jsii.String("Batch Inference"), &SageMakerCreateTransformJobProps{ TransformJobName: jsii.String("MyTransformJob"), ModelName: jsii.String("MyModelName"), ModelClientOptions: &ModelClientOptions{ InvocationsMaxRetries: jsii.Number(3), // default is 0 InvocationsTimeout: awscdk.Duration_Minutes(jsii.Number(5)), }, TransformInput: &TransformInput{ TransformDataSource: &TransformDataSource{ S3DataSource: &TransformS3DataSource{ S3Uri: jsii.String("s3://inputbucket/train"), S3DataType: tasks.S3DataType_S3_PREFIX, }, }, }, TransformOutput: &TransformOutput{ S3OutputPath: jsii.String("s3://outputbucket/TransformJobOutputPath"), }, TransformResources: &TransformResources{ InstanceCount: jsii.Number(1), InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_M4, ec2.InstanceSize_XLARGE), }, })
type TransformS3DataSource ¶
type TransformS3DataSource struct { // Identifies either a key name prefix or a manifest. S3Uri *string `field:"required" json:"s3Uri" yaml:"s3Uri"` // S3 Data Type. // Default: 'S3Prefix'. // S3DataType S3DataType `field:"optional" json:"s3DataType" yaml:"s3DataType"` }
Location of the channel data.
Example:
tasks.NewSageMakerCreateTransformJob(this, jsii.String("Batch Inference"), &SageMakerCreateTransformJobProps{ TransformJobName: jsii.String("MyTransformJob"), ModelName: jsii.String("MyModelName"), ModelClientOptions: &ModelClientOptions{ InvocationsMaxRetries: jsii.Number(3), // default is 0 InvocationsTimeout: awscdk.Duration_Minutes(jsii.Number(5)), }, TransformInput: &TransformInput{ TransformDataSource: &TransformDataSource{ S3DataSource: &TransformS3DataSource{ S3Uri: jsii.String("s3://inputbucket/train"), S3DataType: tasks.S3DataType_S3_PREFIX, }, }, }, TransformOutput: &TransformOutput{ S3OutputPath: jsii.String("s3://outputbucket/TransformJobOutputPath"), }, TransformResources: &TransformResources{ InstanceCount: jsii.Number(1), InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_M4, ec2.InstanceSize_XLARGE), }, })
type URLEncodingFormat ¶ added in v2.138.0
type URLEncodingFormat string
The style used when applying URL encoding to array values.
Example:
import "github.com/aws/aws-cdk-go/awscdk" connection := events.NewConnection(this, jsii.String("Connection"), &ConnectionProps{ Authorization: events.Authorization_Basic(jsii.String("username"), awscdk.SecretValue_UnsafePlainText(jsii.String("password"))), }) tasks.NewHttpInvoke(this, jsii.String("Invoke HTTP API"), &HttpInvokeProps{ ApiRoot: jsii.String("https://api.example.com"), ApiEndpoint: sfn.TaskInput_FromText(jsii.String("path/to/resource")), Body: sfn.TaskInput_FromObject(map[string]interface{}{ "foo": jsii.String("bar"), }), Connection: Connection, Headers: sfn.TaskInput_*FromObject(map[string]interface{}{ "Content-Type": jsii.String("application/json"), }), Method: sfn.TaskInput_*FromText(jsii.String("POST")), QueryStringParameters: sfn.TaskInput_*FromObject(map[string]interface{}{ "id": jsii.String("123"), }), UrlEncodingFormat: tasks.URLEncodingFormat_BRACKETS, })
const ( // Encode arrays using brackets. // // For example, {'array': ['a','b','c']} encodes to 'array[]=a&array[]=b&array[]=c'. URLEncodingFormat_BRACKETS URLEncodingFormat = "BRACKETS" // Encode arrays using commas. // // For example, {'array': ['a','b','c']} encodes to 'array=a,b,c,d'. URLEncodingFormat_COMMAS URLEncodingFormat = "COMMAS" // Apply the default URL encoding style (INDICES). URLEncodingFormat_DEFAULT URLEncodingFormat = "DEFAULT" // Encode arrays using the index value. // // For example, {'array': ['a','b','c']} encodes to 'array[0]=a&array[1]=b&array[2]=c'. URLEncodingFormat_INDICES URLEncodingFormat = "INDICES" // Do not apply URL encoding. URLEncodingFormat_NONE URLEncodingFormat = "NONE" // Repeat key for each item in the array. // // For example, {'array': ['a','b','c']} encodes to 'array[]=a&array[]=b&array[]=c'. URLEncodingFormat_REPEAT URLEncodingFormat = "REPEAT" )
type VirtualClusterInput ¶ added in v2.1.0
type VirtualClusterInput interface { // The VirtualCluster Id. Id() *string }
Class that returns a virtual cluster's id depending on input type.
Example:
tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{ VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")), ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(), JobName: jsii.String("EMR-Containers-Job"), JobDriver: &JobDriver{ SparkSubmitJobDriver: &SparkSubmitJobDriver{ EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")), }, }, ApplicationConfig: []applicationConfiguration{ &applicationConfiguration{ Classification: tasks.Classification_SPARK_DEFAULTS(), Properties: map[string]*string{ "spark.executor.instances": jsii.String("1"), "spark.executor.memory": jsii.String("512M"), }, }, }, })
func VirtualClusterInput_FromTaskInput ¶ added in v2.1.0
func VirtualClusterInput_FromTaskInput(taskInput awsstepfunctions.TaskInput) VirtualClusterInput
Input for a virtualClusterId from a Task Input.
func VirtualClusterInput_FromVirtualClusterId ¶ added in v2.1.0
func VirtualClusterInput_FromVirtualClusterId(virtualClusterId *string) VirtualClusterInput
Input for virtualClusterId from a literal string.
type VpcConfig ¶
type VpcConfig struct { // VPC. Vpc awsec2.IVpc `field:"required" json:"vpc" yaml:"vpc"` // VPC subnets. // Default: - Private Subnets are selected. // Subnets *awsec2.SubnetSelection `field:"optional" json:"subnets" yaml:"subnets"` }
Specifies the VPC that you want your Amazon SageMaker training job to connect to.
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 subnet subnet var subnetFilter subnetFilter var vpc vpc vpcConfig := &VpcConfig{ Vpc: vpc, // the properties below are optional Subnets: &SubnetSelection{ AvailabilityZones: []*string{ jsii.String("availabilityZones"), }, OnePerAz: jsii.Boolean(false), SubnetFilters: []*subnetFilter{ subnetFilter, }, SubnetGroupName: jsii.String("subnetGroupName"), Subnets: []iSubnet{ subnet, }, SubnetType: awscdk.Aws_ec2.SubnetType_PRIVATE_ISOLATED, }, }
type WorkerConfigurationProperty ¶ added in v2.144.0
type WorkerConfigurationProperty struct { // The number of workers of a defined `WorkerType` that are allocated when a job runs. NumberOfWorkers *float64 `field:"required" json:"numberOfWorkers" yaml:"numberOfWorkers"` // The type of predefined worker that is allocated when a job runs. // Default: - must choose one of `workerType` or `workerTypeV2`. // // Deprecated: Use `workerTypeV2` for more flexibility in defining worker types. WorkerType WorkerType `field:"optional" json:"workerType" yaml:"workerType"` // The type of predefined worker that is allocated when a job runs. // // Can be one of the // predefined values or dynamic values using `WorkerTypeV2.of(...)`. // Default: - must choose one of `workerType` or `workerTypeV2`. // WorkerTypeV2 WorkerTypeV2 `field:"optional" json:"workerTypeV2" yaml:"workerTypeV2"` }
Properties for the worker configuration.
Example:
tasks.NewGlueStartJobRun(this, jsii.String("Task"), &GlueStartJobRunProps{ GlueJobName: jsii.String("my-glue-job"), WorkerConfiguration: &WorkerConfigurationProperty{ WorkerTypeV2: tasks.WorkerTypeV2_G_1X(), // Worker type NumberOfWorkers: jsii.Number(2), }, })
type WorkerType ¶ added in v2.144.0
type WorkerType string
The type of predefined worker that is allocated when a job runs. Deprecated: Use `workerTypeV2` property for `WorkerConfigurationProperty`.
const ( // Each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker. // Deprecated: Use `workerTypeV2` property for `WorkerConfigurationProperty`. WorkerType_STANDARD WorkerType = "STANDARD" // Each worker maps to 0.25 DPU (2 vCPU, 4 GB of memory, 64 GB disk), and provides 1 executor per worker. Suitable for low volume streaming jobs. // Deprecated: Use `workerTypeV2` property for `WorkerConfigurationProperty`. WorkerType_G_025X WorkerType = "G_025X" // Each worker maps to 1 DPU (4 vCPU, 16 GB of memory, 64 GB disk), and provides 1 executor per worker. // // Suitable for memory-intensive jobs. // Deprecated: Use `workerTypeV2` property for `WorkerConfigurationProperty`. WorkerType_G_1X WorkerType = "G_1X" // Each worker maps to 2 DPU (8 vCPU, 32 GB of memory, 128 GB disk), and provides 1 executor per worker. // // Suitable for memory-intensive jobs. // Deprecated: Use `workerTypeV2` property for `WorkerConfigurationProperty`. WorkerType_G_2X WorkerType = "G_2X" // Each worker maps to 4 DPU (16 vCPU, 64 GB of memory, 256 GB disk), and provides 1 executor per worker. // // We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for AWS Glue version 3.0 or later jobs. // Deprecated: Use `workerTypeV2` property for `WorkerConfigurationProperty`. WorkerType_G_4X WorkerType = "G_4X" // Each worker maps to 8 DPU (32 vCPU, 128 GB of memory, 512 GB disk), and provides 1 executor per worker. // // We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for AWS Glue version 3.0 or later jobs. // Deprecated: Use `workerTypeV2` property for `WorkerConfigurationProperty`. WorkerType_G_8X WorkerType = "G_8X" // Each worker maps to 2 high-memory DPU [M-DPU] (8 vCPU, 64 GB of memory, 128 GB disk). // // Supported in Ray jobs. // Deprecated: Use `workerTypeV2` property for `WorkerConfigurationProperty`. WorkerType_Z_2X WorkerType = "Z_2X" )
type WorkerTypeV2 ¶ added in v2.173.0
type WorkerTypeV2 interface { // The name of this WorkerType, as expected by Job resource. Name() *string }
The type of predefined worker that is allocated when a job runs.
If you need to use a WorkerTypeV2 that doesn't exist as a static member, you can instantiate a `WorkerTypeV2` object, e.g: `WorkerTypeV2.of('other type')`.
Example:
tasks.NewGlueStartJobRun(this, jsii.String("Task"), &GlueStartJobRunProps{ GlueJobName: jsii.String("my-glue-job"), WorkerConfiguration: &WorkerConfigurationProperty{ WorkerTypeV2: tasks.WorkerTypeV2_G_1X(), // Worker type NumberOfWorkers: jsii.Number(2), }, })
func WorkerTypeV2_G_025X ¶ added in v2.173.0
func WorkerTypeV2_G_025X() WorkerTypeV2
func WorkerTypeV2_G_1X ¶ added in v2.173.0
func WorkerTypeV2_G_1X() WorkerTypeV2
func WorkerTypeV2_G_2X ¶ added in v2.173.0
func WorkerTypeV2_G_2X() WorkerTypeV2
func WorkerTypeV2_G_4X ¶ added in v2.173.0
func WorkerTypeV2_G_4X() WorkerTypeV2
func WorkerTypeV2_G_8X ¶ added in v2.173.0
func WorkerTypeV2_G_8X() WorkerTypeV2
func WorkerTypeV2_Of ¶ added in v2.173.0
func WorkerTypeV2_Of(workerType *string) WorkerTypeV2
Custom worker type.
func WorkerTypeV2_STANDARD ¶ added in v2.173.0
func WorkerTypeV2_STANDARD() WorkerTypeV2
func WorkerTypeV2_Z_2X ¶ added in v2.173.0
func WorkerTypeV2_Z_2X() WorkerTypeV2
Source Files
¶
- AcceleratorClass.go
- AcceleratorClass__checks.go
- AcceleratorType.go
- AcceleratorType__checks.go
- ActionAfterCompletion.go
- ActionOnFailure.go
- AlgorithmSpecification.go
- ApplicationConfiguration.go
- AssembleWith.go
- AthenaGetQueryExecution.go
- AthenaGetQueryExecutionJsonPathProps.go
- AthenaGetQueryExecutionJsonataProps.go
- AthenaGetQueryExecutionProps.go
- AthenaGetQueryExecution__checks.go
- AthenaGetQueryResults.go
- AthenaGetQueryResultsJsonPathProps.go
- AthenaGetQueryResultsJsonataProps.go
- AthenaGetQueryResultsProps.go
- AthenaGetQueryResults__checks.go
- AthenaStartQueryExecution.go
- AthenaStartQueryExecutionJsonPathProps.go
- AthenaStartQueryExecutionJsonataProps.go
- AthenaStartQueryExecutionProps.go
- AthenaStartQueryExecution__checks.go
- AthenaStopQueryExecution.go
- AthenaStopQueryExecutionJsonPathProps.go
- AthenaStopQueryExecutionJsonataProps.go
- AthenaStopQueryExecutionProps.go
- AthenaStopQueryExecution__checks.go
- AuthType.go
- BatchContainerOverrides.go
- BatchJobDependency.go
- BatchStrategy.go
- BatchSubmitJob.go
- BatchSubmitJobJsonPathProps.go
- BatchSubmitJobJsonataProps.go
- BatchSubmitJobProps.go
- BatchSubmitJob__checks.go
- BedrockInvokeModel.go
- BedrockInvokeModelInputProps.go
- BedrockInvokeModelJsonPathProps.go
- BedrockInvokeModelJsonataProps.go
- BedrockInvokeModelOutputProps.go
- BedrockInvokeModelProps.go
- BedrockInvokeModel__checks.go
- CallApiGatewayEndpointBaseOptions.go
- CallApiGatewayEndpointBaseProps.go
- CallApiGatewayEndpointJsonPathBaseProps.go
- CallApiGatewayEndpointJsonataBaseProps.go
- CallApiGatewayHttpApiEndpoint.go
- CallApiGatewayHttpApiEndpointJsonPathProps.go
- CallApiGatewayHttpApiEndpointJsonataProps.go
- CallApiGatewayHttpApiEndpointOptions.go
- CallApiGatewayHttpApiEndpointProps.go
- CallApiGatewayHttpApiEndpoint__checks.go
- CallApiGatewayRestApiEndpoint.go
- CallApiGatewayRestApiEndpointJsonPathProps.go
- CallApiGatewayRestApiEndpointJsonataProps.go
- CallApiGatewayRestApiEndpointOptions.go
- CallApiGatewayRestApiEndpointProps.go
- CallApiGatewayRestApiEndpoint__checks.go
- CallAwsService.go
- CallAwsServiceCrossRegion.go
- CallAwsServiceCrossRegionJsonPathProps.go
- CallAwsServiceCrossRegionJsonataProps.go
- CallAwsServiceCrossRegionProps.go
- CallAwsServiceCrossRegion__checks.go
- CallAwsServiceJsonPathProps.go
- CallAwsServiceJsonataProps.go
- CallAwsServiceProps.go
- CallAwsService__checks.go
- Channel.go
- Classification.go
- Classification__checks.go
- CodeBuildStartBuild.go
- CodeBuildStartBuildBatch.go
- CodeBuildStartBuildBatchJsonPathProps.go
- CodeBuildStartBuildBatchJsonataProps.go
- CodeBuildStartBuildBatchProps.go
- CodeBuildStartBuildBatch__checks.go
- CodeBuildStartBuildJsonPathProps.go
- CodeBuildStartBuildJsonataProps.go
- CodeBuildStartBuildProps.go
- CodeBuildStartBuild__checks.go
- CommonEcsRunTaskProps.go
- CompressionType.go
- ContainerDefinition.go
- ContainerDefinitionConfig.go
- ContainerDefinitionOptions.go
- ContainerDefinition__checks.go
- ContainerOverride.go
- ContainerOverrides.go
- CronOptions.go
- DataSource.go
- DockerImage.go
- DockerImageConfig.go
- DockerImage__checks.go
- DynamoAttributeValue.go
- DynamoAttributeValue__checks.go
- DynamoConsumedCapacity.go
- DynamoDeleteItem.go
- DynamoDeleteItemJsonPathProps.go
- DynamoDeleteItemJsonataProps.go
- DynamoDeleteItemProps.go
- DynamoDeleteItem__checks.go
- DynamoGetItem.go
- DynamoGetItemJsonPathProps.go
- DynamoGetItemJsonataProps.go
- DynamoGetItemProps.go
- DynamoGetItem__checks.go
- DynamoItemCollectionMetrics.go
- DynamoProjectionExpression.go
- DynamoProjectionExpression__checks.go
- DynamoPutItem.go
- DynamoPutItemJsonPathProps.go
- DynamoPutItemJsonataProps.go
- DynamoPutItemProps.go
- DynamoPutItem__checks.go
- DynamoReturnValues.go
- DynamoUpdateItem.go
- DynamoUpdateItemJsonPathProps.go
- DynamoUpdateItemJsonataProps.go
- DynamoUpdateItemProps.go
- DynamoUpdateItem__checks.go
- EcsEc2LaunchTarget.go
- EcsEc2LaunchTargetOptions.go
- EcsEc2LaunchTarget__checks.go
- EcsFargateLaunchTarget.go
- EcsFargateLaunchTargetOptions.go
- EcsFargateLaunchTarget__checks.go
- EcsLaunchTargetConfig.go
- EcsRunTask.go
- EcsRunTaskJsonPathProps.go
- EcsRunTaskJsonataProps.go
- EcsRunTaskProps.go
- EcsRunTask__checks.go
- EksCall.go
- EksCallJsonPathProps.go
- EksCallJsonataProps.go
- EksCallProps.go
- EksCall__checks.go
- EksClusterInput.go
- EksClusterInput__checks.go
- EmrAddStep.go
- EmrAddStepJsonPathProps.go
- EmrAddStepJsonataProps.go
- EmrAddStepProps.go
- EmrAddStep__checks.go
- EmrCancelStep.go
- EmrCancelStepJsonPathProps.go
- EmrCancelStepJsonataProps.go
- EmrCancelStepProps.go
- EmrCancelStep__checks.go
- EmrContainersCreateVirtualCluster.go
- EmrContainersCreateVirtualClusterJsonPathProps.go
- EmrContainersCreateVirtualClusterJsonataProps.go
- EmrContainersCreateVirtualClusterProps.go
- EmrContainersCreateVirtualCluster__checks.go
- EmrContainersDeleteVirtualCluster.go
- EmrContainersDeleteVirtualClusterJsonPathProps.go
- EmrContainersDeleteVirtualClusterJsonataProps.go
- EmrContainersDeleteVirtualClusterProps.go
- EmrContainersDeleteVirtualCluster__checks.go
- EmrContainersStartJobRun.go
- EmrContainersStartJobRunJsonPathProps.go
- EmrContainersStartJobRunJsonataProps.go
- EmrContainersStartJobRunProps.go
- EmrContainersStartJobRun__checks.go
- EmrCreateCluster.go
- EmrCreateClusterJsonPathProps.go
- EmrCreateClusterJsonataProps.go
- EmrCreateClusterProps.go
- EmrCreateCluster_ApplicationConfigProperty.go
- EmrCreateCluster_AutoScalingPolicyProperty.go
- EmrCreateCluster_BootstrapActionConfigProperty.go
- EmrCreateCluster_CloudWatchAlarmComparisonOperator.go
- EmrCreateCluster_CloudWatchAlarmDefinitionProperty.go
- EmrCreateCluster_CloudWatchAlarmStatistic.go
- EmrCreateCluster_CloudWatchAlarmUnit.go
- EmrCreateCluster_ConfigurationProperty.go
- EmrCreateCluster_EbsBlockDeviceConfigProperty.go
- EmrCreateCluster_EbsBlockDeviceVolumeType.go
- EmrCreateCluster_EbsConfigurationProperty.go
- EmrCreateCluster_EmrClusterScaleDownBehavior.go
- EmrCreateCluster_InstanceFleetConfigProperty.go
- EmrCreateCluster_InstanceFleetProvisioningSpecificationsProperty.go
- EmrCreateCluster_InstanceGroupConfigProperty.go
- EmrCreateCluster_InstanceMarket.go
- EmrCreateCluster_InstanceRoleType.go
- EmrCreateCluster_InstanceTypeConfigProperty.go
- EmrCreateCluster_InstancesConfigProperty.go
- EmrCreateCluster_KerberosAttributesProperty.go
- EmrCreateCluster_MetricDimensionProperty.go
- EmrCreateCluster_OnDemandAllocationStrategy.go
- EmrCreateCluster_OnDemandProvisioningSpecificationProperty.go
- EmrCreateCluster_PlacementTypeProperty.go
- EmrCreateCluster_ScalingActionProperty.go
- EmrCreateCluster_ScalingAdjustmentType.go
- EmrCreateCluster_ScalingConstraintsProperty.go
- EmrCreateCluster_ScalingRuleProperty.go
- EmrCreateCluster_ScalingTriggerProperty.go
- EmrCreateCluster_ScriptBootstrapActionConfigProperty.go
- EmrCreateCluster_SimpleScalingPolicyConfigurationProperty.go
- EmrCreateCluster_SpotAllocationStrategy.go
- EmrCreateCluster_SpotProvisioningSpecificationProperty.go
- EmrCreateCluster_SpotTimeoutAction.go
- EmrCreateCluster_VolumeSpecificationProperty.go
- EmrCreateCluster__checks.go
- EmrModifyInstanceFleetByName.go
- EmrModifyInstanceFleetByNameJsonPathProps.go
- EmrModifyInstanceFleetByNameJsonataProps.go
- EmrModifyInstanceFleetByNameProps.go
- EmrModifyInstanceFleetByName__checks.go
- EmrModifyInstanceGroupByName.go
- EmrModifyInstanceGroupByNameJsonPathProps.go
- EmrModifyInstanceGroupByNameJsonataProps.go
- EmrModifyInstanceGroupByNameProps.go
- EmrModifyInstanceGroupByName_InstanceGroupModifyConfigProperty.go
- EmrModifyInstanceGroupByName_InstanceResizePolicyProperty.go
- EmrModifyInstanceGroupByName_ShrinkPolicyProperty.go
- EmrModifyInstanceGroupByName__checks.go
- EmrSetClusterTerminationProtection.go
- EmrSetClusterTerminationProtectionJsonPathProps.go
- EmrSetClusterTerminationProtectionJsonataProps.go
- EmrSetClusterTerminationProtectionProps.go
- EmrSetClusterTerminationProtection__checks.go
- EmrTerminateCluster.go
- EmrTerminateClusterJsonPathProps.go
- EmrTerminateClusterJsonataProps.go
- EmrTerminateClusterProps.go
- EmrTerminateCluster__checks.go
- EncryptionConfiguration.go
- EncryptionOption.go
- EvaluateExpression.go
- EvaluateExpressionProps.go
- EvaluateExpression__checks.go
- EventBridgePutEvents.go
- EventBridgePutEventsEntry.go
- EventBridgePutEventsJsonPathProps.go
- EventBridgePutEventsJsonataProps.go
- EventBridgePutEventsProps.go
- EventBridgePutEvents__checks.go
- EventBridgeSchedulerCreateScheduleTask.go
- EventBridgeSchedulerCreateScheduleTaskJsonPathProps.go
- EventBridgeSchedulerCreateScheduleTaskJsonataProps.go
- EventBridgeSchedulerCreateScheduleTaskProps.go
- EventBridgeSchedulerCreateScheduleTask__checks.go
- EventBridgeSchedulerTarget.go
- EventBridgeSchedulerTargetProps.go
- EventBridgeSchedulerTarget__checks.go
- ExecutionClass.go
- GlueDataBrewStartJobRun.go
- GlueDataBrewStartJobRunJsonPathProps.go
- GlueDataBrewStartJobRunJsonataProps.go
- GlueDataBrewStartJobRunProps.go
- GlueDataBrewStartJobRun__checks.go
- GlueStartCrawlerRun.go
- GlueStartCrawlerRunJsonPathProps.go
- GlueStartCrawlerRunJsonataProps.go
- GlueStartCrawlerRunProps.go
- GlueStartCrawlerRun__checks.go
- GlueStartJobRun.go
- GlueStartJobRunJsonPathProps.go
- GlueStartJobRunJsonataProps.go
- GlueStartJobRunProps.go
- GlueStartJobRun__checks.go
- Guardrail.go
- Guardrail__checks.go
- HttpInvoke.go
- HttpInvokeJsonPathProps.go
- HttpInvokeJsonataProps.go
- HttpInvokeProps.go
- HttpInvoke__checks.go
- HttpMethod.go
- HttpMethods.go
- IContainerDefinition.go
- IContainerDefinition__checks.go
- IEcsLaunchTarget.go
- IEcsLaunchTarget__checks.go
- ISageMakerTask.go
- InputMode.go
- JobDependency.go
- JobDriver.go
- LambdaInvocationType.go
- LambdaInvoke.go
- LambdaInvokeJsonPathProps.go
- LambdaInvokeJsonataProps.go
- LambdaInvokeProps.go
- LambdaInvoke__checks.go
- LaunchTargetBindOptions.go
- MediaConvertCreateJob.go
- MediaConvertCreateJobJsonPathProps.go
- MediaConvertCreateJobJsonataProps.go
- MediaConvertCreateJobProps.go
- MediaConvertCreateJob__checks.go
- MessageAttribute.go
- MessageAttributeDataType.go
- MetricDefinition.go
- Mode.go
- ModelClientOptions.go
- Monitoring.go
- OutputDataConfig.go
- ProductionVariant.go
- QueryExecutionContext.go
- RecordWrapperType.go
- ReleaseLabel.go
- ReleaseLabel__checks.go
- ResourceConfig.go
- ResultConfiguration.go
- RetryPolicy.go
- S3DataDistributionType.go
- S3DataSource.go
- S3DataType.go
- S3Location.go
- S3LocationBindOptions.go
- S3LocationConfig.go
- S3Location__checks.go
- SageMakerCreateEndpoint.go
- SageMakerCreateEndpointConfig.go
- SageMakerCreateEndpointConfigJsonPathProps.go
- SageMakerCreateEndpointConfigJsonataProps.go
- SageMakerCreateEndpointConfigProps.go
- SageMakerCreateEndpointConfig__checks.go
- SageMakerCreateEndpointJsonPathProps.go
- SageMakerCreateEndpointJsonataProps.go
- SageMakerCreateEndpointProps.go
- SageMakerCreateEndpoint__checks.go
- SageMakerCreateModel.go
- SageMakerCreateModelJsonPathProps.go
- SageMakerCreateModelJsonataProps.go
- SageMakerCreateModelProps.go
- SageMakerCreateModel__checks.go
- SageMakerCreateTrainingJob.go
- SageMakerCreateTrainingJobJsonPathProps.go
- SageMakerCreateTrainingJobJsonataProps.go
- SageMakerCreateTrainingJobProps.go
- SageMakerCreateTrainingJob__checks.go
- SageMakerCreateTransformJob.go
- SageMakerCreateTransformJobJsonPathProps.go
- SageMakerCreateTransformJobJsonataProps.go
- SageMakerCreateTransformJobProps.go
- SageMakerCreateTransformJob__checks.go
- SageMakerUpdateEndpoint.go
- SageMakerUpdateEndpointJsonPathProps.go
- SageMakerUpdateEndpointJsonataProps.go
- SageMakerUpdateEndpointProps.go
- SageMakerUpdateEndpoint__checks.go
- Schedule.go
- Schedule__checks.go
- ShuffleConfig.go
- SnsPublish.go
- SnsPublishJsonPathProps.go
- SnsPublishJsonataProps.go
- SnsPublishProps.go
- SnsPublish__checks.go
- SparkSubmitJobDriver.go
- SplitType.go
- SqsSendMessage.go
- SqsSendMessageJsonPathProps.go
- SqsSendMessageJsonataProps.go
- SqsSendMessageProps.go
- SqsSendMessage__checks.go
- StepFunctionsInvokeActivity.go
- StepFunctionsInvokeActivityJsonPathProps.go
- StepFunctionsInvokeActivityJsonataProps.go
- StepFunctionsInvokeActivityProps.go
- StepFunctionsInvokeActivity__checks.go
- StepFunctionsStartExecution.go
- StepFunctionsStartExecutionJsonPathProps.go
- StepFunctionsStartExecutionJsonataProps.go
- StepFunctionsStartExecutionProps.go
- StepFunctionsStartExecution__checks.go
- StoppingCondition.go
- TaskEnvironmentVariable.go
- TransformDataSource.go
- TransformInput.go
- TransformOutput.go
- TransformResources.go
- TransformS3DataSource.go
- URLEncodingFormat.go
- VirtualClusterInput.go
- VirtualClusterInput__checks.go
- VpcConfig.go
- WorkerConfigurationProperty.go
- WorkerType.go
- WorkerTypeV2.go
- WorkerTypeV2__checks.go
- main.go