Class: AWSCDK::ECR::CfnRepositoryCreationTemplateProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecr/cfn_repository_creation_template_props.rb

Overview

Properties for defining a CfnRepositoryCreationTemplate.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(applied_for:, prefix:, custom_role_arn: nil, description: nil, encryption_configuration: nil, image_tag_mutability: nil, image_tag_mutability_exclusion_filters: nil, lifecycle_policy: nil, repository_policy: nil, resource_tags: nil) ⇒ CfnRepositoryCreationTemplateProps

Returns a new instance of CfnRepositoryCreationTemplateProps.

Parameters:

  • applied_for (Array<String>)

    A list of enumerable Strings representing the repository creation scenarios that this template will apply towards.

  • prefix (String)

    The repository namespace prefix associated with the repository creation template.

  • custom_role_arn (String, nil) (defaults to: nil)

    The ARN of the role to be assumed by Amazon ECR.

  • description (String, nil) (defaults to: nil)

    The description associated with the repository creation template.

  • encryption_configuration (AWSCDK::IResolvable, AWSCDK::ECR::CfnRepositoryCreationTemplate::EncryptionConfigurationProperty, nil) (defaults to: nil)

    The encryption configuration associated with the repository creation template.

  • image_tag_mutability (String, nil) (defaults to: nil)

    The tag mutability setting for the repository.

  • image_tag_mutability_exclusion_filters (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::ECR::CfnRepositoryCreationTemplate::ImageTagMutabilityExclusionFilterProperty>, nil) (defaults to: nil)

    A list of filters that specify which image tags are excluded from the repository creation template's image tag mutability setting.

  • lifecycle_policy (String, nil) (defaults to: nil)

    The lifecycle policy to use for repositories created using the template.

  • repository_policy (String, nil) (defaults to: nil)

    The repository policy to apply to repositories created using the template.

  • resource_tags (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::CfnTag>, nil) (defaults to: nil)

    The metadata to apply to the repository to help you categorize and organize.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'ecr/cfn_repository_creation_template_props.rb', line 19

def initialize(applied_for:, prefix:, custom_role_arn: nil, description: nil, encryption_configuration: nil, image_tag_mutability: nil, image_tag_mutability_exclusion_filters: nil, lifecycle_policy: nil, repository_policy: nil, resource_tags: nil)
  @applied_for = applied_for
  Jsii::Type.check_type(@applied_for, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "appliedFor")
  @prefix = prefix
  Jsii::Type.check_type(@prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix")
  @custom_role_arn = custom_role_arn
  Jsii::Type.check_type(@custom_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customRoleArn") unless @custom_role_arn.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @encryption_configuration = encryption_configuration.is_a?(Hash) ? ::AWSCDK::ECR::CfnRepositoryCreationTemplate::EncryptionConfigurationProperty.new(**encryption_configuration.transform_keys(&:to_sym)) : encryption_configuration
  Jsii::Type.check_type(@encryption_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3IuQ2ZuUmVwb3NpdG9yeUNyZWF0aW9uVGVtcGxhdGUuRW5jcnlwdGlvbkNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "encryptionConfiguration") unless @encryption_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("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNyLkNmblJlcG9zaXRvcnlDcmVhdGlvblRlbXBsYXRlLkltYWdlVGFnTXV0YWJpbGl0eUV4Y2x1c2lvbkZpbHRlclByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "imageTagMutabilityExclusionFilters") unless @image_tag_mutability_exclusion_filters.nil?
  @lifecycle_policy = lifecycle_policy
  Jsii::Type.check_type(@lifecycle_policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "lifecyclePolicy") unless @lifecycle_policy.nil?
  @repository_policy = repository_policy
  Jsii::Type.check_type(@repository_policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "repositoryPolicy") unless @repository_policy.nil?
  @resource_tags = resource_tags
  Jsii::Type.check_type(@resource_tags, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5UYWcifV19fSwia2luZCI6ImFycmF5In19XX19")), "resourceTags") unless @resource_tags.nil?
end

Instance Attribute Details

#applied_forArray<String> (readonly)

A list of enumerable Strings representing the repository creation scenarios that this template will apply towards.

The supported scenarios are PULL_THROUGH_CACHE, REPLICATION, and CREATE_ON_PUSH



48
49
50
# File 'ecr/cfn_repository_creation_template_props.rb', line 48

def applied_for
  @applied_for
end

#custom_role_arnString? (readonly)

The ARN of the role to be assumed by Amazon ECR.

Amazon ECR will assume your supplied role when the customRoleArn is specified. When this field isn't specified, Amazon ECR will use the service-linked role for the repository creation template.



60
61
62
# File 'ecr/cfn_repository_creation_template_props.rb', line 60

def custom_role_arn
  @custom_role_arn
end

#descriptionString? (readonly)

The description associated with the repository creation template.



65
66
67
# File 'ecr/cfn_repository_creation_template_props.rb', line 65

def description
  @description
end

#encryption_configurationAWSCDK::IResolvable, ... (readonly)

The encryption configuration associated with the repository creation template.



70
71
72
# File 'ecr/cfn_repository_creation_template_props.rb', line 70

def encryption_configuration
  @encryption_configuration
end

#image_tag_mutabilityString? (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.



77
78
79
# File 'ecr/cfn_repository_creation_template_props.rb', line 77

def image_tag_mutability
  @image_tag_mutability
end

#image_tag_mutability_exclusion_filtersAWSCDK::IResolvable, ... (readonly)

A list of filters that specify which image tags are excluded from the repository creation template's image tag mutability setting.



82
83
84
# File 'ecr/cfn_repository_creation_template_props.rb', line 82

def image_tag_mutability_exclusion_filters
  @image_tag_mutability_exclusion_filters
end

#lifecycle_policyString? (readonly)

The lifecycle policy to use for repositories created using the template.



87
88
89
# File 'ecr/cfn_repository_creation_template_props.rb', line 87

def lifecycle_policy
  @lifecycle_policy
end

#prefixString (readonly)

The repository namespace prefix associated with the repository creation template.



53
54
55
# File 'ecr/cfn_repository_creation_template_props.rb', line 53

def prefix
  @prefix
end

#repository_policyString? (readonly)

The repository policy to apply to repositories created using the template.

A repository policy is a permissions policy associated with a repository to control access permissions.



94
95
96
# File 'ecr/cfn_repository_creation_template_props.rb', line 94

def repository_policy
  @repository_policy
end

#resource_tagsAWSCDK::IResolvable, ... (readonly)

The metadata to apply to the repository to help you categorize and organize.

Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.



101
102
103
# File 'ecr/cfn_repository_creation_template_props.rb', line 101

def resource_tags
  @resource_tags
end

Class Method Details

.jsii_propertiesObject



103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'ecr/cfn_repository_creation_template_props.rb', line 103

def self.jsii_properties
  {
    :applied_for => "appliedFor",
    :prefix => "prefix",
    :custom_role_arn => "customRoleArn",
    :description => "description",
    :encryption_configuration => "encryptionConfiguration",
    :image_tag_mutability => "imageTagMutability",
    :image_tag_mutability_exclusion_filters => "imageTagMutabilityExclusionFilters",
    :lifecycle_policy => "lifecyclePolicy",
    :repository_policy => "repositoryPolicy",
    :resource_tags => "resourceTags",
  }
end

Instance Method Details

#to_jsiiObject



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'ecr/cfn_repository_creation_template_props.rb', line 118

def to_jsii
  result = {}
  result.merge!({
    "appliedFor" => @applied_for,
    "prefix" => @prefix,
    "customRoleArn" => @custom_role_arn,
    "description" => @description,
    "encryptionConfiguration" => @encryption_configuration,
    "imageTagMutability" => @image_tag_mutability,
    "imageTagMutabilityExclusionFilters" => @image_tag_mutability_exclusion_filters,
    "lifecyclePolicy" => @lifecycle_policy,
    "repositoryPolicy" => @repository_policy,
    "resourceTags" => @resource_tags,
  })
  result.compact
end