"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.CloudFrontOriginAccessIdentity = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * The request to create a new origin access identity (OAI). An origin access identity is a special CloudFront user that you can associate with Amazon S3 origins, so that you can secure all or just some of your Amazon S3 content. For more information, see [Restricting Access to Amazon S3 Content by Using an Origin Access Identity](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html) in the *Amazon CloudFront Developer Guide*.
 *
 * ## Example Usage
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const cloudfrontoriginaccessidentity = new aws_native.cloudfront.CloudFrontOriginAccessIdentity("cloudfrontoriginaccessidentity", {cloudFrontOriginAccessIdentityConfig: {
 *     comment: "string-value",
 * }});
 *
 * ```
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const cloudfrontoriginaccessidentity = new aws_native.cloudfront.CloudFrontOriginAccessIdentity("cloudfrontoriginaccessidentity", {cloudFrontOriginAccessIdentityConfig: {
 *     comment: "string-value",
 * }});
 *
 * ```
 */
class CloudFrontOriginAccessIdentity extends pulumi.CustomResource {
    /**
     * Get an existing CloudFrontOriginAccessIdentity 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 CloudFrontOriginAccessIdentity(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of CloudFrontOriginAccessIdentity.  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'] === CloudFrontOriginAccessIdentity.__pulumiType;
    }
    /**
     * Create a CloudFrontOriginAccessIdentity 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?.cloudFrontOriginAccessIdentityConfig === undefined && !opts.urn) {
                throw new Error("Missing required property 'cloudFrontOriginAccessIdentityConfig'");
            }
            resourceInputs["cloudFrontOriginAccessIdentityConfig"] = args?.cloudFrontOriginAccessIdentityConfig;
            resourceInputs["awsId"] = undefined /*out*/;
            resourceInputs["s3CanonicalUserId"] = undefined /*out*/;
        }
        else {
            resourceInputs["awsId"] = undefined /*out*/;
            resourceInputs["cloudFrontOriginAccessIdentityConfig"] = undefined /*out*/;
            resourceInputs["s3CanonicalUserId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(CloudFrontOriginAccessIdentity.__pulumiType, name, resourceInputs, opts);
    }
}
exports.CloudFrontOriginAccessIdentity = CloudFrontOriginAccessIdentity;
/** @internal */
CloudFrontOriginAccessIdentity.__pulumiType = 'aws-native:cloudfront:CloudFrontOriginAccessIdentity';
//# sourceMappingURL=cloudFrontOriginAccessIdentity.js.map