# IOriginRequestPolicy

Represents a Origin Request Policy.

Extends: [IOriginRequestPolicyRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_cloudfront.IOriginRequestPolicyRef.html)
Implemented by: [OriginRequestPolicy](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.OriginRequestPolicy.html)
Obtainable from: [OriginRequestPolicy.ALL_VIEWER](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.OriginRequestPolicy.html#all-viewer), [OriginRequestPolicy.ALL_VIEWER_AND_CLOUDFRONT_2022](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.OriginRequestPolicy.html#all-viewer-and-cloudfront-2022), [OriginRequestPolicy.ALL_VIEWER_EXCEPT_HOST_HEADER](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.OriginRequestPolicy.html#all-viewer-except-host-header), [OriginRequestPolicy.CORS_CUSTOM_ORIGIN](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.OriginRequestPolicy.html#cors-custom-origin), [OriginRequestPolicy.CORS_S3_ORIGIN](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.OriginRequestPolicy.html#cors-s3-origin), [OriginRequestPolicy.ELEMENTAL_MEDIA_TAILOR](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.OriginRequestPolicy.html#elemental-media-tailor), [OriginRequestPolicy.HOST_HEADER_ONLY](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.OriginRequestPolicy.html#host-header-only), [OriginRequestPolicy.USER_AGENT_REFERER_HEADERS](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.OriginRequestPolicy.html#user-agent-referer-headers), [OriginRequestPolicy.fromOriginRequestPolicyId](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.OriginRequestPolicy.html#fromoriginrequestpolicyid)

- Source: [`aws-cloudfront/lib/origin-request-policy.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-cloudfront/lib/origin-request-policy.ts#L13)
- Type last changed: v2.224.0 · 13 Nov 2025

## Properties

- `env`: [ResourceEnvironment](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html) — The environment this resource belongs to.

  For resources that are created and managed in a Stack (those created by
  creating new class instances like `new Role()`, `new Bucket()`, etc.), this
  is always the same as the environment of the stack they belong to.

  For referenced resources (those obtained from referencing methods like
  `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
  different than the stack they were imported into.

- `node`: [Node](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.Node.html) — The tree node.

- `originRequestPolicyId`: string — The ID of the origin request policy.

- `originRequestPolicyRef`: [OriginRequestPolicyReference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_cloudfront.OriginRequestPolicyReference.html) — A reference to a OriginRequestPolicy resource.

## Methods

- `with(...mixins: IMixin[]): IConstruct` — Applies one or more mixins to this construct.

  Mixins are applied in order. The list of constructs is captured at the
  start of the call, so constructs added by a mixin will not be visited.

  **Parameters**

  - `mixins` — The mixins to apply.

  **Returns:** This construct for chaining
