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.ec2.model;
 
 
Container for the parameters to the ReportInstanceStatus operation.

Submits feedback about the status of an instance. The instance must be in the running state. If your experience with the instance differs from the instance status returned by DescribeInstanceStatus, use ReportInstanceStatus to report your experience with the instance. Amazon EC2 collects this information to improve the accuracy of status checks.

Use of this action does not change the value returned by DescribeInstanceStatus.

 
One or more instances.
 
The status of all instances listed.

Constraints:
Allowed Values: ok, impaired

 
     private String status;

    
The time at which the reported instance health state began.
 
     private java.util.Date startTime;

    
The time at which the reported instance health state ended.
 
     private java.util.Date endTime;

    
One or more reason codes that describes the health state of your instance.
  • instance-stuck-in-state: My instance is stuck in a state.

  • unresponsive: My instance is unresponsive.

  • not-accepting-credentials: My instance is not accepting my credentials.

  • password-not-available: A password is not available for my instance.

  • performance-network: My instance is experiencing performance problems which I believe are network related.

  • performance-instance-store: My instance is experiencing performance problems which I believe are related to the instance stores.

  • performance-ebs-volume: My instance is experiencing performance problems which I believe are related to an EBS volume.

  • performance-other: My instance is experiencing performance problems.

  • other: [explain using the description parameter]

 
Descriptive text about the health state of your instance.
 
     private String description;

    
One or more instances.

Returns:
One or more instances.
 
     public java.util.List<StringgetInstances() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
One or more instances.

Parameters:
instances One or more instances.
    public void setInstances(java.util.Collection<Stringinstances) {
        if (instances == null) {
            this. = null;
            return;
        }
        instancesCopy.addAll(instances);
        this. = instancesCopy;
    }
    
    
One or more instances.

NOTE: This method appends the values to the existing list (if any). Use setInstances(java.util.Collection) or withInstances(java.util.Collection) if you want to override the existing values.

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

Parameters:
instances One or more instances.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ReportInstanceStatusRequest withInstances(String... instances) {
        if (getInstances() == nullsetInstances(new java.util.ArrayList<String>(instances.length));
        for (String value : instances) {
            getInstances().add(value);
        }
        return this;
    }
    
    
One or more instances.

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

Parameters:
instances One or more instances.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (instances == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringinstancesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(instances.size());
            instancesCopy.addAll(instances);
            this. = instancesCopy;
        }
        return this;
    }

    
The status of all instances listed.

Constraints:
Allowed Values: ok, impaired

Returns:
The status of all instances listed.
See also:
ReportStatusType
    public String getStatus() {
        return ;
    }
    
    
The status of all instances listed.

Constraints:
Allowed Values: ok, impaired

Parameters:
status The status of all instances listed.
See also:
ReportStatusType
    public void setStatus(String status) {
        this. = status;
    }
    
    
The status of all instances listed.

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

Constraints:
Allowed Values: ok, impaired

Parameters:
status The status of all instances listed.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ReportStatusType
    public ReportInstanceStatusRequest withStatus(String status) {
        this. = status;
        return this;
    }

    
The status of all instances listed.

Constraints:
Allowed Values: ok, impaired

Parameters:
status The status of all instances listed.
See also:
ReportStatusType
    public void setStatus(ReportStatusType status) {
        this. = status.toString();
    }
    
    
The status of all instances listed.

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

Constraints:
Allowed Values: ok, impaired

Parameters:
status The status of all instances listed.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ReportStatusType
        this. = status.toString();
        return this;
    }

    
The time at which the reported instance health state began.

Returns:
The time at which the reported instance health state began.
    public java.util.Date getStartTime() {
        return ;
    }
    
    
The time at which the reported instance health state began.

Parameters:
startTime The time at which the reported instance health state began.
    public void setStartTime(java.util.Date startTime) {
        this. = startTime;
    }
    
    
The time at which the reported instance health state began.

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

Parameters:
startTime The time at which the reported instance health state began.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = startTime;
        return this;
    }

    
The time at which the reported instance health state ended.

Returns:
The time at which the reported instance health state ended.
    public java.util.Date getEndTime() {
        return ;
    }
    
    
The time at which the reported instance health state ended.

Parameters:
endTime The time at which the reported instance health state ended.
    public void setEndTime(java.util.Date endTime) {
        this. = endTime;
    }
    
    
The time at which the reported instance health state ended.

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

Parameters:
endTime The time at which the reported instance health state ended.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = endTime;
        return this;
    }

    
One or more reason codes that describes the health state of your instance.
  • instance-stuck-in-state: My instance is stuck in a state.

  • unresponsive: My instance is unresponsive.

  • not-accepting-credentials: My instance is not accepting my credentials.

  • password-not-available: A password is not available for my instance.

  • performance-network: My instance is experiencing performance problems which I believe are network related.

  • performance-instance-store: My instance is experiencing performance problems which I believe are related to the instance stores.

  • performance-ebs-volume: My instance is experiencing performance problems which I believe are related to an EBS volume.

  • performance-other: My instance is experiencing performance problems.

  • other: [explain using the description parameter]

Returns:
One or more reason codes that describes the health state of your instance.
  • instance-stuck-in-state: My instance is stuck in a state.

  • unresponsive: My instance is unresponsive.

  • not-accepting-credentials: My instance is not accepting my credentials.

  • password-not-available: A password is not available for my instance.

  • performance-network: My instance is experiencing performance problems which I believe are network related.

  • performance-instance-store: My instance is experiencing performance problems which I believe are related to the instance stores.

  • performance-ebs-volume: My instance is experiencing performance problems which I believe are related to an EBS volume.

  • performance-other: My instance is experiencing performance problems.

  • other: [explain using the description parameter]

    public java.util.List<StringgetReasonCodes() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
One or more reason codes that describes the health state of your instance.
  • instance-stuck-in-state: My instance is stuck in a state.

  • unresponsive: My instance is unresponsive.

  • not-accepting-credentials: My instance is not accepting my credentials.

  • password-not-available: A password is not available for my instance.

  • performance-network: My instance is experiencing performance problems which I believe are network related.

  • performance-instance-store: My instance is experiencing performance problems which I believe are related to the instance stores.

  • performance-ebs-volume: My instance is experiencing performance problems which I believe are related to an EBS volume.

  • performance-other: My instance is experiencing performance problems.

  • other: [explain using the description parameter]

Parameters:
reasonCodes One or more reason codes that describes the health state of your instance.
  • instance-stuck-in-state: My instance is stuck in a state.

  • unresponsive: My instance is unresponsive.

  • not-accepting-credentials: My instance is not accepting my credentials.

  • password-not-available: A password is not available for my instance.

  • performance-network: My instance is experiencing performance problems which I believe are network related.

  • performance-instance-store: My instance is experiencing performance problems which I believe are related to the instance stores.

  • performance-ebs-volume: My instance is experiencing performance problems which I believe are related to an EBS volume.

  • performance-other: My instance is experiencing performance problems.

  • other: [explain using the description parameter]

    public void setReasonCodes(java.util.Collection<StringreasonCodes) {
        if (reasonCodes == null) {
            this. = null;
            return;
        }
        reasonCodesCopy.addAll(reasonCodes);
        this. = reasonCodesCopy;
    }
    
    
One or more reason codes that describes the health state of your instance.
  • instance-stuck-in-state: My instance is stuck in a state.

  • unresponsive: My instance is unresponsive.

  • not-accepting-credentials: My instance is not accepting my credentials.

  • password-not-available: A password is not available for my instance.

  • performance-network: My instance is experiencing performance problems which I believe are network related.

  • performance-instance-store: My instance is experiencing performance problems which I believe are related to the instance stores.

  • performance-ebs-volume: My instance is experiencing performance problems which I believe are related to an EBS volume.

  • performance-other: My instance is experiencing performance problems.

  • other: [explain using the description parameter]

NOTE: This method appends the values to the existing list (if any). Use setReasonCodes(java.util.Collection) or withReasonCodes(java.util.Collection) if you want to override the existing values.

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

Parameters:
reasonCodes One or more reason codes that describes the health state of your instance.
  • instance-stuck-in-state: My instance is stuck in a state.

  • unresponsive: My instance is unresponsive.

  • not-accepting-credentials: My instance is not accepting my credentials.

  • password-not-available: A password is not available for my instance.

  • performance-network: My instance is experiencing performance problems which I believe are network related.

  • performance-instance-store: My instance is experiencing performance problems which I believe are related to the instance stores.

  • performance-ebs-volume: My instance is experiencing performance problems which I believe are related to an EBS volume.

  • performance-other: My instance is experiencing performance problems.

  • other: [explain using the description parameter]

Returns:
A reference to this updated object so that method calls can be chained together.
    public ReportInstanceStatusRequest withReasonCodes(String... reasonCodes) {
        if (getReasonCodes() == nullsetReasonCodes(new java.util.ArrayList<String>(reasonCodes.length));
        for (String value : reasonCodes) {
            getReasonCodes().add(value);
        }
        return this;
    }
    
    
One or more reason codes that describes the health state of your instance.
  • instance-stuck-in-state: My instance is stuck in a state.

  • unresponsive: My instance is unresponsive.

  • not-accepting-credentials: My instance is not accepting my credentials.

  • password-not-available: A password is not available for my instance.

  • performance-network: My instance is experiencing performance problems which I believe are network related.

  • performance-instance-store: My instance is experiencing performance problems which I believe are related to the instance stores.

  • performance-ebs-volume: My instance is experiencing performance problems which I believe are related to an EBS volume.

  • performance-other: My instance is experiencing performance problems.

  • other: [explain using the description parameter]

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

Parameters:
reasonCodes One or more reason codes that describes the health state of your instance.
  • instance-stuck-in-state: My instance is stuck in a state.

  • unresponsive: My instance is unresponsive.

  • not-accepting-credentials: My instance is not accepting my credentials.

  • password-not-available: A password is not available for my instance.

  • performance-network: My instance is experiencing performance problems which I believe are network related.

  • performance-instance-store: My instance is experiencing performance problems which I believe are related to the instance stores.

  • performance-ebs-volume: My instance is experiencing performance problems which I believe are related to an EBS volume.

  • performance-other: My instance is experiencing performance problems.

  • other: [explain using the description parameter]

Returns:
A reference to this updated object so that method calls can be chained together.
        if (reasonCodes == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringreasonCodesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(reasonCodes.size());
            reasonCodesCopy.addAll(reasonCodes);
            this. = reasonCodesCopy;
        }
        return this;
    }

    
One or more reason codes that describes the health state of your instance.
  • instance-stuck-in-state: My instance is stuck in a state.

  • unresponsive: My instance is unresponsive.

  • not-accepting-credentials: My instance is not accepting my credentials.

  • password-not-available: A password is not available for my instance.

  • performance-network: My instance is experiencing performance problems which I believe are network related.

  • performance-instance-store: My instance is experiencing performance problems which I believe are related to the instance stores.

  • performance-ebs-volume: My instance is experiencing performance problems which I believe are related to an EBS volume.

  • performance-other: My instance is experiencing performance problems.

  • other: [explain using the description parameter]

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

Parameters:
reasonCodes One or more reason codes that describes the health state of your instance.
  • instance-stuck-in-state: My instance is stuck in a state.

  • unresponsive: My instance is unresponsive.

  • not-accepting-credentials: My instance is not accepting my credentials.

  • password-not-available: A password is not available for my instance.

  • performance-network: My instance is experiencing performance problems which I believe are network related.

  • performance-instance-store: My instance is experiencing performance problems which I believe are related to the instance stores.

  • performance-ebs-volume: My instance is experiencing performance problems which I believe are related to an EBS volume.

  • performance-other: My instance is experiencing performance problems.

  • other: [explain using the description parameter]

Returns:
A reference to this updated object so that method calls can be chained together.
        java.util.ArrayList<StringreasonCodesCopy = new java.util.ArrayList<String>(reasonCodes.length);
        for (ReportInstanceReasonCodes member : reasonCodes) {
            reasonCodesCopy.add(member.toString());
        }
        if (getReasonCodes() == null) {
            setReasonCodes(reasonCodesCopy);
        } else {
            getReasonCodes().addAll(reasonCodesCopy);
        }
        return this;
    }

    
Descriptive text about the health state of your instance.

Returns:
Descriptive text about the health state of your instance.
    public String getDescription() {
        return ;
    }
    
    
Descriptive text about the health state of your instance.

Parameters:
description Descriptive text about the health state of your instance.
    public void setDescription(String description) {
        this. = description;
    }
    
    
Descriptive text about the health state of your instance.

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

Parameters:
description Descriptive text about the health state of your instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ReportInstanceStatusRequest withDescription(String description) {
        this. = description;
        return this;
    }

    
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.
    @Override
        request.addParameter("DryRun", Boolean.toString(true));
        return request;
    }
    
    
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 (getInstances() != nullsb.append("Instances: " + getInstances() + ",");
        if (getStatus() != nullsb.append("Status: " + getStatus() + ",");
        if (getStartTime() != nullsb.append("StartTime: " + getStartTime() + ",");
        if (getEndTime() != nullsb.append("EndTime: " + getEndTime() + ",");
        if (getReasonCodes() != nullsb.append("ReasonCodes: " + getReasonCodes() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getInstances() == null) ? 0 : getInstances().hashCode()); 
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); 
        hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); 
        hashCode = prime * hashCode + ((getReasonCodes() == null) ? 0 : getReasonCodes().hashCode()); 
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ReportInstanceStatusRequest == falsereturn false;
        
        if (other.getInstances() == null ^ this.getInstances() == nullreturn false;
        if (other.getInstances() != null && other.getInstances().equals(this.getInstances()) == falsereturn false
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        if (other.getStartTime() == null ^ this.getStartTime() == nullreturn false;
        if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == falsereturn false
        if (other.getEndTime() == null ^ this.getEndTime() == nullreturn false;
        if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == falsereturn false
        if (other.getReasonCodes() == null ^ this.getReasonCodes() == nullreturn false;
        if (other.getReasonCodes() != null && other.getReasonCodes().equals(this.getReasonCodes()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (ReportInstanceStatusRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X