Class S3Location
Constructs IS3Location
objects.
Inheritance
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class S3Location : DeputyBase
Syntax (vb)
Public MustInherit Class S3Location
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
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)
}
});
Synopsis
Constructors
S3Location() | |
S3Location(By |
Used by jsii to construct an instance of this class from a Javascript-owned object reference |
S3Location(Deputy |
Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(ISage |
Called when the S3Location is bound to a StepFunctions task. |
From |
An |
From |
An |
Constructors
S3Location()
protected S3Location()
S3Location(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected S3Location(ByRefValue reference)
Parameters
- reference Amazon.
JSII. Runtime. Deputy. By Ref Value The Javascript-owned object reference
S3Location(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected S3Location(DeputyBase.DeputyProps props)
Parameters
- props Amazon.
JSII. Runtime. Deputy. Deputy Base. Deputy Props The deputy props
Methods
Bind(ISageMakerTask, IS3LocationBindOptions)
Called when the S3Location is bound to a StepFunctions task.
public abstract IS3LocationConfig Bind(ISageMakerTask task, IS3LocationBindOptions opts)
Parameters
- task ISage
Maker Task - opts IS3Location
Bind Options
Returns
FromBucket(IBucket, String)
An IS3Location
built with a determined bucket and key prefix.
public static S3Location FromBucket(IBucket bucket, string keyPrefix)
Parameters
- bucket IBucket
is the bucket where the objects are to be stored.
- keyPrefix System.
String is the key prefix used by the location.
Returns
FromJsonExpression(String)
An IS3Location
determined fully by a JSONata expression or JSON Path from the task input.
public static S3Location FromJsonExpression(string expression)
Parameters
- expression System.
String the JSON expression resolving to an S3 location URI.
Returns
Remarks
Due to the dynamic nature of those locations, the IAM grants that will be set by grantRead
and grantWrite
apply to the *
resource.