Class CloudMapOptions.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.CloudMapOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CloudMapOptions>
- Enclosing interface:
CloudMapOptions
@Stability(Stable)
public static final class CloudMapOptions.Builder
extends Object
implements software.amazon.jsii.Builder<CloudMapOptions>
A builder for
CloudMapOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.cloudMapNamespace
(INamespace cloudMapNamespace) Sets the value ofCloudMapOptions.getCloudMapNamespace()
container
(ContainerDefinition container) Sets the value ofCloudMapOptions.getContainer()
containerPort
(Number containerPort) Sets the value ofCloudMapOptions.getContainerPort()
dnsRecordType
(DnsRecordType dnsRecordType) Sets the value ofCloudMapOptions.getDnsRecordType()
Sets the value ofCloudMapOptions.getDnsTtl()
failureThreshold
(Number failureThreshold) Sets the value ofCloudMapOptions.getFailureThreshold()
Sets the value ofCloudMapOptions.getName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cloudMapNamespace
Sets the value ofCloudMapOptions.getCloudMapNamespace()
- Parameters:
cloudMapNamespace
- The service discovery namespace for the Cloud Map service to attach to the ECS service.- Returns:
this
-
container
Sets the value ofCloudMapOptions.getContainer()
- Parameters:
container
- The container to point to for a SRV record.- Returns:
this
-
containerPort
Sets the value ofCloudMapOptions.getContainerPort()
- Parameters:
containerPort
- The port to point to for a SRV record.- Returns:
this
-
dnsRecordType
Sets the value ofCloudMapOptions.getDnsRecordType()
- Parameters:
dnsRecordType
- The DNS record type that you want AWS Cloud Map to create. The supported record types are A or SRV.- Returns:
this
-
dnsTtl
Sets the value ofCloudMapOptions.getDnsTtl()
- Parameters:
dnsTtl
- The amount of time that you want DNS resolvers to cache the settings for this record.- Returns:
this
-
failureThreshold
Sets the value ofCloudMapOptions.getFailureThreshold()
- Parameters:
failureThreshold
- The number of 30-second intervals that you want Cloud Map to wait after receiving an UpdateInstanceCustomHealthStatus request before it changes the health status of a service instance. NOTE: This is used for HealthCheckCustomConfig- Returns:
this
-
name
Sets the value ofCloudMapOptions.getName()
- Parameters:
name
- The name of the Cloud Map service to attach to the ECS service.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CloudMapOptions>
- Returns:
- a new instance of
CloudMapOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-