Class: AWSCDK::ECR::RepositoryProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECR::RepositoryProps
- Defined in:
- ecr/repository_props.rb
Instance Attribute Summary collapse
-
#auto_delete_images ⇒ Boolean?
readonly
deprecated
Deprecated.
Use
emptyOnDeleteinstead. -
#empty_on_delete ⇒ Boolean?
readonly
If true, deleting the repository force deletes the contents of the repository.
-
#encryption ⇒ AWSCDK::ECR::RepositoryEncryption?
readonly
The kind of server-side encryption to apply to this repository.
-
#encryption_key ⇒ AWSCDK::Interfaces::AWSKMS::IKeyRef?
readonly
External KMS key to use for repository encryption.
-
#image_scan_on_push ⇒ Boolean?
readonly
Enable the scan on push when creating the repository.
-
#image_tag_mutability ⇒ AWSCDK::ECR::TagMutability?
readonly
The tag mutability setting for the repository.
-
#image_tag_mutability_exclusion_filters ⇒ Array<AWSCDK::ECR::ImageTagMutabilityExclusionFilter>?
readonly
The image tag mutability exclusion filters for the repository.
-
#lifecycle_registry_id ⇒ String?
readonly
The AWS account ID associated with the registry that contains the repository.
-
#lifecycle_rules ⇒ Array<AWSCDK::ECR::LifecycleRule>?
readonly
Life cycle rules to apply to this registry.
-
#removal_policy ⇒ AWSCDK::RemovalPolicy?
readonly
Determine what happens to the repository when the resource/stack is deleted.
-
#repository_name ⇒ String?
readonly
Name for this repository.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(auto_delete_images: nil, empty_on_delete: nil, encryption: nil, encryption_key: nil, image_scan_on_push: nil, image_tag_mutability: nil, image_tag_mutability_exclusion_filters: nil, lifecycle_registry_id: nil, lifecycle_rules: nil, removal_policy: nil, repository_name: nil) ⇒ RepositoryProps
constructor
A new instance of RepositoryProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(auto_delete_images: nil, empty_on_delete: nil, encryption: nil, encryption_key: nil, image_scan_on_push: nil, image_tag_mutability: nil, image_tag_mutability_exclusion_filters: nil, lifecycle_registry_id: nil, lifecycle_rules: nil, removal_policy: nil, repository_name: nil) ⇒ RepositoryProps
Returns a new instance of RepositoryProps.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'ecr/repository_props.rb', line 17 def initialize(auto_delete_images: nil, empty_on_delete: nil, encryption: nil, encryption_key: nil, image_scan_on_push: nil, image_tag_mutability: nil, image_tag_mutability_exclusion_filters: nil, lifecycle_registry_id: nil, lifecycle_rules: nil, removal_policy: nil, repository_name: nil) @auto_delete_images = auto_delete_images Jsii::Type.check_type(@auto_delete_images, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "autoDeleteImages") unless @auto_delete_images.nil? @empty_on_delete = empty_on_delete Jsii::Type.check_type(@empty_on_delete, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "emptyOnDelete") unless @empty_on_delete.nil? @encryption = encryption Jsii::Type.check_type(@encryption, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNyLlJlcG9zaXRvcnlFbmNyeXB0aW9uIn0=")), "encryption") unless @encryption.nil? @encryption_key = encryption_key Jsii::Type.check_type(@encryption_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rbXMuSUtleVJlZiJ9")), "encryptionKey") unless @encryption_key.nil? @image_scan_on_push = image_scan_on_push Jsii::Type.check_type(@image_scan_on_push, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "imageScanOnPush") unless @image_scan_on_push.nil? @image_tag_mutability = image_tag_mutability Jsii::Type.check_type(@image_tag_mutability, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNyLlRhZ011dGFiaWxpdHkifQ==")), "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("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3IuSW1hZ2VUYWdNdXRhYmlsaXR5RXhjbHVzaW9uRmlsdGVyIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "imageTagMutabilityExclusionFilters") unless @image_tag_mutability_exclusion_filters.nil? @lifecycle_registry_id = lifecycle_registry_id Jsii::Type.check_type(@lifecycle_registry_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "lifecycleRegistryId") unless @lifecycle_registry_id.nil? @lifecycle_rules = lifecycle_rules.is_a?(Array) ? lifecycle_rules.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::ECR::LifecycleRule.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : lifecycle_rules Jsii::Type.check_type(@lifecycle_rules, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3IuTGlmZWN5Y2xlUnVsZSJ9LCJraW5kIjoiYXJyYXkifX0=")), "lifecycleRules") unless @lifecycle_rules.nil? @removal_policy = removal_policy Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil? @repository_name = repository_name Jsii::Type.check_type(@repository_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "repositoryName") unless @repository_name.nil? end |
Instance Attribute Details
#auto_delete_images ⇒ Boolean? (readonly)
Use emptyOnDelete instead.
Default: false
Whether all images should be automatically deleted when the repository is removed from the stack or when the stack is deleted.
Requires the removal_policy to be set to RemovalPolicy.DESTROY.
49 50 51 |
# File 'ecr/repository_props.rb', line 49 def auto_delete_images @auto_delete_images end |
#empty_on_delete ⇒ Boolean? (readonly)
Default: false
If true, deleting the repository force deletes the contents of the repository.
If false, the repository must be empty before attempting to delete it.
56 57 58 |
# File 'ecr/repository_props.rb', line 56 def empty_on_delete @empty_on_delete end |
#encryption ⇒ AWSCDK::ECR::RepositoryEncryption? (readonly)
Default: - KMS if encryptionKey is specified, or AES256 otherwise.
The kind of server-side encryption to apply to this repository.
If you choose KMS, you can specify a KMS key via encryption_key. If
encryptionKey is not specified, an AWS managed KMS key is used.
64 65 66 |
# File 'ecr/repository_props.rb', line 64 def encryption @encryption end |
#encryption_key ⇒ AWSCDK::Interfaces::AWSKMS::IKeyRef? (readonly)
Default: - If encryption is set to KMS and this property is undefined, an AWS managed KMS key is used.
External KMS key to use for repository encryption.
The 'encryption' property must be either not specified or set to "KMS". An error will be emitted if encryption is set to "AES256".
72 73 74 |
# File 'ecr/repository_props.rb', line 72 def encryption_key @encryption_key end |
#image_scan_on_push ⇒ Boolean? (readonly)
Default: false
Enable the scan on push when creating the repository.
77 78 79 |
# File 'ecr/repository_props.rb', line 77 def image_scan_on_push @image_scan_on_push end |
#image_tag_mutability ⇒ AWSCDK::ECR::TagMutability? (readonly)
Default: TagMutability.MUTABLE
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.
84 85 86 |
# File 'ecr/repository_props.rb', line 84 def image_tag_mutability @image_tag_mutability end |
#image_tag_mutability_exclusion_filters ⇒ Array<AWSCDK::ECR::ImageTagMutabilityExclusionFilter>? (readonly)
Default: undefined - AWS ECR default is no exclusion filters
The image tag mutability exclusion filters for the repository.
These filters specify which image tags can override the repository's default image tag mutability setting.
92 93 94 |
# File 'ecr/repository_props.rb', line 92 def image_tag_mutability_exclusion_filters @image_tag_mutability_exclusion_filters end |
#lifecycle_registry_id ⇒ String? (readonly)
Default: The default registry is assumed.
The AWS account ID associated with the registry that contains the repository.
98 99 100 |
# File 'ecr/repository_props.rb', line 98 def lifecycle_registry_id @lifecycle_registry_id end |
#lifecycle_rules ⇒ Array<AWSCDK::ECR::LifecycleRule>? (readonly)
Default: No life cycle rules
Life cycle rules to apply to this registry.
103 104 105 |
# File 'ecr/repository_props.rb', line 103 def lifecycle_rules @lifecycle_rules end |
#removal_policy ⇒ AWSCDK::RemovalPolicy? (readonly)
Default: RemovalPolicy.Retain
Determine what happens to the repository when the resource/stack is deleted.
108 109 110 |
# File 'ecr/repository_props.rb', line 108 def removal_policy @removal_policy end |
#repository_name ⇒ String? (readonly)
Default: Automatically generated name.
Name for this repository.
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.
117 118 119 |
# File 'ecr/repository_props.rb', line 117 def repository_name @repository_name end |
Class Method Details
.jsii_properties ⇒ Object
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'ecr/repository_props.rb', line 119 def self.jsii_properties { :auto_delete_images => "autoDeleteImages", :empty_on_delete => "emptyOnDelete", :encryption => "encryption", :encryption_key => "encryptionKey", :image_scan_on_push => "imageScanOnPush", :image_tag_mutability => "imageTagMutability", :image_tag_mutability_exclusion_filters => "imageTagMutabilityExclusionFilters", :lifecycle_registry_id => "lifecycleRegistryId", :lifecycle_rules => "lifecycleRules", :removal_policy => "removalPolicy", :repository_name => "repositoryName", } end |
Instance Method Details
#to_jsii ⇒ Object
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'ecr/repository_props.rb', line 135 def to_jsii result = {} result.merge!({ "autoDeleteImages" => @auto_delete_images, "emptyOnDelete" => @empty_on_delete, "encryption" => @encryption, "encryptionKey" => @encryption_key, "imageScanOnPush" => @image_scan_on_push, "imageTagMutability" => @image_tag_mutability, "imageTagMutabilityExclusionFilters" => @image_tag_mutability_exclusion_filters, "lifecycleRegistryId" => @lifecycle_registry_id, "lifecycleRules" => @lifecycle_rules, "removalPolicy" => @removal_policy, "repositoryName" => @repository_name, }) result.compact end |