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.95.0 (build f1ff514)", date="2024-03-26T18:09:30.921Z") @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", "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();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    S3Location(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    S3Location(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    An IS3Location determined fully by a 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, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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)
      An IS3Location built 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

      @Stability(Stable) @NotNull public static S3Location fromJsonExpression(@NotNull String expression)
      An IS3Location determined fully by a JSON Path from the task input.

      Due to the dynamic nature of those locations, the IAM grants that will be set by grantRead and grantWrite apply 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.