updateFindingAggregator method

Future<UpdateFindingAggregatorResponse> updateFindingAggregator({
  1. required String findingAggregatorArn,
  2. required String regionLinkingMode,
  3. List<String>? regions,
})
Updates cross-Region aggregation settings. You can use this operation to update the Region linking mode and the list of included or excluded Amazon Web Services Regions. However, you can't use this operation to change the home Region.

You can invoke this operation from the current home Region only.

May throw AccessDeniedException. May throw InternalException. May throw InvalidAccessException. May throw InvalidInputException. May throw LimitExceededException. May throw ResourceNotFoundException.

Parameter findingAggregatorArn : The ARN of the finding aggregator. To obtain the ARN, use ListFindingAggregators.

Parameter regionLinkingMode : Indicates whether to aggregate findings from all of the available Regions in the current partition. Also determines whether to automatically aggregate findings from new Regions as Security Hub CSPM supports them and you opt into them.

The selected option also determines how to use the Regions provided in the Regions list.

The options are as follows:

  • ALL_REGIONS - Aggregates findings from all of the Regions where Security Hub CSPM is enabled. When you choose this option, Security Hub CSPM also automatically aggregates findings from new Regions as Security Hub CSPM supports them and you opt into them.
  • ALL_REGIONS_EXCEPT_SPECIFIED - Aggregates findings from all of the Regions where Security Hub CSPM is enabled, except for the Regions listed in the Regions parameter. When you choose this option, Security Hub CSPM also automatically aggregates findings from new Regions as Security Hub CSPM supports them and you opt into them.
  • SPECIFIED_REGIONS - Aggregates findings only from the Regions listed in the Regions parameter. Security Hub CSPM does not automatically aggregate findings from new Regions.
  • NO_REGIONS - Aggregates no data because no Regions are selected as linked Regions.

Parameter regions : If RegionLinkingMode is ALL_REGIONS_EXCEPT_SPECIFIED, then this is a space-separated list of Regions that don't replicate and send findings to the home Region.

If RegionLinkingMode is SPECIFIED_REGIONS, then this is a space-separated list of Regions that do replicate and send findings to the home Region.

An InvalidInputException error results if you populate this field while RegionLinkingMode is NO_REGIONS.

Implementation

Future<UpdateFindingAggregatorResponse> updateFindingAggregator({
  required String findingAggregatorArn,
  required String regionLinkingMode,
  List<String>? regions,
}) async {
  final $payload = <String, dynamic>{
    'FindingAggregatorArn': findingAggregatorArn,
    'RegionLinkingMode': regionLinkingMode,
    if (regions != null) 'Regions': regions,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/findingAggregator/update',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateFindingAggregatorResponse.fromJson(response);
}