Method: Aws::Health::Client#describe_affected_entities_for_organization

Defined in:
lib/aws-sdk-health/client.rb

#describe_affected_entities_for_organization(params = {}) ⇒ Types::DescribeAffectedEntitiesForOrganizationResponse

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][1

operation from your

organization’s management account.

<note markdown=“1”> * 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*.

</note>

[1]: docs.aws.amazon.com/health/latest/APIReference/API_EnableHealthServiceAccessForOrganization.html [2]: docs.aws.amazon.com/health/latest/ug/security_iam_id-based-policy-examples.html#resource-action-based-conditions

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_affected_entities_for_organization({
  organization_entity_filters: [
    {
      event_arn: "eventArn", # required
      aws_account_id: "accountId",
    },
  ],
  locale: "locale",
  next_token: "nextToken",
  max_results: 1,
  organization_entity_account_filters: [
    {
      event_arn: "eventArn", # required
      aws_account_id: "accountId",
      status_codes: ["IMPAIRED"], # accepts IMPAIRED, UNIMPAIRED, UNKNOWN, PENDING, RESOLVED
    },
  ],
})

Response structure


resp.entities #=> Array
resp.entities[0].entity_arn #=> String
resp.entities[0].event_arn #=> String
resp.entities[0].entity_value #=> String
resp.entities[0].entity_url #=> String
resp.entities[0]. #=> String
resp.entities[0].last_updated_time #=> Time
resp.entities[0].status_code #=> String, one of "IMPAIRED", "UNIMPAIRED", "UNKNOWN", "PENDING", "RESOLVED"
resp.entities[0].tags #=> Hash
resp.entities[0].tags["tagKey"] #=> String
resp.failed_set #=> Array
resp.failed_set[0]. #=> String
resp.failed_set[0].event_arn #=> String
resp.failed_set[0].error_name #=> String
resp.failed_set[0].error_message #=> String
resp.next_token #=> String

Options Hash (params):

  • :organization_entity_filters (Array<Types::EventAccountFilter>)

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

  • :locale (String)

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

  • :next_token (String)

    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.

  • :max_results (Integer)

    The maximum number of items to return in one batch, between 10 and 100, inclusive.

  • :organization_entity_account_filters (Array<Types::EntityAccountFilter>)

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

See Also:



673
674
675
676
# File 'lib/aws-sdk-health/client.rb', line 673

def describe_affected_entities_for_organization(params = {}, options = {})
  req = build_request(:describe_affected_entities_for_organization, params)
  req.send_request(options)
end