deleteAggregationAuthorization method

Future<void> deleteAggregationAuthorization({
  1. required String authorizedAccountId,
  2. required String authorizedAwsRegion,
})

Deletes the authorization granted to the specified configuration aggregator account in a specified region.

May throw InvalidParameterValueException.

Parameter authorizedAccountId : The 12-digit account ID of the account authorized to aggregate data.

Parameter authorizedAwsRegion : The region authorized to collect aggregated data.

Implementation

Future<void> deleteAggregationAuthorization({
  required String authorizedAccountId,
  required String authorizedAwsRegion,
}) async {
  ArgumentError.checkNotNull(authorizedAccountId, 'authorizedAccountId');
  ArgumentError.checkNotNull(authorizedAwsRegion, 'authorizedAwsRegion');
  _s.validateStringLength(
    'authorizedAwsRegion',
    authorizedAwsRegion,
    1,
    64,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StarlingDoveService.DeleteAggregationAuthorization'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AuthorizedAccountId': authorizedAccountId,
      'AuthorizedAwsRegion': authorizedAwsRegion,
    },
  );
}