Interface IS3DownloadOptions
Options when downloading files from S3.
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IS3DownloadOptions
Syntax (vb)
Public Interface IS3DownloadOptions
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.S3.Assets;
Instance instance;
var asset = new Asset(this, "Asset", new AssetProps {
Path = "./configure.sh"
});
var localPath = instance.UserData.AddS3DownloadCommand(new S3DownloadOptions {
Bucket = asset.Bucket,
BucketKey = asset.S3ObjectKey,
Region = "us-east-1"
});
instance.UserData.AddExecuteFileCommand(new ExecuteFileOptions {
FilePath = localPath,
Arguments = "--verbose -y"
});
asset.GrantRead(instance.Role);
Synopsis
Properties
Bucket | Name of the S3 bucket to download from. |
BucketKey | The key of the file to download. |
LocalFile | The name of the local file. |
Region | The region of the S3 Bucket (needed for access via VPC Gateway). |
Properties
Bucket
BucketKey
The key of the file to download.
string BucketKey { get; }
Property Value
System.String
LocalFile
The name of the local file.
virtual string LocalFile { get; }
Property Value
System.String
Remarks
Default: Linux - /tmp/bucketKey Windows - %TEMP%/bucketKey
Region
The region of the S3 Bucket (needed for access via VPC Gateway).
virtual string Region { get; }
Property Value
System.String
Remarks
Default: none