BatchSubmitJobJsonataProps Struct
Properties for BatchSubmitJob using JSONata.
| Source | aws-stepfunctions-tasks/lib/batch/submit-job.ts |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
import { aws_stepfunctions as stepfunctions } from 'aws-cdk-lib';
import { aws_stepfunctions_tasks as stepfunctions_tasks } from 'aws-cdk-lib';
declare const assign: any;
declare const instanceType: ec2.InstanceType;
declare const outputs: any;
declare const size: cdk.Size;
declare const taskInput: stepfunctions.TaskInput;
declare const taskRole: stepfunctions.TaskRole;
declare const timeout: stepfunctions.Timeout;
const batchSubmitJobJsonataProps: stepfunctions_tasks.BatchSubmitJobJsonataProps = {
jobDefinitionArn: 'jobDefinitionArn',
jobName: 'jobName',
jobQueueArn: 'jobQueueArn',
// the properties below are optional
arraySize: 123,
assign: {
assignKey: assign,
},
attempts: 123,
comment: 'comment',
containerOverrides: {
command: ['command'],
environment: {
environmentKey: 'environment',
},
gpuCount: 123,
instanceType: instanceType,
memory: size,
vcpus: 123,
},
credentials: {
role: taskRole,
},
dependsOn: [{
jobId: 'jobId',
type: 'type',
}],
heartbeat: cdk.Duration.minutes(30),
heartbeatTimeout: timeout,
integrationPattern: stepfunctions.IntegrationPattern.REQUEST_RESPONSE,
outputs: outputs,
payload: taskInput,
queryLanguage: stepfunctions.QueryLanguage.JSON_PATH,
stateName: 'stateName',
tags: {
tagsKey: 'tags',
},
taskTimeout: timeout,
timeout: cdk.Duration.minutes(30),
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_ec2 as ec2
from aws_cdk import aws_stepfunctions as stepfunctions
from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks
# assign: Any
# instance_type: ec2.InstanceType
# outputs: Any
# size: cdk.Size
# task_input: stepfunctions.TaskInput
# task_role: stepfunctions.TaskRole
# timeout: stepfunctions.Timeout
batch_submit_job_jsonata_props = stepfunctions_tasks.BatchSubmitJobJsonataProps(
job_definition_arn="jobDefinitionArn",
job_name="jobName",
job_queue_arn="jobQueueArn",
# the properties below are optional
array_size=123,
assign={
"assign_key": assign
},
attempts=123,
comment="comment",
container_overrides=stepfunctions_tasks.BatchContainerOverrides(
command=["command"],
environment={
"environment_key": "environment"
},
gpu_count=123,
instance_type=instance_type,
memory=size,
vcpus=123
),
credentials=stepfunctions.Credentials(
role=task_role
),
depends_on=[stepfunctions_tasks.BatchJobDependency(
job_id="jobId",
type="type"
)],
heartbeat=cdk.Duration.minutes(30),
heartbeat_timeout=timeout,
integration_pattern=stepfunctions.IntegrationPattern.REQUEST_RESPONSE,
outputs=outputs,
payload=task_input,
query_language=stepfunctions.QueryLanguage.JSON_PATH,
state_name="stateName",
tags={
"tags_key": "tags"
},
task_timeout=timeout,
timeout=cdk.Duration.minutes(30)
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.stepfunctions.*;
import software.amazon.awscdk.services.stepfunctions.tasks.*;
Object assign;
InstanceType instanceType;
Object outputs;
Size size;
TaskInput taskInput;
TaskRole taskRole;
Timeout timeout;
BatchSubmitJobJsonataProps batchSubmitJobJsonataProps = BatchSubmitJobJsonataProps.builder()
.jobDefinitionArn("jobDefinitionArn")
.jobName("jobName")
.jobQueueArn("jobQueueArn")
// the properties below are optional
.arraySize(123)
.assign(Map.of(
"assignKey", assign))
.attempts(123)
.comment("comment")
.containerOverrides(BatchContainerOverrides.builder()
.command(List.of("command"))
.environment(Map.of(
"environmentKey", "environment"))
.gpuCount(123)
.instanceType(instanceType)
.memory(size)
.vcpus(123)
.build())
.credentials(Credentials.builder()
.role(taskRole)
.build())
.dependsOn(List.of(BatchJobDependency.builder()
.jobId("jobId")
.type("type")
.build()))
.heartbeat(Duration.minutes(30))
.heartbeatTimeout(timeout)
.integrationPattern(IntegrationPattern.REQUEST_RESPONSE)
.outputs(outputs)
.payload(taskInput)
.queryLanguage(QueryLanguage.JSON_PATH)
.stateName("stateName")
.tags(Map.of(
"tagsKey", "tags"))
.taskTimeout(timeout)
.timeout(Duration.minutes(30))
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.StepFunctions;
using Amazon.CDK.AWS.StepFunctions.Tasks;
var assign;
InstanceType instanceType;
var outputs;
Size size;
TaskInput taskInput;
TaskRole taskRole;
Timeout timeout;
var batchSubmitJobJsonataProps = new BatchSubmitJobJsonataProps {
JobDefinitionArn = "jobDefinitionArn",
JobName = "jobName",
JobQueueArn = "jobQueueArn",
// the properties below are optional
ArraySize = 123,
Assign = new Dictionary<string, object> {
{ "assignKey", assign }
},
Attempts = 123,
Comment = "comment",
ContainerOverrides = new BatchContainerOverrides {
Command = new [] { "command" },
Environment = new Dictionary<string, string> {
{ "environmentKey", "environment" }
},
GpuCount = 123,
InstanceType = instanceType,
Memory = size,
Vcpus = 123
},
Credentials = new Credentials {
Role = taskRole
},
DependsOn = new [] { new BatchJobDependency {
JobId = "jobId",
Type = "type"
} },
Heartbeat = Duration.Minutes(30),
HeartbeatTimeout = timeout,
IntegrationPattern = IntegrationPattern.REQUEST_RESPONSE,
Outputs = outputs,
Payload = taskInput,
QueryLanguage = QueryLanguage.JSON_PATH,
StateName = "stateName",
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
},
TaskTimeout = timeout,
Timeout = Duration.Minutes(30)
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// 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)),
}
Properties
arraySizeoptionalnumberarray_sizeoptionalint | floatarraySizeoptionalNumberArraySizeoptionaldoubleArraySizeoptional*float64 #Default: No array size
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.
assignoptional{ [key: string]: any }assignoptionaltyping.Mapping[str, Any]assignoptionalMap<String, Object>AssignoptionalIDictionary<string, object>Assignoptional*map[string]interface{} #Default: Not assign variables
Using workflow variables, you can store data in a step and retrieve that data in future steps.
attemptsoptionalnumberattemptsoptionalint | floatattemptsoptionalNumberAttemptsoptionaldoubleAttemptsoptional*float64 = 1 #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.
commentoptionalstringcommentoptionalstrcommentoptionalStringCommentoptionalstringCommentoptional*string #Default: No comment
containerOverridesoptionalBatchContainerOverridescontainer_overridesoptionalBatchContainerOverridescontainerOverridesoptionalBatchContainerOverridesContainerOverridesoptionalBatchContainerOverridesContainerOverridesoptionalBatchContainerOverrides #Default: No container overrides
credentialsoptionalCredentialscredentialsoptionalCredentialscredentialsoptionalCredentialsCredentialsoptionalCredentialsCredentialsoptionalCredentials #Default: None (Task is executed using the State Machine's execution role)
This enables cross-account resource invocations.
dependsOnoptionalBatchJobDependency[]depends_onoptionaltyping.List[BatchJobDependency]dependsOnoptionalList<BatchJobDependency>DependsOnoptionalBatchJobDependency[]DependsOnoptional*[]BatchJobDependency #Default: No dependencies
A job can depend upon a maximum of 20 jobs.
heartbeatoptionalDurationheartbeatoptionalDurationheartbeatoptionalDurationHeartbeatoptionalDurationHeartbeatoptionalDuration = None deprecated #heartbeatTimeoutoptionalTimeoutheartbeat_timeoutoptionalTimeoutheartbeatTimeoutoptionalTimeoutHeartbeatTimeoutoptionalTimeoutHeartbeatTimeoutoptionalTimeout = None #[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface
integrationPatternoptionalIntegrationPatternintegration_patternoptionalIntegrationPatternintegrationPatternoptionalIntegrationPatternIntegrationPatternoptionalIntegrationPatternIntegrationPatternoptionalIntegrationPattern #Default: IntegrationPattern.REQUEST_RESPONSE for most tasks. IntegrationPattern.RUN_JOB for the following exceptions: BatchSubmitJob, EmrAddStep, EmrCreateCluster, EmrTerminationCluster, and EmrContainersStartJobRun.
You can control these AWS services using service integration patterns.
Depending on the AWS Service, the Service Integration Pattern availability will vary.
jobDefinitionArnstringjob_definition_arnstrjobDefinitionArnStringJobDefinitionArnstringJobDefinitionArn*string required #The first character must be alphanumeric, and up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
outputsoptionalanyoutputsoptionalAnyoutputsoptionalObjectOutputsoptionalobjectOutputsoptionalinterface{} #Default: $states.result or $states.errorOutput
notes
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.
payloadoptionalTaskInputpayloadoptionalTaskInputpayloadoptionalTaskInputPayloadoptionalTaskInputPayloadoptionalTaskInput #Default: No parameters are passed
queryLanguageoptionalQueryLanguagequery_languageoptionalQueryLanguagequeryLanguageoptionalQueryLanguageQueryLanguageoptionalQueryLanguageQueryLanguageoptionalQueryLanguage = JSONPath #If the state does not contain a queryLanguage field, then it will use the query language specified in the top-level queryLanguage field.
stateNameoptionalstringstate_nameoptionalstrstateNameoptionalStringStateNameoptionalstringStateNameoptional*string #Default: The construct ID will be used as state name
tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string #Default: {} - no tags