Class: AWSCDK::Codecommit::CfnRepository::CodeProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Codecommit::CfnRepository::CodeProperty
- Defined in:
- codecommit/cfn_repository.rb
Overview
Information about code to be committed.
Instance Attribute Summary collapse
-
#branch_name ⇒ String?
readonly
Optional.
-
#s3 ⇒ AWSCDK::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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(s3:, branch_name: nil) ⇒ CodeProperty
constructor
A new instance of CodeProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(s3:, branch_name: nil) ⇒ CodeProperty
Returns a new instance of CodeProperty.
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_name ⇒ String? (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 |
#s3 ⇒ AWSCDK::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_properties ⇒ Object
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_jsii ⇒ Object
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 |