Class: AWSCDK::Codecommit::CfnRepository::S3Property

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
codecommit/cfn_repository.rb

Overview

Information about the Amazon S3 bucket that contains the code that will be committed to the new repository.

Changes to this property are ignored after initial resource creation.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket:, key:, object_version: nil) ⇒ S3Property

Returns a new instance of S3Property.

Parameters:

  • bucket (String)

    The name of the Amazon S3 bucket that contains the ZIP file with the content that will be committed to the new repository.

  • key (String)

    The key to use for accessing the Amazon S3 bucket.

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

    The object version of the ZIP file, if versioning is enabled for the Amazon S3 bucket.



747
748
749
750
751
752
753
754
# File 'codecommit/cfn_repository.rb', line 747

def initialize(bucket:, key:, object_version: nil)
  @bucket = bucket
  Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucket")
  @key = key
  Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key")
  @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

#bucketString (readonly)

The name of the Amazon S3 bucket that contains the ZIP file with the content that will be committed to the new repository.

This can be specified using the name of the bucket in the AWS account . Changes to this property are ignored after initial resource creation.



762
763
764
# File 'codecommit/cfn_repository.rb', line 762

def bucket
  @bucket
end

#keyString (readonly)

The key to use for accessing the Amazon S3 bucket.

Changes to this property are ignored after initial resource creation. For more information, see Creating object key names and Uploading objects in the Amazon S3 User Guide.



769
770
771
# File 'codecommit/cfn_repository.rb', line 769

def key
  @key
end

#object_versionString? (readonly)

The object version of the ZIP file, if versioning is enabled for the Amazon S3 bucket.

Changes to this property are ignored after initial resource creation.



776
777
778
# File 'codecommit/cfn_repository.rb', line 776

def object_version
  @object_version
end

Class Method Details

.jsii_propertiesObject



778
779
780
781
782
783
784
# File 'codecommit/cfn_repository.rb', line 778

def self.jsii_properties
  {
    :bucket => "bucket",
    :key => "key",
    :object_version => "objectVersion",
  }
end

Instance Method Details

#to_jsiiObject



786
787
788
789
790
791
792
793
794
# File 'codecommit/cfn_repository.rb', line 786

def to_jsii
  result = {}
  result.merge!({
    "bucket" => @bucket,
    "key" => @key,
    "objectVersion" => @object_version,
  })
  result.compact
end