Show / Hide Table of Contents

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

Name of the S3 bucket to download from.

IBucketRef Bucket { get; }
Property Value

IBucketRef

Remarks

ExampleMetadata: infused

BucketKey

The key of the file to download.

string BucketKey { get; }
Property Value

string

Remarks

ExampleMetadata: infused

LocalFile

The name of the local file.

string? LocalFile { get; }
Property Value

string

Remarks

Default: Linux - /tmp/bucketKey Windows - %TEMP%/bucketKey

Region

The region of the S3 Bucket (needed for access via VPC Gateway).

string? Region { get; }
Property Value

string

Remarks

Default: none

Back to top Generated by DocFX