Class SageMakerCreateTrainingJob
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.services.stepfunctions.State
software.amazon.awscdk.services.stepfunctions.TaskStateBase
software.amazon.awscdk.services.stepfunctions.tasks.SageMakerCreateTrainingJob
- All Implemented Interfaces:
IConnectable
,IGrantable
,IChainable
,INextable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.106.0 (build e852934)",
date="2025-02-12T12:32:12.229Z")
@Stability(Stable)
public class SageMakerCreateTrainingJob
extends TaskStateBase
implements IGrantable, IConnectable
Class representing the SageMaker Create Training Job task.
Example:
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();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A fluent builder forSageMakerCreateTrainingJob
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.stepfunctions.IChainable
IChainable.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IConnectable
IConnectable.Jsii$Default, IConnectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IGrantable
IGrantable.Jsii$Default, IGrantable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.stepfunctions.INextable
INextable.Jsii$Default
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SageMakerCreateTrainingJob
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
SageMakerCreateTrainingJob
(software.amazon.jsii.JsiiObjectRef objRef) SageMakerCreateTrainingJob
(software.constructs.Construct scope, String id, SageMakerCreateTrainingJobProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSecurityGroup
(ISecurityGroup securityGroup) Add the security group to all instances via the launch configuration security groups array.Allows specify security group connections for instances of this fleet.The principal to grant permissions to.getRole()
The execution role for the Sagemaker training job.protected TaskMetricsConfig
protected List<PolicyStatement>
static SageMakerCreateTrainingJob
jsonata
(software.constructs.Construct scope, String id, SageMakerCreateTrainingJobJsonataProps props) A Step Functions Task using JSONata to create a SageMaker training job.static SageMakerCreateTrainingJob
jsonPath
(software.constructs.Construct scope, String id, SageMakerCreateTrainingJobJsonPathProps props) A Step Functions Task using JSONPath to create a SageMaker training job.Methods inherited from class software.amazon.awscdk.services.stepfunctions.TaskStateBase
addCatch, addCatch, addRetry, addRetry, getEndStates, metric, metric, metricFailed, metricFailed, metricHeartbeatTimedOut, metricHeartbeatTimedOut, metricRunTime, metricRunTime, metricScheduled, metricScheduled, metricScheduleTime, metricScheduleTime, metricStarted, metricStarted, metricSucceeded, metricSucceeded, metricTime, metricTime, metricTimedOut, metricTimedOut, next, toStateJson, toStateJson, whenBoundToGraph
Methods inherited from class software.amazon.awscdk.services.stepfunctions.State
addBranch, addChoice, addChoice, addItemProcessor, addItemProcessor, addIterator, addPrefix, bindToGraph, filterNextables, findReachableEndStates, findReachableEndStates, findReachableStates, findReachableStates, getArguments, getAssign, getBranches, getComment, getDefaultChoice, getId, getInputPath, getIteration, getOutputPath, getOutputs, getParameters, getProcessor, getProcessorConfig, getProcessorMode, getQueryLanguage, getResultPath, getResultSelector, getStartState, getStateId, getStateName, makeDefault, makeNext, prefixStates, renderAssign, renderAssign, renderBranches, renderChoices, renderChoices, renderInputOutput, renderItemProcessor, renderIterator, renderNextEnd, renderQueryLanguage, renderQueryLanguage, renderResultSelector, renderRetryCatch, renderRetryCatch, setDefaultChoice, setIteration, setProcessor, setProcessorConfig, setProcessorMode, validateState
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
SageMakerCreateTrainingJob
protected SageMakerCreateTrainingJob(software.amazon.jsii.JsiiObjectRef objRef) -
SageMakerCreateTrainingJob
protected SageMakerCreateTrainingJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
SageMakerCreateTrainingJob
@Stability(Stable) public SageMakerCreateTrainingJob(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull SageMakerCreateTrainingJobProps props) - Parameters:
scope
- This parameter is required.id
- Descriptive identifier for this chainable. This parameter is required.props
- This parameter is required.
-
-
Method Details
-
jsonata
@Stability(Stable) @NotNull public static SageMakerCreateTrainingJob jsonata(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull SageMakerCreateTrainingJobJsonataProps props) A Step Functions Task using JSONata to create a SageMaker training job.- Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
jsonPath
@Stability(Stable) @NotNull public static SageMakerCreateTrainingJob jsonPath(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull SageMakerCreateTrainingJobJsonPathProps props) A Step Functions Task using JSONPath to create a SageMaker training job.- Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
addSecurityGroup
Add the security group to all instances via the launch configuration security groups array.- Parameters:
securityGroup
- : The security group to add. This parameter is required.
-
getConnections
Allows specify security group connections for instances of this fleet.- Specified by:
getConnections
in interfaceIConnectable
-
getGrantPrincipal
The principal to grant permissions to.- Specified by:
getGrantPrincipal
in interfaceIGrantable
-
getRole
The execution role for the Sagemaker training job.Only available after task has been added to a state machine.
-
getTaskMetrics
- Specified by:
getTaskMetrics
in classTaskStateBase
-
getTaskPolicies
- Specified by:
getTaskPolicies
in classTaskStateBase
-