Skip to content
v2.278.0

Experimental

@aws-cdk/aws-mediapackagev2-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

OriginEndpointProps Struct ​

Properties to set on an Origin Endpoint.

Example ​

ts
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' })],
});
python
# channel: Channel
# speke_role: iam.IRole


OriginEndpoint(self, "TsEndpoint",
    channel=channel,
    segment=Segment.ts(
        encryption=TsEncryption.speke(
            method=TsEncryptionMethod.SAMPLE_AES,
            resource_id="my-content-id",
            url="https://example.com/speke",
            role=speke_role
        )
    ),
    manifests=[Manifest.hls(manifest_name="index")]
)
java
Channel channel;
IRole spekeRole;


OriginEndpoint.Builder.create(this, "TsEndpoint")
        .channel(channel)
        .segment(Segment.ts(TsSegmentProps.builder()
                .encryption(TsEncryption.speke(TsSpekeEncryptionProps.builder()
                        .method(TsEncryptionMethod.SAMPLE_AES)
                        .resourceId("my-content-id")
                        .url("https://example.com/speke")
                        .role(spekeRole)
                        .build()))
                .build()))
        .manifests(List.of(Manifest.hls(HlsManifestConfiguration.builder().manifestName("index").build())))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaPackageV2.Alpha
Channel channel;
IRole spekeRole;


new OriginEndpoint(this, "TsEndpoint", new OriginEndpointProps {
    Channel = channel,
    Segment = Segment.Ts(new TsSegmentProps {
        Encryption = TsEncryption.Speke(new TsSpekeEncryptionProps {
            Method = TsEncryptionMethod.SAMPLE_AES,
            ResourceId = "my-content-id",
            Url = "https://example.com/speke",
            Role = spekeRole
        })
    }),
    Manifests = new [] { Manifest.Hls(new HlsManifestConfiguration { ManifestName = "index" }) }
});
go
// Install: go get github.com/aws/aws-cdk-go/awsmediapackagev2alpha/v2
var channel Channel
var spekeRole IRole


awsmediapackagev2alpha.NewOriginEndpoint(this, jsii.String("TsEndpoint"), &OriginEndpointProps{
	Channel: Channel,
	Segment: awsmediapackagev2alpha.Segment_Ts(&TsSegmentProps{
		Encryption: awsmediapackagev2alpha.TsEncryption_Speke(&TsSpekeEncryptionProps{
			Method: awsmediapackagev2alpha.TsEncryptionMethod_SAMPLE_AES,
			ResourceId: jsii.String("my-content-id"),
			Url: jsii.String("https://example.com/speke"),
			Role: spekeRole,
		}),
	}),
	Manifests: []Manifest{
		awsmediapackagev2alpha.Manifest_Hls(&HlsManifestConfiguration{
			ManifestName: jsii.String("index"),
		}),
	},
})

Properties ​

cdnAuthoptionalCdnAuthConfigurationcdn_authoptionalCdnAuthConfigurationcdnAuthoptionalCdnAuthConfigurationCdnAuthoptionalCdnAuthConfigurationCdnAuthoptionalCdnAuthConfiguration #
Provide access to MediaPackage V2 Origin Endpoint via secret header.

Default: undefined - Not configured on endpoint

notes

Use this when your CDN doesn't support AWS Signature Version 4 (SigV4) authentication. For SigV4-based access with Amazon CloudFront, see MediaPackageV2Origin.

Setting cdnAuth auto-creates the following policy on the OriginEndpoint:

json
{
  "Version":"2012-10-17",
  "Statement": [
    {
      "Sid": "AllowGetObjectAccessForAuthorizedRequest",
      "Effect": "Allow",
      "Principal": "*",
      "Action": "mediapackagev2:GetObject",
      "Resource": "arn:aws:mediapackagev2:us-east-1:111122223333:channelGroup/channelGroupName/channel/channelName/originEndpoint/originEndpointName",
      "Condition": {
        "Bool": {
          "mediapackagev2:RequestHasMatchingCdnAuthHeader": "true"
        }
      }
    }
  ]
}
channelIChannelchannelIChannelchannelIChannelChannelIChannelChannelIChannel required #
The channel associated with the origin endpoint.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
The description associated with the origin endpoint.

Default: undefined - No description is added to Origin Endpoint

forceEndpointConfigurationConditionsoptionalEndpointErrorConfiguration[]force_endpoint_configuration_conditionsoptionaltyping.List[EndpointErrorConfiguration]forceEndpointConfigurationConditionsoptionalList<EndpointErrorConfiguration>ForceEndpointConfigurationConditionsoptionalEndpointErrorConfiguration[]ForceEndpointConfigurationConditionsoptional*[]EndpointErrorConfiguration #
The failover settings for the endpoint.

Default: undefined - No force endpoint configuration is configured

manifestsManifest[]manifeststyping.List[Manifest]manifestsList<Manifest>ManifestsManifest[]Manifests*[]Manifest required #
Manifests configuration for HLS, Low Latency HLS and DASH.
originEndpointNameoptionalstringorigin_endpoint_nameoptionalstroriginEndpointNameoptionalStringOriginEndpointNameoptionalstringOriginEndpointNameoptional*string = autogenerated #
The name of the origin endpoint associated with the origin endpoint configuration.
removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy = RemovalPolicy.DESTROY #
Policy to apply when the origin endpoint is removed from the stack.
notes

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.

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.

startoverWindowoptionalDurationstartover_windowoptionalDurationstartoverWindowoptionalDurationStartoverWindowoptionalDurationStartoverWindowoptionalDuration = 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.

tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string #
The tags associated with the origin endpoint.

Default: No tagging