Modifier and Type | Method and Description |
---|---|
Service |
build() |
static Service.Builder |
create(software.constructs.Construct scope,
java.lang.String id) |
Service.Builder |
customHealthCheck(HealthCheckCustomConfig customHealthCheck)
Structure containing failure threshold for a custom health checker.
|
Service.Builder |
description(java.lang.String description)
A description of the service.
|
Service.Builder |
dnsRecordType(DnsRecordType dnsRecordType)
The DNS type of the record that you want AWS Cloud Map to create.
|
Service.Builder |
dnsTtl(Duration dnsTtl)
The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record.
|
Service.Builder |
healthCheck(HealthCheckConfig healthCheck)
Settings for an optional health check.
|
Service.Builder |
loadBalancer(java.lang.Boolean loadBalancer)
Whether or not this service will have an Elastic LoadBalancer registered to it as an AliasTargetInstance.
|
Service.Builder |
name(java.lang.String name)
A name for the Service.
|
Service.Builder |
namespace(INamespace namespace)
The namespace that you want to use for DNS configuration.
|
Service.Builder |
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.
|
public static Service.Builder create(software.constructs.Construct scope, java.lang.String id)
scope
- This parameter is required.id
- This parameter is required.Service.Builder
.public Service.Builder customHealthCheck(HealthCheckCustomConfig customHealthCheck)
Only one of healthCheckConfig or healthCheckCustomConfig can be specified. See: https://docs.aws.amazon.com/cloud-map/latest/api/API_HealthCheckCustomConfig.html
Default: none
customHealthCheck
- Structure containing failure threshold for a custom health checker. This parameter is required.this
public Service.Builder description(java.lang.String description)
Default: none
description
- A description of the service. This parameter is required.this
public Service.Builder healthCheck(HealthCheckConfig healthCheck)
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
healthCheck
- Settings for an optional health check. This parameter is required.this
public Service.Builder name(java.lang.String name)
Default: CloudFormation-generated name
name
- A name for the Service. This parameter is required.this
public Service.Builder dnsRecordType(DnsRecordType dnsRecordType)
Supported record types include A, AAAA, A and AAAA (A_AAAA), CNAME, and SRV.
Default: A
dnsRecordType
- The DNS type of the record that you want AWS Cloud Map to create. This parameter is required.this
public Service.Builder dnsTtl(Duration dnsTtl)
Default: Duration.minutes(1)
dnsTtl
- The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record. This parameter is required.this
public Service.Builder loadBalancer(java.lang.Boolean loadBalancer)
Setting this to true
correctly configures the routingPolicy
and performs some additional validation.
Default: false
loadBalancer
- Whether or not this service will have an Elastic LoadBalancer registered to it as an AliasTargetInstance. This parameter is required.this
public Service.Builder routingPolicy(RoutingPolicy routingPolicy)
Default: WEIGHTED for CNAME records and when loadBalancer is true, MULTIVALUE otherwise
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.this
public Service.Builder namespace(INamespace namespace)
namespace
- The namespace that you want to use for DNS configuration. This parameter is required.this
public Service build()