create_origin_endpoint
async
¶
create_origin_endpoint(
channel_group_name: ResourceName,
channel_name: ResourceName,
origin_endpoint_name: ResourceName,
container_type: ContainerType,
*,
config_overrides: Optional[AsyncMediaPackageV2ClientConfig] = None,
segment: Optional[Segment] = None,
client_token: Optional[IdempotencyToken] = None,
description: Optional[ResourceDescription] = None,
startover_window_seconds: Optional[int] = None,
hls_manifests: Optional[CreateHlsManifests] = None,
low_latency_hls_manifests: Optional[CreateLowLatencyHlsManifests] = None,
dash_manifests: Optional[CreateDashManifests] = None,
mss_manifests: Optional[CreateMssManifests] = None,
force_endpoint_error_configuration: Optional[
ForceEndpointErrorConfiguration
] = None,
uri_separator: Optional[UriSeparator] = None,
stream_name_output_mode: Optional[StreamNameOutputMode] = None,
tags: Optional[TagMap] = None,
) -> CreateOriginEndpointResponse
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.
Parameters:
-
channel_group_name(ResourceName) –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.
-
channel_name(ResourceName) –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.
-
origin_endpoint_name(ResourceName) –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.
-
container_type(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.
-
segment(Optional[Segment], default:None) –The segment configuration, including the segment name, duration, and other configuration values.
-
client_token(Optional[IdempotencyToken], default:None) –A unique, case-sensitive token that you provide to ensure the idempotency of the request.
-
description(Optional[ResourceDescription], default:None) –Enter any descriptive text that helps you to identify the origin endpoint.
-
startover_window_seconds(Optional[int], default:None) –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).
-
hls_manifests(Optional[CreateHlsManifests], default:None) –An HTTP live streaming (HLS) manifest configuration.
-
low_latency_hls_manifests(Optional[CreateLowLatencyHlsManifests], default:None) –A low-latency HLS manifest configuration.
-
dash_manifests(Optional[CreateDashManifests], default:None) –A DASH manifest configuration.
-
mss_manifests(Optional[CreateMssManifests], default:None) –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.
-
force_endpoint_error_configuration(Optional[ForceEndpointErrorConfiguration], default:None) –The failover settings for the endpoint.
-
uri_separator(Optional[UriSeparator], default:None) –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. -
stream_name_output_mode(Optional[StreamNameOutputMode], default:None) –The output mode for stream names in egress manifests. This setting is valid only when the associated channel's
InputTypeisHLS. You can't change the stream name output mode after you create the endpoint.INDEXuses numeric indices for stream names (for example, 1, 2, 3).PASSTHROUGH_NAMEuses the stream names from the input manifest. If you don't specify a value, the default isINDEX. -
tags(Optional[TagMap], default:None) –A comma-separated list of tag key:value pairs that you define. For example:
"Key1": "Value1","Key2": "Value2"
Raises:
-
AccessDeniedException–Access is denied because either you don't have permissions to perform the requested operation or MediaPackage is getting throttling errors with CDN authorization. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide. Or, if you're using CDN authorization, you will receive this exception if MediaPackage receives a throttling error from Secrets Manager.
-
ConflictException–Updating or deleting this resource can cause an inconsistent state.
-
InternalServerException–Indicates that an error from the service occurred while trying to process a request.
-
ResourceNotFoundException–The specified resource doesn't exist.
-
ServiceQuotaExceededException–The request would cause a service quota to be exceeded.
-
ThrottlingException–The request throughput limit was exceeded.
-
ValidationException–The input failed to meet the constraints specified by the AWS service.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Creating an OriginEndpoint with container type TS, and encryption enabled
>>> await client.create_origin_endpoint(channel_group_name='exampleChannelGroup', channel_name='exampleChannel', origin_endpoint_name='exampleOriginEndpointTS', container_type='TS', description='Description for exampleOriginEndpointTS', startover_window_seconds=300, force_endpoint_error_configuration={'EndpointErrorConditions': ['STALE_MANIFEST', 'INCOMPLETE_MANIFEST', 'MISSING_DRM_KEY', 'SLATE_INPUT']}, uri_separator='UNDERSCORE', stream_name_output_mode='INDEX', segment={'SegmentDurationSeconds': 6, 'SegmentName': 'segmentName', 'TsUseAudioRenditionGroup': True, 'IncludeIframeOnlyStreams': True, 'TsIncludeDvbSubtitles': True, 'Scte': {'ScteFilter': ['SPLICE_INSERT', 'BREAK']}, 'Encryption': {'ConstantInitializationVector': 'A382A901F3C1F7718512266CFFBB0B7E', 'EncryptionMethod': {'TsEncryptionMethod': 'AES_128'}, 'KeyRotationIntervalSeconds': 300, 'SpekeKeyProvider': {'EncryptionContractConfiguration': {'PresetSpeke20Audio': 'SHARED', 'PresetSpeke20Video': 'SHARED'}, 'ResourceId': 'ResourceId', 'DrmSystems': ['CLEAR_KEY_AES_128'], 'RoleArn': 'arn:aws:iam::123456789012:role/empRole', 'Url': 'https://foo.com', 'CertificateArn': 'arn:aws:acm:us-west-2:123456789012:certificate/0c6a65f1-7bd3-48ac-be17-f38675def22e'}}}, hls_manifests=[{'ManifestName': 'exampleManifest1', 'ChildManifestName': 'exampleChildManifest1', 'ScteHls': {'AdMarkerHls': 'DATERANGE'}, 'ManifestWindowSeconds': 30, 'ProgramDateTimeIntervalSeconds': 60, 'UriPathType': 'ROOT'}, {'ManifestName': 'exampleManifest2', 'ChildManifestName': 'exampleManifest2', 'ScteHls': {'AdMarkerHls': 'DATERANGE'}, 'ManifestWindowSeconds': 30, 'ProgramDateTimeIntervalSeconds': 60, 'UriPathType': 'ROOT'}], low_latency_hls_manifests=[{'ManifestName': 'exampleLLManifest1', 'ChildManifestName': 'exampleLLChildManifest1', 'ScteHls': {'AdMarkerHls': 'DATERANGE'}, 'ManifestWindowSeconds': 30, 'ProgramDateTimeIntervalSeconds': 60}, {'ManifestName': 'exampleLLManifest2', 'ChildManifestName': 'exampleLLManifest2', 'ScteHls': {'AdMarkerHls': 'DATERANGE'}, 'ManifestWindowSeconds': 30, 'ProgramDateTimeIntervalSeconds': 60}], tags={'key1': 'value1', 'key2': 'value2'})
Creating an OriginEndpoint with container type CMAF, and encryption enabled
>>> await client.create_origin_endpoint(channel_group_name='exampleChannelGroup', channel_name='exampleChannel', origin_endpoint_name='exampleOriginEndpointCMAF', container_type='CMAF', startover_window_seconds=300, force_endpoint_error_configuration={'EndpointErrorConditions': ['STALE_MANIFEST', 'INCOMPLETE_MANIFEST', 'MISSING_DRM_KEY', 'SLATE_INPUT']}, uri_separator='UNDERSCORE', segment={'SegmentDurationSeconds': 6, 'SegmentName': 'segmentName', 'IncludeIframeOnlyStreams': True, 'Scte': {'ScteFilter': ['SPLICE_INSERT', 'BREAK']}, 'Encryption': {'ConstantInitializationVector': 'A382A901F3C1F7718512266CFFBB0B9F', 'EncryptionMethod': {'CmafEncryptionMethod': 'CBCS'}, 'KeyRotationIntervalSeconds': 300, 'SpekeKeyProvider': {'EncryptionContractConfiguration': {'PresetSpeke20Audio': 'PRESET_AUDIO_1', 'PresetSpeke20Video': 'PRESET_VIDEO_1'}, 'ResourceId': 'ResourceId', 'DrmSystems': ['PLAYREADY', 'WIDEVINE'], 'RoleArn': 'arn:aws:iam::123456789012:role/empRole', 'Url': 'https://foo.com', 'CertificateArn': 'arn:aws:acm:us-west-2:123456789012:certificate/0c6a65f1-7bd3-48ac-be17-f38675def22e'}}, 'OutputTimestampMode': 'REBASED_TO_CHANNEL_START'}, hls_manifests=[{'ManifestName': 'exampleManifest1', 'ChildManifestName': 'exampleChildManifest1', 'ScteHls': {'AdMarkerHls': 'DATERANGE'}, 'ManifestWindowSeconds': 30, 'ProgramDateTimeIntervalSeconds': 60}, {'ManifestName': 'exampleManifest2', 'ChildManifestName': 'exampleManifest2', 'ScteHls': {'AdMarkerHls': 'DATERANGE'}, 'ManifestWindowSeconds': 30, 'ProgramDateTimeIntervalSeconds': 60}], low_latency_hls_manifests=[{'ManifestName': 'exampleLLManifest1', 'ChildManifestName': 'exampleLLChildManifest1', 'ScteHls': {'AdMarkerHls': 'DATERANGE'}, 'ManifestWindowSeconds': 30, 'ProgramDateTimeIntervalSeconds': 60}, {'ManifestName': 'exampleLLManifest2', 'ChildManifestName': 'exampleLLManifest2', 'ScteHls': {'AdMarkerHls': 'DATERANGE'}, 'ManifestWindowSeconds': 30, 'ProgramDateTimeIntervalSeconds': 60}], dash_manifests=[{'ManifestName': 'exampleDashManifest1', 'ManifestWindowSeconds': 300, 'MinUpdatePeriodSeconds': 5, 'MinBufferTimeSeconds': 30, 'SuggestedPresentationDelaySeconds': 2, 'SegmentTemplateFormat': 'NUMBER_WITH_TIMELINE', 'PeriodTriggers': ['AVAILS'], 'ScteDash': {'AdMarkerDash': 'XML'}, 'DrmSignaling': 'INDIVIDUAL', 'UtcTiming': {'TimingMode': 'HTTP_HEAD', 'TimingSource': 'example'}, 'Profiles': ['DVB_DASH'], 'BaseUrls': [{'Url': 'http://example.com/', 'ServiceLocation': 'A', 'DvbPriority': 1, 'DvbWeight': 3}], 'ProgramInformation': {'Title': 'exampleTitle', 'Source': 'exampleSource', 'Copyright': '(c) Example. All rights reserved', 'LanguageCode': 'en', 'MoreInformationUrl': 'https://example.com/more-information'}, 'DvbSettings': {'FontDownload': {'Url': 'https://example.com/fonts/SubtitleDisplay.woff', 'MimeType': 'application/font', 'FontFamily': 'SubtitleDisplay'}, 'ErrorMetrics': [{'ReportingUrl': 'https://example.com/dvb-errors/errors', 'Probability': 500}]}, 'Compactness': 'STANDARD'}, {'ManifestName': 'exampleDashManifest2', 'ManifestWindowSeconds': 60, 'MinUpdatePeriodSeconds': 3, 'MinBufferTimeSeconds': 9, 'SuggestedPresentationDelaySeconds': 12, 'SegmentTemplateFormat': 'NUMBER_WITH_TIMELINE', 'PeriodTriggers': ['AVAILS', 'DRM_KEY_ROTATION', 'SOURCE_CHANGES', 'SOURCE_DISRUPTIONS'], 'ScteDash': {'AdMarkerDash': 'XML'}, 'DrmSignaling': 'INDIVIDUAL', 'UtcTiming': {'TimingMode': 'HTTP_HEAD', 'TimingSource': 'example'}, 'Profiles': ['DVB_DASH'], 'BaseUrls': [{'Url': 'http://example2.com/', 'ServiceLocation': 'B', 'DvbPriority': 2, 'DvbWeight': 2}], 'ProgramInformation': {'Title': 'exampleTitle2', 'Source': 'exampleSource2', 'Copyright': '(c) Example. All rights reserved', 'LanguageCode': 'en', 'MoreInformationUrl': 'https://example2.com/more-information'}, 'DvbSettings': {'FontDownload': {'Url': 'https://example.com/fonts/SubtitleDisplay.woff', 'MimeType': 'application/font', 'FontFamily': 'SubtitleDisplay'}, 'ErrorMetrics': [{'ReportingUrl': 'https://example2.com/dvb-errors/errors', 'Probability': 600}]}, 'Compactness': 'STANDARD', 'AvailabilityStartTimeConfiguration': {'FixedAvailabilityStartTime': '2026-04-17T23:00:00.00Z'}}], tags={'key1': 'value1', 'key2': 'value2'})
Creating an OriginEndpoint with container type ISM, and encryption enabled
>>> await client.create_origin_endpoint(channel_group_name='exampleChannelGroup', channel_name='exampleChannel', origin_endpoint_name='exampleOriginEndpointISM', container_type='ISM', description='Description for exampleOriginEndpointISM', startover_window_seconds=300, force_endpoint_error_configuration={'EndpointErrorConditions': ['STALE_MANIFEST', 'INCOMPLETE_MANIFEST', 'MISSING_DRM_KEY', 'SLATE_INPUT']}, uri_separator='UNDERSCORE', segment={'SegmentDurationSeconds': 2, 'SegmentName': 'segmentName', 'Encryption': {'EncryptionMethod': {'IsmEncryptionMethod': 'CENC'}, 'SpekeKeyProvider': {'EncryptionContractConfiguration': {'PresetSpeke20Audio': 'SHARED', 'PresetSpeke20Video': 'SHARED'}, 'ResourceId': 'ResourceId', 'DrmSystems': ['PLAYREADY'], 'RoleArn': 'arn:aws:iam::123456789012:role/empRole', 'Url': 'https://speke-key-provider.example.com'}}}, mss_manifests=[{'ManifestName': 'exampleMssManifest1', 'ManifestWindowSeconds': 60, 'ManifestLayout': 'FULL'}], tags={'key1': 'value1', 'key2': 'value2'})
Source code in docs_src/capo_mediapackagev2/_services/async_media_package_v2.py
1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 | |