Skip to content
v2.275.0

Experimental

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

MediaPackageV2OriginProps Struct ​

Properties for a MediaPackage V2 Origin with OAC.

Example ​

ts
declare const endpoint: OriginEndpoint;
declare const group: ChannelGroup;

new cloudfront.Distribution(this, 'Distribution', {
  defaultBehavior: {
    origin: new MediaPackageV2Origin(endpoint, {
      channelGroup: group,
    }),
  },
});

Properties ​

channelGroupIChannelGroupchannel_groupIChannelGroupchannelGroupIChannelGroupChannelGroupIChannelGroupChannelGroupIChannelGrouprequired#
The channel group that the origin endpoint belongs to.

Used to derive the egress domain for the CloudFront origin.

connectionAttemptsoptionalnumberconnection_attemptsoptionalint | floatconnectionAttemptsoptionalNumberConnectionAttemptsoptionaldoubleConnectionAttemptsoptional*float64= 3#
The number of times that CloudFront attempts to connect to the origin;

valid values are 1, 2, or 3 attempts.

connectionTimeoutoptionalDurationconnection_timeoutoptionalDurationconnectionTimeoutoptionalDurationConnectionTimeoutoptionalDurationConnectionTimeoutoptionalDuration= Duration.seconds(10)#
The number of seconds that CloudFront waits when trying to establish a connection to the origin.

Valid values are 1-10 seconds, inclusive.

customHeadersoptional{ [key: string]: string }custom_headersoptionaltyping.Mapping[str, str]customHeadersoptionalMap<String, String>CustomHeadersoptionalIDictionary<string, string>CustomHeadersoptional*map[string]*string= {}#
A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.
originAccessControloptionalIOriginAccessControlReforigin_access_controloptionalIOriginAccessControlReforiginAccessControloptionalIOriginAccessControlRefOriginAccessControloptionalIOriginAccessControlRefOriginAccessControloptionalIOriginAccessControlRef#
An optional Origin Access Control.

Default: an Origin Access Control will be created automatically.

originAccessControlIdoptionalstringorigin_access_control_idoptionalstroriginAccessControlIdoptionalStringOriginAccessControlIdoptionalstringOriginAccessControlIdoptional*string#
The unique identifier of an origin access control for this origin.

Default: no origin access control

originIdoptionalstringorigin_idoptionalstroriginIdoptionalStringOriginIdoptionalstringOriginIdoptional*string#
A unique identifier for the origin.

Default: an originid will be generated for you

This value must be unique within the distribution.

originPathoptionalstringorigin_pathoptionalstroriginPathoptionalStringOriginPathoptionalstringOriginPathoptional*string= '/'#
An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin.

Must begin, but not end, with '/' (e.g., '/production/images').

originShieldEnabledoptionalbooleanorigin_shield_enabledoptionalbooloriginShieldEnabledoptionalBooleanOriginShieldEnabledoptionalboolOriginShieldEnabledoptional*bool= true#
Origin Shield is enabled by setting originShieldRegion to a valid region, after this to disable Origin Shield again you must set this flag to false.
originShieldRegionoptionalstringorigin_shield_regionoptionalstroriginShieldRegionoptionalStringOriginShieldRegionoptionalstringOriginShieldRegionoptional*string#
When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.

Default: origin shield not enabled

responseCompletionTimeoutoptionalDurationresponse_completion_timeoutoptionalDurationresponseCompletionTimeoutoptionalDurationResponseCompletionTimeoutoptionalDurationResponseCompletionTimeoutoptionalDuration#
The time that a request from CloudFront to the origin can stay open and wait for a response.

Default: undefined - AWS CloudFront default is not enforcing a maximum value

If the complete response isn't received from the origin by this time, CloudFront ends the connection.

Valid values are 1-3600 seconds, inclusive.