> **Experimental**
>
> `@aws-cdk/aws-mediapackagev2-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# OriginEndpointPolicyProps

Properties for Origin Endpoint policy.

Used as props by: [OriginEndpointPolicy](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-mediapackagev2-alpha.OriginEndpointPolicy.html)

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/origin-endpoint-policy.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-mediapackagev2-alpha/lib/origin-endpoint-policy.ts#L39)

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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
};
```

Golang:

```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

- `cdnAuth`: [CdnAuthConfiguration](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-mediapackagev2-alpha.CdnAuthConfiguration.html) — Optional CDN Authorization configuration.

  **Default:** No header based CDN authorization

- `originEndpoint`: [IOriginEndpoint](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-mediapackagev2-alpha.IOriginEndpoint.html) (required) — `OriginEndpoint` to apply the Origin Endpoint Policy to.

- `policyDocument`: [PolicyDocument](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.PolicyDocument.html) — Initial policy document to apply.

  **Default:** empty policy document
