Class: AWSCDK::ServiceDiscovery::CfnPrivateDNSNamespaceProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
service_discovery/cfn_private_dns_namespace_props.rb

Overview

Properties for defining a CfnPrivateDnsNamespace.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, vpc:, description: nil, properties: nil, tags: nil) ⇒ CfnPrivateDNSNamespaceProps

Returns a new instance of CfnPrivateDNSNamespaceProps.

Parameters:



14
15
16
17
18
19
20
21
22
23
24
25
# File 'service_discovery/cfn_private_dns_namespace_props.rb', line 14

def initialize(name:, vpc:, description: nil, properties: nil, tags: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @vpc = vpc
  Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "vpc")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @properties = properties.is_a?(Hash) ? ::AWSCDK::ServiceDiscovery::CfnPrivateDNSNamespace::PropertiesProperty.new(**properties.transform_keys(&:to_sym)) : properties
  Jsii::Type.check_type(@properties, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zZXJ2aWNlZGlzY292ZXJ5LkNmblByaXZhdGVEbnNOYW1lc3BhY2UuUHJvcGVydGllc1Byb3BlcnR5In1dfX0=")), "properties") unless @properties.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

#descriptionString? (readonly)

A description for the namespace.



43
44
45
# File 'service_discovery/cfn_private_dns_namespace_props.rb', line 43

def description
  @description
end

#nameString (readonly)

The name that you want to assign to this namespace.

When you create a private DNS namespace, AWS Cloud Map automatically creates an Amazon RouteĀ 53 private hosted zone that has the same name as the namespace.



33
34
35
# File 'service_discovery/cfn_private_dns_namespace_props.rb', line 33

def name
  @name
end

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

Properties for the private DNS namespace.



48
49
50
# File 'service_discovery/cfn_private_dns_namespace_props.rb', line 48

def properties
  @properties
end

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

The tags for the namespace.

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.



55
56
57
# File 'service_discovery/cfn_private_dns_namespace_props.rb', line 55

def tags
  @tags
end

#vpcString (readonly)

The ID of the Amazon VPC that you want to associate the namespace with.



38
39
40
# File 'service_discovery/cfn_private_dns_namespace_props.rb', line 38

def vpc
  @vpc
end

Class Method Details

.jsii_propertiesObject



57
58
59
60
61
62
63
64
65
# File 'service_discovery/cfn_private_dns_namespace_props.rb', line 57

def self.jsii_properties
  {
    :name => "name",
    :vpc => "vpc",
    :description => "description",
    :properties => "properties",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



67
68
69
70
71
72
73
74
75
76
77
# File 'service_discovery/cfn_private_dns_namespace_props.rb', line 67

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "vpc" => @vpc,
    "description" => @description,
    "properties" => @properties,
    "tags" => @tags,
  })
  result.compact
end