Class: AWSCDK::S3::Location
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3::Location
- Defined in:
- s3/location.rb
Overview
An interface that represents the location of a specific object in an S3 Bucket.
Instance Attribute Summary collapse
-
#bucket_name ⇒ String
readonly
The name of the S3 Bucket the object is in.
-
#object_key ⇒ String
readonly
The path inside the Bucket where the object is located at.
-
#object_version ⇒ String?
readonly
The S3 object version.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(bucket_name:, object_key:, object_version: nil) ⇒ Location
constructor
A new instance of Location.
- #to_jsii ⇒ Object
Constructor Details
#initialize(bucket_name:, object_key:, object_version: nil) ⇒ Location
Returns a new instance of Location.
10 11 12 13 14 15 16 17 |
# File 's3/location.rb', line 10 def initialize(bucket_name:, object_key:, object_version: nil) @bucket_name = bucket_name Jsii::Type.check_type(@bucket_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucketName") @object_key = object_key Jsii::Type.check_type(@object_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "objectKey") @object_version = object_version Jsii::Type.check_type(@object_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "objectVersion") unless @object_version.nil? end |
Instance Attribute Details
#bucket_name ⇒ String (readonly)
The name of the S3 Bucket the object is in.
22 23 24 |
# File 's3/location.rb', line 22 def bucket_name @bucket_name end |
#object_key ⇒ String (readonly)
The path inside the Bucket where the object is located at.
26 27 28 |
# File 's3/location.rb', line 26 def object_key @object_key end |
#object_version ⇒ String? (readonly)
The S3 object version.
30 31 32 |
# File 's3/location.rb', line 30 def object_version @object_version end |
Class Method Details
.jsii_properties ⇒ Object
32 33 34 35 36 37 38 |
# File 's3/location.rb', line 32 def self.jsii_properties { :bucket_name => "bucketName", :object_key => "objectKey", :object_version => "objectVersion", } end |
Instance Method Details
#to_jsii ⇒ Object
40 41 42 43 44 45 46 47 48 |
# File 's3/location.rb', line 40 def to_jsii result = {} result.merge!({ "bucketName" => @bucket_name, "objectKey" => @object_key, "objectVersion" => @object_version, }) result.compact end |