Class S3Location
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.stepfunctions.tasks.S3Location
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-12T17:54:23.945Z")
@Stability(Stable)
public abstract class S3Location
extends software.amazon.jsii.JsiiObject
Constructs
IS3Location objects.
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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedS3Location(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedS3Location(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionabstract S3LocationConfigbind(ISageMakerTask task, S3LocationBindOptions opts) Called when the S3Location is bound to a StepFunctions task.static S3LocationfromBucket(IBucket bucket, String keyPrefix) AnIS3Locationbuilt with a determined bucket and key prefix.static S3LocationfromJsonExpression(String expression) AnIS3Locationdetermined fully by a JSONata expression or JSON Path from the task input.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
S3Location
protected S3Location(software.amazon.jsii.JsiiObjectRef objRef) -
S3Location
protected S3Location(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
S3Location
@Stability(Stable) protected S3Location()
-
-
Method Details
-
fromBucket
@Stability(Stable) @NotNull public static S3Location fromBucket(@NotNull IBucket bucket, @NotNull String keyPrefix) AnIS3Locationbuilt with a determined bucket and key prefix.- Parameters:
bucket- is the bucket where the objects are to be stored. This parameter is required.keyPrefix- is the key prefix used by the location. This parameter is required.
-
fromJsonExpression
AnIS3Locationdetermined 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
grantReadandgrantWriteapply to the*resource.- Parameters:
expression- the JSON expression resolving to an S3 location URI. This parameter is required.
-
bind
@Stability(Stable) @NotNull public abstract S3LocationConfig bind(@NotNull ISageMakerTask task, @NotNull S3LocationBindOptions opts) Called when the S3Location is bound to a StepFunctions task.- Parameters:
task- This parameter is required.opts- This parameter is required.
-