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.

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 {
  ArgumentError.checkNotNull(destinationId, 'destinationId');
  ArgumentError.checkNotNull(detectorId, 'detectorId');
  _s.validateStringLength(
    'detectorId',
    detectorId,
    1,
    300,
    isRequired: true,
  );
  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,
  );
}