createChannelGroup method
Create a channel group to group your channels and origin endpoints. A channel group is the top-level resource that consists of channels and origin endpoints that are associated with it and that provides predictable URLs for stream delivery. All channels and origin endpoints within the channel group are guaranteed to share the DNS. You can create only one channel group with each request.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter channelGroupName :
The name that describes the channel group. The name is the primary
identifier for the channel group, and must be unique for your account in
the AWS Region. You can't use spaces in the name. You can't change the
name after you create the channel group.
Parameter clientToken :
A unique, case-sensitive token that you provide to ensure the idempotency
of the request.
Parameter description :
Enter any descriptive text that helps you to identify the channel group.
Parameter tags :
A comma-separated list of tag key:value pairs that you define. For
example:
"Key1": "Value1",
"Key2": "Value2"
Implementation
Future<CreateChannelGroupResponse> createChannelGroup({
required String channelGroupName,
String? clientToken,
String? description,
Map<String, String>? tags,
}) async {
final headers = <String, String>{
if (clientToken != null) 'x-amzn-client-token': clientToken.toString(),
};
final $payload = <String, dynamic>{
'ChannelGroupName': channelGroupName,
if (description != null) 'Description': description,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/channelGroup',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return CreateChannelGroupResponse.fromJson(response);
}