UNPKG

@pulumi/aws

Version:

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

113 lines 5 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.NetworkPeeringConnection = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.odb.NetworkPeeringConnection("example", { * displayName: "example", * odbNetworkId: "my-odb-network-id", * peerNetworkId: "my-vpc-id", * tags: { * env: "dev", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import odb network peering using the `id`. For example: * * ```sh * $ pulumi import aws:odb/networkPeeringConnection:NetworkPeeringConnection example example * ``` */ class NetworkPeeringConnection extends pulumi.CustomResource { /** * Get an existing NetworkPeeringConnection 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 NetworkPeeringConnection(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of NetworkPeeringConnection. 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'] === NetworkPeeringConnection.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["createdAt"] = state?.createdAt; resourceInputs["displayName"] = state?.displayName; resourceInputs["odbNetworkArn"] = state?.odbNetworkArn; resourceInputs["odbNetworkId"] = state?.odbNetworkId; resourceInputs["odbPeeringConnectionType"] = state?.odbPeeringConnectionType; resourceInputs["peerNetworkArn"] = state?.peerNetworkArn; resourceInputs["peerNetworkId"] = state?.peerNetworkId; resourceInputs["percentProgress"] = state?.percentProgress; resourceInputs["region"] = state?.region; resourceInputs["status"] = state?.status; resourceInputs["statusReason"] = state?.statusReason; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["timeouts"] = state?.timeouts; } else { const args = argsOrState; if (args?.displayName === undefined && !opts.urn) { throw new Error("Missing required property 'displayName'"); } if (args?.odbNetworkId === undefined && !opts.urn) { throw new Error("Missing required property 'odbNetworkId'"); } if (args?.peerNetworkId === undefined && !opts.urn) { throw new Error("Missing required property 'peerNetworkId'"); } resourceInputs["displayName"] = args?.displayName; resourceInputs["odbNetworkId"] = args?.odbNetworkId; resourceInputs["peerNetworkId"] = args?.peerNetworkId; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["timeouts"] = args?.timeouts; resourceInputs["arn"] = undefined /*out*/; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["odbNetworkArn"] = undefined /*out*/; resourceInputs["odbPeeringConnectionType"] = undefined /*out*/; resourceInputs["peerNetworkArn"] = undefined /*out*/; resourceInputs["percentProgress"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["statusReason"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(NetworkPeeringConnection.__pulumiType, name, resourceInputs, opts); } } exports.NetworkPeeringConnection = NetworkPeeringConnection; /** @internal */ NetworkPeeringConnection.__pulumiType = 'aws:odb/networkPeeringConnection:NetworkPeeringConnection'; //# sourceMappingURL=networkPeeringConnection.js.map