Class: AWSCDK::ECR::CfnRepositoryProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECR::CfnRepositoryProps
- Defined in:
- ecr/cfn_repository_props.rb
Overview
Properties for defining a CfnRepository.
Instance Attribute Summary collapse
-
#empty_on_delete ⇒ Boolean, ...
readonly
If true, deleting the repository force deletes the contents of the repository.
-
#encryption_configuration ⇒ AWSCDK::IResolvable, ...
readonly
The encryption configuration for the repository.
-
#image_scanning_configuration ⇒ AWSCDK::IResolvable, ...
readonly
The
imageScanningConfigurationparameter is being deprecated, in favor of specifying the image scanning configuration at the registry level. -
#image_tag_mutability ⇒ String?
readonly
The tag mutability setting for the repository.
-
#image_tag_mutability_exclusion_filters ⇒ AWSCDK::IResolvable, ...
readonly
A list of filters that specify which image tags are excluded from the repository's image tag mutability setting.
-
#lifecycle_policy ⇒ AWSCDK::IResolvable, ...
readonly
Creates or updates a lifecycle policy.
-
#repository_name ⇒ String?
readonly
The name to use for the repository.
-
#repository_policy_text ⇒ Object?
readonly
The JSON repository policy text to apply to the repository.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
An array of key-value pairs to apply to this resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(empty_on_delete: nil, encryption_configuration: nil, image_scanning_configuration: nil, image_tag_mutability: nil, image_tag_mutability_exclusion_filters: nil, lifecycle_policy: nil, repository_name: nil, repository_policy_text: nil, tags: nil) ⇒ CfnRepositoryProps
constructor
A new instance of CfnRepositoryProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(empty_on_delete: nil, encryption_configuration: nil, image_scanning_configuration: nil, image_tag_mutability: nil, image_tag_mutability_exclusion_filters: nil, lifecycle_policy: nil, repository_name: nil, repository_policy_text: nil, tags: nil) ⇒ CfnRepositoryProps
Returns a new instance of CfnRepositoryProps.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'ecr/cfn_repository_props.rb', line 18 def initialize(empty_on_delete: nil, encryption_configuration: nil, image_scanning_configuration: nil, image_tag_mutability: nil, image_tag_mutability_exclusion_filters: nil, lifecycle_policy: nil, repository_name: nil, repository_policy_text: nil, tags: nil) @empty_on_delete = empty_on_delete Jsii::Type.check_type(@empty_on_delete, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "emptyOnDelete") unless @empty_on_delete.nil? @encryption_configuration = encryption_configuration.is_a?(Hash) ? ::AWSCDK::ECR::CfnRepository::EncryptionConfigurationProperty.new(**encryption_configuration.transform_keys(&:to_sym)) : encryption_configuration Jsii::Type.check_type(@encryption_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3IuQ2ZuUmVwb3NpdG9yeS5FbmNyeXB0aW9uQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "encryptionConfiguration") unless @encryption_configuration.nil? @image_scanning_configuration = image_scanning_configuration.is_a?(Hash) ? ::AWSCDK::ECR::CfnRepository::ImageScanningConfigurationProperty.new(**image_scanning_configuration.transform_keys(&:to_sym)) : image_scanning_configuration Jsii::Type.check_type(@image_scanning_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3IuQ2ZuUmVwb3NpdG9yeS5JbWFnZVNjYW5uaW5nQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "imageScanningConfiguration") unless @image_scanning_configuration.nil? @image_tag_mutability = image_tag_mutability Jsii::Type.check_type(@image_tag_mutability, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageTagMutability") unless @image_tag_mutability.nil? @image_tag_mutability_exclusion_filters = image_tag_mutability_exclusion_filters Jsii::Type.check_type(@image_tag_mutability_exclusion_filters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNyLkNmblJlcG9zaXRvcnkuSW1hZ2VUYWdNdXRhYmlsaXR5RXhjbHVzaW9uRmlsdGVyUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "imageTagMutabilityExclusionFilters") unless @image_tag_mutability_exclusion_filters.nil? @lifecycle_policy = lifecycle_policy.is_a?(Hash) ? ::AWSCDK::ECR::CfnRepository::LifecyclePolicyProperty.new(**lifecycle_policy.transform_keys(&:to_sym)) : lifecycle_policy Jsii::Type.check_type(@lifecycle_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3IuQ2ZuUmVwb3NpdG9yeS5MaWZlY3ljbGVQb2xpY3lQcm9wZXJ0eSJ9XX19")), "lifecyclePolicy") unless @lifecycle_policy.nil? @repository_name = repository_name Jsii::Type.check_type(@repository_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "repositoryName") unless @repository_name.nil? @repository_policy_text = repository_policy_text Jsii::Type.check_type(@repository_policy_text, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "repositoryPolicyText") unless @repository_policy_text.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? end |
Instance Attribute Details
#empty_on_delete ⇒ Boolean, ... (readonly)
If true, deleting the repository force deletes the contents of the repository.
If false, the repository must be empty before attempting to delete it.
45 46 47 |
# File 'ecr/cfn_repository_props.rb', line 45 def empty_on_delete @empty_on_delete end |
#encryption_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
The encryption configuration for the repository.
This determines how the contents of your repository are encrypted at rest.
52 53 54 |
# File 'ecr/cfn_repository_props.rb', line 52 def encryption_configuration @encryption_configuration end |
#image_scanning_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
The
imageScanningConfigurationparameter is being deprecated, in favor of specifying the image scanning configuration at the registry level.
For more information, see PutRegistryScanningConfiguration .
The image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.
61 62 63 |
# File 'ecr/cfn_repository_props.rb', line 61 def image_scanning_configuration @image_scanning_configuration end |
#image_tag_mutability ⇒ String? (readonly)
The tag mutability setting for the repository.
If this parameter is omitted, the default setting of MUTABLE will be used which will allow image tags to be overwritten. If IMMUTABLE is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.
68 69 70 |
# File 'ecr/cfn_repository_props.rb', line 68 def image_tag_mutability @image_tag_mutability end |
#image_tag_mutability_exclusion_filters ⇒ AWSCDK::IResolvable, ... (readonly)
A list of filters that specify which image tags are excluded from the repository's image tag mutability setting.
73 74 75 |
# File 'ecr/cfn_repository_props.rb', line 73 def image_tag_mutability_exclusion_filters @image_tag_mutability_exclusion_filters end |
#lifecycle_policy ⇒ AWSCDK::IResolvable, ... (readonly)
Creates or updates a lifecycle policy.
For information about lifecycle policy syntax, see Lifecycle policy template .
80 81 82 |
# File 'ecr/cfn_repository_props.rb', line 80 def lifecycle_policy @lifecycle_policy end |
#repository_name ⇒ String? (readonly)
The name to use for the repository.
The repository name may be specified on its own (such as nginx-web-app ) or it can be prepended with a namespace to group the repository into a category (such as project-a/nginx-web-app ). If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the repository name. For more information, see Name type .
The repository name must start with a letter and can only contain lowercase letters, numbers, hyphens, underscores, and forward slashes.
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
91 92 93 |
# File 'ecr/cfn_repository_props.rb', line 91 def repository_name @repository_name end |
#repository_policy_text ⇒ Object? (readonly)
The JSON repository policy text to apply to the repository.
For more information, see Amazon ECR repository policies in the Amazon Elastic Container Registry User Guide .
98 99 100 |
# File 'ecr/cfn_repository_props.rb', line 98 def repository_policy_text @repository_policy_text end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
An array of key-value pairs to apply to this resource.
103 104 105 |
# File 'ecr/cfn_repository_props.rb', line 103 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'ecr/cfn_repository_props.rb', line 105 def self.jsii_properties { :empty_on_delete => "emptyOnDelete", :encryption_configuration => "encryptionConfiguration", :image_scanning_configuration => "imageScanningConfiguration", :image_tag_mutability => "imageTagMutability", :image_tag_mutability_exclusion_filters => "imageTagMutabilityExclusionFilters", :lifecycle_policy => "lifecyclePolicy", :repository_name => "repositoryName", :repository_policy_text => "repositoryPolicyText", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'ecr/cfn_repository_props.rb', line 119 def to_jsii result = {} result.merge!({ "emptyOnDelete" => @empty_on_delete, "encryptionConfiguration" => @encryption_configuration, "imageScanningConfiguration" => @image_scanning_configuration, "imageTagMutability" => @image_tag_mutability, "imageTagMutabilityExclusionFilters" => @image_tag_mutability_exclusion_filters, "lifecyclePolicy" => @lifecycle_policy, "repositoryName" => @repository_name, "repositoryPolicyText" => @repository_policy_text, "tags" => @tags, }) result.compact end |