UNPKG

@pulumi/aws

Version:

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

131 lines 5.46 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.VpcAttachment = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a Network Manager VPC attachment. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkmanager.VpcAttachment("example", { * subnetArns: [exampleAwsSubnet.arn], * coreNetworkId: exampleAwsccNetworkmanagerCoreNetwork.id, * vpcArn: exampleAwsVpc.arn, * }); * ``` * * ### Usage with Options * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkmanager.VpcAttachment("example", { * subnetArns: [exampleAwsSubnet.arn], * coreNetworkId: exampleAwsccNetworkmanagerCoreNetwork.id, * vpcArn: exampleAwsVpc.arn, * options: { * applianceModeSupport: false, * dnsSupport: true, * ipv6Support: false, * securityGroupReferencingSupport: true, * }, * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_networkmanager_vpc_attachment` using the attachment ID. For example: * * ```sh * $ pulumi import aws:networkmanager/vpcAttachment:VpcAttachment example attachment-0f8fa60d2238d1bd8 * ``` */ class VpcAttachment extends pulumi.CustomResource { /** * Get an existing VpcAttachment 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 VpcAttachment(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of VpcAttachment. 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'] === VpcAttachment.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["attachmentPolicyRuleNumber"] = state?.attachmentPolicyRuleNumber; resourceInputs["attachmentType"] = state?.attachmentType; resourceInputs["coreNetworkArn"] = state?.coreNetworkArn; resourceInputs["coreNetworkId"] = state?.coreNetworkId; resourceInputs["edgeLocation"] = state?.edgeLocation; resourceInputs["options"] = state?.options; resourceInputs["ownerAccountId"] = state?.ownerAccountId; resourceInputs["resourceArn"] = state?.resourceArn; resourceInputs["segmentName"] = state?.segmentName; resourceInputs["state"] = state?.state; resourceInputs["subnetArns"] = state?.subnetArns; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["vpcArn"] = state?.vpcArn; } else { const args = argsOrState; if (args?.coreNetworkId === undefined && !opts.urn) { throw new Error("Missing required property 'coreNetworkId'"); } if (args?.subnetArns === undefined && !opts.urn) { throw new Error("Missing required property 'subnetArns'"); } if (args?.vpcArn === undefined && !opts.urn) { throw new Error("Missing required property 'vpcArn'"); } resourceInputs["coreNetworkId"] = args?.coreNetworkId; resourceInputs["options"] = args?.options; resourceInputs["subnetArns"] = args?.subnetArns; resourceInputs["tags"] = args?.tags; resourceInputs["vpcArn"] = args?.vpcArn; resourceInputs["arn"] = undefined /*out*/; resourceInputs["attachmentPolicyRuleNumber"] = undefined /*out*/; resourceInputs["attachmentType"] = undefined /*out*/; resourceInputs["coreNetworkArn"] = undefined /*out*/; resourceInputs["edgeLocation"] = undefined /*out*/; resourceInputs["ownerAccountId"] = undefined /*out*/; resourceInputs["resourceArn"] = undefined /*out*/; resourceInputs["segmentName"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(VpcAttachment.__pulumiType, name, resourceInputs, opts); } } exports.VpcAttachment = VpcAttachment; /** @internal */ VpcAttachment.__pulumiType = 'aws:networkmanager/vpcAttachment:VpcAttachment'; //# sourceMappingURL=vpcAttachment.js.map