Class: AWSCDK::CodeArtifact::CfnDomainProps

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

Overview

Properties for defining a CfnDomain.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(domain_name:, encryption_key: nil, permissions_policy_document: nil, tags: nil) ⇒ CfnDomainProps

Returns a new instance of CfnDomainProps.

Parameters:

  • domain_name (String)

    A string that specifies the name of the requested domain.

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

    The key used to encrypt the domain.

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

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

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

    A list of tags to be applied to the domain.



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

def initialize(domain_name:, encryption_key: nil, permissions_policy_document: nil, tags: nil)
  @domain_name = domain_name
  Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainName")
  @encryption_key = encryption_key
  Jsii::Type.check_type(@encryption_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "encryptionKey") unless @encryption_key.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?
end

Instance Attribute Details

#domain_nameString (readonly)

A string that specifies the name of the requested domain.



28
29
30
# File 'code_artifact/cfn_domain_props.rb', line 28

def domain_name
  @domain_name
end

#encryption_keyString? (readonly)

The key used to encrypt the domain.



33
34
35
# File 'code_artifact/cfn_domain_props.rb', line 33

def encryption_key
  @encryption_key
end

#permissions_policy_documentObject? (readonly)

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



38
39
40
# File 'code_artifact/cfn_domain_props.rb', line 38

def permissions_policy_document
  @permissions_policy_document
end

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

A list of tags to be applied to the domain.



43
44
45
# File 'code_artifact/cfn_domain_props.rb', line 43

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



45
46
47
48
49
50
51
52
# File 'code_artifact/cfn_domain_props.rb', line 45

def self.jsii_properties
  {
    :domain_name => "domainName",
    :encryption_key => "encryptionKey",
    :permissions_policy_document => "permissionsPolicyDocument",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



54
55
56
57
58
59
60
61
62
63
# File 'code_artifact/cfn_domain_props.rb', line 54

def to_jsii
  result = {}
  result.merge!({
    "domainName" => @domain_name,
    "encryptionKey" => @encryption_key,
    "permissionsPolicyDocument" => @permissions_policy_document,
    "tags" => @tags,
  })
  result.compact
end