Skip to content

aws.health.describe_affected_entities_for_organization

Example SQL Queries

SELECT * FROM
aws.health.describe_affected_entities_for_organization;

Description

Returns a list of entities that have been affected by one or more events for one or more accounts in your organization in Organizations, based on the filter criteria. Entities can refer to individual customer resources, groups of customer resources, or any other construct, depending on the Amazon Web Service.

At least one event Amazon Resource Name (ARN) and account ID are required.

Before you can call this operation, you must first enable Health to work with Organizations. To do this, call the EnableHealthServiceAccessForOrganization operation from your organization's management account.

  • This API operation uses pagination. Specify the nextToken parameter in the next request to return more results.

  • This operation doesn't support resource-level permissions. You can't use this operation to allow or deny access to specific Health events. For more information, see Resource- and action-based conditions in the Health User Guide.

Table Definition

Column NameColumn Data Type
locale Input Column

The locale (language) to return information in. English (en) is the default and the only supported value at this time.

VARCHAR
organization_entity_account_filters Input Column

A JSON set of elements including the awsAccountId, eventArn and a set of statusCodes.

STRUCT(
"event_arn" VARCHAR,
"aws_account_id" VARCHAR,
"status_codes" VARCHAR[]
)[]
Show child fields
organization_entity_account_filters[]
Show child fields
organization_entity_account_filters[].aws_account_id

The 12-digit Amazon Web Services account numbers that contains the affected entities.

organization_entity_account_filters[].event_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

organization_entity_account_filters[].status_codes[]
organization_entity_filters Input Column

A JSON set of elements including the awsAccountId and the eventArn.

STRUCT(
"event_arn" VARCHAR,
"aws_account_id" VARCHAR
)[]
Show child fields
organization_entity_filters[]
Show child fields
organization_entity_filters[].aws_account_id

The 12-digit Amazon Web Services account numbers that contains the affected entities.

organization_entity_filters[].event_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

_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

entities

A JSON set of elements including the awsAccountId and its entityArn, entityValue and its entityArn, lastUpdatedTime, and statusCode.

STRUCT(
"entity_arn" VARCHAR,
"event_arn" VARCHAR,
"entity_value" VARCHAR,
"entity_url" VARCHAR,
"aws_account_id" VARCHAR,
"last_updated_time" TIMESTAMP_S,
"status_code" VARCHAR,
"tags" MAP(VARCHAR, VARCHAR)
)[]
Show child fields
entities[]
Show child fields
entities[].aws_account_id

The 12-digit Amazon Web Services account number that contains the affected entity.

entities[].entity_arn

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

entities[].entity_url

The URL of the affected entity.

entities[].entity_value

The ID of the affected entity.

entities[].event_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

entities[].last_updated_time

The most recent time that the entity was updated.

entities[].status_code

The most recent status of the entity affected by the event. The possible values are IMPAIRED, UNIMPAIRED, and UNKNOWN.

entities[].tags

A map of entity tags attached to the affected entity.

Currently, the tags property isn't supported.

failed_set

A JSON set of elements of the failed response, including the awsAccountId, errorMessage, errorName, and eventArn.

STRUCT(
"aws_account_id" VARCHAR,
"event_arn" VARCHAR,
"error_name" VARCHAR,
"error_message" VARCHAR
)[]
Show child fields
failed_set[]
Show child fields
failed_set[].aws_account_id

The 12-digit Amazon Web Services account numbers that contains the affected entities.

failed_set[].error_message

A message that describes the error. Follow the error message and retry your request.

For example, the InvalidAccountInputError error message appears if you call the DescribeAffectedEntitiesForOrganization operation and specify the AccountSpecific value for the EventScopeCode parameter, but don't specify an Amazon Web Services account.

failed_set[].error_name

The name of the error.

failed_set[].event_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