Interface S3DownloadOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
S3DownloadOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:39.523Z")
@Stability(Stable)
public interface S3DownloadOptions
extends software.amazon.jsii.JsiiSerializable
Options when downloading files from S3.
Example:
import software.amazon.awscdk.services.s3.assets.Asset;
Instance instance;
Asset asset = Asset.Builder.create(this, "Asset")
.path("./configure.sh")
.build();
String localPath = instance.userData.addS3DownloadCommand(S3DownloadOptions.builder()
.bucket(asset.getBucket())
.bucketKey(asset.getS3ObjectKey())
.region("us-east-1")
.build());
instance.userData.addExecuteFileCommand(ExecuteFileOptions.builder()
.filePath(localPath)
.arguments("--verbose -y")
.build());
asset.grantRead(instance.getRole());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forS3DownloadOptionsstatic final classAn implementation forS3DownloadOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic S3DownloadOptions.Builderbuilder()Name of the S3 bucket to download from.The key of the file to download.default StringThe name of the local file.default StringThe region of the S3 Bucket (needed for access via VPC Gateway).Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getBucket
Name of the S3 bucket to download from. -
getBucketKey
The key of the file to download. -
getLocalFile
The name of the local file.Default: Linux - /tmp/bucketKey Windows - %TEMP%/bucketKey
-
getRegion
The region of the S3 Bucket (needed for access via VPC Gateway).Default: none
-
builder
- Returns:
- a
S3DownloadOptions.BuilderofS3DownloadOptions
-