Class Service.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Service>
- Enclosing class:
Service
Service
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static Service.Builder
customHealthCheck
(HealthCheckCustomConfig customHealthCheck) Structure containing failure threshold for a custom health checker.description
(String description) A description of the service.discoveryType
(DiscoveryType discoveryType) Controls how instances within this service can be discovered.dnsRecordType
(DnsRecordType dnsRecordType) The DNS type of the record that you want AWS Cloud Map to create.The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record.healthCheck
(HealthCheckConfig healthCheck) Settings for an optional health check.loadBalancer
(Boolean loadBalancer) Whether or not this service will have an Elastic LoadBalancer registered to it as an AliasTargetInstance.A name for the Service.namespace
(INamespace namespace) The namespace that you want to use for DNS configuration.routingPolicy
(RoutingPolicy routingPolicy) The routing policy that you want to apply to all DNS records that AWS Cloud Map creates when you register an instance and specify this service.
-
Method Details
-
create
@Stability(Stable) public static Service.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
Service.Builder
.
-
customHealthCheck
@Stability(Stable) public Service.Builder customHealthCheck(HealthCheckCustomConfig customHealthCheck) 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
Default: none
- Parameters:
customHealthCheck
- Structure containing failure threshold for a custom health checker. This parameter is required.- Returns:
this
-
description
A description of the service.Default: none
- Parameters:
description
- A description of the service. This parameter is required.- Returns:
this
-
healthCheck
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.
Default: none
- Parameters:
healthCheck
- Settings for an optional health check. This parameter is required.- Returns:
this
-
name
A name for the Service.Default: CloudFormation-generated name
- Parameters:
name
- A name for the Service. This parameter is required.- Returns:
this
-
discoveryType
Controls how instances within this service can be discovered.Default: DNS_AND_API
- Parameters:
discoveryType
- Controls how instances within this service can be discovered. This parameter is required.- Returns:
this
-
dnsRecordType
The DNS type of the record that you want AWS Cloud Map to create.Supported record types include A, AAAA, A and AAAA (A_AAAA), CNAME, and SRV.
Default: A
- Parameters:
dnsRecordType
- The DNS type of the record that you want AWS Cloud Map to create. This parameter is required.- Returns:
this
-
dnsTtl
The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record.Default: Duration.minutes(1)
- Parameters:
dnsTtl
- The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record. This parameter is required.- Returns:
this
-
loadBalancer
Whether or not this service will have an Elastic LoadBalancer registered to it as an AliasTargetInstance.Setting this to
true
correctly configures theroutingPolicy
and performs some additional validation.Default: false
- Parameters:
loadBalancer
- Whether or not this service will have an Elastic LoadBalancer registered to it as an AliasTargetInstance. This parameter is required.- Returns:
this
-
routingPolicy
The routing policy that you want to apply to all DNS records that AWS Cloud Map creates when you register an instance and specify this service.Default: WEIGHTED for CNAME records and when loadBalancer is true, MULTIVALUE otherwise
- Parameters:
routingPolicy
- The routing policy that you want to apply to all DNS records that AWS Cloud Map creates when you register an instance and specify this service. This parameter is required.- Returns:
this
-
namespace
The namespace that you want to use for DNS configuration.- Parameters:
namespace
- The namespace that you want to use for DNS configuration. This parameter is required.- Returns:
this
-
build
-