describeEventDetailsForOrganization method

Future<DescribeEventDetailsForOrganizationResponse> describeEventDetailsForOrganization({
  1. required List<EventAccountFilter> organizationEventDetailFilters,
  2. String? locale,
})

Returns detailed information about one or more specified events for one or more Amazon Web Services accounts in your organization. This information includes standard event data (such as the Amazon Web Services Region and service), an event description, and (depending on the event) possible metadata. This operation doesn't return affected entities, such as the resources related to the event. To return affected entities, use the DescribeAffectedEntitiesForOrganization operation. When you call the DescribeEventDetailsForOrganization operation, specify the organizationEventDetailFilters object in the request. Depending on the Health event type, note the following differences:

  • To return event details for a public event, you must specify a null value for the awsAccountId parameter. If you specify an account ID for a public event, Health returns an error message because public events aren't specific to an account.
  • To return event details for an event that is specific to an account in your organization, you must specify the awsAccountId parameter in the request. If you don't specify an account ID, Health returns an error message because the event is specific to an account in your organization.
For more information, see Event.

May throw UnsupportedLocale.

Parameter organizationEventDetailFilters : A set of JSON elements that includes the awsAccountId and the eventArn.

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

Implementation

Future<DescribeEventDetailsForOrganizationResponse>
    describeEventDetailsForOrganization({
  required List<EventAccountFilter> organizationEventDetailFilters,
  String? locale,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSHealth_20160804.DescribeEventDetailsForOrganization'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'organizationEventDetailFilters': organizationEventDetailFilters,
      if (locale != null) 'locale': locale,
    },
  );

  return DescribeEventDetailsForOrganizationResponse.fromJson(
      jsonResponse.body);
}