Class: AWSCDK::CodeArtifact::CfnRepositoryProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
code_artifact/cfn_repository_props.rb

Overview

Properties for defining a CfnRepository.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(domain_name:, repository_name:, description: nil, domain_owner: nil, external_connections: nil, permissions_policy_document: nil, tags: nil, upstreams: nil) ⇒ CfnRepositoryProps

Returns a new instance of CfnRepositoryProps.

Parameters:

  • domain_name (String)

    The name of the domain that contains the repository.

  • repository_name (String)

    The name of an upstream repository.

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

    A text description of the repository.

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

    The 12-digit account number of the AWS account that owns the domain that contains the repository.

  • external_connections (Array<String>, nil) (defaults to: nil)

    An array of external connections associated with the repository.

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

    The document that defines the resource policy that is set on a repository.

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

    A list of tags to be applied to the repository.

  • upstreams (Array<String>, nil) (defaults to: nil)

    A list of upstream repositories to associate with the repository.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'code_artifact/cfn_repository_props.rb', line 17

def initialize(domain_name:, repository_name:, description: nil, domain_owner: nil, external_connections: nil, permissions_policy_document: nil, tags: nil, upstreams: nil)
  @domain_name = domain_name
  Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainName")
  @repository_name = repository_name
  Jsii::Type.check_type(@repository_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "repositoryName")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @domain_owner = domain_owner
  Jsii::Type.check_type(@domain_owner, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainOwner") unless @domain_owner.nil?
  @external_connections = external_connections
  Jsii::Type.check_type(@external_connections, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "externalConnections") unless @external_connections.nil?
  @permissions_policy_document = permissions_policy_document
  Jsii::Type.check_type(@permissions_policy_document, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "permissionsPolicyDocument") unless @permissions_policy_document.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?
  @upstreams = upstreams
  Jsii::Type.check_type(@upstreams, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "upstreams") unless @upstreams.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

A text description of the repository.



50
51
52
# File 'code_artifact/cfn_repository_props.rb', line 50

def description
  @description
end

#domain_nameString (readonly)

The name of the domain that contains the repository.



40
41
42
# File 'code_artifact/cfn_repository_props.rb', line 40

def domain_name
  @domain_name
end

#domain_ownerString? (readonly)

The 12-digit account number of the AWS account that owns the domain that contains the repository.

It does not include dashes or spaces.



57
58
59
# File 'code_artifact/cfn_repository_props.rb', line 57

def domain_owner
  @domain_owner
end

#external_connectionsArray<String>? (readonly)

An array of external connections associated with the repository.

For more information, see Supported external connection repositories in the CodeArtifact user guide .



64
65
66
# File 'code_artifact/cfn_repository_props.rb', line 64

def external_connections
  @external_connections
end

#permissions_policy_documentObject? (readonly)

The document that defines the resource policy that is set on a repository.



69
70
71
# File 'code_artifact/cfn_repository_props.rb', line 69

def permissions_policy_document
  @permissions_policy_document
end

#repository_nameString (readonly)

The name of an upstream repository.



45
46
47
# File 'code_artifact/cfn_repository_props.rb', line 45

def repository_name
  @repository_name
end

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

A list of tags to be applied to the repository.



74
75
76
# File 'code_artifact/cfn_repository_props.rb', line 74

def tags
  @tags
end

#upstreamsArray<String>? (readonly)

A list of upstream repositories to associate with the repository.

The order of the upstream repositories in the list determines their priority order when AWS CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories .



81
82
83
# File 'code_artifact/cfn_repository_props.rb', line 81

def upstreams
  @upstreams
end

Class Method Details

.jsii_propertiesObject



83
84
85
86
87
88
89
90
91
92
93
94
# File 'code_artifact/cfn_repository_props.rb', line 83

def self.jsii_properties
  {
    :domain_name => "domainName",
    :repository_name => "repositoryName",
    :description => "description",
    :domain_owner => "domainOwner",
    :external_connections => "externalConnections",
    :permissions_policy_document => "permissionsPolicyDocument",
    :tags => "tags",
    :upstreams => "upstreams",
  }
end

Instance Method Details

#to_jsiiObject



96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'code_artifact/cfn_repository_props.rb', line 96

def to_jsii
  result = {}
  result.merge!({
    "domainName" => @domain_name,
    "repositoryName" => @repository_name,
    "description" => @description,
    "domainOwner" => @domain_owner,
    "externalConnections" => @external_connections,
    "permissionsPolicyDocument" => @permissions_policy_document,
    "tags" => @tags,
    "upstreams" => @upstreams,
  })
  result.compact
end