createChannel method
- required String channelName,
- required String clusterArn,
- required List<
TopicConfiguration> topicConfigurationList, - EncryptionConfiguration? encryptionConfiguration,
- IcebergDestinationConfiguration? icebergDestinationConfiguration,
- ChannelLoggingInfo? loggingInfo,
- S3DestinationConfiguration? s3DestinationConfiguration,
- Map<
String, String> ? tags,
Creates a Channel that streams records from an Amazon MSK Express cluster topic to Amazon S3 or Apache Iceberg.
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw NotFoundException.
May throw ServiceUnavailableException.
May throw TooManyRequestsException.
May throw UnauthorizedException.
Parameter channelName :
The name of the channel. Must be unique within the cluster.
Parameter clusterArn :
The Amazon Resource Name (ARN) that uniquely identifies the cluster.
Parameter topicConfigurationList :
The list of topic configurations for the channel. Currently exactly one
topic must be specified.
Parameter encryptionConfiguration :
The encryption configuration applied to the channel.
Parameter icebergDestinationConfiguration :
The Apache Iceberg destination for the channel. Mutually exclusive with
s3DestinationConfiguration.
Parameter loggingInfo :
The destinations to which the channel publishes operational logs.
Parameter s3DestinationConfiguration :
The Amazon S3 destination for the channel. Mutually exclusive with
icebergDestinationConfiguration.
Parameter tags :
The tags attached to the channel.
Implementation
Future<CreateChannelResponse> createChannel({
required String channelName,
required String clusterArn,
required List<TopicConfiguration> topicConfigurationList,
EncryptionConfiguration? encryptionConfiguration,
IcebergDestinationConfiguration? icebergDestinationConfiguration,
ChannelLoggingInfo? loggingInfo,
S3DestinationConfiguration? s3DestinationConfiguration,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'channelName': channelName,
'topicConfigurationList': topicConfigurationList,
if (encryptionConfiguration != null)
'encryptionConfiguration': encryptionConfiguration,
if (icebergDestinationConfiguration != null)
'icebergDestinationConfiguration': icebergDestinationConfiguration,
if (loggingInfo != null) 'loggingInfo': loggingInfo,
if (s3DestinationConfiguration != null)
's3DestinationConfiguration': s3DestinationConfiguration,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/clusters/${Uri.encodeComponent(clusterArn)}/channels',
exceptionFnMap: _exceptionFns,
);
return CreateChannelResponse.fromJson(response);
}