health

package
v1.6.16-0...-b84b5a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package health provides a client for AWS Health APIs and Notifications.

Index

Examples

Constants

View Source
const (
	// EntityStatusCodeImpaired is a entityStatusCode enum value
	EntityStatusCodeImpaired = "IMPAIRED"

	// EntityStatusCodeUnimpaired is a entityStatusCode enum value
	EntityStatusCodeUnimpaired = "UNIMPAIRED"

	// EntityStatusCodeUnknown is a entityStatusCode enum value
	EntityStatusCodeUnknown = "UNKNOWN"
)
View Source
const (
	// EventStatusCodeOpen is a eventStatusCode enum value
	EventStatusCodeOpen = "open"

	// EventStatusCodeClosed is a eventStatusCode enum value
	EventStatusCodeClosed = "closed"

	// EventStatusCodeUpcoming is a eventStatusCode enum value
	EventStatusCodeUpcoming = "upcoming"
)
View Source
const (
	// EventTypeCategoryIssue is a eventTypeCategory enum value
	EventTypeCategoryIssue = "issue"

	// EventTypeCategoryAccountNotification is a eventTypeCategory enum value
	EventTypeCategoryAccountNotification = "accountNotification"

	// EventTypeCategoryScheduledChange is a eventTypeCategory enum value
	EventTypeCategoryScheduledChange = "scheduledChange"
)
View Source
const (
	ServiceName = "health"    // Service endpoint prefix API calls made to.
	EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
)

Service information constants

View Source
const (
	// EventAggregateFieldEventTypeCategory is a eventAggregateField enum value
	EventAggregateFieldEventTypeCategory = "eventTypeCategory"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AffectedEntity

type AffectedEntity struct {

	// The 12-digit AWS account number that contains the affected entity.
	AwsAccountId *string `locationName:"awsAccountId" type:"string"`

	// The unique identifier for the entity. Format: arn:aws:health:entity-region:aws-account:entity/entity-id.
	// Example: arn:aws:health:us-east-1:111222333444:entity/AVh5GGT7ul1arKr1sE1K
	EntityArn *string `locationName:"entityArn" type:"string"`

	// The ID of the affected entity.
	EntityValue *string `locationName:"entityValue" type:"string"`

	// The unique identifier for the event. Format: arn:aws:health:event-region::event/EVENT_TYPE_PLUS_ID.
	// Example: arn:aws:health:us-east-1::event/AWS_EC2_MAINTENANCE_5331
	EventArn *string `locationName:"eventArn" type:"string"`

	// The most recent time that the entity was updated.
	LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp" timestampFormat:"unix"`

	// The most recent status of the entity affected by the event. The possible
	// values are IMPAIRED, UNIMPAIRED, and UNKNOWN.
	StatusCode *string `locationName:"statusCode" type:"string" enum:"entityStatusCode"`

	// A map of entity tags attached to the affected entity.
	Tags map[string]*string `locationName:"tags" type:"map"`
	// contains filtered or unexported fields
}

Information about an entity that is affected by a Health event. Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/AffectedEntity

func (AffectedEntity) GoString

func (s AffectedEntity) GoString() string

GoString returns the string representation

func (*AffectedEntity) SetAwsAccountId

func (s *AffectedEntity) SetAwsAccountId(v string) *AffectedEntity

SetAwsAccountId sets the AwsAccountId field's value.

func (*AffectedEntity) SetEntityArn

func (s *AffectedEntity) SetEntityArn(v string) *AffectedEntity

SetEntityArn sets the EntityArn field's value.

func (*AffectedEntity) SetEntityValue

func (s *AffectedEntity) SetEntityValue(v string) *AffectedEntity

SetEntityValue sets the EntityValue field's value.

func (*AffectedEntity) SetEventArn

func (s *AffectedEntity) SetEventArn(v string) *AffectedEntity

SetEventArn sets the EventArn field's value.

func (*AffectedEntity) SetLastUpdatedTime

func (s *AffectedEntity) SetLastUpdatedTime(v time.Time) *AffectedEntity

SetLastUpdatedTime sets the LastUpdatedTime field's value.

func (*AffectedEntity) SetStatusCode

func (s *AffectedEntity) SetStatusCode(v string) *AffectedEntity

SetStatusCode sets the StatusCode field's value.

func (*AffectedEntity) SetTags

func (s *AffectedEntity) SetTags(v map[string]*string) *AffectedEntity

SetTags sets the Tags field's value.

func (AffectedEntity) String

func (s AffectedEntity) String() string

String returns the string representation

type DateTimeRange

type DateTimeRange struct {

	// The starting date and time of a time range.
	From *time.Time `locationName:"from" type:"timestamp" timestampFormat:"unix"`

	// The ending date and time of a time range.
	To *time.Time `locationName:"to" type:"timestamp" timestampFormat:"unix"`
	// contains filtered or unexported fields
}

A range of dates and times that is used by the EventFilter and EntityFilter objects. If from is set and to is set: match items where the timestamp (startTime, endTime, or lastUpdatedTime) is between from and to inclusive. If from is set and to is not set: match items where the timestamp value is equal to or after from. If from is not set and to is set: match items where the timestamp value is equal to or before to. Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DateTimeRange

func (DateTimeRange) GoString

func (s DateTimeRange) GoString() string

GoString returns the string representation

func (*DateTimeRange) SetFrom

func (s *DateTimeRange) SetFrom(v time.Time) *DateTimeRange

SetFrom sets the From field's value.

func (*DateTimeRange) SetTo

func (s *DateTimeRange) SetTo(v time.Time) *DateTimeRange

SetTo sets the To field's value.

func (DateTimeRange) String

func (s DateTimeRange) String() string

String returns the string representation

type DescribeAffectedEntitiesInput

type DescribeAffectedEntitiesInput struct {

	// Values to narrow the results returned. At least one event ARN is required.
	//
	// Filter is a required field
	Filter *EntityFilter `locationName:"filter" type:"structure" required:"true"`

	// The locale (language) to return information in. English (en) is the default
	// and the only supported value at this time.
	Locale *string `locationName:"locale" min:"2" type:"string"`

	// The maximum number of items to return in one batch, between 10 and 100, inclusive.
	MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"`

	// If the results of a search are large, only a portion of the results are returned,
	// and a nextToken pagination token is returned in the response. To retrieve
	// the next batch of results, reissue the search request and include the returned
	// token. When all results have been returned, the response does not contain
	// a pagination token value.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeAffectedEntitiesRequest

func (DescribeAffectedEntitiesInput) GoString

GoString returns the string representation

func (*DescribeAffectedEntitiesInput) SetFilter

SetFilter sets the Filter field's value.

func (*DescribeAffectedEntitiesInput) SetLocale

SetLocale sets the Locale field's value.

func (*DescribeAffectedEntitiesInput) SetMaxResults

SetMaxResults sets the MaxResults field's value.

func (*DescribeAffectedEntitiesInput) SetNextToken

SetNextToken sets the NextToken field's value.

func (DescribeAffectedEntitiesInput) String

String returns the string representation

func (*DescribeAffectedEntitiesInput) Validate

func (s *DescribeAffectedEntitiesInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeAffectedEntitiesOutput

type DescribeAffectedEntitiesOutput struct {

	// The entities that match the filter criteria.
	Entities []*AffectedEntity `locationName:"entities" type:"list"`

	// If the results of a search are large, only a portion of the results are returned,
	// and a nextToken pagination token is returned in the response. To retrieve
	// the next batch of results, reissue the search request and include the returned
	// token. When all results have been returned, the response does not contain
	// a pagination token value.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeAffectedEntitiesResponse

func (DescribeAffectedEntitiesOutput) GoString

GoString returns the string representation

func (*DescribeAffectedEntitiesOutput) SetEntities

SetEntities sets the Entities field's value.

func (*DescribeAffectedEntitiesOutput) SetNextToken

SetNextToken sets the NextToken field's value.

func (DescribeAffectedEntitiesOutput) String

String returns the string representation

type DescribeEntityAggregatesInput

type DescribeEntityAggregatesInput struct {

	// A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/AWS_EC2_MAINTENANCE_5331",
	// "arn:aws:health:us-west-1::event/AWS_EBS_LOST_VOLUME_xyz"
	EventArns []*string `locationName:"eventArns" min:"1" type:"list"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEntityAggregatesRequest

func (DescribeEntityAggregatesInput) GoString

GoString returns the string representation

func (*DescribeEntityAggregatesInput) SetEventArns

SetEventArns sets the EventArns field's value.

func (DescribeEntityAggregatesInput) String

String returns the string representation

func (*DescribeEntityAggregatesInput) Validate

func (s *DescribeEntityAggregatesInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeEntityAggregatesOutput

type DescribeEntityAggregatesOutput struct {

	// The number of entities that are affected by each of the specified events.
	EntityAggregates []*EntityAggregate `locationName:"entityAggregates" type:"list"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEntityAggregatesResponse

func (DescribeEntityAggregatesOutput) GoString

GoString returns the string representation

func (*DescribeEntityAggregatesOutput) SetEntityAggregates

SetEntityAggregates sets the EntityAggregates field's value.

func (DescribeEntityAggregatesOutput) String

String returns the string representation

type DescribeEventAggregatesInput

type DescribeEventAggregatesInput struct {

	// The only currently supported value is eventTypeCategory.
	//
	// AggregateField is a required field
	AggregateField *string `locationName:"aggregateField" type:"string" required:"true" enum:"eventAggregateField"`

	// Values to narrow the results returned.
	Filter *EventFilter `locationName:"filter" type:"structure"`

	// The maximum number of items to return in one batch, between 10 and 100, inclusive.
	MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"`

	// If the results of a search are large, only a portion of the results are returned,
	// and a nextToken pagination token is returned in the response. To retrieve
	// the next batch of results, reissue the search request and include the returned
	// token. When all results have been returned, the response does not contain
	// a pagination token value.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventAggregatesRequest

func (DescribeEventAggregatesInput) GoString

func (s DescribeEventAggregatesInput) GoString() string

GoString returns the string representation

func (*DescribeEventAggregatesInput) SetAggregateField

SetAggregateField sets the AggregateField field's value.

func (*DescribeEventAggregatesInput) SetFilter

SetFilter sets the Filter field's value.

func (*DescribeEventAggregatesInput) SetMaxResults

SetMaxResults sets the MaxResults field's value.

func (*DescribeEventAggregatesInput) SetNextToken

SetNextToken sets the NextToken field's value.

func (DescribeEventAggregatesInput) String

String returns the string representation

func (*DescribeEventAggregatesInput) Validate

func (s *DescribeEventAggregatesInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeEventAggregatesOutput

type DescribeEventAggregatesOutput struct {

	// The number of events in each category that meet the optional filter criteria.
	EventAggregates []*EventAggregate `locationName:"eventAggregates" type:"list"`

	// If the results of a search are large, only a portion of the results are returned,
	// and a nextToken pagination token is returned in the response. To retrieve
	// the next batch of results, reissue the search request and include the returned
	// token. When all results have been returned, the response does not contain
	// a pagination token value.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventAggregatesResponse

func (DescribeEventAggregatesOutput) GoString

GoString returns the string representation

func (*DescribeEventAggregatesOutput) SetEventAggregates

SetEventAggregates sets the EventAggregates field's value.

func (*DescribeEventAggregatesOutput) SetNextToken

SetNextToken sets the NextToken field's value.

func (DescribeEventAggregatesOutput) String

String returns the string representation

type DescribeEventDetailsInput

type DescribeEventDetailsInput struct {

	// A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/AWS_EC2_MAINTENANCE_5331",
	// "arn:aws:health:us-west-1::event/AWS_EBS_LOST_VOLUME_xyz"
	//
	// EventArns is a required field
	EventArns []*string `locationName:"eventArns" min:"1" type:"list" required:"true"`

	// The locale (language) to return information in. English (en) is the default
	// and the only supported value at this time.
	Locale *string `locationName:"locale" min:"2" type:"string"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventDetailsRequest

func (DescribeEventDetailsInput) GoString

func (s DescribeEventDetailsInput) GoString() string

GoString returns the string representation

func (*DescribeEventDetailsInput) SetEventArns

SetEventArns sets the EventArns field's value.

func (*DescribeEventDetailsInput) SetLocale

SetLocale sets the Locale field's value.

func (DescribeEventDetailsInput) String

func (s DescribeEventDetailsInput) String() string

String returns the string representation

func (*DescribeEventDetailsInput) Validate

func (s *DescribeEventDetailsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeEventDetailsOutput

type DescribeEventDetailsOutput struct {

	// Error messages for any events that could not be retrieved.
	FailedSet []*EventDetailsErrorItem `locationName:"failedSet" type:"list"`

	// Information about the events that could be retrieved.
	SuccessfulSet []*EventDetails `locationName:"successfulSet" type:"list"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventDetailsResponse

func (DescribeEventDetailsOutput) GoString

func (s DescribeEventDetailsOutput) GoString() string

GoString returns the string representation

func (*DescribeEventDetailsOutput) SetFailedSet

SetFailedSet sets the FailedSet field's value.

func (*DescribeEventDetailsOutput) SetSuccessfulSet

SetSuccessfulSet sets the SuccessfulSet field's value.

func (DescribeEventDetailsOutput) String

String returns the string representation

type DescribeEventTypesInput

type DescribeEventTypesInput struct {

	// Values to narrow the results returned.
	Filter *EventTypeFilter `locationName:"filter" type:"structure"`

	// The locale (language) to return information in. English (en) is the default
	// and the only supported value at this time.
	Locale *string `locationName:"locale" min:"2" type:"string"`

	// The maximum number of items to return in one batch, between 10 and 100, inclusive.
	MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"`

	// If the results of a search are large, only a portion of the results are returned,
	// and a nextToken pagination token is returned in the response. To retrieve
	// the next batch of results, reissue the search request and include the returned
	// token. When all results have been returned, the response does not contain
	// a pagination token value.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventTypesRequest

func (DescribeEventTypesInput) GoString

func (s DescribeEventTypesInput) GoString() string

GoString returns the string representation

func (*DescribeEventTypesInput) SetFilter

SetFilter sets the Filter field's value.

func (*DescribeEventTypesInput) SetLocale

SetLocale sets the Locale field's value.

func (*DescribeEventTypesInput) SetMaxResults

SetMaxResults sets the MaxResults field's value.

func (*DescribeEventTypesInput) SetNextToken

SetNextToken sets the NextToken field's value.

func (DescribeEventTypesInput) String

func (s DescribeEventTypesInput) String() string

String returns the string representation

func (*DescribeEventTypesInput) Validate

func (s *DescribeEventTypesInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeEventTypesOutput

type DescribeEventTypesOutput struct {

	// A list of event types that match the filter criteria. Event types have a
	// category (issue, accountNotification, or scheduledChange), a service (for
	// example, EC2, RDS, DATAPIPELINE, BILLING), and a code (in the format AWS_SERVICE_DESCRIPTION;
	// for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT).
	EventTypes []*EventType `locationName:"eventTypes" type:"list"`

	// If the results of a search are large, only a portion of the results are returned,
	// and a nextToken pagination token is returned in the response. To retrieve
	// the next batch of results, reissue the search request and include the returned
	// token. When all results have been returned, the response does not contain
	// a pagination token value.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventTypesResponse

func (DescribeEventTypesOutput) GoString

func (s DescribeEventTypesOutput) GoString() string

GoString returns the string representation

func (*DescribeEventTypesOutput) SetEventTypes

SetEventTypes sets the EventTypes field's value.

func (*DescribeEventTypesOutput) SetNextToken

SetNextToken sets the NextToken field's value.

func (DescribeEventTypesOutput) String

func (s DescribeEventTypesOutput) String() string

String returns the string representation

type DescribeEventsInput

type DescribeEventsInput struct {

	// Values to narrow the results returned.
	Filter *EventFilter `locationName:"filter" type:"structure"`

	// The locale (language) to return information in. English (en) is the default
	// and the only supported value at this time.
	Locale *string `locationName:"locale" min:"2" type:"string"`

	// The maximum number of items to return in one batch, between 10 and 100, inclusive.
	MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"`

	// If the results of a search are large, only a portion of the results are returned,
	// and a nextToken pagination token is returned in the response. To retrieve
	// the next batch of results, reissue the search request and include the returned
	// token. When all results have been returned, the response does not contain
	// a pagination token value.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventsRequest

func (DescribeEventsInput) GoString

func (s DescribeEventsInput) GoString() string

GoString returns the string representation

func (*DescribeEventsInput) SetFilter

SetFilter sets the Filter field's value.

func (*DescribeEventsInput) SetLocale

SetLocale sets the Locale field's value.

func (*DescribeEventsInput) SetMaxResults

func (s *DescribeEventsInput) SetMaxResults(v int64) *DescribeEventsInput

SetMaxResults sets the MaxResults field's value.

func (*DescribeEventsInput) SetNextToken

func (s *DescribeEventsInput) SetNextToken(v string) *DescribeEventsInput

SetNextToken sets the NextToken field's value.

func (DescribeEventsInput) String

func (s DescribeEventsInput) String() string

String returns the string representation

func (*DescribeEventsInput) Validate

func (s *DescribeEventsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeEventsOutput

type DescribeEventsOutput struct {

	// The events that match the specified filter criteria.
	Events []*Event `locationName:"events" type:"list"`

	// If the results of a search are large, only a portion of the results are returned,
	// and a nextToken pagination token is returned in the response. To retrieve
	// the next batch of results, reissue the search request and include the returned
	// token. When all results have been returned, the response does not contain
	// a pagination token value.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventsResponse

func (DescribeEventsOutput) GoString

func (s DescribeEventsOutput) GoString() string

GoString returns the string representation

func (*DescribeEventsOutput) SetEvents

func (s *DescribeEventsOutput) SetEvents(v []*Event) *DescribeEventsOutput

SetEvents sets the Events field's value.

func (*DescribeEventsOutput) SetNextToken

func (s *DescribeEventsOutput) SetNextToken(v string) *DescribeEventsOutput

SetNextToken sets the NextToken field's value.

func (DescribeEventsOutput) String

func (s DescribeEventsOutput) String() string

String returns the string representation

type EntityAggregate

type EntityAggregate struct {

	// The number entities that match the criteria for the specified events.
	Count *int64 `locationName:"count" type:"integer"`

	// The unique identifier for the event. Format: arn:aws:health:event-region::event/EVENT_TYPE_PLUS_ID.
	// Example: arn:aws:health:us-east-1::event/AWS_EC2_MAINTENANCE_5331
	EventArn *string `locationName:"eventArn" type:"string"`
	// contains filtered or unexported fields
}

The number of entities that are affected by one or more events. Returned by the DescribeEntityAggregates operation. Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/EntityAggregate

func (EntityAggregate) GoString

func (s EntityAggregate) GoString() string

GoString returns the string representation

func (*EntityAggregate) SetCount

func (s *EntityAggregate) SetCount(v int64) *EntityAggregate

SetCount sets the Count field's value.

func (*EntityAggregate) SetEventArn

func (s *EntityAggregate) SetEventArn(v string) *EntityAggregate

SetEventArn sets the EventArn field's value.

func (EntityAggregate) String

func (s EntityAggregate) String() string

String returns the string representation

type EntityFilter

type EntityFilter struct {

	// A list of entity ARNs (unique identifiers).
	EntityArns []*string `locationName:"entityArns" min:"1" type:"list"`

	// A list of IDs for affected entities.
	EntityValues []*string `locationName:"entityValues" min:"1" type:"list"`

	// A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/AWS_EC2_MAINTENANCE_5331",
	// "arn:aws:health:us-west-1::event/AWS_EBS_LOST_VOLUME_xyz"
	//
	// EventArns is a required field
	EventArns []*string `locationName:"eventArns" min:"1" type:"list" required:"true"`

	// A list of the most recent dates and times that the entity was updated.
	LastUpdatedTimes []*DateTimeRange `locationName:"lastUpdatedTimes" min:"1" type:"list"`

	// A list of entity status codes (IMPAIRED, UNIMPAIRED, or UNKNOWN).
	StatusCodes []*string `locationName:"statusCodes" min:"1" type:"list"`

	// A map of entity tags attached to the affected entity.
	Tags []map[string]*string `locationName:"tags" type:"list"`
	// contains filtered or unexported fields
}

The values to use to filter results from the DescribeAffectedEntities operation. Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/EntityFilter

func (EntityFilter) GoString

func (s EntityFilter) GoString() string

GoString returns the string representation

func (*EntityFilter) SetEntityArns

func (s *EntityFilter) SetEntityArns(v []*string) *EntityFilter

SetEntityArns sets the EntityArns field's value.

func (*EntityFilter) SetEntityValues

func (s *EntityFilter) SetEntityValues(v []*string) *EntityFilter

SetEntityValues sets the EntityValues field's value.

func (*EntityFilter) SetEventArns

func (s *EntityFilter) SetEventArns(v []*string) *EntityFilter

SetEventArns sets the EventArns field's value.

func (*EntityFilter) SetLastUpdatedTimes

func (s *EntityFilter) SetLastUpdatedTimes(v []*DateTimeRange) *EntityFilter

SetLastUpdatedTimes sets the LastUpdatedTimes field's value.

func (*EntityFilter) SetStatusCodes

func (s *EntityFilter) SetStatusCodes(v []*string) *EntityFilter

SetStatusCodes sets the StatusCodes field's value.

func (*EntityFilter) SetTags

func (s *EntityFilter) SetTags(v []map[string]*string) *EntityFilter

SetTags sets the Tags field's value.

func (EntityFilter) String

func (s EntityFilter) String() string

String returns the string representation

func (*EntityFilter) Validate

func (s *EntityFilter) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type Event

type Event struct {

	// The unique identifier for the event. Format: arn:aws:health:event-region::event/EVENT_TYPE_PLUS_ID.
	// Example: arn:aws:health:us-east-1::event/AWS_EC2_MAINTENANCE_5331
	Arn *string `locationName:"arn" type:"string"`

	// The AWS Availability Zone of the event. For example, us-east-1a.
	AvailabilityZone *string `locationName:"availabilityZone" type:"string"`

	// The date and time that the event ended.
	EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"unix"`

	// The
	EventTypeCategory *string `locationName:"eventTypeCategory" min:"3" type:"string" enum:"eventTypeCategory"`

	// The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION;
	// for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT.
	EventTypeCode *string `locationName:"eventTypeCode" min:"3" type:"string"`

	// The most recent date and time that the event was updated.
	LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp" timestampFormat:"unix"`

	// The AWS region name of the event.
	Region *string `locationName:"region" type:"string"`

	// The AWS service that is affected by the event. For example, EC2, RDS.
	Service *string `locationName:"service" min:"2" type:"string"`

	// The date and time that the event began.
	StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix"`

	// The most recent status of the event. Possible values are open, closed, and
	// upcoming.
	StatusCode *string `locationName:"statusCode" type:"string" enum:"eventStatusCode"`
	// contains filtered or unexported fields
}

Summary information about an event, returned by the DescribeEvents operation. The DescribeEventDetails operation also returns this information, as well as the EventDescription and additional event metadata. Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/Event

func (Event) GoString

func (s Event) GoString() string

GoString returns the string representation

func (*Event) SetArn

func (s *Event) SetArn(v string) *Event

SetArn sets the Arn field's value.

func (*Event) SetAvailabilityZone

func (s *Event) SetAvailabilityZone(v string) *Event

SetAvailabilityZone sets the AvailabilityZone field's value.

func (*Event) SetEndTime

func (s *Event) SetEndTime(v time.Time) *Event

SetEndTime sets the EndTime field's value.

func (*Event) SetEventTypeCategory

func (s *Event) SetEventTypeCategory(v string) *Event

SetEventTypeCategory sets the EventTypeCategory field's value.

func (*Event) SetEventTypeCode

func (s *Event) SetEventTypeCode(v string) *Event

SetEventTypeCode sets the EventTypeCode field's value.

func (*Event) SetLastUpdatedTime

func (s *Event) SetLastUpdatedTime(v time.Time) *Event

SetLastUpdatedTime sets the LastUpdatedTime field's value.

func (*Event) SetRegion

func (s *Event) SetRegion(v string) *Event

SetRegion sets the Region field's value.

func (*Event) SetService

func (s *Event) SetService(v string) *Event

SetService sets the Service field's value.

func (*Event) SetStartTime

func (s *Event) SetStartTime(v time.Time) *Event

SetStartTime sets the StartTime field's value.

func (*Event) SetStatusCode

func (s *Event) SetStatusCode(v string) *Event

SetStatusCode sets the StatusCode field's value.

func (Event) String

func (s Event) String() string

String returns the string representation

type EventAggregate

type EventAggregate struct {

	// The issue type for the associated count.
	AggregateValue *string `locationName:"aggregateValue" type:"string"`

	// The number of events of the associated issue type.
	Count *int64 `locationName:"count" type:"integer"`
	// contains filtered or unexported fields
}

The number of events of each issue type. Returned by the DescribeEventAggregates operation. Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/EventAggregate

func (EventAggregate) GoString

func (s EventAggregate) GoString() string

GoString returns the string representation

func (*EventAggregate) SetAggregateValue

func (s *EventAggregate) SetAggregateValue(v string) *EventAggregate

SetAggregateValue sets the AggregateValue field's value.

func (*EventAggregate) SetCount

func (s *EventAggregate) SetCount(v int64) *EventAggregate

SetCount sets the Count field's value.

func (EventAggregate) String

func (s EventAggregate) String() string

String returns the string representation

type EventDescription

type EventDescription struct {

	// The most recent description of the event.
	LatestDescription *string `locationName:"latestDescription" type:"string"`
	// contains filtered or unexported fields
}

The detailed description of the event. Included in the information returned by the DescribeEventDetails operation. Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/EventDescription

func (EventDescription) GoString

func (s EventDescription) GoString() string

GoString returns the string representation

func (*EventDescription) SetLatestDescription

func (s *EventDescription) SetLatestDescription(v string) *EventDescription

SetLatestDescription sets the LatestDescription field's value.

func (EventDescription) String

func (s EventDescription) String() string

String returns the string representation

type EventDetails

type EventDetails struct {

	// Summary information about the event.
	Event *Event `locationName:"event" type:"structure"`

	// The most recent description of the event.
	EventDescription *EventDescription `locationName:"eventDescription" type:"structure"`

	// Additional metadata about the event.
	EventMetadata map[string]*string `locationName:"eventMetadata" type:"map"`
	// contains filtered or unexported fields
}

Detailed information about an event. A combination of an Event object, an EventDescription object, and additional metadata about the event. Returned by the DescribeEventDetails operation. Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/EventDetails

func (EventDetails) GoString

func (s EventDetails) GoString() string

GoString returns the string representation

func (*EventDetails) SetEvent

func (s *EventDetails) SetEvent(v *Event) *EventDetails

SetEvent sets the Event field's value.

func (*EventDetails) SetEventDescription

func (s *EventDetails) SetEventDescription(v *EventDescription) *EventDetails

SetEventDescription sets the EventDescription field's value.

func (*EventDetails) SetEventMetadata

func (s *EventDetails) SetEventMetadata(v map[string]*string) *EventDetails

SetEventMetadata sets the EventMetadata field's value.

func (EventDetails) String

func (s EventDetails) String() string

String returns the string representation

type EventDetailsErrorItem

type EventDetailsErrorItem struct {

	// A message that describes the error.
	ErrorMessage *string `locationName:"errorMessage" type:"string"`

	// The name of the error.
	ErrorName *string `locationName:"errorName" type:"string"`

	// The unique identifier for the event. Format: arn:aws:health:event-region::event/EVENT_TYPE_PLUS_ID.
	// Example: arn:aws:health:us-east-1::event/AWS_EC2_MAINTENANCE_5331
	EventArn *string `locationName:"eventArn" type:"string"`
	// contains filtered or unexported fields
}

Error information returned when a DescribeEventDetails operation cannot find a specified event. Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/EventDetailsErrorItem

func (EventDetailsErrorItem) GoString

func (s EventDetailsErrorItem) GoString() string

GoString returns the string representation

func (*EventDetailsErrorItem) SetErrorMessage

func (s *EventDetailsErrorItem) SetErrorMessage(v string) *EventDetailsErrorItem

SetErrorMessage sets the ErrorMessage field's value.

func (*EventDetailsErrorItem) SetErrorName

SetErrorName sets the ErrorName field's value.

func (*EventDetailsErrorItem) SetEventArn

SetEventArn sets the EventArn field's value.

func (EventDetailsErrorItem) String

func (s EventDetailsErrorItem) String() string

String returns the string representation

type EventFilter

type EventFilter struct {

	// A list of AWS availability zones.
	AvailabilityZones []*string `locationName:"availabilityZones" type:"list"`

	// A list of dates and times that the event ended.
	EndTimes []*DateTimeRange `locationName:"endTimes" min:"1" type:"list"`

	// A list of entity ARNs (unique identifiers).
	EntityArns []*string `locationName:"entityArns" min:"1" type:"list"`

	// A list of entity identifiers, such as EC2 instance IDs (i-34ab692e) or EBS
	// volumes (vol-426ab23e).
	EntityValues []*string `locationName:"entityValues" min:"1" type:"list"`

	// A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/AWS_EC2_MAINTENANCE_5331",
	// "arn:aws:health:us-west-1::event/AWS_EBS_LOST_VOLUME_xyz"
	EventArns []*string `locationName:"eventArns" min:"1" type:"list"`

	// A list of event status codes.
	EventStatusCodes []*string `locationName:"eventStatusCodes" min:"1" type:"list"`

	// A list of event type category codes (issue, scheduledChange, or accountNotification).
	EventTypeCategories []*string `locationName:"eventTypeCategories" min:"1" type:"list"`

	// A list of unique identifiers for event types. For example, "AWS_EC2_SYSTEM_MAINTENANCE_EVENT","AWS_RDS_MAINTENANCE_SCHEDULED"
	EventTypeCodes []*string `locationName:"eventTypeCodes" min:"1" type:"list"`

	// A list of dates and times that the event was last updated.
	LastUpdatedTimes []*DateTimeRange `locationName:"lastUpdatedTimes" min:"1" type:"list"`

	// A list of AWS regions.
	Regions []*string `locationName:"regions" min:"1" type:"list"`

	// The AWS services associated with the event. For example, EC2, RDS.
	Services []*string `locationName:"services" min:"1" type:"list"`

	// A list of dates and times that the event began.
	StartTimes []*DateTimeRange `locationName:"startTimes" min:"1" type:"list"`

	// A map of entity tags attached to the affected entity.
	Tags []map[string]*string `locationName:"tags" type:"list"`
	// contains filtered or unexported fields
}

The values to use to filter results from the DescribeEvents and DescribeEventAggregates operations. Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/EventFilter

func (EventFilter) GoString

func (s EventFilter) GoString() string

GoString returns the string representation

func (*EventFilter) SetAvailabilityZones

func (s *EventFilter) SetAvailabilityZones(v []*string) *EventFilter

SetAvailabilityZones sets the AvailabilityZones field's value.

func (*EventFilter) SetEndTimes

func (s *EventFilter) SetEndTimes(v []*DateTimeRange) *EventFilter

SetEndTimes sets the EndTimes field's value.

func (*EventFilter) SetEntityArns

func (s *EventFilter) SetEntityArns(v []*string) *EventFilter

SetEntityArns sets the EntityArns field's value.

func (*EventFilter) SetEntityValues

func (s *EventFilter) SetEntityValues(v []*string) *EventFilter

SetEntityValues sets the EntityValues field's value.

func (*EventFilter) SetEventArns

func (s *EventFilter) SetEventArns(v []*string) *EventFilter

SetEventArns sets the EventArns field's value.

func (*EventFilter) SetEventStatusCodes

func (s *EventFilter) SetEventStatusCodes(v []*string) *EventFilter

SetEventStatusCodes sets the EventStatusCodes field's value.

func (*EventFilter) SetEventTypeCategories

func (s *EventFilter) SetEventTypeCategories(v []*string) *EventFilter

SetEventTypeCategories sets the EventTypeCategories field's value.

func (*EventFilter) SetEventTypeCodes

func (s *EventFilter) SetEventTypeCodes(v []*string) *EventFilter

SetEventTypeCodes sets the EventTypeCodes field's value.

func (*EventFilter) SetLastUpdatedTimes

func (s *EventFilter) SetLastUpdatedTimes(v []*DateTimeRange) *EventFilter

SetLastUpdatedTimes sets the LastUpdatedTimes field's value.

func (*EventFilter) SetRegions

func (s *EventFilter) SetRegions(v []*string) *EventFilter

SetRegions sets the Regions field's value.

func (*EventFilter) SetServices

func (s *EventFilter) SetServices(v []*string) *EventFilter

SetServices sets the Services field's value.

func (*EventFilter) SetStartTimes

func (s *EventFilter) SetStartTimes(v []*DateTimeRange) *EventFilter

SetStartTimes sets the StartTimes field's value.

func (*EventFilter) SetTags

func (s *EventFilter) SetTags(v []map[string]*string) *EventFilter

SetTags sets the Tags field's value.

func (EventFilter) String

func (s EventFilter) String() string

String returns the string representation

func (*EventFilter) Validate

func (s *EventFilter) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type EventType

type EventType struct {

	// A list of event type category codes (issue, scheduledChange, or accountNotification).
	Category *string `locationName:"category" min:"3" type:"string" enum:"eventTypeCategory"`

	// The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION;
	// for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT.
	Code *string `locationName:"code" min:"3" type:"string"`

	// The AWS service that is affected by the event. For example, EC2, RDS.
	Service *string `locationName:"service" min:"2" type:"string"`
	// contains filtered or unexported fields
}

Metadata about a type of event that is reported by AWS Health. Data consists of the category (for example, issue), the service (for example, EC2), and the event type code (for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT). Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/EventType

func (EventType) GoString

func (s EventType) GoString() string

GoString returns the string representation

func (*EventType) SetCategory

func (s *EventType) SetCategory(v string) *EventType

SetCategory sets the Category field's value.

func (*EventType) SetCode

func (s *EventType) SetCode(v string) *EventType

SetCode sets the Code field's value.

func (*EventType) SetService

func (s *EventType) SetService(v string) *EventType

SetService sets the Service field's value.

func (EventType) String

func (s EventType) String() string

String returns the string representation

type EventTypeFilter

type EventTypeFilter struct {

	// A list of event type category codes (issue, scheduledChange, or accountNotification).
	EventTypeCategories []*string `locationName:"eventTypeCategories" min:"1" type:"list"`

	// A list of event type codes.
	EventTypeCodes []*string `locationName:"eventTypeCodes" min:"1" type:"list"`

	// The AWS services associated with the event. For example, EC2, RDS.
	Services []*string `locationName:"services" min:"1" type:"list"`
	// contains filtered or unexported fields
}

The values to use to filter results from the DescribeEventTypes operation. Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/EventTypeFilter

func (EventTypeFilter) GoString

func (s EventTypeFilter) GoString() string

GoString returns the string representation

func (*EventTypeFilter) SetEventTypeCategories

func (s *EventTypeFilter) SetEventTypeCategories(v []*string) *EventTypeFilter

SetEventTypeCategories sets the EventTypeCategories field's value.

func (*EventTypeFilter) SetEventTypeCodes

func (s *EventTypeFilter) SetEventTypeCodes(v []*string) *EventTypeFilter

SetEventTypeCodes sets the EventTypeCodes field's value.

func (*EventTypeFilter) SetServices

func (s *EventTypeFilter) SetServices(v []*string) *EventTypeFilter

SetServices sets the Services field's value.

func (EventTypeFilter) String

func (s EventTypeFilter) String() string

String returns the string representation

func (*EventTypeFilter) Validate

func (s *EventTypeFilter) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type Health

type Health struct {
	*client.Client
}

The AWS Health API provides programmatic access to the AWS Health information that is presented in the AWS Personal Health Dashboard (https://phd.aws.amazon.com/phd/home#/). You can get information about events that affect your AWS resources:

  • DescribeEvents: Summary information about events.

  • DescribeEventDetails: Detailed information about one or more events.

  • DescribeAffectedEntities: Information about AWS resources that are affected by one or more events.

In addition, these operations provide information about event types and summary counts of events or affected entities:

  • DescribeEventTypes: Information about the kinds of events that AWS Health tracks.

  • DescribeEventAggregates: A count of the number of events that meet specified criteria.

  • DescribeEntityAggregates: A count of the number of affected entities that meet specified criteria.

The Health API requires a Business or Enterprise support plan from AWS Support (http://aws.amazon.com/premiumsupport/). Calling the Health API from an account that does not have a Business or Enterprise support plan causes a SubscriptionRequiredException.

For authentication of requests, AWS Health uses the Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).

See the AWS Health User Guide (http://docs.aws.amazon.com/health/latest/ug/what-is-aws-health.html) for information about how to use the API.

Service Endpoint

The HTTP endpoint for the AWS Health API is:

The service client's operations are safe to be used concurrently. It is not safe to mutate any of the client's properties though. Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04

func New

func New(p client.ConfigProvider, cfgs ...*aws.Config) *Health

New creates a new instance of the Health client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.

Example:

// Create a Health client from just a session.
svc := health.New(mySession)

// Create a Health client with additional configuration
svc := health.New(mySession, aws.NewConfig().WithRegion("us-west-2"))

func (*Health) DescribeAffectedEntities

func (c *Health) DescribeAffectedEntities(input *DescribeAffectedEntitiesInput) (*DescribeAffectedEntitiesOutput, error)

DescribeAffectedEntities API operation for AWS Health APIs and Notifications.

Returns a list of entities that have been affected by the specified events, based on the specified filter criteria. Entities can refer to individual customer resources, groups of customer resources, or any other construct, depending on the AWS service. Events that have impact beyond that of the affected entities, or where the extent of impact is unknown, include at least one entity indicating this.

At least one event ARN is required. Results are sorted by the lastUpdatedTime of the entity, starting with the most recent.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Health APIs and Notifications's API operation DescribeAffectedEntities for usage and error information.

Returned Error Codes:

  • InvalidPaginationToken The specified pagination token (nextToken) is not valid.

  • UnsupportedLocale The specified locale is not supported.

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeAffectedEntities

Example
package main

import (
	"fmt"
	"time"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/health"
)

func main() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := health.New(sess)

	params := &health.DescribeAffectedEntitiesInput{
		Filter: &health.EntityFilter{ // Required
			EventArns: []*string{ // Required
				aws.String("eventArn"), // Required
				// More values...
			},
			EntityArns: []*string{
				aws.String("entityArn"), // Required
				// More values...
			},
			EntityValues: []*string{
				aws.String("entityValue"), // Required
				// More values...
			},
			LastUpdatedTimes: []*health.DateTimeRange{
				{ // Required
					From: aws.Time(time.Now()),
					To:   aws.Time(time.Now()),
				},
				// More values...
			},
			StatusCodes: []*string{
				aws.String("entityStatusCode"), // Required
				// More values...
			},
			Tags: []map[string]*string{
				{ // Required
					"Key": aws.String("tagValue"), // Required
					// More values...
				},
				// More values...
			},
		},
		Locale:     aws.String("locale"),
		MaxResults: aws.Int64(1),
		NextToken:  aws.String("nextToken"),
	}
	resp, err := svc.DescribeAffectedEntities(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
Output:

func (*Health) DescribeAffectedEntitiesPages

func (c *Health) DescribeAffectedEntitiesPages(input *DescribeAffectedEntitiesInput, fn func(p *DescribeAffectedEntitiesOutput, lastPage bool) (shouldContinue bool)) error

DescribeAffectedEntitiesPages iterates over the pages of a DescribeAffectedEntities operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See DescribeAffectedEntities method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a DescribeAffectedEntities operation.
pageNum := 0
err := client.DescribeAffectedEntitiesPages(params,
    func(page *DescribeAffectedEntitiesOutput, lastPage bool) bool {
        pageNum++
        fmt.Println(page)
        return pageNum <= 3
    })

func (*Health) DescribeAffectedEntitiesRequest

func (c *Health) DescribeAffectedEntitiesRequest(input *DescribeAffectedEntitiesInput) (req *request.Request, output *DescribeAffectedEntitiesOutput)

DescribeAffectedEntitiesRequest generates a "aws/request.Request" representing the client's request for the DescribeAffectedEntities operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See DescribeAffectedEntities for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the DescribeAffectedEntities method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the DescribeAffectedEntitiesRequest method.
req, resp := client.DescribeAffectedEntitiesRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeAffectedEntities

func (*Health) DescribeEntityAggregates

func (c *Health) DescribeEntityAggregates(input *DescribeEntityAggregatesInput) (*DescribeEntityAggregatesOutput, error)

DescribeEntityAggregates API operation for AWS Health APIs and Notifications.

Returns the number of entities that are affected by each of the specified events. If no events are specified, the counts of all affected entities are returned.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Health APIs and Notifications's API operation DescribeEntityAggregates for usage and error information. Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEntityAggregates

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/health"
)

func main() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := health.New(sess)

	params := &health.DescribeEntityAggregatesInput{
		EventArns: []*string{
			aws.String("eventArn"), // Required
			// More values...
		},
	}
	resp, err := svc.DescribeEntityAggregates(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
Output:

func (*Health) DescribeEntityAggregatesRequest

func (c *Health) DescribeEntityAggregatesRequest(input *DescribeEntityAggregatesInput) (req *request.Request, output *DescribeEntityAggregatesOutput)

DescribeEntityAggregatesRequest generates a "aws/request.Request" representing the client's request for the DescribeEntityAggregates operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See DescribeEntityAggregates for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the DescribeEntityAggregates method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the DescribeEntityAggregatesRequest method.
req, resp := client.DescribeEntityAggregatesRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEntityAggregates

func (*Health) DescribeEventAggregates

func (c *Health) DescribeEventAggregates(input *DescribeEventAggregatesInput) (*DescribeEventAggregatesOutput, error)

DescribeEventAggregates API operation for AWS Health APIs and Notifications.

Returns the number of events of each event type (issue, scheduled change, and account notification). If no filter is specified, the counts of all events in each category are returned.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Health APIs and Notifications's API operation DescribeEventAggregates for usage and error information.

Returned Error Codes:

  • InvalidPaginationToken The specified pagination token (nextToken) is not valid.

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventAggregates

Example
package main

import (
	"fmt"
	"time"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/health"
)

func main() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := health.New(sess)

	params := &health.DescribeEventAggregatesInput{
		AggregateField: aws.String("eventAggregateField"), // Required
		Filter: &health.EventFilter{
			AvailabilityZones: []*string{
				aws.String("availabilityZone"), // Required
				// More values...
			},
			EndTimes: []*health.DateTimeRange{
				{ // Required
					From: aws.Time(time.Now()),
					To:   aws.Time(time.Now()),
				},
				// More values...
			},
			EntityArns: []*string{
				aws.String("entityArn"), // Required
				// More values...
			},
			EntityValues: []*string{
				aws.String("entityValue"), // Required
				// More values...
			},
			EventArns: []*string{
				aws.String("eventArn"), // Required
				// More values...
			},
			EventStatusCodes: []*string{
				aws.String("eventStatusCode"), // Required
				// More values...
			},
			EventTypeCategories: []*string{
				aws.String("eventTypeCategory"), // Required
				// More values...
			},
			EventTypeCodes: []*string{
				aws.String("eventType"), // Required
				// More values...
			},
			LastUpdatedTimes: []*health.DateTimeRange{
				{ // Required
					From: aws.Time(time.Now()),
					To:   aws.Time(time.Now()),
				},
				// More values...
			},
			Regions: []*string{
				aws.String("region"), // Required
				// More values...
			},
			Services: []*string{
				aws.String("service"), // Required
				// More values...
			},
			StartTimes: []*health.DateTimeRange{
				{ // Required
					From: aws.Time(time.Now()),
					To:   aws.Time(time.Now()),
				},
				// More values...
			},
			Tags: []map[string]*string{
				{ // Required
					"Key": aws.String("tagValue"), // Required
					// More values...
				},
				// More values...
			},
		},
		MaxResults: aws.Int64(1),
		NextToken:  aws.String("nextToken"),
	}
	resp, err := svc.DescribeEventAggregates(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
Output:

func (*Health) DescribeEventAggregatesPages

func (c *Health) DescribeEventAggregatesPages(input *DescribeEventAggregatesInput, fn func(p *DescribeEventAggregatesOutput, lastPage bool) (shouldContinue bool)) error

DescribeEventAggregatesPages iterates over the pages of a DescribeEventAggregates operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See DescribeEventAggregates method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a DescribeEventAggregates operation.
pageNum := 0
err := client.DescribeEventAggregatesPages(params,
    func(page *DescribeEventAggregatesOutput, lastPage bool) bool {
        pageNum++
        fmt.Println(page)
        return pageNum <= 3
    })

func (*Health) DescribeEventAggregatesRequest

func (c *Health) DescribeEventAggregatesRequest(input *DescribeEventAggregatesInput) (req *request.Request, output *DescribeEventAggregatesOutput)

DescribeEventAggregatesRequest generates a "aws/request.Request" representing the client's request for the DescribeEventAggregates operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See DescribeEventAggregates for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the DescribeEventAggregates method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the DescribeEventAggregatesRequest method.
req, resp := client.DescribeEventAggregatesRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventAggregates

func (*Health) DescribeEventDetails

func (c *Health) DescribeEventDetails(input *DescribeEventDetailsInput) (*DescribeEventDetailsOutput, error)

DescribeEventDetails API operation for AWS Health APIs and Notifications.

Returns detailed information about one or more specified events. Information includes standard event data (region, service, etc., as returned by DescribeEvents), a detailed event description, and possible additional metadata that depends upon the nature of the event. Affected entities are not included; to retrieve those, use the DescribeAffectedEntities operation.

If a specified event cannot be retrieved, an error message is returned for that event.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Health APIs and Notifications's API operation DescribeEventDetails for usage and error information.

Returned Error Codes:

  • UnsupportedLocale The specified locale is not supported.

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventDetails

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/health"
)

func main() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := health.New(sess)

	params := &health.DescribeEventDetailsInput{
		EventArns: []*string{ // Required
			aws.String("eventArn"), // Required
			// More values...
		},
		Locale: aws.String("locale"),
	}
	resp, err := svc.DescribeEventDetails(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
Output:

func (*Health) DescribeEventDetailsRequest

func (c *Health) DescribeEventDetailsRequest(input *DescribeEventDetailsInput) (req *request.Request, output *DescribeEventDetailsOutput)

DescribeEventDetailsRequest generates a "aws/request.Request" representing the client's request for the DescribeEventDetails operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See DescribeEventDetails for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the DescribeEventDetails method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the DescribeEventDetailsRequest method.
req, resp := client.DescribeEventDetailsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventDetails

func (*Health) DescribeEventTypes

func (c *Health) DescribeEventTypes(input *DescribeEventTypesInput) (*DescribeEventTypesOutput, error)

DescribeEventTypes API operation for AWS Health APIs and Notifications.

Returns the event types that meet the specified filter criteria. If no filter criteria are specified, all event types are returned, in no particular order.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Health APIs and Notifications's API operation DescribeEventTypes for usage and error information.

Returned Error Codes:

  • InvalidPaginationToken The specified pagination token (nextToken) is not valid.

  • UnsupportedLocale The specified locale is not supported.

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventTypes

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/health"
)

func main() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := health.New(sess)

	params := &health.DescribeEventTypesInput{
		Filter: &health.EventTypeFilter{
			EventTypeCategories: []*string{
				aws.String("eventTypeCategory"), // Required
				// More values...
			},
			EventTypeCodes: []*string{
				aws.String("eventTypeCode"), // Required
				// More values...
			},
			Services: []*string{
				aws.String("service"), // Required
				// More values...
			},
		},
		Locale:     aws.String("locale"),
		MaxResults: aws.Int64(1),
		NextToken:  aws.String("nextToken"),
	}
	resp, err := svc.DescribeEventTypes(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
Output:

func (*Health) DescribeEventTypesPages

func (c *Health) DescribeEventTypesPages(input *DescribeEventTypesInput, fn func(p *DescribeEventTypesOutput, lastPage bool) (shouldContinue bool)) error

DescribeEventTypesPages iterates over the pages of a DescribeEventTypes operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See DescribeEventTypes method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a DescribeEventTypes operation.
pageNum := 0
err := client.DescribeEventTypesPages(params,
    func(page *DescribeEventTypesOutput, lastPage bool) bool {
        pageNum++
        fmt.Println(page)
        return pageNum <= 3
    })

func (*Health) DescribeEventTypesRequest

func (c *Health) DescribeEventTypesRequest(input *DescribeEventTypesInput) (req *request.Request, output *DescribeEventTypesOutput)

DescribeEventTypesRequest generates a "aws/request.Request" representing the client's request for the DescribeEventTypes operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See DescribeEventTypes for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the DescribeEventTypes method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the DescribeEventTypesRequest method.
req, resp := client.DescribeEventTypesRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventTypes

func (*Health) DescribeEvents

func (c *Health) DescribeEvents(input *DescribeEventsInput) (*DescribeEventsOutput, error)

DescribeEvents API operation for AWS Health APIs and Notifications.

Returns information about events that meet the specified filter criteria. Events are returned in a summary form and do not include the detailed description, any additional metadata that depends on the event type, or any affected resources. To retrieve that information, use the DescribeEventDetails and DescribeAffectedEntities operations.

If no filter criteria are specified, all events are returned. Results are sorted by lastModifiedTime, starting with the most recent.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Health APIs and Notifications's API operation DescribeEvents for usage and error information.

Returned Error Codes:

  • InvalidPaginationToken The specified pagination token (nextToken) is not valid.

  • UnsupportedLocale The specified locale is not supported.

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEvents

Example
package main

import (
	"fmt"
	"time"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/health"
)

func main() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := health.New(sess)

	params := &health.DescribeEventsInput{
		Filter: &health.EventFilter{
			AvailabilityZones: []*string{
				aws.String("availabilityZone"), // Required
				// More values...
			},
			EndTimes: []*health.DateTimeRange{
				{ // Required
					From: aws.Time(time.Now()),
					To:   aws.Time(time.Now()),
				},
				// More values...
			},
			EntityArns: []*string{
				aws.String("entityArn"), // Required
				// More values...
			},
			EntityValues: []*string{
				aws.String("entityValue"), // Required
				// More values...
			},
			EventArns: []*string{
				aws.String("eventArn"), // Required
				// More values...
			},
			EventStatusCodes: []*string{
				aws.String("eventStatusCode"), // Required
				// More values...
			},
			EventTypeCategories: []*string{
				aws.String("eventTypeCategory"), // Required
				// More values...
			},
			EventTypeCodes: []*string{
				aws.String("eventType"), // Required
				// More values...
			},
			LastUpdatedTimes: []*health.DateTimeRange{
				{ // Required
					From: aws.Time(time.Now()),
					To:   aws.Time(time.Now()),
				},
				// More values...
			},
			Regions: []*string{
				aws.String("region"), // Required
				// More values...
			},
			Services: []*string{
				aws.String("service"), // Required
				// More values...
			},
			StartTimes: []*health.DateTimeRange{
				{ // Required
					From: aws.Time(time.Now()),
					To:   aws.Time(time.Now()),
				},
				// More values...
			},
			Tags: []map[string]*string{
				{ // Required
					"Key": aws.String("tagValue"), // Required
					// More values...
				},
				// More values...
			},
		},
		Locale:     aws.String("locale"),
		MaxResults: aws.Int64(1),
		NextToken:  aws.String("nextToken"),
	}
	resp, err := svc.DescribeEvents(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
Output:

func (*Health) DescribeEventsPages

func (c *Health) DescribeEventsPages(input *DescribeEventsInput, fn func(p *DescribeEventsOutput, lastPage bool) (shouldContinue bool)) error

DescribeEventsPages iterates over the pages of a DescribeEvents operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See DescribeEvents method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a DescribeEvents operation.
pageNum := 0
err := client.DescribeEventsPages(params,
    func(page *DescribeEventsOutput, lastPage bool) bool {
        pageNum++
        fmt.Println(page)
        return pageNum <= 3
    })

func (*Health) DescribeEventsRequest

func (c *Health) DescribeEventsRequest(input *DescribeEventsInput) (req *request.Request, output *DescribeEventsOutput)

DescribeEventsRequest generates a "aws/request.Request" representing the client's request for the DescribeEvents operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See DescribeEvents for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the DescribeEvents method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the DescribeEventsRequest method.
req, resp := client.DescribeEventsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEvents

Directories

Path Synopsis
Package healthiface provides an interface to enable mocking the AWS Health APIs and Notifications service client for testing your code.
Package healthiface provides an interface to enable mocking the AWS Health APIs and Notifications service client for testing your code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL