BatchSubmitJobJsonPathProps Struct
Properties for BatchSubmitJob using JSONPath.
| 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 resultSelector: any;
declare const size: cdk.Size;
declare const taskInput: stepfunctions.TaskInput;
declare const taskRole: stepfunctions.TaskRole;
declare const timeout: stepfunctions.Timeout;
const batchSubmitJobJsonPathProps: stepfunctions_tasks.BatchSubmitJobJsonPathProps = {
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,
inputPath: 'inputPath',
integrationPattern: stepfunctions.IntegrationPattern.REQUEST_RESPONSE,
outputPath: 'outputPath',
payload: taskInput,
queryLanguage: stepfunctions.QueryLanguage.JSON_PATH,
resultPath: 'resultPath',
resultSelector: {
resultSelectorKey: resultSelector,
},
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
# result_selector: Any
# size: cdk.Size
# task_input: stepfunctions.TaskInput
# task_role: stepfunctions.TaskRole
# timeout: stepfunctions.Timeout
batch_submit_job_json_path_props = stepfunctions_tasks.BatchSubmitJobJsonPathProps(
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,
input_path="inputPath",
integration_pattern=stepfunctions.IntegrationPattern.REQUEST_RESPONSE,
output_path="outputPath",
payload=task_input,
query_language=stepfunctions.QueryLanguage.JSON_PATH,
result_path="resultPath",
result_selector={
"result_selector_key": result_selector
},
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 resultSelector;
Size size;
TaskInput taskInput;
TaskRole taskRole;
Timeout timeout;
BatchSubmitJobJsonPathProps batchSubmitJobJsonPathProps = BatchSubmitJobJsonPathProps.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)
.inputPath("inputPath")
.integrationPattern(IntegrationPattern.REQUEST_RESPONSE)
.outputPath("outputPath")
.payload(taskInput)
.queryLanguage(QueryLanguage.JSON_PATH)
.resultPath("resultPath")
.resultSelector(Map.of(
"resultSelectorKey", resultSelector))
.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 resultSelector;
Size size;
TaskInput taskInput;
TaskRole taskRole;
Timeout timeout;
var batchSubmitJobJsonPathProps = new BatchSubmitJobJsonPathProps {
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,
InputPath = "inputPath",
IntegrationPattern = IntegrationPattern.REQUEST_RESPONSE,
OutputPath = "outputPath",
Payload = taskInput,
QueryLanguage = QueryLanguage.JSON_PATH,
ResultPath = "resultPath",
ResultSelector = new Dictionary<string, object> {
{ "resultSelectorKey", resultSelector }
},
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 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)),
}
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
inputPathoptionalstringinput_pathoptionalstrinputPathoptionalStringInputPathoptionalstringInputPathoptional*string = $ #May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.
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.
outputPathoptionalstringoutput_pathoptionalstroutputPathoptionalStringOutputPathoptionalstringOutputPathoptional*string = $ #May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}.
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.
resultPathoptionalstringresult_pathoptionalstrresultPathoptionalStringResultPathoptionalstringResultPathoptional*string = $ #May also be the special value JsonPath.DISCARD, which will cause the state's input to become its output.
resultSelectoroptional{ [key: string]: any }result_selectoroptionaltyping.Mapping[str, Any]resultSelectoroptionalMap<String, Object>ResultSelectoroptionalIDictionary<string, object>ResultSelectoroptional*map[string]interface{} = None #You can use ResultSelector to create a payload with values that are static or selected from the state's raw result.
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