Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.route53.model;
 
 
Container for the parameters to the UpdateHealthCheck operation.

This action updates an existing health check.

To update a health check, send a POST request to the 2013-04-01/healthcheck/health check ID resource. The request body must include an XML document with an UpdateHealthCheckRequest element. The response returns an UpdateHealthCheckResponse element, which contains metadata about the health check.

 
 public class UpdateHealthCheckRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The ID of the health check to update.

Constraints:
Length: 0 - 64

 
     private String healthCheckId;

    
Optional. When you specify a health check version, Route 53 compares this value with the current value in the health check, which prevents you from updating the health check when the versions don't match. Using HealthCheckVersion lets you prevent overwriting another change to the health check.

Constraints:
Range: 1 -

 
     private Long healthCheckVersion;

    
The IP address of the resource that you want to check.

Specify this value only if you want to change it.

Constraints:
Length: 0 - 15
Pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

 
     private String iPAddress;

    
The port on which you want Route 53 to open a connection to perform health checks.

Specify this value only if you want to change it.

Constraints:
Range: 1 - 65535

 
     private Integer port;

    
The path that you want Amazon Route 53 to request when performing health checks. The path can be any value for which your endpoint will return an HTTP status code of 2xx or 3xx when the endpoint is healthy, for example the file /docs/route53-health-check.html.

Specify this value only if you want to change it.

Constraints:
Length: 0 - 255

 
     private String resourcePath;

    
Fully qualified domain name of the instance to be health checked.

Specify this value only if you want to change it.

Constraints:
Length: 0 - 255

 
     private String fullyQualifiedDomainName;

    
If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH, the string that you want Route 53 to search for in the response body from the specified resource. If the string appears in the response body, Route 53 considers the resource healthy.

Specify this value only if you want to change it.

Constraints:
Length: 0 - 255

    private String searchString;

    
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 vice versa.

Valid values are integers between 1 and 10. For more information, see "How Amazon Route 53 Determines Whether an Endpoint Is Healthy" in the Amazon Route 53 Developer Guide.

Specify this value only if you want to change it.

Constraints:
Range: 1 - 10

    private Integer failureThreshold;

    
The ID of the health check to update.

Constraints:
Length: 0 - 64

Returns:
The ID of the health check to update.
    public String getHealthCheckId() {
        return ;
    }
    
    
The ID of the health check to update.

Constraints:
Length: 0 - 64

Parameters:
healthCheckId The ID of the health check to update.
    public void setHealthCheckId(String healthCheckId) {
        this. = healthCheckId;
    }
    
    
The ID of the health check to update.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 64

Parameters:
healthCheckId The ID of the health check to update.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateHealthCheckRequest withHealthCheckId(String healthCheckId) {
        this. = healthCheckId;
        return this;
    }

    
Optional. When you specify a health check version, Route 53 compares this value with the current value in the health check, which prevents you from updating the health check when the versions don't match. Using HealthCheckVersion lets you prevent overwriting another change to the health check.

Constraints:
Range: 1 -

Returns:
Optional. When you specify a health check version, Route 53 compares this value with the current value in the health check, which prevents you from updating the health check when the versions don't match. Using HealthCheckVersion lets you prevent overwriting another change to the health check.
    public Long getHealthCheckVersion() {
        return ;
    }
    
    
Optional. When you specify a health check version, Route 53 compares this value with the current value in the health check, which prevents you from updating the health check when the versions don't match. Using HealthCheckVersion lets you prevent overwriting another change to the health check.

Constraints:
Range: 1 -

Parameters:
healthCheckVersion Optional. When you specify a health check version, Route 53 compares this value with the current value in the health check, which prevents you from updating the health check when the versions don't match. Using HealthCheckVersion lets you prevent overwriting another change to the health check.
    public void setHealthCheckVersion(Long healthCheckVersion) {
        this. = healthCheckVersion;
    }
    
    
Optional. When you specify a health check version, Route 53 compares this value with the current value in the health check, which prevents you from updating the health check when the versions don't match. Using HealthCheckVersion lets you prevent overwriting another change to the health check.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 1 -

Parameters:
healthCheckVersion Optional. When you specify a health check version, Route 53 compares this value with the current value in the health check, which prevents you from updating the health check when the versions don't match. Using HealthCheckVersion lets you prevent overwriting another change to the health check.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateHealthCheckRequest withHealthCheckVersion(Long healthCheckVersion) {
        this. = healthCheckVersion;
        return this;
    }

    
The IP address of the resource that you want to check.

Specify this value only if you want to change it.

Constraints:
Length: 0 - 15
Pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

Returns:
The IP address of the resource that you want to check.

Specify this value only if you want to change it.

    public String getIPAddress() {
        return ;
    }
    
    
The IP address of the resource that you want to check.

Specify this value only if you want to change it.

Constraints:
Length: 0 - 15
Pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

Parameters:
iPAddress The IP address of the resource that you want to check.

Specify this value only if you want to change it.

    public void setIPAddress(String iPAddress) {
        this. = iPAddress;
    }
    
    
The IP address of the resource that you want to check.

Specify this value only if you want to change it.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 15
Pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

Parameters:
iPAddress The IP address of the resource that you want to check.

Specify this value only if you want to change it.

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateHealthCheckRequest withIPAddress(String iPAddress) {
        this. = iPAddress;
        return this;
    }

    
The port on which you want Route 53 to open a connection to perform health checks.

Specify this value only if you want to change it.

Constraints:
Range: 1 - 65535

Returns:
The port on which you want Route 53 to open a connection to perform health checks.

Specify this value only if you want to change it.

    public Integer getPort() {
        return ;
    }
    
    
The port on which you want Route 53 to open a connection to perform health checks.

Specify this value only if you want to change it.

Constraints:
Range: 1 - 65535

Parameters:
port The port on which you want Route 53 to open a connection to perform health checks.

Specify this value only if you want to change it.

    public void setPort(Integer port) {
        this. = port;
    }
    
    
The port on which you want Route 53 to open a connection to perform health checks.

Specify this value only if you want to change it.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 1 - 65535

Parameters:
port The port on which you want Route 53 to open a connection to perform health checks.

Specify this value only if you want to change it.

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateHealthCheckRequest withPort(Integer port) {
        this. = port;
        return this;
    }

    
The path that you want Amazon Route 53 to request when performing health checks. The path can be any value for which your endpoint will return an HTTP status code of 2xx or 3xx when the endpoint is healthy, for example the file /docs/route53-health-check.html.

Specify this value only if you want to change it.

Constraints:
Length: 0 - 255

Returns:
The path that you want Amazon Route 53 to request when performing health checks. The path can be any value for which your endpoint will return an HTTP status code of 2xx or 3xx when the endpoint is healthy, for example the file /docs/route53-health-check.html.

Specify this value only if you want to change it.

    public String getResourcePath() {
        return ;
    }
    
    
The path that you want Amazon Route 53 to request when performing health checks. The path can be any value for which your endpoint will return an HTTP status code of 2xx or 3xx when the endpoint is healthy, for example the file /docs/route53-health-check.html.

Specify this value only if you want to change it.

Constraints:
Length: 0 - 255

Parameters:
resourcePath The path that you want Amazon Route 53 to request when performing health checks. The path can be any value for which your endpoint will return an HTTP status code of 2xx or 3xx when the endpoint is healthy, for example the file /docs/route53-health-check.html.

Specify this value only if you want to change it.

    public void setResourcePath(String resourcePath) {
        this. = resourcePath;
    }
    
    
The path that you want Amazon Route 53 to request when performing health checks. The path can be any value for which your endpoint will return an HTTP status code of 2xx or 3xx when the endpoint is healthy, for example the file /docs/route53-health-check.html.

Specify this value only if you want to change it.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 255

Parameters:
resourcePath The path that you want Amazon Route 53 to request when performing health checks. The path can be any value for which your endpoint will return an HTTP status code of 2xx or 3xx when the endpoint is healthy, for example the file /docs/route53-health-check.html.

Specify this value only if you want to change it.

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateHealthCheckRequest withResourcePath(String resourcePath) {
        this. = resourcePath;
        return this;
    }

    
Fully qualified domain name of the instance to be health checked.

Specify this value only if you want to change it.

Constraints:
Length: 0 - 255

Returns:
Fully qualified domain name of the instance to be health checked.

Specify this value only if you want to change it.

        return ;
    }
    
    
Fully qualified domain name of the instance to be health checked.

Specify this value only if you want to change it.

Constraints:
Length: 0 - 255

Parameters:
fullyQualifiedDomainName Fully qualified domain name of the instance to be health checked.

Specify this value only if you want to change it.

    public void setFullyQualifiedDomainName(String fullyQualifiedDomainName) {
        this. = fullyQualifiedDomainName;
    }
    
    
Fully qualified domain name of the instance to be health checked.

Specify this value only if you want to change it.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 255

Parameters:
fullyQualifiedDomainName Fully qualified domain name of the instance to be health checked.

Specify this value only if you want to change it.

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateHealthCheckRequest withFullyQualifiedDomainName(String fullyQualifiedDomainName) {
        this. = fullyQualifiedDomainName;
        return this;
    }

    
If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH, the string that you want Route 53 to search for in the response body from the specified resource. If the string appears in the response body, Route 53 considers the resource healthy.

Specify this value only if you want to change it.

Constraints:
Length: 0 - 255

Returns:
If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH, the string that you want Route 53 to search for in the response body from the specified resource. If the string appears in the response body, Route 53 considers the resource healthy.

Specify this value only if you want to change it.

    public String getSearchString() {
        return ;
    }
    
    
If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH, the string that you want Route 53 to search for in the response body from the specified resource. If the string appears in the response body, Route 53 considers the resource healthy.

Specify this value only if you want to change it.

Constraints:
Length: 0 - 255

Parameters:
searchString If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH, the string that you want Route 53 to search for in the response body from the specified resource. If the string appears in the response body, Route 53 considers the resource healthy.

Specify this value only if you want to change it.

    public void setSearchString(String searchString) {
        this. = searchString;
    }
    
    
If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH, the string that you want Route 53 to search for in the response body from the specified resource. If the string appears in the response body, Route 53 considers the resource healthy.

Specify this value only if you want to change it.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 255

Parameters:
searchString If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH, the string that you want Route 53 to search for in the response body from the specified resource. If the string appears in the response body, Route 53 considers the resource healthy.

Specify this value only if you want to change it.

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateHealthCheckRequest withSearchString(String searchString) {
        this. = searchString;
        return this;
    }

    
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 vice versa.

Valid values are integers between 1 and 10. For more information, see "How Amazon Route 53 Determines Whether an Endpoint Is Healthy" in the Amazon Route 53 Developer Guide.

Specify this value only if you want to change it.

Constraints:
Range: 1 - 10

Returns:
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 vice versa.

Valid values are integers between 1 and 10. For more information, see "How Amazon Route 53 Determines Whether an Endpoint Is Healthy" in the Amazon Route 53 Developer Guide.

Specify this value only if you want to change it.

    public Integer getFailureThreshold() {
        return ;
    }
    
    
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 vice versa.

Valid values are integers between 1 and 10. For more information, see "How Amazon Route 53 Determines Whether an Endpoint Is Healthy" in the Amazon Route 53 Developer Guide.

Specify this value only if you want to change it.

Constraints:
Range: 1 - 10

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 vice versa.

Valid values are integers between 1 and 10. For more information, see "How Amazon Route 53 Determines Whether an Endpoint Is Healthy" in the Amazon Route 53 Developer Guide.

Specify this value only if you want to change it.

    public void setFailureThreshold(Integer failureThreshold) {
        this. = 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 vice versa.

Valid values are integers between 1 and 10. For more information, see "How Amazon Route 53 Determines Whether an Endpoint Is Healthy" in the Amazon Route 53 Developer Guide.

Specify this value only if you want to change it.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 1 - 10

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 vice versa.

Valid values are integers between 1 and 10. For more information, see "How Amazon Route 53 Determines Whether an Endpoint Is Healthy" in the Amazon Route 53 Developer Guide.

Specify this value only if you want to change it.

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateHealthCheckRequest withFailureThreshold(Integer failureThreshold) {
        this. = failureThreshold;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getHealthCheckId() != nullsb.append("HealthCheckId: " + getHealthCheckId() + ",");
        if (getHealthCheckVersion() != nullsb.append("HealthCheckVersion: " + getHealthCheckVersion() + ",");
        if (getIPAddress() != nullsb.append("IPAddress: " + getIPAddress() + ",");
        if (getPort() != nullsb.append("Port: " + getPort() + ",");
        if (getResourcePath() != nullsb.append("ResourcePath: " + getResourcePath() + ",");
        if (getFullyQualifiedDomainName() != nullsb.append("FullyQualifiedDomainName: " + getFullyQualifiedDomainName() + ",");
        if (getSearchString() != nullsb.append("SearchString: " + getSearchString() + ",");
        if (getFailureThreshold() != nullsb.append("FailureThreshold: " + getFailureThreshold() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getHealthCheckId() == null) ? 0 : getHealthCheckId().hashCode()); 
        hashCode = prime * hashCode + ((getHealthCheckVersion() == null) ? 0 : getHealthCheckVersion().hashCode()); 
        hashCode = prime * hashCode + ((getIPAddress() == null) ? 0 : getIPAddress().hashCode()); 
        hashCode = prime * hashCode + ((getPort() == null) ? 0 : getPort().hashCode()); 
        hashCode = prime * hashCode + ((getResourcePath() == null) ? 0 : getResourcePath().hashCode()); 
        hashCode = prime * hashCode + ((getFullyQualifiedDomainName() == null) ? 0 : getFullyQualifiedDomainName().hashCode()); 
        hashCode = prime * hashCode + ((getSearchString() == null) ? 0 : getSearchString().hashCode()); 
        hashCode = prime * hashCode + ((getFailureThreshold() == null) ? 0 : getFailureThreshold().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof UpdateHealthCheckRequest == falsereturn false;
        UpdateHealthCheckRequest other = (UpdateHealthCheckRequest)obj;
        
        if (other.getHealthCheckId() == null ^ this.getHealthCheckId() == nullreturn false;
        if (other.getHealthCheckId() != null && other.getHealthCheckId().equals(this.getHealthCheckId()) == falsereturn false
        if (other.getHealthCheckVersion() == null ^ this.getHealthCheckVersion() == nullreturn false;
        if (other.getHealthCheckVersion() != null && other.getHealthCheckVersion().equals(this.getHealthCheckVersion()) == falsereturn false
        if (other.getIPAddress() == null ^ this.getIPAddress() == nullreturn false;
        if (other.getIPAddress() != null && other.getIPAddress().equals(this.getIPAddress()) == falsereturn false
        if (other.getPort() == null ^ this.getPort() == nullreturn false;
        if (other.getPort() != null && other.getPort().equals(this.getPort()) == falsereturn false
        if (other.getResourcePath() == null ^ this.getResourcePath() == nullreturn false;
        if (other.getResourcePath() != null && other.getResourcePath().equals(this.getResourcePath()) == falsereturn false
        if (other.getFullyQualifiedDomainName() == null ^ this.getFullyQualifiedDomainName() == nullreturn false;
        if (other.getFullyQualifiedDomainName() != null && other.getFullyQualifiedDomainName().equals(this.getFullyQualifiedDomainName()) == falsereturn false
        if (other.getSearchString() == null ^ this.getSearchString() == nullreturn false;
        if (other.getSearchString() != null && other.getSearchString().equals(this.getSearchString()) == falsereturn false
        if (other.getFailureThreshold() == null ^ this.getFailureThreshold() == nullreturn false;
        if (other.getFailureThreshold() != null && other.getFailureThreshold().equals(this.getFailureThreshold()) == falsereturn false
        return true;
    }
    
    @Override
    public UpdateHealthCheckRequest clone() {
        
            return (UpdateHealthCheckRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X