Class: AWSCDK::CodeStar::CfnGitHubRepository::S3Property

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
code_star/cfn_git_hub_repository.rb

Overview

The S3 property type specifies information about the Amazon S3 bucket that contains the code to be committed to the new repository.

S3 is a property of the AWS::CodeStar::GitHubRepository resource.

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 to be committed to the new repository.

  • key (String)

    The S3 object key or file name for the ZIP file.

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

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



631
632
633
634
635
636
637
638
# File 'code_star/cfn_git_hub_repository.rb', line 631

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 to be committed to the new repository.



644
645
646
# File 'code_star/cfn_git_hub_repository.rb', line 644

def bucket
  @bucket
end

#keyString (readonly)

The S3 object key or file name for the ZIP file.



649
650
651
# File 'code_star/cfn_git_hub_repository.rb', line 649

def key
  @key
end

#object_versionString? (readonly)

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



654
655
656
# File 'code_star/cfn_git_hub_repository.rb', line 654

def object_version
  @object_version
end

Class Method Details

.jsii_propertiesObject



656
657
658
659
660
661
662
# File 'code_star/cfn_git_hub_repository.rb', line 656

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

Instance Method Details

#to_jsiiObject



664
665
666
667
668
669
670
671
672
# File 'code_star/cfn_git_hub_repository.rb', line 664

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