Class: AWSCDK::ECS::CloudMapNamespaceOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/cloud_map_namespace_options.rb

Overview

The options for creating an AWS Cloud Map namespace.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, type: nil, use_for_service_connect: nil, vpc: nil) ⇒ CloudMapNamespaceOptions

Returns a new instance of CloudMapNamespaceOptions.

Parameters:

  • name (String)

    The name of the namespace, such as example.com.

  • type (AWSCDK::ServiceDiscovery::NamespaceType, nil) (defaults to: nil)

    The type of CloudMap Namespace to create.

  • use_for_service_connect (Boolean, nil) (defaults to: nil)

    This property specifies whether to set the provided namespace as the service connect default in the cluster properties.

  • vpc (AWSCDK::EC2::IVPC, nil) (defaults to: nil)

    The VPC to associate the namespace with.



11
12
13
14
15
16
17
18
19
20
# File 'ecs/cloud_map_namespace_options.rb', line 11

def initialize(name:, type: nil, use_for_service_connect: nil, vpc: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWRpc2NvdmVyeS5OYW1lc3BhY2VUeXBlIn0=")), "type") unless @type.nil?
  @use_for_service_connect = use_for_service_connect
  Jsii::Type.check_type(@use_for_service_connect, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "useForServiceConnect") unless @use_for_service_connect.nil?
  @vpc = vpc
  Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") unless @vpc.nil?
end

Instance Attribute Details

#nameString (readonly)

The name of the namespace, such as example.com.

Returns:

  • (String)


25
26
27
# File 'ecs/cloud_map_namespace_options.rb', line 25

def name
  @name
end

#typeAWSCDK::ServiceDiscovery::NamespaceType? (readonly)

Note:

Default: PrivateDns

The type of CloudMap Namespace to create.



30
31
32
# File 'ecs/cloud_map_namespace_options.rb', line 30

def type
  @type
end

#use_for_service_connectBoolean? (readonly)

Note:

Default: false

This property specifies whether to set the provided namespace as the service connect default in the cluster properties.

Returns:

  • (Boolean, nil)


35
36
37
# File 'ecs/cloud_map_namespace_options.rb', line 35

def use_for_service_connect
  @use_for_service_connect
end

#vpcAWSCDK::EC2::IVPC? (readonly)

Note:

Default: VPC of the cluster for Private DNS Namespace, otherwise none

The VPC to associate the namespace with.

This property is required for private DNS namespaces.

Returns:



42
43
44
# File 'ecs/cloud_map_namespace_options.rb', line 42

def vpc
  @vpc
end

Class Method Details

.jsii_propertiesObject



44
45
46
47
48
49
50
51
# File 'ecs/cloud_map_namespace_options.rb', line 44

def self.jsii_properties
  {
    :name => "name",
    :type => "type",
    :use_for_service_connect => "useForServiceConnect",
    :vpc => "vpc",
  }
end

Instance Method Details

#to_jsiiObject



53
54
55
56
57
58
59
60
61
62
# File 'ecs/cloud_map_namespace_options.rb', line 53

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "type" => @type,
    "useForServiceConnect" => @use_for_service_connect,
    "vpc" => @vpc,
  })
  result.compact
end