Class: AWSCDK::Codecommit::CfnRepository::CodeProperty

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

Overview

Information about code to be committed.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(s3:, branch_name: nil) ⇒ CodeProperty

Returns a new instance of CodeProperty.

Parameters:



616
617
618
619
620
621
# File 'codecommit/cfn_repository.rb', line 616

def initialize(s3:, branch_name: nil)
  @s3 = s3.is_a?(Hash) ? ::AWSCDK::Codecommit::CfnRepository::S3Property.new(**s3.transform_keys(&:to_sym)) : s3
  Jsii::Type.check_type(@s3, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlY29tbWl0LkNmblJlcG9zaXRvcnkuUzNQcm9wZXJ0eSJ9XX19")), "s3")
  @branch_name = branch_name
  Jsii::Type.check_type(@branch_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "branchName") unless @branch_name.nil?
end

Instance Attribute Details

#branch_nameString? (readonly)

Optional.

Specifies a branch name to be used as the default branch when importing code into a repository on initial creation. If this property is not set, the name main will be used for the default branch for the repository. Changes to this property are ignored after initial resource creation. We recommend using this parameter to set the name to main to align with the default behavior of CodeCommit unless another name is needed.



636
637
638
# File 'codecommit/cfn_repository.rb', line 636

def branch_name
  @branch_name
end

#s3AWSCDK::IResolvable, AWSCDK::Codecommit::CfnRepository::S3Property (readonly)

Information about the Amazon S3 bucket that contains a ZIP file of code to be committed to the repository.

Changes to this property are ignored after initial resource creation.



629
630
631
# File 'codecommit/cfn_repository.rb', line 629

def s3
  @s3
end

Class Method Details

.jsii_propertiesObject



638
639
640
641
642
643
# File 'codecommit/cfn_repository.rb', line 638

def self.jsii_properties
  {
    :s3 => "s3",
    :branch_name => "branchName",
  }
end

Instance Method Details

#to_jsiiObject



645
646
647
648
649
650
651
652
# File 'codecommit/cfn_repository.rb', line 645

def to_jsii
  result = {}
  result.merge!({
    "s3" => @s3,
    "branchName" => @branch_name,
  })
  result.compact
end