class OriginEndpoint (construct)
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.MediaPackageV2.Alpha.OriginEndpoint |
Go | github.com/aws/aws-cdk-go/awsmediapackagev2alpha/v2#OriginEndpoint |
Java | software.amazon.awscdk.services.mediapackagev2.alpha.OriginEndpoint |
Python | aws_cdk.aws_mediapackagev2_alpha.OriginEndpoint |
TypeScript (source) | @aws-cdk/aws-mediapackagev2-alpha ยป OriginEndpoint |
Implements
IConstruct, IDependable, IResource, IEnvironment, IOrigin, IOrigin
Defines an AWS Elemental MediaPackage V2 Origin Endpoint.
Example
declare const channel: Channel;
declare const spekeRole: iam.IRole;
new OriginEndpoint(this, 'TsEndpoint', {
channel,
segment: Segment.ts({
encryption: TsEncryption.speke({
method: TsEncryptionMethod.SAMPLE_AES,
resourceId: 'my-content-id',
url: 'https://example.com/speke',
role: spekeRole,
}),
}),
manifests: [Manifest.hls({ manifestName: 'index' })],
});
Initializer
new OriginEndpoint(scope: Construct, id: string, props: OriginEndpointProps)
Parameters
- scope
Construct - id
string - props
OriginEndpoint Props
Construct Props
| Name | Type | Description |
|---|---|---|
| channel | IChannel | The channel associated with the origin endpoint. |
| manifests | Manifest[] | Manifests configuration for HLS, Low Latency HLS and DASH. |
| segment | Segment | The segment associated with the origin endpoint. |
| cdn | Cdn | Provide access to MediaPackage V2 Origin Endpoint via secret header. |
| description? | string | The description associated with the origin endpoint. |
| force | Endpoint[] | The failover settings for the endpoint. |
| origin | string | The name of the origin endpoint associated with the origin endpoint configuration. |
| removal | Removal | Policy to apply when the origin endpoint is removed from the stack. |
| startover | Duration | The size of the window to specify a window of the live stream that's available for on-demand viewing. |
| tags? | { [string]: string } | The tags associated with the origin endpoint. |
channel
Type:
IChannel
The channel associated with the origin endpoint.
manifests
Type:
Manifest[]
Manifests configuration for HLS, Low Latency HLS and DASH.
segment
Type:
Segment
The segment associated with the origin endpoint.
Inside the segment configuration you can define options such as encryption, SPEKE parameters and other general segment configurations.
Use Segment.ts() or Segment.cmaf() to create the configuration.
cdnAuth?
Type:
Cdn
(optional, default: undefined - Not configured on endpoint)
Provide access to MediaPackage V2 Origin Endpoint via secret header.
description?
Type:
string
(optional, default: undefined - No description is added to Origin Endpoint)
The description associated with the origin endpoint.
forceEndpointConfigurationConditions?
Type:
Endpoint[]
(optional, default: undefined - No force endpoint configuration is configured)
The failover settings for the endpoint.
originEndpointName?
Type:
string
(optional, default: autogenerated)
The name of the origin endpoint associated with the origin endpoint configuration.
removalPolicy?
Type:
Removal
(optional, default: RemovalPolicy.DESTROY)
Policy to apply when the origin endpoint is removed from the stack.
Even though MediaPackage ChannelGroups, Channels and OriginEndpoints are technically stateful,
their contents are transient and it is common to add and remove these while rearchitecting your application.
The default is therefore DESTROY. Change it to RETAIN if the content (in a lookback window) are so
valuable that accidentally losing it would be unacceptable.
startoverWindow?
Type:
Duration
(optional, default: 900)
The size of the window to specify 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.
tags?
Type:
{ [string]: string }
(optional, default: No tagging)
The tags associated with the origin endpoint.
Properties
| Name | Type | Description |
|---|---|---|
| auto | boolean | Indicates if an origin endpoint resource policy should automatically be created upon the first call to addToResourcePolicy. |
| channel | string | The name of the channel group associated with the origin endpoint configuration. |
| channel | string | The channel name associated with the origin endpoint. |
| dash | Dash[] | |
| env | Resource | The environment this resource belongs to. |
| hls | Hls[] | |
| ll | Low[] | |
| mss | Mss[] | |
| node | Node | The tree node. |
| origin | string | The Amazon Resource Name (ARN) of the origin endpoint. |
| origin | string | The name of the origin endpoint associated with the origin endpoint configuration. |
| origin | Origin | A reference to this Origin Endpoint resource. |
| stack | Stack | The stack in which this resource is defined. |
| created | string | The timestamp of the creation of the origin endpoint. |
| dash | string[] | Array containing DASH Manifests created by the OriginEndpoint. |
| hls | string[] | Array containing HLS Manifests created by the OriginEndpoint. |
| low | string[] | Array containing Low Latency HLS Manifests created by the OriginEndpoint. |
| modified | string | The timestamp of the modification of the origin endpoint. |
| mss | string[] | Array containing MSS Manifests created by the OriginEndpoint. |
| policy? | Origin | The resource policy associated with this origin endpoint. |
| segment? | Segment | |
| static PROPERTY_INJECTION_ID | string | Uniquely identifies this class. |
autoCreatePolicy
Type:
boolean
Indicates if an origin endpoint resource policy should automatically be created upon the first call to addToResourcePolicy.
channelGroupName
Type:
string
The name of the channel group associated with the origin endpoint configuration.
channelName
Type:
string
The channel name associated with the origin endpoint.
dashManifests
Type:
Dash[]
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
hlsManifests
Type:
Hls[]
llHlsManifests
Type:
Low[]
mssManifests
Type:
Mss[]
node
Type:
Node
The tree node.
originEndpointArn
Type:
string
The Amazon Resource Name (ARN) of the origin endpoint.
originEndpointName
Type:
string
The name of the origin endpoint associated with the origin endpoint configuration.
originEndpointRef
Type:
Origin
A reference to this Origin Endpoint resource.
Required by the auto-generated IOriginEndpointRef interface.
stack
Type:
Stack
The stack in which this resource is defined.
createdAt?
Type:
string
(optional)
The timestamp of the creation of the origin endpoint.
dashManifestUrls?
Type:
string[]
(optional)
Array containing DASH Manifests created by the OriginEndpoint.
hlsManifestUrls?
Type:
string[]
(optional)
Array containing HLS Manifests created by the OriginEndpoint.
lowLatencyHlsManifestUrls?
Type:
string[]
(optional)
Array containing Low Latency HLS Manifests created by the OriginEndpoint.
modifiedAt?
Type:
string
(optional)
The timestamp of the modification of the origin endpoint.
mssManifestUrls?
Type:
string[]
(optional)
Array containing MSS Manifests created by the OriginEndpoint.
policy?
Type:
Origin
(optional)
The resource policy associated with this origin endpoint.
If autoCreatePolicy is true, an OriginEndpointPolicy will be created upon the
first call to addToResourcePolicy(s).
segment?
Type:
Segment
(optional)
static PROPERTY_INJECTION_ID
Type:
string
Uniquely identifies this class.
Methods
| Name | Description |
|---|---|
| add | Configure origin endpoint policy. |
| apply | Apply the given removal policy to this resource. |
| metric(metricName, props?) | Create a CloudWatch metric. |
| metric | Returns Metric for Egress Bytes. |
| metric | Returns Metric for Egress Request Count. |
| metric | Returns Metric for Egress Response time. |
| metric | Returns Metric for Ingress Bytes. |
| metric | Returns Metric for Ingress Request Count. |
| metric | Returns Metric for Ingress response time. |
| to | Returns a string representation of this construct. |
| with(...mixins) | Applies one or more mixins to this construct. |
| protected segment | Validate and modify Segment configuration for endpoint. |
| static from | Creates an OriginEndpoint construct that represents an external (imported) Origin Endpoint. |
addToResourcePolicy(statement, cdnAuth?)
public addToResourcePolicy(statement: PolicyStatement, cdnAuth?: CdnAuthConfiguration): AddToResourcePolicyResult
Parameters
- statement
Policyโ - The policy statement to add.Statement - cdnAuth
Cdnโ - Optional CDN authorization configuration.Auth Configuration
Returns
Configure origin endpoint policy.
You can only add 1 OriginEndpointPolicy to an OriginEndpoint. If you have already defined one, it will append to the policy already created.
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
RemovalPolicy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
metric(metricName, props?)
public metric(metricName: string, props?: MetricOptions): Metric
Parameters
- metricName
stringโ name of the metric. - props
Metricโ metric options.Options
Returns
Create a CloudWatch metric.
metricEgressBytes(props?)
public metricEgressBytes(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Returns Metric for Egress Bytes.
metricEgressRequestCount(props?)
public metricEgressRequestCount(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Returns Metric for Egress Request Count.
metricEgressResponseTime(props?)
public metricEgressResponseTime(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Returns Metric for Egress Response time.
metricIngressBytes(props?)
public metricIngressBytes(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Returns Metric for Ingress Bytes.
metricIngressRequestCount(props?)
public metricIngressRequestCount(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Returns Metric for Ingress Request Count.
metricIngressResponseTime(props?)
public metricIngressResponseTime(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Returns Metric for Ingress response time.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
with(...mixins)
public with(...mixins: IMixin[]): IConstruct
Parameters
- mixins
IMixin
Returns
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
protected segmentValidation(segmentContainerType, segment?)
protected segmentValidation(segmentContainerType: ContainerType, segment?: SegmentConfiguration): SegmentProperty
Parameters
- segmentContainerType
ContainerType - segment
SegmentConfiguration
Returns
Validate and modify Segment configuration for endpoint.
static fromOriginEndpointAttributes(scope, id, attrs)
public static fromOriginEndpointAttributes(scope: Construct, id: string, attrs: OriginEndpointAttributes): IOriginEndpoint
Parameters
- scope
Construct - id
string - attrs
OriginEndpoint Attributes
Returns
Creates an OriginEndpoint construct that represents an external (imported) Origin Endpoint.

.NET
Go
Java
Python
TypeScript (