Skip to content
v2.273.0

SageMakerCreateTrainingJob ​

Class representing the SageMaker Create Training Job task.

Example ​

ts
new tasks.SageMakerCreateTrainingJob(this, 'TrainSagemaker', {
  trainingJobName: sfn.JsonPath.stringAt('$.JobName'),
  algorithmSpecification: {
    algorithmName: 'BlazingText',
    trainingInputMode: tasks.InputMode.FILE,
  },
  inputDataConfig: [{
    channelName: 'train',
    dataSource: {
      s3DataSource: {
        s3DataType: tasks.S3DataType.S3_PREFIX,
        s3Location: tasks.S3Location.fromJsonExpression('$.S3Bucket'),
      },
    },
  }],
  outputDataConfig: {
    s3OutputLocation: tasks.S3Location.fromBucket(s3.Bucket.fromBucketName(this, 'Bucket', 'amzn-s3-demo-bucket'), 'myoutputpath'),
  },
  resourceConfig: {
    instanceCount: 1,
    instanceType: new ec2.InstanceType(sfn.JsonPath.stringAt('$.InstanceType')),
    volumeSize: Size.gibibytes(50),
  }, // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume
  stoppingCondition: {
    maxRuntime: Duration.hours(2),
  }, // optional: default is 1 hour
});
python
tasks.SageMakerCreateTrainingJob(self, "TrainSagemaker",
    training_job_name=sfn.JsonPath.string_at("$.JobName"),
    algorithm_specification=tasks.AlgorithmSpecification(
        algorithm_name="BlazingText",
        training_input_mode=tasks.InputMode.FILE
    ),
    input_data_config=[tasks.Channel(
        channel_name="train",
        data_source=tasks.DataSource(
            s3_data_source=tasks.S3DataSource(
                s3_data_type=tasks.S3DataType.S3_PREFIX,
                s3_location=tasks.S3Location.from_json_expression("$.S3Bucket")
            )
        )
    )],
    output_data_config=tasks.OutputDataConfig(
        s3_output_location=tasks.S3Location.from_bucket(s3.Bucket.from_bucket_name(self, "Bucket", "amzn-s3-demo-bucket"), "myoutputpath")
    ),
    resource_config=tasks.ResourceConfig(
        instance_count=1,
        instance_type=ec2.InstanceType(sfn.JsonPath.string_at("$.InstanceType")),
        volume_size=Size.gibibytes(50)
    ),  # optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume
    stopping_condition=tasks.StoppingCondition(
        max_runtime=Duration.hours(2)
    )
)
java
SageMakerCreateTrainingJob.Builder.create(this, "TrainSagemaker")
        .trainingJobName(JsonPath.stringAt("$.JobName"))
        .algorithmSpecification(AlgorithmSpecification.builder()
                .algorithmName("BlazingText")
                .trainingInputMode(InputMode.FILE)
                .build())
        .inputDataConfig(List.of(Channel.builder()
                .channelName("train")
                .dataSource(DataSource.builder()
                        .s3DataSource(S3DataSource.builder()
                                .s3DataType(S3DataType.S3_PREFIX)
                                .s3Location(S3Location.fromJsonExpression("$.S3Bucket"))
                                .build())
                        .build())
                .build()))
        .outputDataConfig(OutputDataConfig.builder()
                .s3OutputLocation(S3Location.fromBucket(Bucket.fromBucketName(this, "Bucket", "amzn-s3-demo-bucket"), "myoutputpath"))
                .build())
        .resourceConfig(ResourceConfig.builder()
                .instanceCount(1)
                .instanceType(new InstanceType(JsonPath.stringAt("$.InstanceType")))
                .volumeSize(Size.gibibytes(50))
                .build()) // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume
        .stoppingCondition(StoppingCondition.builder()
                .maxRuntime(Duration.hours(2))
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
new SageMakerCreateTrainingJob(this, "TrainSagemaker", new SageMakerCreateTrainingJobProps {
    TrainingJobName = JsonPath.StringAt("$.JobName"),
    AlgorithmSpecification = new AlgorithmSpecification {
        AlgorithmName = "BlazingText",
        TrainingInputMode = InputMode.FILE
    },
    InputDataConfig = new [] { new Channel {
        ChannelName = "train",
        DataSource = new DataSource {
            S3DataSource = new S3DataSource {
                S3DataType = S3DataType.S3_PREFIX,
                S3Location = S3Location.FromJsonExpression("$.S3Bucket")
            }
        }
    } },
    OutputDataConfig = new OutputDataConfig {
        S3OutputLocation = S3Location.FromBucket(Bucket.FromBucketName(this, "Bucket", "amzn-s3-demo-bucket"), "myoutputpath")
    },
    ResourceConfig = new ResourceConfig {
        InstanceCount = 1,
        InstanceType = new InstanceType(JsonPath.StringAt("$.InstanceType")),
        VolumeSize = Size.Gibibytes(50)
    },  // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume
    StoppingCondition = new StoppingCondition {
        MaxRuntime = Duration.Hours(2)
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
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)),
	},
})

Initializer ​

ts
new SageMakerCreateTrainingJob(scope: Construct, id: string, props: SageMakerCreateTrainingJobProps)
python
SageMakerCreateTrainingJob(scope: Construct, id: str, props: SageMakerCreateTrainingJobProps)
java
new SageMakerCreateTrainingJob(Construct scope, String id, SageMakerCreateTrainingJobProps props)
csharp
new SageMakerCreateTrainingJob(Construct scope, string id, SageMakerCreateTrainingJobProps props)
go
NewSageMakerCreateTrainingJob(Scope Construct, Id *string, Props SageMakerCreateTrainingJobProps)

Construct Props ​

algorithmSpecificationAlgorithmSpecificationalgorithm_specificationAlgorithmSpecificationalgorithmSpecificationAlgorithmSpecificationAlgorithmSpecificationAlgorithmSpecificationAlgorithmSpecificationAlgorithmSpecificationrequired#
Identifies the training algorithm to use.
assign{ [key: string]: any }assigntyping.Mapping[str, Any]assignMap<String, Object>AssignIDictionary<string, object>Assign*map[string]interface{}= Not assign variables#
Workflow variables to store in this step.

Using workflow variables, you can store data in a step and retrieve that data in future steps.

commentstringcommentstrcommentStringCommentstringComment*string= No comment#
A comment describing this state.
credentialsCredentialscredentialsCredentialscredentialsCredentialsCredentialsCredentialsCredentialsCredentials= None (Task is executed using the…#
Credentials for an IAM Role that the State Machine assumes for executing the task.

This enables cross-account resource invocations.

default

Default: None (Task is executed using the State Machine's execution role)

enableNetworkIsolationbooleanenable_network_isolationboolenableNetworkIsolationBooleanEnableNetworkIsolationboolEnableNetworkIsolation*bool= false#
Isolates the training container.

No inbound or outbound network calls can be made to or from the training container.

environment{ [key: string]: string }environmenttyping.Mapping[str, str]environmentMap<String, String>EnvironmentIDictionary<string, string>Environment*map[string]*string= No environment variables#
Environment variables to set in the Docker container.
heartbeatDurationheartbeatDurationheartbeatDurationHeartbeatDurationHeartbeatDuration= Nonedeprecated#
use `heartbeatTimeout`
heartbeatTimeoutTimeoutheartbeat_timeoutTimeoutheartbeatTimeoutTimeoutHeartbeatTimeoutTimeoutHeartbeatTimeoutTimeout= None#
Timeout for the heartbeat.

[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface

hyperparameters{ [key: string]: any }hyperparameterstyping.Mapping[str, Any]hyperparametersMap<String, Object>HyperparametersIDictionary<string, object>Hyperparameters*map[string]interface{}= No hyperparameters#
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

inputDataConfigChannel[]input_data_configtyping.List[Channel]inputDataConfigList<Channel>InputDataConfigChannel[]InputDataConfig*[]Channel= No inputDataConfig#
Describes the various datasets (e.g. train, validation, test) and the Amazon S3 location where stored.
inputPathstringinput_pathstrinputPathStringInputPathstringInputPath*string= $#
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 {}.

integrationPatternIntegrationPatternintegration_patternIntegrationPatternintegrationPatternIntegrationPatternIntegrationPatternIntegrationPatternIntegrationPatternIntegrationPattern= `IntegrationPattern.REQUEST_RESP…#
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.

default

Default: IntegrationPattern.REQUEST_RESPONSE for most tasks. IntegrationPattern.RUN_JOB for the following exceptions: BatchSubmitJob, EmrAddStep, EmrCreateCluster, EmrTerminationCluster, and EmrContainersStartJobRun.

outputDataConfigOutputDataConfigoutput_data_configOutputDataConfigoutputDataConfigOutputDataConfigOutputDataConfigOutputDataConfigOutputDataConfigOutputDataConfigrequired#
Identifies the Amazon S3 location where you want Amazon SageMaker to save the results of model training.
outputPathstringoutput_pathstroutputPathStringOutputPathstringOutputPath*string= $#
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 {}.

outputsanyoutputsAnyoutputsObjectOutputsobjectOutputsinterface{}= $states.result or $states.errorO…#
Used to specify and transform output from the state.
notes · default

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.

Default: $states.result or $states.errorOutput

queryLanguageQueryLanguagequery_languageQueryLanguagequeryLanguageQueryLanguageQueryLanguageQueryLanguageQueryLanguageQueryLanguage= JSONPath#
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.

resourceConfigResourceConfigresource_configResourceConfigresourceConfigResourceConfigResourceConfigResourceConfigResourceConfigResourceConfig= 1 instance of EC2 `M4.XLarge` wi…#
Specifies the resources, ML compute instances, and ML storage volumes to deploy for model training.
default

Default: 1 instance of EC2 M4.XLarge with 10GB volume

resultPathstringresult_pathstrresultPathStringResultPathstringResultPath*string= $#
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.

resultSelector{ [key: string]: any }result_selectortyping.Mapping[str, Any]resultSelectorMap<String, Object>ResultSelectorIDictionary<string, object>ResultSelector*map[string]interface{}= None#
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.

roleIRoleroleIRoleroleIRoleRoleIRoleRoleIRole= a role will be created.#
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

stateNamestringstate_namestrstateNameStringStateNamestringStateName*string= The construct ID will be used as…#
Optional name for this state.
default

Default: The construct ID will be used as state name

stoppingConditionStoppingConditionstopping_conditionStoppingConditionstoppingConditionStoppingConditionStoppingConditionStoppingConditionStoppingConditionStoppingCondition= max runtime of 1 hour#
Sets a time limit for training.
tags{ [key: string]: string }tagstyping.Mapping[str, str]tagsMap<String, String>TagsIDictionary<string, string>Tags*map[string]*string= No tags#
Tags to be applied to the train job.
taskTimeoutTimeouttask_timeoutTimeouttaskTimeoutTimeoutTaskTimeoutTimeoutTaskTimeoutTimeout= None#
Timeout for the task.

[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface

timeoutDurationtimeoutDurationtimeoutDurationTimeoutDurationTimeoutDuration= Nonedeprecated#
use `taskTimeout`
trainingJobNamestringtraining_job_namestrtrainingJobNameStringTrainingJobNamestringTrainingJobName*stringrequired#
Training Job Name.
vpcConfigVpcConfigvpc_configVpcConfigvpcConfigVpcConfigVpcConfigVpcConfigVpcConfigVpcConfig= No VPC#
Specifies the VPC that you want your training job to connect to.

Properties ​

connectionsConnectionsconnectionsConnectionsconnectionsConnectionsConnectionsConnectionsConnectionsConnectionsrequired#
Allows specify security group connections for instances of this fleet.
endStatesINextable[]end_statestyping.List[INextable]endStatesList<INextable>EndStatesINextable[]EndStates*[]INextablerequired#
Continuable states of this Chainable.
grantPrincipalIPrincipalgrant_principalIPrincipalgrantPrincipalIPrincipalGrantPrincipalIPrincipalGrantPrincipalIPrincipalrequired#
The principal to grant permissions to.
idstringidstridStringIdstringId*stringrequired#
Descriptive identifier for this chainable.
nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
PROPERTY_INJECTION_IDstringproperty_injection_idstrPROPERTY_INJECTION_IDStringPROPERTY_INJECTION_IDstringPROPERTY_INJECTION_ID*stringrequiredstatic#
Uniquely identifies this class.
roleIRoleroleIRoleroleIRoleRoleIRoleRoleIRolerequired#
The execution role for the Sagemaker training job.

Only available after task has been added to a state machine.

startStateStatestart_stateStatestartStateStateStartStateStateStartStateStaterequired#
First state of this Chainable.
stateIdstringstate_idstrstateIdStringStateIdstringStateId*stringrequired#
Tokenized string that evaluates to the state's ID.

Methods ​

addCatch(handler: IChainable, props?: CatchProps): TaskStateBasedef add_catch(self, handler: IChainable, props: typing.Optional[CatchProps] = None) -> TaskStateBasepublic TaskStateBase addCatch(IChainable handler, CatchProps props)public TaskStateBase AddCatch(IChainable handler, CatchProps? props = null)func AddCatch(Handler IChainable, Props CatchProps) TaskStateBase#
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.

addPrefix(x: string): voiddef add_prefix(self, x: str) -> Nonepublic void addPrefix(String x)public void AddPrefix(string x)func AddPrefix(X *string)#
Add a prefix to the stateId of this state.
addRetry(props?: RetryProps): TaskStateBasedef add_retry(self, props: typing.Optional[RetryProps] = None) -> TaskStateBasepublic TaskStateBase addRetry(RetryProps props)public TaskStateBase AddRetry(RetryProps? props = null)func AddRetry(Props RetryProps) TaskStateBase#
Add retry configuration for this state.

This controls if and how the execution will be retried if a particular error occurs.

addSecurityGroup(securityGroup: ISecurityGroup): voiddef add_security_group(self, security_group: ISecurityGroup) -> Nonepublic void addSecurityGroup(ISecurityGroup securityGroup)public void AddSecurityGroup(ISecurityGroup securityGroup)func AddSecurityGroup(SecurityGroup ISecurityGroup)#
Add the security group to all instances via the launch configuration security groups array.
1 parameter

Parameters

  • securityGroupsecurity_groupsecurityGroupsecurityGroupSecurityGroup — : The security group to add.
bindToGraph(graph: StateGraph): voiddef bind_to_graph(self, graph: StateGraph) -> Nonepublic void bindToGraph(StateGraph graph)public void BindToGraph(StateGraph graph)func BindToGraph(Graph StateGraph)#
Register this state as part of the given graph.

Don't call this. It will be called automatically when you work with states normally.

filterNextables(states: State[]): INextable[]@staticmethod def filter_nextables(states: typing.List[State]) -> typing.List[INextable]public static List<INextable> filterNextables(List<State> states)public static INextable[] FilterNextables(State[] states)func FilterNextables(States *[]State) *[]INextablestatic#
Return only the states that allow chaining from an array of states.
findReachableEndStates(start: State, options?: FindStateOptions): State[]@staticmethod def find_reachable_end_states(start: State, options: typing.Optional[FindStateOptions] = None) -> typing.List[State]public static List<State> findReachableEndStates(State start, FindStateOptions options)public static State[] FindReachableEndStates(State start, FindStateOptions? options = null)func FindReachableEndStates(Start State, Options FindStateOptions) *[]Statestatic#
Find the set of end states states reachable through transitions from the given start state.
findReachableStates(start: State, options?: FindStateOptions): State[]@staticmethod def find_reachable_states(start: State, options: typing.Optional[FindStateOptions] = None) -> typing.List[State]public static List<State> findReachableStates(State start, FindStateOptions options)public static State[] FindReachableStates(State start, FindStateOptions? options = null)func FindReachableStates(Start State, Options FindStateOptions) *[]Statestatic#
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.

isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#
Checks if `x` is a construct.
notes · 1 parameter · returns

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.

Parameters

  • xxxxX — Any object.

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

jsonata(scope: Construct, id: string, props: SageMakerCreateTrainingJobJsonataProps): SageMakerCreateTrainingJob // chainable@staticmethod def jsonata(scope: Construct, id: str, props: SageMakerCreateTrainingJobJsonataProps) -> SageMakerCreateTrainingJobpublic static SageMakerCreateTrainingJob jsonata(Construct scope, String id, SageMakerCreateTrainingJobJsonataProps props)public static SageMakerCreateTrainingJob Jsonata(Construct scope, string id, SageMakerCreateTrainingJobJsonataProps props)func Jsonata(Scope Construct, Id *string, Props SageMakerCreateTrainingJobJsonataProps) SageMakerCreateTrainingJobstatic#
A Step Functions Task using JSONata to create a SageMaker training job.
jsonPath(scope: Construct, id: string, props: SageMakerCreateTrainingJobJsonPathProps): SageMakerCreateTrainingJob // chainable@staticmethod def json_path(scope: Construct, id: str, props: SageMakerCreateTrainingJobJsonPathProps) -> SageMakerCreateTrainingJobpublic static SageMakerCreateTrainingJob jsonPath(Construct scope, String id, SageMakerCreateTrainingJobJsonPathProps props)public static SageMakerCreateTrainingJob JsonPath(Construct scope, string id, SageMakerCreateTrainingJobJsonPathProps props)func JsonPath(Scope Construct, Id *string, Props SageMakerCreateTrainingJobJsonPathProps) SageMakerCreateTrainingJobstatic#
A Step Functions Task using JSONPath to create a SageMaker training job.
metric(metricName: string, props?: MetricOptions): Metricdef metric(self, metric_name: str, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metric(String metricName, MetricOptions props)public Metric Metric(string metricName, MetricOptions? props = null)func Metric(MetricName *string, Props MetricOptions) Metric#
Return the given named metric for this Task.
metricFailed(props?: MetricOptions): Metricdef metric_failed(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricFailed(MetricOptions props)public Metric MetricFailed(MetricOptions? props = null)func MetricFailed(Props MetricOptions) Metric#
Metric for the number of times this activity fails.
metricHeartbeatTimedOut(props?: MetricOptions): Metricdef metric_heartbeat_timed_out(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricHeartbeatTimedOut(MetricOptions props)public Metric MetricHeartbeatTimedOut(MetricOptions? props = null)func MetricHeartbeatTimedOut(Props MetricOptions) Metric#
Metric for the number of times the heartbeat times out for this activity.
metricRunTime(props?: MetricOptions): Metricdef metric_run_time(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricRunTime(MetricOptions props)public Metric MetricRunTime(MetricOptions? props = null)func MetricRunTime(Props MetricOptions) Metric#
The interval, in milliseconds, between the time the Task starts and the time it closes.
metricScheduled(props?: MetricOptions): Metricdef metric_scheduled(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricScheduled(MetricOptions props)public Metric MetricScheduled(MetricOptions? props = null)func MetricScheduled(Props MetricOptions) Metric#
Metric for the number of times this activity is scheduled.
metricScheduleTime(props?: MetricOptions): Metricdef metric_schedule_time(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricScheduleTime(MetricOptions props)public Metric MetricScheduleTime(MetricOptions? props = null)func MetricScheduleTime(Props MetricOptions) Metric#
The interval, in milliseconds, for which the activity stays in the schedule state.
metricStarted(props?: MetricOptions): Metricdef metric_started(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricStarted(MetricOptions props)public Metric MetricStarted(MetricOptions? props = null)func MetricStarted(Props MetricOptions) Metric#
Metric for the number of times this activity is started.
metricSucceeded(props?: MetricOptions): Metricdef metric_succeeded(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricSucceeded(MetricOptions props)public Metric MetricSucceeded(MetricOptions? props = null)func MetricSucceeded(Props MetricOptions) Metric#
Metric for the number of times this activity succeeds.
metricTime(props?: MetricOptions): Metricdef metric_time(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricTime(MetricOptions props)public Metric MetricTime(MetricOptions? props = null)func MetricTime(Props MetricOptions) Metric#
The interval, in milliseconds, between the time the activity is scheduled and the time it closes.
metricTimedOut(props?: MetricOptions): Metricdef metric_timed_out(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricTimedOut(MetricOptions props)public Metric MetricTimedOut(MetricOptions? props = null)func MetricTimedOut(Props MetricOptions) Metric#
Metric for the number of times this activity times out.
prefixStates(root: IConstruct, prefix: string): void@staticmethod def prefix_states(root: IConstruct, prefix: str) -> Nonepublic static void prefixStates(IConstruct root, String prefix)public static void PrefixStates(IConstruct root, string prefix)func PrefixStates(Root IConstruct, Prefix *string)static#
Add a prefix to the stateId of all States found in a construct tree.
toStateJson(topLevelQueryLanguage?: QueryLanguage): jsondef to_state_json(self, top_level_query_language: typing.Optional[QueryLanguage] = None) -> Anypublic Object toStateJson(QueryLanguage topLevelQueryLanguage)public object ToStateJson(QueryLanguage? topLevelQueryLanguage = null)func ToStateJson(TopLevelQueryLanguage QueryLanguage) interface{}#
Return the Amazon States Language object for this state.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

1 parameter · returns

Parameters

  • mixinsmixinsmixinsmixinsMixins — The mixins to apply.

Returns: This construct for chaining