Class: AWSCDK::ECR::CfnPublicRepositoryProps

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

Overview

Properties for defining a CfnPublicRepository.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repository_catalog_data: nil, repository_name: nil, repository_policy_text: nil, tags: nil) ⇒ CfnPublicRepositoryProps

Returns a new instance of CfnPublicRepositoryProps.

Parameters:

  • repository_catalog_data (Object, nil) (defaults to: nil)

    The details about the repository that are publicly visible in the Amazon ECR Public Gallery.

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

    The name to use for the public repository.

  • repository_policy_text (Object, nil) (defaults to: nil)

    The JSON repository policy text to apply to the public repository.

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

    An array of key-value pairs to apply to this resource.



13
14
15
16
17
18
19
20
21
22
# File 'ecr/cfn_public_repository_props.rb', line 13

def initialize(repository_catalog_data: nil, repository_name: nil, repository_policy_text: nil, tags: nil)
  @repository_catalog_data = repository_catalog_data
  Jsii::Type.check_type(@repository_catalog_data, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "repositoryCatalogData") unless @repository_catalog_data.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 = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#repository_catalog_dataObject? (readonly)

The details about the repository that are publicly visible in the Amazon ECR Public Gallery.

For more information, see Amazon ECR Public repository catalog data in the Amazon ECR Public User Guide .



30
31
32
# File 'ecr/cfn_public_repository_props.rb', line 30

def repository_catalog_data
  @repository_catalog_data
end

#repository_nameString? (readonly)

The name to use for the public 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 .

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.



39
40
41
# File 'ecr/cfn_public_repository_props.rb', line 39

def repository_name
  @repository_name
end

#repository_policy_textObject? (readonly)

The JSON repository policy text to apply to the public repository.

For more information, see Amazon ECR Public repository policies in the Amazon ECR Public User Guide .



46
47
48
# File 'ecr/cfn_public_repository_props.rb', line 46

def repository_policy_text
  @repository_policy_text
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

An array of key-value pairs to apply to this resource.



51
52
53
# File 'ecr/cfn_public_repository_props.rb', line 51

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



53
54
55
56
57
58
59
60
# File 'ecr/cfn_public_repository_props.rb', line 53

def self.jsii_properties
  {
    :repository_catalog_data => "repositoryCatalogData",
    :repository_name => "repositoryName",
    :repository_policy_text => "repositoryPolicyText",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



62
63
64
65
66
67
68
69
70
71
# File 'ecr/cfn_public_repository_props.rb', line 62

def to_jsii
  result = {}
  result.merge!({
    "repositoryCatalogData" => @repository_catalog_data,
    "repositoryName" => @repository_name,
    "repositoryPolicyText" => @repository_policy_text,
    "tags" => @tags,
  })
  result.compact
end