Class: AWSCDK::ServiceDiscovery::CfnServiceProps

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

Overview

Properties for defining a CfnService.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description: nil, dns_config: nil, health_check_config: nil, health_check_custom_config: nil, name: nil, namespace_id: nil, service_attributes: nil, tags: nil, type: nil) ⇒ CfnServiceProps

Returns a new instance of CfnServiceProps.

Parameters:

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

    The description of the service.

  • dns_config (AWSCDK::IResolvable, AWSCDK::ServiceDiscovery::CfnService::DNSConfigProperty, nil) (defaults to: nil)

    A complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.

  • health_check_config (AWSCDK::IResolvable, AWSCDK::ServiceDiscovery::CfnService::HealthCheckConfigProperty, nil) (defaults to: nil)

    Public DNS and HTTP namespaces only. A complex type that contains settings for an optional health check. If you specify settings for a health check, AWS Cloud Map associates the health check with the records that you specify in DnsConfig .

  • health_check_custom_config (AWSCDK::IResolvable, AWSCDK::ServiceDiscovery::CfnService::HealthCheckCustomConfigProperty, nil) (defaults to: nil)

    A complex type that contains information about an optional custom health check.

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

    The name of the service.

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

    The ID or Amazon Resource Name (ARN) of the namespace that you want to use to create the service.

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

    A complex type that contains information about attributes associated with a specific service.

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

    The tags for the service.

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

    If present, specifies that the service instances are only discoverable using the DiscoverInstances API operation.



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'service_discovery/cfn_service_props.rb', line 18

def initialize(description: nil, dns_config: nil, health_check_config: nil, health_check_custom_config: nil, name: nil, namespace_id: nil, service_attributes: nil, tags: nil, type: nil)
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @dns_config = dns_config.is_a?(Hash) ? ::AWSCDK::ServiceDiscovery::CfnService::DNSConfigProperty.new(**dns_config.transform_keys(&:to_sym)) : dns_config
  Jsii::Type.check_type(@dns_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zZXJ2aWNlZGlzY292ZXJ5LkNmblNlcnZpY2UuRG5zQ29uZmlnUHJvcGVydHkifV19fQ==")), "dnsConfig") unless @dns_config.nil?
  @health_check_config = health_check_config.is_a?(Hash) ? ::AWSCDK::ServiceDiscovery::CfnService::HealthCheckConfigProperty.new(**health_check_config.transform_keys(&:to_sym)) : health_check_config
  Jsii::Type.check_type(@health_check_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zZXJ2aWNlZGlzY292ZXJ5LkNmblNlcnZpY2UuSGVhbHRoQ2hlY2tDb25maWdQcm9wZXJ0eSJ9XX19")), "healthCheckConfig") unless @health_check_config.nil?
  @health_check_custom_config = health_check_custom_config.is_a?(Hash) ? ::AWSCDK::ServiceDiscovery::CfnService::HealthCheckCustomConfigProperty.new(**health_check_custom_config.transform_keys(&:to_sym)) : health_check_custom_config
  Jsii::Type.check_type(@health_check_custom_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zZXJ2aWNlZGlzY292ZXJ5LkNmblNlcnZpY2UuSGVhbHRoQ2hlY2tDdXN0b21Db25maWdQcm9wZXJ0eSJ9XX19")), "healthCheckCustomConfig") unless @health_check_custom_config.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @namespace_id = namespace_id
  Jsii::Type.check_type(@namespace_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "namespaceId") unless @namespace_id.nil?
  @service_attributes = service_attributes
  Jsii::Type.check_type(@service_attributes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "serviceAttributes") unless @service_attributes.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?
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") unless @type.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

The description of the service.



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

def description
  @description
end

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

A complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.

The record types of a service can only be changed by deleting the service and recreating it with a new Dnsconfig .



50
51
52
# File 'service_discovery/cfn_service_props.rb', line 50

def dns_config
  @dns_config
end

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

Public DNS and HTTP namespaces only. A complex type that contains settings for an optional health check. If you specify settings for a health check, AWS Cloud Map associates the health check with the records that you specify in DnsConfig .

For information about the charges for health checks, see Amazon Route 53 Pricing .



57
58
59
# File 'service_discovery/cfn_service_props.rb', line 57

def health_check_config
  @health_check_config
end

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

A complex type that contains information about an optional custom health check.

If you specify a health check configuration, you can specify either HealthCheckCustomConfig or HealthCheckConfig but not both.



64
65
66
# File 'service_discovery/cfn_service_props.rb', line 64

def health_check_custom_config
  @health_check_custom_config
end

#nameString? (readonly)

The name of the service.



69
70
71
# File 'service_discovery/cfn_service_props.rb', line 69

def name
  @name
end

#namespace_idString? (readonly)

The ID or Amazon Resource Name (ARN) of the namespace that you want to use to create the service.

For namespaces shared with your AWS account, specify the namespace ARN. For more information about shared namespaces, see Cross-account AWS Cloud Map namespace sharing in the AWS Cloud Map Developer Guide .



76
77
78
# File 'service_discovery/cfn_service_props.rb', line 76

def namespace_id
  @namespace_id
end

#service_attributesObject? (readonly)

A complex type that contains information about attributes associated with a specific service.



81
82
83
# File 'service_discovery/cfn_service_props.rb', line 81

def service_attributes
  @service_attributes
end

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

The tags for the service.

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.



88
89
90
# File 'service_discovery/cfn_service_props.rb', line 88

def tags
  @tags
end

#typeString? (readonly)

If present, specifies that the service instances are only discoverable using the DiscoverInstances API operation.

No DNS records is registered for the service instances. The only valid value is HTTP .



95
96
97
# File 'service_discovery/cfn_service_props.rb', line 95

def type
  @type
end

Class Method Details

.jsii_propertiesObject



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

def self.jsii_properties
  {
    :description => "description",
    :dns_config => "dnsConfig",
    :health_check_config => "healthCheckConfig",
    :health_check_custom_config => "healthCheckCustomConfig",
    :name => "name",
    :namespace_id => "namespaceId",
    :service_attributes => "serviceAttributes",
    :tags => "tags",
    :type => "type",
  }
end

Instance Method Details

#to_jsiiObject



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'service_discovery/cfn_service_props.rb', line 111

def to_jsii
  result = {}
  result.merge!({
    "description" => @description,
    "dnsConfig" => @dns_config,
    "healthCheckConfig" => @health_check_config,
    "healthCheckCustomConfig" => @health_check_custom_config,
    "name" => @name,
    "namespaceId" => @namespace_id,
    "serviceAttributes" => @service_attributes,
    "tags" => @tags,
    "type" => @type,
  })
  result.compact
end