Class: AWSCDK::Codecommit::CfnRepositoryProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Codecommit::CfnRepositoryProps
- Defined in:
- codecommit/cfn_repository_props.rb
Overview
Properties for defining a CfnRepository.
Instance Attribute Summary collapse
-
#code ⇒ AWSCDK::IResolvable, ...
readonly
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.
-
#kms_key_id ⇒ String?
readonly
The ID of the AWS Key Management Service encryption key used to encrypt and decrypt the repository.
-
#repository_description ⇒ String?
readonly
A comment or description about the new repository.
-
#repository_name ⇒ String
readonly
The name of the new repository to be created.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
One or more tag key-value pairs to use when tagging this repository.
-
#triggers ⇒ AWSCDK::IResolvable, ...
readonly
The JSON block of configuration information for each trigger.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(repository_name:, code: nil, kms_key_id: nil, repository_description: nil, tags: nil, triggers: nil) ⇒ CfnRepositoryProps
constructor
A new instance of CfnRepositoryProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(repository_name:, code: nil, kms_key_id: nil, repository_description: nil, tags: nil, triggers: nil) ⇒ CfnRepositoryProps
Returns a new instance of CfnRepositoryProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'codecommit/cfn_repository_props.rb', line 15 def initialize(repository_name:, code: nil, kms_key_id: nil, repository_description: nil, tags: nil, triggers: nil) @repository_name = repository_name Jsii::Type.check_type(@repository_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "repositoryName") @code = code.is_a?(Hash) ? ::AWSCDK::Codecommit::CfnRepository::CodeProperty.new(**code.transform_keys(&:to_sym)) : code Jsii::Type.check_type(@code, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlY29tbWl0LkNmblJlcG9zaXRvcnkuQ29kZVByb3BlcnR5In1dfX0=")), "code") unless @code.nil? @kms_key_id = kms_key_id Jsii::Type.check_type(@kms_key_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKeyId") unless @kms_key_id.nil? @repository_description = repository_description Jsii::Type.check_type(@repository_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "repositoryDescription") unless @repository_description.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? @triggers = triggers Jsii::Type.check_type(@triggers, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWNvbW1pdC5DZm5SZXBvc2l0b3J5LlJlcG9zaXRvcnlUcmlnZ2VyUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "triggers") unless @triggers.nil? end |
Instance Attribute Details
#code ⇒ AWSCDK::IResolvable, ... (readonly)
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.
Information about code is only used in resource creation. Updates to a stack will not reflect changes made to code properties after initial resource creation.
You can only use this property to add code when creating a repository with a CloudFormation template at creation time. This property cannot be used for updating code to an existing repository.
45 46 47 |
# File 'codecommit/cfn_repository_props.rb', line 45 def code @code end |
#kms_key_id ⇒ String? (readonly)
The ID of the AWS Key Management Service encryption key used to encrypt and decrypt the repository.
The input can be the full ARN, the key ID, or the key alias. For more information, see Finding the key ID and key ARN .
52 53 54 |
# File 'codecommit/cfn_repository_props.rb', line 52 def kms_key_id @kms_key_id end |
#repository_description ⇒ String? (readonly)
A comment or description about the new repository.
The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage.
59 60 61 |
# File 'codecommit/cfn_repository_props.rb', line 59 def repository_description @repository_description end |
#repository_name ⇒ String (readonly)
The name of the new repository to be created.
The repository name must be unique across the calling AWS account . Repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. For more information about the limits on repository names, see Quotas in the AWS CodeCommit User Guide . The suffix .git is prohibited.
36 37 38 |
# File 'codecommit/cfn_repository_props.rb', line 36 def repository_name @repository_name end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
One or more tag key-value pairs to use when tagging this repository.
64 65 66 |
# File 'codecommit/cfn_repository_props.rb', line 64 def @tags end |
#triggers ⇒ AWSCDK::IResolvable, ... (readonly)
The JSON block of configuration information for each trigger.
69 70 71 |
# File 'codecommit/cfn_repository_props.rb', line 69 def triggers @triggers end |
Class Method Details
.jsii_properties ⇒ Object
71 72 73 74 75 76 77 78 79 80 |
# File 'codecommit/cfn_repository_props.rb', line 71 def self.jsii_properties { :repository_name => "repositoryName", :code => "code", :kms_key_id => "kmsKeyId", :repository_description => "repositoryDescription", :tags => "tags", :triggers => "triggers", } end |
Instance Method Details
#to_jsii ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'codecommit/cfn_repository_props.rb', line 82 def to_jsii result = {} result.merge!({ "repositoryName" => @repository_name, "code" => @code, "kmsKeyId" => @kms_key_id, "repositoryDescription" => @repository_description, "tags" => @tags, "triggers" => @triggers, }) result.compact end |