"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.OriginRequestPolicy = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * An origin request policy.
 *  When it's attached to a cache behavior, the origin request policy determines the values that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the following:
 *   +  The request body and the URL path (without the domain name) from the viewer request.
 *   +  The headers that CloudFront automatically includes in every origin request, including ``Host``, ``User-Agent``, and ``X-Amz-Cf-Id``.
 *   +  All HTTP headers, cookies, and URL query strings that are specified in the cache policy or the origin request policy. These can include items from the viewer request and, in the case of headers, additional ones that are added by CloudFront.
 *
 *  CloudFront sends a request when it can't find an object in its cache that matches the request. If you want to send values to the origin and also include them in the cache key, use ``CachePolicy``.
 */
class OriginRequestPolicy extends pulumi.CustomResource {
    /**
     * Get an existing OriginRequestPolicy resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, opts) {
        return new OriginRequestPolicy(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of OriginRequestPolicy.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === OriginRequestPolicy.__pulumiType;
    }
    /**
     * Create a OriginRequestPolicy resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name, args, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (!opts.id) {
            if (args?.originRequestPolicyConfig === undefined && !opts.urn) {
                throw new Error("Missing required property 'originRequestPolicyConfig'");
            }
            resourceInputs["originRequestPolicyConfig"] = args?.originRequestPolicyConfig;
            resourceInputs["awsId"] = undefined /*out*/;
            resourceInputs["lastModifiedTime"] = undefined /*out*/;
        }
        else {
            resourceInputs["awsId"] = undefined /*out*/;
            resourceInputs["lastModifiedTime"] = undefined /*out*/;
            resourceInputs["originRequestPolicyConfig"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(OriginRequestPolicy.__pulumiType, name, resourceInputs, opts);
    }
}
exports.OriginRequestPolicy = OriginRequestPolicy;
/** @internal */
OriginRequestPolicy.__pulumiType = 'aws-native:cloudfront:OriginRequestPolicy';
//# sourceMappingURL=originRequestPolicy.js.map