describeEntityAggregatesForOrganization method

Future<DescribeEntityAggregatesForOrganizationResponse> describeEntityAggregatesForOrganization({
  1. required List<String> eventArns,
  2. List<String>? awsAccountIds,
})

Returns a list of entity aggregates for your Organizations that are affected by each of the specified events.

Parameter eventArns : A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101"

Parameter awsAccountIds : A list of 12-digit Amazon Web Services account numbers that contains the affected entities.

Implementation

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

  return DescribeEntityAggregatesForOrganizationResponse.fromJson(
      jsonResponse.body);
}