Class: AWSCDK::ServiceDiscovery::BaseServiceProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ServiceDiscovery::BaseServiceProps
- Defined in:
- service_discovery/base_service_props.rb
Overview
Basic props needed to create a service in a given namespace.
Used by HttpNamespace.createService
Direct Known Subclasses
Instance Attribute Summary collapse
-
#custom_health_check ⇒ AWSCDK::ServiceDiscovery::HealthCheckCustomConfig?
readonly
Structure containing failure threshold for a custom health checker.
-
#description ⇒ String?
readonly
A description of the service.
-
#health_check ⇒ AWSCDK::ServiceDiscovery::HealthCheckConfig?
readonly
Settings for an optional health check.
-
#name ⇒ String?
readonly
A name for the Service.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(custom_health_check: nil, description: nil, health_check: nil, name: nil) ⇒ BaseServiceProps
constructor
A new instance of BaseServiceProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(custom_health_check: nil, description: nil, health_check: nil, name: nil) ⇒ BaseServiceProps
Returns a new instance of BaseServiceProps.
13 14 15 16 17 18 19 20 21 22 |
# File 'service_discovery/base_service_props.rb', line 13 def initialize(custom_health_check: nil, description: nil, health_check: nil, name: nil) @custom_health_check = custom_health_check.is_a?(Hash) ? ::AWSCDK::ServiceDiscovery::HealthCheckCustomConfig.new(**custom_health_check.transform_keys(&:to_sym)) : custom_health_check Jsii::Type.check_type(@custom_health_check, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWRpc2NvdmVyeS5IZWFsdGhDaGVja0N1c3RvbUNvbmZpZyJ9")), "customHealthCheck") unless @custom_health_check.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @health_check = health_check.is_a?(Hash) ? ::AWSCDK::ServiceDiscovery::HealthCheckConfig.new(**health_check.transform_keys(&:to_sym)) : health_check Jsii::Type.check_type(@health_check, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWRpc2NvdmVyeS5IZWFsdGhDaGVja0NvbmZpZyJ9")), "healthCheck") unless @health_check.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? end |
Instance Attribute Details
#custom_health_check ⇒ AWSCDK::ServiceDiscovery::HealthCheckCustomConfig? (readonly)
Default: none
Structure containing failure threshold for a custom health checker.
Only one of healthCheckConfig or healthCheckCustomConfig can be specified. See: https://docs.aws.amazon.com/cloud-map/latest/api/API_HealthCheckCustomConfig.html
31 32 33 |
# File 'service_discovery/base_service_props.rb', line 31 def custom_health_check @custom_health_check end |
#description ⇒ String? (readonly)
Default: none
A description of the service.
36 37 38 |
# File 'service_discovery/base_service_props.rb', line 36 def description @description end |
#health_check ⇒ AWSCDK::ServiceDiscovery::HealthCheckConfig? (readonly)
Default: none
Settings for an optional health check.
If you specify health check settings, AWS Cloud Map associates the health check with the records that you specify in DnsConfig. Only one of healthCheckConfig or healthCheckCustomConfig can be specified. Not valid for PrivateDnsNamespaces. If you use healthCheck, you can only register IP instances to this service.
46 47 48 |
# File 'service_discovery/base_service_props.rb', line 46 def health_check @health_check end |
#name ⇒ String? (readonly)
Default: CloudFormation-generated name
A name for the Service.
51 52 53 |
# File 'service_discovery/base_service_props.rb', line 51 def name @name end |
Class Method Details
.jsii_properties ⇒ Object
53 54 55 56 57 58 59 60 |
# File 'service_discovery/base_service_props.rb', line 53 def self.jsii_properties { :custom_health_check => "customHealthCheck", :description => "description", :health_check => "healthCheck", :name => "name", } end |
Instance Method Details
#to_jsii ⇒ Object
62 63 64 65 66 67 68 69 70 71 |
# File 'service_discovery/base_service_props.rb', line 62 def to_jsii result = {} result.merge!({ "customHealthCheck" => @custom_health_check, "description" => @description, "healthCheck" => @health_check, "name" => @name, }) result.compact end |