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.

OriginEndpointPolicyProps Struct ​

Properties for Origin Endpoint policy.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as mediapackagev2_alpha from '@aws-cdk/aws-mediapackagev2-alpha';
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_secretsmanager as secretsmanager } from 'aws-cdk-lib';

declare const originEndpoint: mediapackagev2_alpha.OriginEndpoint;
declare const policyDocument: iam.PolicyDocument;
declare const role: iam.Role;
declare const secret: secretsmanager.Secret;
const originEndpointPolicyProps: mediapackagev2_alpha.OriginEndpointPolicyProps = {
  originEndpoint: originEndpoint,

  // the properties below are optional
  cdnAuth: {
    secrets: [secret],

    // the properties below are optional
    role: role,
  },
  policyDocument: policyDocument,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_mediapackagev2_alpha as mediapackagev2_alpha
from aws_cdk import aws_iam as iam
from aws_cdk import aws_secretsmanager as secretsmanager

# origin_endpoint: mediapackagev2_alpha.OriginEndpoint
# policy_document: iam.PolicyDocument
# role: iam.Role
# secret: secretsmanager.Secret

origin_endpoint_policy_props = mediapackagev2_alpha.OriginEndpointPolicyProps(
    origin_endpoint=origin_endpoint,

    # the properties below are optional
    cdn_auth=mediapackagev2_alpha.CdnAuthConfiguration(
        secrets=[secret],

        # the properties below are optional
        role=role
    ),
    policy_document=policy_document
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.mediapackagev2.alpha.*;
import software.amazon.awscdk.services.iam.*;
import software.amazon.awscdk.services.secretsmanager.*;

OriginEndpoint originEndpoint;
PolicyDocument policyDocument;
Role role;
Secret secret;

OriginEndpointPolicyProps originEndpointPolicyProps = OriginEndpointPolicyProps.builder()
        .originEndpoint(originEndpoint)

        // the properties below are optional
        .cdnAuth(CdnAuthConfiguration.builder()
                .secrets(List.of(secret))

                // the properties below are optional
                .role(role)
                .build())
        .policyDocument(policyDocument)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaPackageV2.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.MediaPackageV2.Alpha;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.SecretsManager;

OriginEndpoint originEndpoint;
PolicyDocument policyDocument;
Role role;
Secret secret;

var originEndpointPolicyProps = new OriginEndpointPolicyProps {
    OriginEndpoint = originEndpoint,

    // the properties below are optional
    CdnAuth = new CdnAuthConfiguration {
        Secrets = new [] { secret },

        // the properties below are optional
        Role = role
    },
    PolicyDocument = policyDocument
};
go
// Install: go get github.com/aws/aws-cdk-go/awsmediapackagev2alpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import mediapackagev2_alpha "github.com/aws/aws-cdk-go/awsmediapackagev2alpha"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var originEndpoint OriginEndpoint
var policyDocument PolicyDocument
var role Role
var secret Secret

originEndpointPolicyProps := &OriginEndpointPolicyProps{
	OriginEndpoint: originEndpoint,

	// the properties below are optional
	CdnAuth: &CdnAuthConfiguration{
		Secrets: []ISecret{
			secret,
		},

		// the properties below are optional
		Role: role,
	},
	PolicyDocument: policyDocument,
}

Properties ​

cdnAuthoptionalCdnAuthConfigurationcdn_authoptionalCdnAuthConfigurationcdnAuthoptionalCdnAuthConfigurationCdnAuthoptionalCdnAuthConfigurationCdnAuthoptionalCdnAuthConfiguration #
Optional CDN Authorization configuration.

Default: No header based CDN authorization

originEndpointIOriginEndpointorigin_endpointIOriginEndpointoriginEndpointIOriginEndpointOriginEndpointIOriginEndpointOriginEndpointIOriginEndpoint required #
`OriginEndpoint` to apply the Origin Endpoint Policy to.
policyDocumentoptionalPolicyDocumentpolicy_documentoptionalPolicyDocumentpolicyDocumentoptionalPolicyDocumentPolicyDocumentoptionalPolicyDocumentPolicyDocumentoptionalPolicyDocument #
Initial policy document to apply.

Default: empty policy document