Class S3DownloadOptions
Options when downloading files from S3.
Inheritance
System.Object
S3DownloadOptions
Implements
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class S3DownloadOptions : Object, IS3DownloadOptions
Syntax (vb)
Public Class S3DownloadOptions
Inherits Object
Implements 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
Constructors
S3DownloadOptions() |
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). |
Constructors
S3DownloadOptions()
public S3DownloadOptions()
Properties
Bucket
BucketKey
The key of the file to download.
public string BucketKey { get; set; }
Property Value
System.String
LocalFile
The name of the local file.
public string LocalFile { get; set; }
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).
public string Region { get; set; }
Property Value
System.String
Remarks
Default: none