@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:42.536Z") @Stability(value=Stable) public abstract class S3Location extends software.amazon.jsii.JsiiObject
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", "mybucket"), "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();
| Modifier | Constructor and Description |
|---|---|
protected |
S3Location() |
protected |
S3Location(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
S3Location(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
abstract S3LocationConfig |
bind(ISageMakerTask task,
S3LocationBindOptions opts)
Called when the S3Location is bound to a StepFunctions task.
|
static S3Location |
fromBucket(IBucket bucket,
String keyPrefix)
An `IS3Location` built with a determined bucket and key prefix.
|
static S3Location |
fromJsonExpression(String expression)
An `IS3Location` determined fully by a JSON Path from the task input.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected S3Location(software.amazon.jsii.JsiiObjectRef objRef)
protected S3Location(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) protected S3Location()
@Stability(value=Stable) @NotNull public static S3Location fromBucket(@NotNull IBucket bucket, @NotNull String keyPrefix)
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.@Stability(value=Stable) @NotNull public static S3Location fromJsonExpression(@NotNull String expression)
Due to the dynamic nature of those locations, the IAM grants that will be set by grantRead and grantWrite
apply to the * resource.
expression - the JSON expression resolving to an S3 location URI. This parameter is required.@Stability(value=Stable) @NotNull public abstract S3LocationConfig bind(@NotNull ISageMakerTask task, @NotNull S3LocationBindOptions opts)
task - This parameter is required.opts - This parameter is required.Copyright © 2022. All rights reserved.