UNPKG

@pulumi/aws

Version:

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

102 lines 4.09 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.VpcAssociationAuthorization = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Authorizes a VPC in a different account to be associated with a local Route53 Hosted Zone. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ec2.Vpc("example", { * cidrBlock: "10.6.0.0/16", * enableDnsHostnames: true, * enableDnsSupport: true, * }); * const exampleZone = new aws.route53.Zone("example", { * name: "example.com", * vpcs: [{ * vpcId: example.id, * }], * }); * const alternate = new aws.ec2.Vpc("alternate", { * cidrBlock: "10.7.0.0/16", * enableDnsHostnames: true, * enableDnsSupport: true, * }); * const exampleVpcAssociationAuthorization = new aws.route53.VpcAssociationAuthorization("example", { * vpcId: alternate.id, * zoneId: exampleZone.id, * }); * const exampleZoneAssociation = new aws.route53.ZoneAssociation("example", { * vpcId: exampleVpcAssociationAuthorization.vpcId, * zoneId: exampleVpcAssociationAuthorization.zoneId, * }); * ``` * * ## Import * * Using `pulumi import`, import Route 53 VPC Association Authorizations using the Hosted Zone ID and VPC ID, separated by a colon (`:`). For example: * * ```sh * $ pulumi import aws:route53/vpcAssociationAuthorization:VpcAssociationAuthorization example Z123456ABCDEFG:vpc-12345678 * ``` */ class VpcAssociationAuthorization extends pulumi.CustomResource { /** * Get an existing VpcAssociationAuthorization 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 VpcAssociationAuthorization(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of VpcAssociationAuthorization. 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'] === VpcAssociationAuthorization.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["vpcId"] = state?.vpcId; resourceInputs["vpcRegion"] = state?.vpcRegion; resourceInputs["zoneId"] = state?.zoneId; } else { const args = argsOrState; if (args?.vpcId === undefined && !opts.urn) { throw new Error("Missing required property 'vpcId'"); } if (args?.zoneId === undefined && !opts.urn) { throw new Error("Missing required property 'zoneId'"); } resourceInputs["vpcId"] = args?.vpcId; resourceInputs["vpcRegion"] = args?.vpcRegion; resourceInputs["zoneId"] = args?.zoneId; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(VpcAssociationAuthorization.__pulumiType, name, resourceInputs, opts); } } exports.VpcAssociationAuthorization = VpcAssociationAuthorization; /** @internal */ VpcAssociationAuthorization.__pulumiType = 'aws:route53/vpcAssociationAuthorization:VpcAssociationAuthorization'; //# sourceMappingURL=vpcAssociationAuthorization.js.map