updatePublishingDestination method

Future<void> updatePublishingDestination({
  1. required String destinationId,
  2. required String detectorId,
  3. DestinationProperties? destinationProperties,
})

Updates information about the publishing destination specified by the destinationId.

May throw BadRequestException. May throw InternalServerErrorException.

Parameter destinationId : The ID of the publishing destination to update.

Parameter detectorId : The ID of the detector associated with the publishing destinations to update.

To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.

Parameter destinationProperties : A DestinationProperties object that includes the DestinationArn and KmsKeyArn of the publishing destination.

Implementation

Future<void> updatePublishingDestination({
  required String destinationId,
  required String detectorId,
  DestinationProperties? destinationProperties,
}) async {
  final $payload = <String, dynamic>{
    if (destinationProperties != null)
      'destinationProperties': destinationProperties,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/detector/${Uri.encodeComponent(detectorId)}/publishingDestination/${Uri.encodeComponent(destinationId)}',
    exceptionFnMap: _exceptionFns,
  );
}