Class CfnServicePropsMixin.HealthCheckConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.servicediscovery.CfnServicePropsMixin.HealthCheckConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnServicePropsMixin.HealthCheckConfigProperty>
- Enclosing interface:
CfnServicePropsMixin.HealthCheckConfigProperty
@Stability(Stable)
public static final class CfnServicePropsMixin.HealthCheckConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnServicePropsMixin.HealthCheckConfigProperty>
A builder for
CfnServicePropsMixin.HealthCheckConfigProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.failureThreshold(Number failureThreshold) Sets the value ofCfnServicePropsMixin.HealthCheckConfigProperty.getFailureThreshold()resourcePath(String resourcePath) Sets the value ofCfnServicePropsMixin.HealthCheckConfigProperty.getResourcePath()Sets the value ofCfnServicePropsMixin.HealthCheckConfigProperty.getType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
failureThreshold
@Stability(Stable) public CfnServicePropsMixin.HealthCheckConfigProperty.Builder failureThreshold(Number failureThreshold) Sets the value ofCfnServicePropsMixin.HealthCheckConfigProperty.getFailureThreshold()- Parameters:
failureThreshold- The number of consecutive health checks that an endpoint must pass or fail for Route 53 to change the current status of the endpoint from unhealthy to healthy or the other way around. For more information, see How Route 53 Determines Whether an Endpoint Is Healthy in the Route 53 Developer Guide .- Returns:
this
-
resourcePath
@Stability(Stable) public CfnServicePropsMixin.HealthCheckConfigProperty.Builder resourcePath(String resourcePath) Sets the value ofCfnServicePropsMixin.HealthCheckConfigProperty.getResourcePath()- Parameters:
resourcePath- The path that you want Route 53 to request when performing health checks. The path can be any value that your endpoint returns an HTTP status code of a 2xx or 3xx format for when the endpoint is healthy. An example file is/docs/route53-health-check.html. Route 53 automatically adds the DNS name for the service. If you don't specify a value forResourcePath, the default value is/.If you specify
TCPforType, you must not specify a value forResourcePath.- Returns:
this
-
type
Sets the value ofCfnServicePropsMixin.HealthCheckConfigProperty.getType()- Parameters:
type- The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy.You can't change the value of
Typeafter you create a health check.You can create the following types of health checks:
- HTTP : Route 53 tries to establish a TCP connection. If successful, Route 53 submits an HTTP request and waits for an HTTP status code of 200 or greater and less than 400.
- HTTPS : Route 53 tries to establish a TCP connection. If successful, Route 53 submits an HTTPS request and waits for an HTTP status code of 200 or greater and less than 400.
If you specify HTTPS for the value of
Type, the endpoint must support TLS v1.0 or later.- TCP : Route 53 tries to establish a TCP connection.
If you specify
TCPforType, don't specify a value forResourcePath.For more information, see How Route 53 Determines Whether an Endpoint Is Healthy in the Route 53 Developer Guide .
- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnServicePropsMixin.HealthCheckConfigProperty>- Returns:
- a new instance of
CfnServicePropsMixin.HealthCheckConfigProperty - Throws:
NullPointerException- if any required attribute was not provided
-