Class: AWSCDK::Datasync::CfnLocationS3Props

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
datasync/cfn_location_s3_props.rb

Overview

Properties for defining a CfnLocationS3.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(s3_config:, s3_bucket_arn: nil, s3_storage_class: nil, subdirectory: nil, tags: nil) ⇒ CfnLocationS3Props

Returns a new instance of CfnLocationS3Props.

Parameters:

  • s3_config (AWSCDK::IResolvable, AWSCDK::Datasync::CfnLocationS3::S3ConfigProperty)

    The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that is used to access an Amazon S3 bucket.

  • s3_bucket_arn (String, AWSCDK::Interfaces::AWSS3::IBucketRef, nil) (defaults to: nil)

    The ARN of the Amazon S3 bucket.

  • s3_storage_class (String, nil) (defaults to: nil)

    The Amazon S3 storage class that you want to store your files in when this location is used as a task destination.

  • subdirectory (String, nil) (defaults to: nil)

    Specifies a prefix in the S3 bucket that DataSync reads from or writes to (depending on whether the bucket is a source or destination location).

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    Specifies labels that help you categorize, filter, and search for your AWS resources.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'datasync/cfn_location_s3_props.rb', line 14

def initialize(s3_config:, s3_bucket_arn: nil, s3_storage_class: nil, subdirectory: nil, tags: nil)
  @s3_config = s3_config.is_a?(Hash) ? ::AWSCDK::Datasync::CfnLocationS3::S3ConfigProperty.new(**s3_config.transform_keys(&:to_sym)) : s3_config
  Jsii::Type.check_type(@s3_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19kYXRhc3luYy5DZm5Mb2NhdGlvblMzLlMzQ29uZmlnUHJvcGVydHkifV19fQ==")), "s3Config")
  @s3_bucket_arn = s3_bucket_arn
  Jsii::Type.check_type(@s3_bucket_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19zMy5JQnVja2V0UmVmIn1dfX0=")), "s3BucketArn") unless @s3_bucket_arn.nil?
  @s3_storage_class = s3_storage_class
  Jsii::Type.check_type(@s3_storage_class, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3StorageClass") unless @s3_storage_class.nil?
  @subdirectory = subdirectory
  Jsii::Type.check_type(@subdirectory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subdirectory") unless @subdirectory.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#s3_bucket_arnString, ... (readonly)

The ARN of the Amazon S3 bucket.



38
39
40
# File 'datasync/cfn_location_s3_props.rb', line 38

def s3_bucket_arn
  @s3_bucket_arn
end

#s3_configAWSCDK::IResolvable, AWSCDK::Datasync::CfnLocationS3::S3ConfigProperty (readonly)

The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that is used to access an Amazon S3 bucket.

For detailed information about using such a role, see Creating a Location for Amazon S3 in the AWS DataSync User Guide .



33
34
35
# File 'datasync/cfn_location_s3_props.rb', line 33

def s3_config
  @s3_config
end

#s3_storage_classString? (readonly)

Note:

Default: - "STANDARD"

The Amazon S3 storage class that you want to store your files in when this location is used as a task destination.

For buckets in AWS Regions , the storage class defaults to S3 Standard.

For more information about S3 storage classes, see Amazon S3 Storage Classes . Some storage classes have behaviors that can affect your S3 storage costs. For detailed information, see Considerations When Working with Amazon S3 Storage Classes in DataSync .



48
49
50
# File 'datasync/cfn_location_s3_props.rb', line 48

def s3_storage_class
  @s3_storage_class
end

#subdirectoryString? (readonly)

Specifies a prefix in the S3 bucket that DataSync reads from or writes to (depending on whether the bucket is a source or destination location).

DataSync can't transfer objects with a prefix that begins with a slash ( / ) or includes // , /./ , or /../ patterns. For example:

  • /photos
  • photos//2006/January
  • photos/./2006/February
  • photos/../2006/March


60
61
62
# File 'datasync/cfn_location_s3_props.rb', line 60

def subdirectory
  @subdirectory
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

Specifies labels that help you categorize, filter, and search for your AWS resources.

We recommend creating at least a name tag for your transfer location.



67
68
69
# File 'datasync/cfn_location_s3_props.rb', line 67

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



69
70
71
72
73
74
75
76
77
# File 'datasync/cfn_location_s3_props.rb', line 69

def self.jsii_properties
  {
    :s3_config => "s3Config",
    :s3_bucket_arn => "s3BucketArn",
    :s3_storage_class => "s3StorageClass",
    :subdirectory => "subdirectory",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



79
80
81
82
83
84
85
86
87
88
89
# File 'datasync/cfn_location_s3_props.rb', line 79

def to_jsii
  result = {}
  result.merge!({
    "s3Config" => @s3_config,
    "s3BucketArn" => @s3_bucket_arn,
    "s3StorageClass" => @s3_storage_class,
    "subdirectory" => @subdirectory,
    "tags" => @tags,
  })
  result.compact
end