createOriginEndpoint method
- required String channelGroupName,
- required String channelName,
- required ContainerType containerType,
- required String originEndpointName,
- String? clientToken,
- List<
CreateDashManifestConfiguration> ? dashManifests, - String? description,
- ForceEndpointErrorConfiguration? forceEndpointErrorConfiguration,
- List<
CreateHlsManifestConfiguration> ? hlsManifests, - List<
CreateLowLatencyHlsManifestConfiguration> ? lowLatencyHlsManifests, - List<
CreateMssManifestConfiguration> ? mssManifests, - Segment? segment,
- int? startoverWindowSeconds,
- Map<
String, String> ? tags, - UriSeparator? uriSeparator,
The endpoint is attached to a channel, and represents the output of the live content. You can associate multiple endpoints to a single channel. Each endpoint gives players and downstream CDNs (such as Amazon CloudFront) access to the content for playback. Content can't be served from a channel until it has an endpoint. You can create only one endpoint 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.
Parameter channelName :
The name that describes the channel. The name is the primary identifier
for the channel, and must be unique for your account in the AWS Region and
channel group.
Parameter containerType :
The type of container to attach to this origin endpoint. A container type
is a file format that encapsulates one or more media streams, such as
audio and video, into a single file. You can't change the container type
after you create the endpoint.
Parameter originEndpointName :
The name that describes the origin endpoint. The name is the primary
identifier for the origin endpoint, and must be unique for your account in
the AWS Region and channel. You can't use spaces in the name. You can't
change the name after you create the endpoint.
Parameter clientToken :
A unique, case-sensitive token that you provide to ensure the idempotency
of the request.
Parameter dashManifests :
A DASH manifest configuration.
Parameter description :
Enter any descriptive text that helps you to identify the origin endpoint.
Parameter forceEndpointErrorConfiguration :
The failover settings for the endpoint.
Parameter hlsManifests :
An HTTP live streaming (HLS) manifest configuration.
Parameter lowLatencyHlsManifests :
A low-latency HLS manifest configuration.
Parameter mssManifests :
A list of Microsoft Smooth Streaming (MSS) manifest configurations for the
origin endpoint. You can configure multiple MSS manifests to provide
different streaming experiences or to support different client
requirements.
Parameter segment :
The segment configuration, including the segment name, duration, and other
configuration values.
Parameter startoverWindowSeconds :
The size of the window (in seconds) to create a window of the live stream
that's available for on-demand viewing. Viewers can start-over or catch-up
on content that falls within the window. The maximum startover window is
1,209,600 seconds (14 days).
Parameter tags :
A comma-separated list of tag key:value pairs that you define. For
example:
"Key1": "Value1",
"Key2": "Value2"
Parameter uriSeparator :
The separator character to use in generated URIs for this origin endpoint.
This setting applies to all manifest types on the endpoint. If you don't
specify a value, the default is UNDERSCORE.
Implementation
Future<CreateOriginEndpointResponse> createOriginEndpoint({
required String channelGroupName,
required String channelName,
required ContainerType containerType,
required String originEndpointName,
String? clientToken,
List<CreateDashManifestConfiguration>? dashManifests,
String? description,
ForceEndpointErrorConfiguration? forceEndpointErrorConfiguration,
List<CreateHlsManifestConfiguration>? hlsManifests,
List<CreateLowLatencyHlsManifestConfiguration>? lowLatencyHlsManifests,
List<CreateMssManifestConfiguration>? mssManifests,
Segment? segment,
int? startoverWindowSeconds,
Map<String, String>? tags,
UriSeparator? uriSeparator,
}) async {
final headers = <String, String>{
if (clientToken != null) 'x-amzn-client-token': clientToken.toString(),
};
final $payload = <String, dynamic>{
'ContainerType': containerType.value,
'OriginEndpointName': originEndpointName,
if (dashManifests != null) 'DashManifests': dashManifests,
if (description != null) 'Description': description,
if (forceEndpointErrorConfiguration != null)
'ForceEndpointErrorConfiguration': forceEndpointErrorConfiguration,
if (hlsManifests != null) 'HlsManifests': hlsManifests,
if (lowLatencyHlsManifests != null)
'LowLatencyHlsManifests': lowLatencyHlsManifests,
if (mssManifests != null) 'MssManifests': mssManifests,
if (segment != null) 'Segment': segment,
if (startoverWindowSeconds != null)
'StartoverWindowSeconds': startoverWindowSeconds,
if (tags != null) 'Tags': tags,
if (uriSeparator != null) 'UriSeparator': uriSeparator.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/channelGroup/${Uri.encodeComponent(channelGroupName)}/channel/${Uri.encodeComponent(channelName)}/originEndpoint',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return CreateOriginEndpointResponse.fromJson(response);
}