UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

106 lines 3.69 kB
"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.VpcOrigin = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Creates an Amazon CloudFront VPC origin. * * For information about CloudFront VPC origins, see * [Amazon CloudFront Developer Guide - Restrict access with VPC origins][1]. * * ## Example Usage * * ### Application Load Balancer * * The following example below creates a CloudFront VPC origin for a Application Load Balancer. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const alb = new aws.cloudfront.VpcOrigin("alb", {vpcOriginEndpointConfig: { * name: "example-vpc-origin", * arn: _this.arn, * httpPort: 8080, * httpsPort: 8443, * originProtocolPolicy: "https-only", * originSslProtocols: { * items: ["TLSv1.2"], * quantity: 1, * }, * }}); * ``` * * ## Import * * terraform * * import { * * to = aws_cloudfront_vpc_origin.origin * * id = "vo_JQEa410sssUFoY6wMkx69j" * * } * * Using `pulumi import`, import Cloudfront VPC origins using the `id`. For example: * * console * * % pulumi import aws_cloudfront_vpc_origin vo_JQEa410sssUFoY6wMkx69j */ class VpcOrigin extends pulumi.CustomResource { /** * Get an existing VpcOrigin 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 state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new VpcOrigin(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of VpcOrigin. 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'] === VpcOrigin.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["etag"] = state?.etag; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["timeouts"] = state?.timeouts; resourceInputs["vpcOriginEndpointConfig"] = state?.vpcOriginEndpointConfig; } else { const args = argsOrState; resourceInputs["tags"] = args?.tags; resourceInputs["timeouts"] = args?.timeouts; resourceInputs["vpcOriginEndpointConfig"] = args?.vpcOriginEndpointConfig; resourceInputs["arn"] = undefined /*out*/; resourceInputs["etag"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(VpcOrigin.__pulumiType, name, resourceInputs, opts); } } exports.VpcOrigin = VpcOrigin; /** @internal */ VpcOrigin.__pulumiType = 'aws:cloudfront/vpcOrigin:VpcOrigin'; //# sourceMappingURL=vpcOrigin.js.map