Class MediaPackageV2OriginProps.Builder
java.lang.Object
software.amazon.awscdk.services.mediapackagev2.alpha.MediaPackageV2OriginProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<MediaPackageV2OriginProps>
- Enclosing interface:
MediaPackageV2OriginProps
@Stability(Experimental)
public static final class MediaPackageV2OriginProps.Builder
extends Object
implements software.amazon.jsii.Builder<MediaPackageV2OriginProps>
A builder for
MediaPackageV2OriginProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.cdnAuth(CdnAuthConfiguration cdnAuth) Sets the value ofMediaPackageV2OriginProps.getCdnAuth()channelGroup(IChannelGroup channelGroup) Sets the value ofMediaPackageV2OriginProps.getChannelGroup()connectionAttempts(Number connectionAttempts) Sets the value ofOriginOptions.getConnectionAttempts()connectionTimeout(Duration connectionTimeout) Sets the value ofOriginOptions.getConnectionTimeout()customHeaders(Map<String, String> customHeaders) Sets the value ofOriginOptions.getCustomHeaders()originAccessControl(IOriginAccessControlRef originAccessControl) Sets the value ofMediaPackageV2OriginProps.getOriginAccessControl()originAccessControlId(String originAccessControlId) Sets the value ofOriginOptions.getOriginAccessControlId()Sets the value ofOriginOptions.getOriginId()originPath(String originPath) Sets the value ofOriginProps.getOriginPath()originShieldEnabled(Boolean originShieldEnabled) Sets the value ofOriginOptions.getOriginShieldEnabled()originShieldRegion(String originShieldRegion) Sets the value ofOriginOptions.getOriginShieldRegion()responseCompletionTimeout(Duration responseCompletionTimeout) Sets the value ofOriginOptions.getResponseCompletionTimeout()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
channelGroup
@Stability(Experimental) public MediaPackageV2OriginProps.Builder channelGroup(IChannelGroup channelGroup) Sets the value ofMediaPackageV2OriginProps.getChannelGroup()- Parameters:
channelGroup- The channel group that the origin endpoint belongs to. This parameter is required. Used to derive the egress domain for the CloudFront origin.- Returns:
this
-
cdnAuth
@Stability(Experimental) public MediaPackageV2OriginProps.Builder cdnAuth(CdnAuthConfiguration cdnAuth) Sets the value ofMediaPackageV2OriginProps.getCdnAuth()- Parameters:
cdnAuth- Optional CDN authorization configuration. If you need CDN auth on this endpoint, provide it here so it is configured on the firstaddToResourcePolicycall. If CDN auth is added separately after this origin is bound, it will be ignored.- Returns:
this
-
originAccessControl
@Stability(Experimental) public MediaPackageV2OriginProps.Builder originAccessControl(IOriginAccessControlRef originAccessControl) Sets the value ofMediaPackageV2OriginProps.getOriginAccessControl()- Parameters:
originAccessControl- An optional Origin Access Control.- Returns:
this
-
originPath
Sets the value ofOriginProps.getOriginPath()- Parameters:
originPath- 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').- Returns:
this
-
connectionAttempts
@Stability(Stable) public MediaPackageV2OriginProps.Builder connectionAttempts(Number connectionAttempts) Sets the value ofOriginOptions.getConnectionAttempts()- Parameters:
connectionAttempts- The number of times that CloudFront attempts to connect to the origin;. valid values are 1, 2, or 3 attempts.- Returns:
this
-
connectionTimeout
@Stability(Stable) public MediaPackageV2OriginProps.Builder connectionTimeout(Duration connectionTimeout) Sets the value ofOriginOptions.getConnectionTimeout()- Parameters:
connectionTimeout- The number of seconds that CloudFront waits when trying to establish a connection to the origin. Valid values are 1-10 seconds, inclusive.- Returns:
this
-
customHeaders
@Stability(Stable) public MediaPackageV2OriginProps.Builder customHeaders(Map<String, String> customHeaders) Sets the value ofOriginOptions.getCustomHeaders()- Parameters:
customHeaders- A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.- Returns:
this
-
originAccessControlId
@Stability(Stable) public MediaPackageV2OriginProps.Builder originAccessControlId(String originAccessControlId) Sets the value ofOriginOptions.getOriginAccessControlId()- Parameters:
originAccessControlId- The unique identifier of an origin access control for this origin.- Returns:
this
-
originId
Sets the value ofOriginOptions.getOriginId()- Parameters:
originId- A unique identifier for the origin. This value must be unique within the distribution.- Returns:
this
-
originShieldEnabled
@Stability(Stable) public MediaPackageV2OriginProps.Builder originShieldEnabled(Boolean originShieldEnabled) Sets the value ofOriginOptions.getOriginShieldEnabled()- Parameters:
originShieldEnabled- 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.- Returns:
this
-
originShieldRegion
@Stability(Stable) public MediaPackageV2OriginProps.Builder originShieldRegion(String originShieldRegion) Sets the value ofOriginOptions.getOriginShieldRegion()- Parameters:
originShieldRegion- When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.- Returns:
this
-
responseCompletionTimeout
@Stability(Stable) public MediaPackageV2OriginProps.Builder responseCompletionTimeout(Duration responseCompletionTimeout) Sets the value ofOriginOptions.getResponseCompletionTimeout()- Parameters:
responseCompletionTimeout- The time that a request from CloudFront to the origin can stay open and wait for a response. If the complete response isn't received from the origin by this time, CloudFront ends the connection.Valid values are 1-3600 seconds, inclusive.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<MediaPackageV2OriginProps>- Returns:
- a new instance of
MediaPackageV2OriginProps - Throws:
NullPointerException- if any required attribute was not provided
-