updateChannel method

Future<UpdateChannelResponse> updateChannel({
  1. required String channelArn,
  2. required String clusterArn,
  3. IcebergDestinationUpdate? icebergDestinationUpdate,
  4. S3DestinationUpdate? s3DestinationUpdate,
})

Updates the destination configuration of an existing channel. Exactly one of icebergDestinationUpdate or s3DestinationUpdate must be supplied.

May throw BadRequestException. May throw ForbiddenException. May throw InternalServerErrorException. May throw NotFoundException. May throw ServiceUnavailableException. May throw TooManyRequestsException. May throw UnauthorizedException.

Parameter channelArn : The Amazon Resource Name (ARN) that uniquely identifies the channel.

Parameter clusterArn : The Amazon Resource Name (ARN) that uniquely identifies the cluster.

Parameter icebergDestinationUpdate : Updates fields on an Apache Iceberg destination. Use only when the channel was created with an Iceberg destination.

Parameter s3DestinationUpdate : Updates fields on an Amazon S3 destination. Use only when the channel was created with an Amazon S3 destination.

Implementation

Future<UpdateChannelResponse> updateChannel({
  required String channelArn,
  required String clusterArn,
  IcebergDestinationUpdate? icebergDestinationUpdate,
  S3DestinationUpdate? s3DestinationUpdate,
}) async {
  final $payload = <String, dynamic>{
    if (icebergDestinationUpdate != null)
      'icebergDestinationUpdate': icebergDestinationUpdate,
    if (s3DestinationUpdate != null)
      's3DestinationUpdate': s3DestinationUpdate,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/v1/clusters/${Uri.encodeComponent(clusterArn)}/channels/${Uri.encodeComponent(channelArn)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateChannelResponse.fromJson(response);
}