com.amazonaws.services.ec2.model.EventInformation Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ec2 Show documentation
/*
* Copyright 2016-2021 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;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* Describes an EC2 Fleet or Spot Fleet event.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class EventInformation implements Serializable, Cloneable {
/**
*
* The description of the event.
*
*/
private String eventDescription;
/**
*
* The event.
*
*
* The following are the error
events:
*
*
* -
*
* iamFleetRoleInvalid
- The EC2 Fleet or Spot Fleet did not have the required permissions either to
* launch or terminate an instance.
*
*
* -
*
* spotFleetRequestConfigurationInvalid
- The configuration is not valid. For more information, see the
* description of the event.
*
*
* -
*
* spotInstanceCountLimitExceeded
- You've reached the limit on the number of Spot Instances that you
* can launch.
*
*
*
*
* The following are the fleetRequestChange
events:
*
*
* -
*
* active
- The EC2 Fleet or Spot Fleet request has been validated and Amazon EC2 is attempting to
* maintain the target number of running Spot Instances.
*
*
* -
*
* cancelled
- The EC2 Fleet or Spot Fleet request is canceled and has no running Spot Instances. The
* EC2 Fleet or Spot Fleet will be deleted two days after its instances were terminated.
*
*
* -
*
* cancelled_running
- The EC2 Fleet or Spot Fleet request is canceled and does not launch additional
* Spot Instances. Existing Spot Instances continue to run until they are interrupted or terminated.
*
*
* -
*
* cancelled_terminating
- The EC2 Fleet or Spot Fleet request is canceled and its Spot Instances are
* terminating.
*
*
* -
*
* expired
- The EC2 Fleet or Spot Fleet request has expired. A subsequent event indicates that the
* instances were terminated, if the request was created with TerminateInstancesWithExpiration
set.
*
*
* -
*
* modify_in_progress
- A request to modify the EC2 Fleet or Spot Fleet request was accepted and is in
* progress.
*
*
* -
*
* modify_succeeded
- The EC2 Fleet or Spot Fleet request was modified.
*
*
* -
*
* submitted
- The EC2 Fleet or Spot Fleet request is being evaluated and Amazon EC2 is preparing to
* launch the target number of Spot Instances.
*
*
*
*
* The following are the instanceChange
events:
*
*
* -
*
* launched
- A request was fulfilled and a new instance was launched.
*
*
* -
*
* terminated
- An instance was terminated by the user.
*
*
*
*
* The following are the Information
events:
*
*
* -
*
* launchSpecTemporarilyBlacklisted
- The configuration is not valid and several attempts to launch
* instances have failed. For more information, see the description of the event.
*
*
* -
*
* launchSpecUnusable
- The price in a launch specification is not valid because it is below the Spot
* price or the Spot price is above the On-Demand price.
*
*
* -
*
* fleetProgressHalted
- The price in every launch specification is not valid. A launch specification
* might become valid if the Spot price changes.
*
*
*
*/
private String eventSubType;
/**
*
* The ID of the instance. This information is available only for instanceChange
events.
*
*/
private String instanceId;
/**
*
* The description of the event.
*
*
* @param eventDescription
* The description of the event.
*/
public void setEventDescription(String eventDescription) {
this.eventDescription = eventDescription;
}
/**
*
* The description of the event.
*
*
* @return The description of the event.
*/
public String getEventDescription() {
return this.eventDescription;
}
/**
*
* The description of the event.
*
*
* @param eventDescription
* The description of the event.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EventInformation withEventDescription(String eventDescription) {
setEventDescription(eventDescription);
return this;
}
/**
*
* The event.
*
*
* The following are the error
events:
*
*
* -
*
* iamFleetRoleInvalid
- The EC2 Fleet or Spot Fleet did not have the required permissions either to
* launch or terminate an instance.
*
*
* -
*
* spotFleetRequestConfigurationInvalid
- The configuration is not valid. For more information, see the
* description of the event.
*
*
* -
*
* spotInstanceCountLimitExceeded
- You've reached the limit on the number of Spot Instances that you
* can launch.
*
*
*
*
* The following are the fleetRequestChange
events:
*
*
* -
*
* active
- The EC2 Fleet or Spot Fleet request has been validated and Amazon EC2 is attempting to
* maintain the target number of running Spot Instances.
*
*
* -
*
* cancelled
- The EC2 Fleet or Spot Fleet request is canceled and has no running Spot Instances. The
* EC2 Fleet or Spot Fleet will be deleted two days after its instances were terminated.
*
*
* -
*
* cancelled_running
- The EC2 Fleet or Spot Fleet request is canceled and does not launch additional
* Spot Instances. Existing Spot Instances continue to run until they are interrupted or terminated.
*
*
* -
*
* cancelled_terminating
- The EC2 Fleet or Spot Fleet request is canceled and its Spot Instances are
* terminating.
*
*
* -
*
* expired
- The EC2 Fleet or Spot Fleet request has expired. A subsequent event indicates that the
* instances were terminated, if the request was created with TerminateInstancesWithExpiration
set.
*
*
* -
*
* modify_in_progress
- A request to modify the EC2 Fleet or Spot Fleet request was accepted and is in
* progress.
*
*
* -
*
* modify_succeeded
- The EC2 Fleet or Spot Fleet request was modified.
*
*
* -
*
* submitted
- The EC2 Fleet or Spot Fleet request is being evaluated and Amazon EC2 is preparing to
* launch the target number of Spot Instances.
*
*
*
*
* The following are the instanceChange
events:
*
*
* -
*
* launched
- A request was fulfilled and a new instance was launched.
*
*
* -
*
* terminated
- An instance was terminated by the user.
*
*
*
*
* The following are the Information
events:
*
*
* -
*
* launchSpecTemporarilyBlacklisted
- The configuration is not valid and several attempts to launch
* instances have failed. For more information, see the description of the event.
*
*
* -
*
* launchSpecUnusable
- The price in a launch specification is not valid because it is below the Spot
* price or the Spot price is above the On-Demand price.
*
*
* -
*
* fleetProgressHalted
- The price in every launch specification is not valid. A launch specification
* might become valid if the Spot price changes.
*
*
*
*
* @param eventSubType
* The event.
*
* The following are the error
events:
*
*
* -
*
* iamFleetRoleInvalid
- The EC2 Fleet or Spot Fleet did not have the required permissions
* either to launch or terminate an instance.
*
*
* -
*
* spotFleetRequestConfigurationInvalid
- The configuration is not valid. For more information,
* see the description of the event.
*
*
* -
*
* spotInstanceCountLimitExceeded
- You've reached the limit on the number of Spot Instances
* that you can launch.
*
*
*
*
* The following are the fleetRequestChange
events:
*
*
* -
*
* active
- The EC2 Fleet or Spot Fleet request has been validated and Amazon EC2 is attempting
* to maintain the target number of running Spot Instances.
*
*
* -
*
* cancelled
- The EC2 Fleet or Spot Fleet request is canceled and has no running Spot
* Instances. The EC2 Fleet or Spot Fleet will be deleted two days after its instances were terminated.
*
*
* -
*
* cancelled_running
- The EC2 Fleet or Spot Fleet request is canceled and does not launch
* additional Spot Instances. Existing Spot Instances continue to run until they are interrupted or
* terminated.
*
*
* -
*
* cancelled_terminating
- The EC2 Fleet or Spot Fleet request is canceled and its Spot
* Instances are terminating.
*
*
* -
*
* expired
- The EC2 Fleet or Spot Fleet request has expired. A subsequent event indicates that
* the instances were terminated, if the request was created with
* TerminateInstancesWithExpiration
set.
*
*
* -
*
* modify_in_progress
- A request to modify the EC2 Fleet or Spot Fleet request was accepted and
* is in progress.
*
*
* -
*
* modify_succeeded
- The EC2 Fleet or Spot Fleet request was modified.
*
*
* -
*
* submitted
- The EC2 Fleet or Spot Fleet request is being evaluated and Amazon EC2 is
* preparing to launch the target number of Spot Instances.
*
*
*
*
* The following are the instanceChange
events:
*
*
* -
*
* launched
- A request was fulfilled and a new instance was launched.
*
*
* -
*
* terminated
- An instance was terminated by the user.
*
*
*
*
* The following are the Information
events:
*
*
* -
*
* launchSpecTemporarilyBlacklisted
- The configuration is not valid and several attempts to
* launch instances have failed. For more information, see the description of the event.
*
*
* -
*
* launchSpecUnusable
- The price in a launch specification is not valid because it is below the
* Spot price or the Spot price is above the On-Demand price.
*
*
* -
*
* fleetProgressHalted
- The price in every launch specification is not valid. A launch
* specification might become valid if the Spot price changes.
*
*
*/
public void setEventSubType(String eventSubType) {
this.eventSubType = eventSubType;
}
/**
*
* The event.
*
*
* The following are the error
events:
*
*
* -
*
* iamFleetRoleInvalid
- The EC2 Fleet or Spot Fleet did not have the required permissions either to
* launch or terminate an instance.
*
*
* -
*
* spotFleetRequestConfigurationInvalid
- The configuration is not valid. For more information, see the
* description of the event.
*
*
* -
*
* spotInstanceCountLimitExceeded
- You've reached the limit on the number of Spot Instances that you
* can launch.
*
*
*
*
* The following are the fleetRequestChange
events:
*
*
* -
*
* active
- The EC2 Fleet or Spot Fleet request has been validated and Amazon EC2 is attempting to
* maintain the target number of running Spot Instances.
*
*
* -
*
* cancelled
- The EC2 Fleet or Spot Fleet request is canceled and has no running Spot Instances. The
* EC2 Fleet or Spot Fleet will be deleted two days after its instances were terminated.
*
*
* -
*
* cancelled_running
- The EC2 Fleet or Spot Fleet request is canceled and does not launch additional
* Spot Instances. Existing Spot Instances continue to run until they are interrupted or terminated.
*
*
* -
*
* cancelled_terminating
- The EC2 Fleet or Spot Fleet request is canceled and its Spot Instances are
* terminating.
*
*
* -
*
* expired
- The EC2 Fleet or Spot Fleet request has expired. A subsequent event indicates that the
* instances were terminated, if the request was created with TerminateInstancesWithExpiration
set.
*
*
* -
*
* modify_in_progress
- A request to modify the EC2 Fleet or Spot Fleet request was accepted and is in
* progress.
*
*
* -
*
* modify_succeeded
- The EC2 Fleet or Spot Fleet request was modified.
*
*
* -
*
* submitted
- The EC2 Fleet or Spot Fleet request is being evaluated and Amazon EC2 is preparing to
* launch the target number of Spot Instances.
*
*
*
*
* The following are the instanceChange
events:
*
*
* -
*
* launched
- A request was fulfilled and a new instance was launched.
*
*
* -
*
* terminated
- An instance was terminated by the user.
*
*
*
*
* The following are the Information
events:
*
*
* -
*
* launchSpecTemporarilyBlacklisted
- The configuration is not valid and several attempts to launch
* instances have failed. For more information, see the description of the event.
*
*
* -
*
* launchSpecUnusable
- The price in a launch specification is not valid because it is below the Spot
* price or the Spot price is above the On-Demand price.
*
*
* -
*
* fleetProgressHalted
- The price in every launch specification is not valid. A launch specification
* might become valid if the Spot price changes.
*
*
*
*
* @return The event.
*
* The following are the error
events:
*
*
* -
*
* iamFleetRoleInvalid
- The EC2 Fleet or Spot Fleet did not have the required permissions
* either to launch or terminate an instance.
*
*
* -
*
* spotFleetRequestConfigurationInvalid
- The configuration is not valid. For more information,
* see the description of the event.
*
*
* -
*
* spotInstanceCountLimitExceeded
- You've reached the limit on the number of Spot Instances
* that you can launch.
*
*
*
*
* The following are the fleetRequestChange
events:
*
*
* -
*
* active
- The EC2 Fleet or Spot Fleet request has been validated and Amazon EC2 is attempting
* to maintain the target number of running Spot Instances.
*
*
* -
*
* cancelled
- The EC2 Fleet or Spot Fleet request is canceled and has no running Spot
* Instances. The EC2 Fleet or Spot Fleet will be deleted two days after its instances were terminated.
*
*
* -
*
* cancelled_running
- The EC2 Fleet or Spot Fleet request is canceled and does not launch
* additional Spot Instances. Existing Spot Instances continue to run until they are interrupted or
* terminated.
*
*
* -
*
* cancelled_terminating
- The EC2 Fleet or Spot Fleet request is canceled and its Spot
* Instances are terminating.
*
*
* -
*
* expired
- The EC2 Fleet or Spot Fleet request has expired. A subsequent event indicates that
* the instances were terminated, if the request was created with
* TerminateInstancesWithExpiration
set.
*
*
* -
*
* modify_in_progress
- A request to modify the EC2 Fleet or Spot Fleet request was accepted
* and is in progress.
*
*
* -
*
* modify_succeeded
- The EC2 Fleet or Spot Fleet request was modified.
*
*
* -
*
* submitted
- The EC2 Fleet or Spot Fleet request is being evaluated and Amazon EC2 is
* preparing to launch the target number of Spot Instances.
*
*
*
*
* The following are the instanceChange
events:
*
*
* -
*
* launched
- A request was fulfilled and a new instance was launched.
*
*
* -
*
* terminated
- An instance was terminated by the user.
*
*
*
*
* The following are the Information
events:
*
*
* -
*
* launchSpecTemporarilyBlacklisted
- The configuration is not valid and several attempts to
* launch instances have failed. For more information, see the description of the event.
*
*
* -
*
* launchSpecUnusable
- The price in a launch specification is not valid because it is below
* the Spot price or the Spot price is above the On-Demand price.
*
*
* -
*
* fleetProgressHalted
- The price in every launch specification is not valid. A launch
* specification might become valid if the Spot price changes.
*
*
*/
public String getEventSubType() {
return this.eventSubType;
}
/**
*
* The event.
*
*
* The following are the error
events:
*
*
* -
*
* iamFleetRoleInvalid
- The EC2 Fleet or Spot Fleet did not have the required permissions either to
* launch or terminate an instance.
*
*
* -
*
* spotFleetRequestConfigurationInvalid
- The configuration is not valid. For more information, see the
* description of the event.
*
*
* -
*
* spotInstanceCountLimitExceeded
- You've reached the limit on the number of Spot Instances that you
* can launch.
*
*
*
*
* The following are the fleetRequestChange
events:
*
*
* -
*
* active
- The EC2 Fleet or Spot Fleet request has been validated and Amazon EC2 is attempting to
* maintain the target number of running Spot Instances.
*
*
* -
*
* cancelled
- The EC2 Fleet or Spot Fleet request is canceled and has no running Spot Instances. The
* EC2 Fleet or Spot Fleet will be deleted two days after its instances were terminated.
*
*
* -
*
* cancelled_running
- The EC2 Fleet or Spot Fleet request is canceled and does not launch additional
* Spot Instances. Existing Spot Instances continue to run until they are interrupted or terminated.
*
*
* -
*
* cancelled_terminating
- The EC2 Fleet or Spot Fleet request is canceled and its Spot Instances are
* terminating.
*
*
* -
*
* expired
- The EC2 Fleet or Spot Fleet request has expired. A subsequent event indicates that the
* instances were terminated, if the request was created with TerminateInstancesWithExpiration
set.
*
*
* -
*
* modify_in_progress
- A request to modify the EC2 Fleet or Spot Fleet request was accepted and is in
* progress.
*
*
* -
*
* modify_succeeded
- The EC2 Fleet or Spot Fleet request was modified.
*
*
* -
*
* submitted
- The EC2 Fleet or Spot Fleet request is being evaluated and Amazon EC2 is preparing to
* launch the target number of Spot Instances.
*
*
*
*
* The following are the instanceChange
events:
*
*
* -
*
* launched
- A request was fulfilled and a new instance was launched.
*
*
* -
*
* terminated
- An instance was terminated by the user.
*
*
*
*
* The following are the Information
events:
*
*
* -
*
* launchSpecTemporarilyBlacklisted
- The configuration is not valid and several attempts to launch
* instances have failed. For more information, see the description of the event.
*
*
* -
*
* launchSpecUnusable
- The price in a launch specification is not valid because it is below the Spot
* price or the Spot price is above the On-Demand price.
*
*
* -
*
* fleetProgressHalted
- The price in every launch specification is not valid. A launch specification
* might become valid if the Spot price changes.
*
*
*
*
* @param eventSubType
* The event.
*
* The following are the error
events:
*
*
* -
*
* iamFleetRoleInvalid
- The EC2 Fleet or Spot Fleet did not have the required permissions
* either to launch or terminate an instance.
*
*
* -
*
* spotFleetRequestConfigurationInvalid
- The configuration is not valid. For more information,
* see the description of the event.
*
*
* -
*
* spotInstanceCountLimitExceeded
- You've reached the limit on the number of Spot Instances
* that you can launch.
*
*
*
*
* The following are the fleetRequestChange
events:
*
*
* -
*
* active
- The EC2 Fleet or Spot Fleet request has been validated and Amazon EC2 is attempting
* to maintain the target number of running Spot Instances.
*
*
* -
*
* cancelled
- The EC2 Fleet or Spot Fleet request is canceled and has no running Spot
* Instances. The EC2 Fleet or Spot Fleet will be deleted two days after its instances were terminated.
*
*
* -
*
* cancelled_running
- The EC2 Fleet or Spot Fleet request is canceled and does not launch
* additional Spot Instances. Existing Spot Instances continue to run until they are interrupted or
* terminated.
*
*
* -
*
* cancelled_terminating
- The EC2 Fleet or Spot Fleet request is canceled and its Spot
* Instances are terminating.
*
*
* -
*
* expired
- The EC2 Fleet or Spot Fleet request has expired. A subsequent event indicates that
* the instances were terminated, if the request was created with
* TerminateInstancesWithExpiration
set.
*
*
* -
*
* modify_in_progress
- A request to modify the EC2 Fleet or Spot Fleet request was accepted and
* is in progress.
*
*
* -
*
* modify_succeeded
- The EC2 Fleet or Spot Fleet request was modified.
*
*
* -
*
* submitted
- The EC2 Fleet or Spot Fleet request is being evaluated and Amazon EC2 is
* preparing to launch the target number of Spot Instances.
*
*
*
*
* The following are the instanceChange
events:
*
*
* -
*
* launched
- A request was fulfilled and a new instance was launched.
*
*
* -
*
* terminated
- An instance was terminated by the user.
*
*
*
*
* The following are the Information
events:
*
*
* -
*
* launchSpecTemporarilyBlacklisted
- The configuration is not valid and several attempts to
* launch instances have failed. For more information, see the description of the event.
*
*
* -
*
* launchSpecUnusable
- The price in a launch specification is not valid because it is below the
* Spot price or the Spot price is above the On-Demand price.
*
*
* -
*
* fleetProgressHalted
- The price in every launch specification is not valid. A launch
* specification might become valid if the Spot price changes.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EventInformation withEventSubType(String eventSubType) {
setEventSubType(eventSubType);
return this;
}
/**
*
* The ID of the instance. This information is available only for instanceChange
events.
*
*
* @param instanceId
* The ID of the instance. This information is available only for instanceChange
events.
*/
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
/**
*
* The ID of the instance. This information is available only for instanceChange
events.
*
*
* @return The ID of the instance. This information is available only for instanceChange
events.
*/
public String getInstanceId() {
return this.instanceId;
}
/**
*
* The ID of the instance. This information is available only for instanceChange
events.
*
*
* @param instanceId
* The ID of the instance. This information is available only for instanceChange
events.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EventInformation withInstanceId(String instanceId) {
setInstanceId(instanceId);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getEventDescription() != null)
sb.append("EventDescription: ").append(getEventDescription()).append(",");
if (getEventSubType() != null)
sb.append("EventSubType: ").append(getEventSubType()).append(",");
if (getInstanceId() != null)
sb.append("InstanceId: ").append(getInstanceId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof EventInformation == false)
return false;
EventInformation other = (EventInformation) obj;
if (other.getEventDescription() == null ^ this.getEventDescription() == null)
return false;
if (other.getEventDescription() != null && other.getEventDescription().equals(this.getEventDescription()) == false)
return false;
if (other.getEventSubType() == null ^ this.getEventSubType() == null)
return false;
if (other.getEventSubType() != null && other.getEventSubType().equals(this.getEventSubType()) == false)
return false;
if (other.getInstanceId() == null ^ this.getInstanceId() == null)
return false;
if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEventDescription() == null) ? 0 : getEventDescription().hashCode());
hashCode = prime * hashCode + ((getEventSubType() == null) ? 0 : getEventSubType().hashCode());
hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode());
return hashCode;
}
@Override
public EventInformation clone() {
try {
return (EventInformation) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}