Class Event

java.lang.Object
software.amazon.awssdk.services.health.model.Event
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<Event.Builder,Event>

@Generated("software.amazon.awssdk:codegen") public final class Event extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Event.Builder,Event>

Summary information about an Health event.

Health events can be public or account-specific:

  • Public events might be service events that are not specific to an Amazon Web Services account. For example, if there is an issue with an Amazon Web Services Region, Health provides information about the event, even if you don't use services or resources in that Region.

  • Account-specific events are specific to either your Amazon Web Services account or an account in your organization. For example, if there's an issue with Amazon Elastic Compute Cloud in a Region that you use, Health provides information about the event and the affected resources in the account.

You can determine if an event is public or account-specific by using the eventScopeCode parameter. For more information, see eventScopeCode.

See Also:
  • Method Details

    • arn

      public final String arn()

      The unique identifier for the event. The event ARN has the arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID format.

      For example, an event ARN might look like the following:

      arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

      Returns:
      The unique identifier for the event. The event ARN has the arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID format.

      For example, an event ARN might look like the following:

      arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

    • service

      public final String service()

      The Amazon Web Services service that is affected by the event. For example, EC2, RDS.

      Returns:
      The Amazon Web Services service that is affected by the event. For example, EC2, RDS.
    • eventTypeCode

      public final String eventTypeCode()

      The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION ; for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT.

      Returns:
      The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION ; for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT.
    • eventTypeCategory

      public final EventTypeCategory eventTypeCategory()

      A list of event type category codes. Possible values are issue, accountNotification, or scheduledChange. Currently, the investigation value isn't supported at this time.

      If the service returns an enum value that is not available in the current SDK version, eventTypeCategory will return EventTypeCategory.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from eventTypeCategoryAsString().

      Returns:
      A list of event type category codes. Possible values are issue, accountNotification, or scheduledChange. Currently, the investigation value isn't supported at this time.
      See Also:
    • eventTypeCategoryAsString

      public final String eventTypeCategoryAsString()

      A list of event type category codes. Possible values are issue, accountNotification, or scheduledChange. Currently, the investigation value isn't supported at this time.

      If the service returns an enum value that is not available in the current SDK version, eventTypeCategory will return EventTypeCategory.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from eventTypeCategoryAsString().

      Returns:
      A list of event type category codes. Possible values are issue, accountNotification, or scheduledChange. Currently, the investigation value isn't supported at this time.
      See Also:
    • region

      public final String region()

      The Amazon Web Services Region name of the event.

      Returns:
      The Amazon Web Services Region name of the event.
    • availabilityZone

      public final String availabilityZone()

      The Amazon Web Services Availability Zone of the event. For example, us-east-1a.

      Returns:
      The Amazon Web Services Availability Zone of the event. For example, us-east-1a.
    • startTime

      public final Instant startTime()

      The date and time that the event began.

      Returns:
      The date and time that the event began.
    • endTime

      public final Instant endTime()

      The date and time that the event ended.

      Returns:
      The date and time that the event ended.
    • lastUpdatedTime

      public final Instant lastUpdatedTime()

      The most recent date and time that the event was updated.

      Returns:
      The most recent date and time that the event was updated.
    • statusCode

      public final EventStatusCode statusCode()

      The most recent status of the event. Possible values are open, closed, and upcoming.

      If the service returns an enum value that is not available in the current SDK version, statusCode() will return EventStatusCode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusCodeAsString().

      Returns:
      The most recent status of the event. Possible values are open, closed, and upcoming.
      See Also:
    • statusCodeAsString

      public final String statusCodeAsString()

      The most recent status of the event. Possible values are open, closed, and upcoming.

      If the service returns an enum value that is not available in the current SDK version, statusCode() will return EventStatusCode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusCodeAsString().

      Returns:
      The most recent status of the event. Possible values are open, closed, and upcoming.
      See Also:
    • eventScopeCode

      public final EventScopeCode eventScopeCode()

      This parameter specifies if the Health event is a public Amazon Web Services service event or an account-specific event.

      • If the eventScopeCode value is PUBLIC, then the affectedAccounts value is always empty.

      • If the eventScopeCode value is ACCOUNT_SPECIFIC, then the affectedAccounts value lists the affected Amazon Web Services accounts in your organization. For example, if an event affects a service such as Amazon Elastic Compute Cloud and you have Amazon Web Services accounts that use that service, those account IDs appear in the response.

      • If the eventScopeCode value is NONE, then the eventArn that you specified in the request is invalid or doesn't exist.

      If the service returns an enum value that is not available in the current SDK version, eventScopeCode will return EventScopeCode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from eventScopeCodeAsString().

      Returns:
      This parameter specifies if the Health event is a public Amazon Web Services service event or an account-specific event.

      • If the eventScopeCode value is PUBLIC, then the affectedAccounts value is always empty.

      • If the eventScopeCode value is ACCOUNT_SPECIFIC, then the affectedAccounts value lists the affected Amazon Web Services accounts in your organization. For example, if an event affects a service such as Amazon Elastic Compute Cloud and you have Amazon Web Services accounts that use that service, those account IDs appear in the response.

      • If the eventScopeCode value is NONE, then the eventArn that you specified in the request is invalid or doesn't exist.

      See Also:
    • eventScopeCodeAsString

      public final String eventScopeCodeAsString()

      This parameter specifies if the Health event is a public Amazon Web Services service event or an account-specific event.

      • If the eventScopeCode value is PUBLIC, then the affectedAccounts value is always empty.

      • If the eventScopeCode value is ACCOUNT_SPECIFIC, then the affectedAccounts value lists the affected Amazon Web Services accounts in your organization. For example, if an event affects a service such as Amazon Elastic Compute Cloud and you have Amazon Web Services accounts that use that service, those account IDs appear in the response.

      • If the eventScopeCode value is NONE, then the eventArn that you specified in the request is invalid or doesn't exist.

      If the service returns an enum value that is not available in the current SDK version, eventScopeCode will return EventScopeCode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from eventScopeCodeAsString().

      Returns:
      This parameter specifies if the Health event is a public Amazon Web Services service event or an account-specific event.

      • If the eventScopeCode value is PUBLIC, then the affectedAccounts value is always empty.

      • If the eventScopeCode value is ACCOUNT_SPECIFIC, then the affectedAccounts value lists the affected Amazon Web Services accounts in your organization. For example, if an event affects a service such as Amazon Elastic Compute Cloud and you have Amazon Web Services accounts that use that service, those account IDs appear in the response.

      • If the eventScopeCode value is NONE, then the eventArn that you specified in the request is invalid or doesn't exist.

      See Also:
    • toBuilder

      public Event.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<Event.Builder,Event>
      Returns:
      a builder for type T
    • builder

      public static Event.Builder builder()
    • serializableBuilderClass

      public static Class<? extends Event.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.