UNPKG

@pulumi/aws

Version:

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

92 lines 4.3 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.BgpPeer = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a Direct Connect BGP peer resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const peer = new aws.directconnect.BgpPeer("peer", { * virtualInterfaceId: foo.id, * addressFamily: "ipv6", * bgpAsn: 65351, * }); * ``` */ class BgpPeer extends pulumi.CustomResource { /** * Get an existing BgpPeer 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 BgpPeer(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of BgpPeer. 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'] === BgpPeer.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["addressFamily"] = state ? state.addressFamily : undefined; resourceInputs["amazonAddress"] = state ? state.amazonAddress : undefined; resourceInputs["awsDevice"] = state ? state.awsDevice : undefined; resourceInputs["bgpAsn"] = state ? state.bgpAsn : undefined; resourceInputs["bgpAuthKey"] = state ? state.bgpAuthKey : undefined; resourceInputs["bgpPeerId"] = state ? state.bgpPeerId : undefined; resourceInputs["bgpStatus"] = state ? state.bgpStatus : undefined; resourceInputs["customerAddress"] = state ? state.customerAddress : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["virtualInterfaceId"] = state ? state.virtualInterfaceId : undefined; } else { const args = argsOrState; if ((!args || args.addressFamily === undefined) && !opts.urn) { throw new Error("Missing required property 'addressFamily'"); } if ((!args || args.bgpAsn === undefined) && !opts.urn) { throw new Error("Missing required property 'bgpAsn'"); } if ((!args || args.virtualInterfaceId === undefined) && !opts.urn) { throw new Error("Missing required property 'virtualInterfaceId'"); } resourceInputs["addressFamily"] = args ? args.addressFamily : undefined; resourceInputs["amazonAddress"] = args ? args.amazonAddress : undefined; resourceInputs["bgpAsn"] = args ? args.bgpAsn : undefined; resourceInputs["bgpAuthKey"] = args ? args.bgpAuthKey : undefined; resourceInputs["customerAddress"] = args ? args.customerAddress : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["virtualInterfaceId"] = args ? args.virtualInterfaceId : undefined; resourceInputs["awsDevice"] = undefined /*out*/; resourceInputs["bgpPeerId"] = undefined /*out*/; resourceInputs["bgpStatus"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(BgpPeer.__pulumiType, name, resourceInputs, opts); } } exports.BgpPeer = BgpPeer; /** @internal */ BgpPeer.__pulumiType = 'aws:directconnect/bgpPeer:BgpPeer'; //# sourceMappingURL=bgpPeer.js.map