Table of Contents
Health.Client¶A low-level client representing AWS Health APIs and Notifications:
client = session.create_client('health')
These are the available methods:
can_paginate()describe_affected_entities()describe_entity_aggregates()describe_event_aggregates()describe_event_details()describe_event_types()describe_events()generate_presigned_url()get_paginator()get_waiter()can_paginate(operation_name)¶Check if an operation can be paginated.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Returns: | True if the operation can be paginated,
False otherwise. |
describe_affected_entities(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.describe_affected_entities(
filter={
'eventArns': [
'string',
],
'entityArns': [
'string',
],
'entityValues': [
'string',
],
'lastUpdatedTimes': [
{
'from': datetime(2015, 1, 1),
'to': datetime(2015, 1, 1)
},
],
'tags': [
{
'string': 'string'
},
],
'statusCodes': [
'IMPAIRED'|'UNIMPAIRED'|'UNKNOWN',
]
},
locale='string',
nextToken='string',
maxResults=123
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'entities': [
{
'entityArn': 'string',
'eventArn': 'string',
'entityValue': 'string',
'awsAccountId': 'string',
'lastUpdatedTime': datetime(2015, 1, 1),
'statusCode': 'IMPAIRED'|'UNIMPAIRED'|'UNKNOWN',
'tags': {
'string': 'string'
}
},
],
'nextToken': 'string'
}
Response Structure
|
describe_entity_aggregates(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.describe_entity_aggregates(
eventArns=[
'string',
]
)
| Parameters: | eventArns (list) – A list of event ARNs (unique identifiers). For example:
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'entityAggregates': [
{
'eventArn': 'string',
'count': 123
},
]
}
Response Structure
|
describe_event_aggregates(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.describe_event_aggregates(
filter={
'eventArns': [
'string',
],
'eventTypeCodes': [
'string',
],
'services': [
'string',
],
'regions': [
'string',
],
'availabilityZones': [
'string',
],
'startTimes': [
{
'from': datetime(2015, 1, 1),
'to': datetime(2015, 1, 1)
},
],
'endTimes': [
{
'from': datetime(2015, 1, 1),
'to': datetime(2015, 1, 1)
},
],
'lastUpdatedTimes': [
{
'from': datetime(2015, 1, 1),
'to': datetime(2015, 1, 1)
},
],
'entityArns': [
'string',
],
'entityValues': [
'string',
],
'eventTypeCategories': [
'issue'|'accountNotification'|'scheduledChange',
],
'tags': [
{
'string': 'string'
},
],
'eventStatusCodes': [
'open'|'closed'|'upcoming',
]
},
aggregateField='eventTypeCategory',
maxResults=123,
nextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'eventAggregates': [
{
'aggregateValue': 'string',
'count': 123
},
],
'nextToken': 'string'
}
Response Structure
|
describe_event_details(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.describe_event_details(
eventArns=[
'string',
],
locale='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'successfulSet': [
{
'event': {
'arn': 'string',
'service': 'string',
'eventTypeCode': 'string',
'eventTypeCategory': 'issue'|'accountNotification'|'scheduledChange',
'region': 'string',
'availabilityZone': 'string',
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'statusCode': 'open'|'closed'|'upcoming'
},
'eventDescription': {
'latestDescription': 'string'
},
'eventMetadata': {
'string': 'string'
}
},
],
'failedSet': [
{
'eventArn': 'string',
'errorName': 'string',
'errorMessage': 'string'
},
]
}
Response Structure
|
describe_event_types(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.describe_event_types(
filter={
'eventTypeCodes': [
'string',
],
'services': [
'string',
],
'eventTypeCategories': [
'issue'|'accountNotification'|'scheduledChange',
]
},
locale='string',
nextToken='string',
maxResults=123
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'eventTypes': [
{
'service': 'string',
'code': 'string',
'category': 'issue'|'accountNotification'|'scheduledChange'
},
],
'nextToken': 'string'
}
Response Structure
|
describe_events(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.describe_events(
filter={
'eventArns': [
'string',
],
'eventTypeCodes': [
'string',
],
'services': [
'string',
],
'regions': [
'string',
],
'availabilityZones': [
'string',
],
'startTimes': [
{
'from': datetime(2015, 1, 1),
'to': datetime(2015, 1, 1)
},
],
'endTimes': [
{
'from': datetime(2015, 1, 1),
'to': datetime(2015, 1, 1)
},
],
'lastUpdatedTimes': [
{
'from': datetime(2015, 1, 1),
'to': datetime(2015, 1, 1)
},
],
'entityArns': [
'string',
],
'entityValues': [
'string',
],
'eventTypeCategories': [
'issue'|'accountNotification'|'scheduledChange',
],
'tags': [
{
'string': 'string'
},
],
'eventStatusCodes': [
'open'|'closed'|'upcoming',
]
},
nextToken='string',
maxResults=123,
locale='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'events': [
{
'arn': 'string',
'service': 'string',
'eventTypeCode': 'string',
'eventTypeCategory': 'issue'|'accountNotification'|'scheduledChange',
'region': 'string',
'availabilityZone': 'string',
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'statusCode': 'open'|'closed'|'upcoming'
},
],
'nextToken': 'string'
}
Response Structure
|
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
| Parameters: |
|
|---|---|
| Returns: | The presigned url |
get_paginator(operation_name)¶Create a paginator for an operation.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Raises: | OperationNotPageableError – Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
| Return type: | L{botocore.paginate.Paginator} |
| Returns: | A paginator object. |
get_waiter(waiter_name)¶The available paginators are:
Health.Paginator.DescribeAffectedEntitiesHealth.Paginator.DescribeEventAggregatesHealth.Paginator.DescribeEventTypesHealth.Paginator.DescribeEventsHealth.Paginator.DescribeAffectedEntities¶paginator = client.get_paginator('describe_affected_entities')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Health.Client.describe_affected_entities().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
filter={
'eventArns': [
'string',
],
'entityArns': [
'string',
],
'entityValues': [
'string',
],
'lastUpdatedTimes': [
{
'from': datetime(2015, 1, 1),
'to': datetime(2015, 1, 1)
},
],
'tags': [
{
'string': 'string'
},
],
'statusCodes': [
'IMPAIRED'|'UNIMPAIRED'|'UNKNOWN',
]
},
locale='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'entities': [
{
'entityArn': 'string',
'eventArn': 'string',
'entityValue': 'string',
'awsAccountId': 'string',
'lastUpdatedTime': datetime(2015, 1, 1),
'statusCode': 'IMPAIRED'|'UNIMPAIRED'|'UNKNOWN',
'tags': {
'string': 'string'
}
},
],
'NextToken': 'string'
}
Response Structure
|
Health.Paginator.DescribeEventAggregates¶paginator = client.get_paginator('describe_event_aggregates')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Health.Client.describe_event_aggregates().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
filter={
'eventArns': [
'string',
],
'eventTypeCodes': [
'string',
],
'services': [
'string',
],
'regions': [
'string',
],
'availabilityZones': [
'string',
],
'startTimes': [
{
'from': datetime(2015, 1, 1),
'to': datetime(2015, 1, 1)
},
],
'endTimes': [
{
'from': datetime(2015, 1, 1),
'to': datetime(2015, 1, 1)
},
],
'lastUpdatedTimes': [
{
'from': datetime(2015, 1, 1),
'to': datetime(2015, 1, 1)
},
],
'entityArns': [
'string',
],
'entityValues': [
'string',
],
'eventTypeCategories': [
'issue'|'accountNotification'|'scheduledChange',
],
'tags': [
{
'string': 'string'
},
],
'eventStatusCodes': [
'open'|'closed'|'upcoming',
]
},
aggregateField='eventTypeCategory',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'eventAggregates': [
{
'aggregateValue': 'string',
'count': 123
},
],
'NextToken': 'string'
}
Response Structure
|
Health.Paginator.DescribeEventTypes¶paginator = client.get_paginator('describe_event_types')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Health.Client.describe_event_types().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
filter={
'eventTypeCodes': [
'string',
],
'services': [
'string',
],
'eventTypeCategories': [
'issue'|'accountNotification'|'scheduledChange',
]
},
locale='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'eventTypes': [
{
'service': 'string',
'code': 'string',
'category': 'issue'|'accountNotification'|'scheduledChange'
},
],
'NextToken': 'string'
}
Response Structure
|
Health.Paginator.DescribeEvents¶paginator = client.get_paginator('describe_events')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Health.Client.describe_events().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
filter={
'eventArns': [
'string',
],
'eventTypeCodes': [
'string',
],
'services': [
'string',
],
'regions': [
'string',
],
'availabilityZones': [
'string',
],
'startTimes': [
{
'from': datetime(2015, 1, 1),
'to': datetime(2015, 1, 1)
},
],
'endTimes': [
{
'from': datetime(2015, 1, 1),
'to': datetime(2015, 1, 1)
},
],
'lastUpdatedTimes': [
{
'from': datetime(2015, 1, 1),
'to': datetime(2015, 1, 1)
},
],
'entityArns': [
'string',
],
'entityValues': [
'string',
],
'eventTypeCategories': [
'issue'|'accountNotification'|'scheduledChange',
],
'tags': [
{
'string': 'string'
},
],
'eventStatusCodes': [
'open'|'closed'|'upcoming',
]
},
locale='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'events': [
{
'arn': 'string',
'service': 'string',
'eventTypeCode': 'string',
'eventTypeCategory': 'issue'|'accountNotification'|'scheduledChange',
'region': 'string',
'availabilityZone': 'string',
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'lastUpdatedTime': datetime(2015, 1, 1),
'statusCode': 'open'|'closed'|'upcoming'
},
],
'NextToken': 'string'
}
Response Structure
|