@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
109 lines • 5.57 kB
JavaScript
;
// *** 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.HostedConnection = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a hosted connection on the specified interconnect or a link aggregation group (LAG) of interconnects. Intended for use by AWS Direct Connect Partners only.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const hosted = new aws.directconnect.HostedConnection("hosted", {
* connectionId: "dxcon-ffabc123",
* bandwidth: "100Mbps",
* name: "tf-dx-hosted-connection",
* ownerAccountId: "123456789012",
* vlan: 1,
* });
* ```
*/
class HostedConnection extends pulumi.CustomResource {
/**
* Get an existing HostedConnection 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 HostedConnection(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of HostedConnection. 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'] === HostedConnection.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["awsDevice"] = state ? state.awsDevice : undefined;
resourceInputs["bandwidth"] = state ? state.bandwidth : undefined;
resourceInputs["connectionId"] = state ? state.connectionId : undefined;
resourceInputs["connectionRegion"] = state ? state.connectionRegion : undefined;
resourceInputs["hasLogicalRedundancy"] = state ? state.hasLogicalRedundancy : undefined;
resourceInputs["jumboFrameCapable"] = state ? state.jumboFrameCapable : undefined;
resourceInputs["lagId"] = state ? state.lagId : undefined;
resourceInputs["loaIssueTime"] = state ? state.loaIssueTime : undefined;
resourceInputs["location"] = state ? state.location : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["ownerAccountId"] = state ? state.ownerAccountId : undefined;
resourceInputs["partnerName"] = state ? state.partnerName : undefined;
resourceInputs["providerName"] = state ? state.providerName : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["state"] = state ? state.state : undefined;
resourceInputs["vlan"] = state ? state.vlan : undefined;
}
else {
const args = argsOrState;
if ((!args || args.bandwidth === undefined) && !opts.urn) {
throw new Error("Missing required property 'bandwidth'");
}
if ((!args || args.connectionId === undefined) && !opts.urn) {
throw new Error("Missing required property 'connectionId'");
}
if ((!args || args.ownerAccountId === undefined) && !opts.urn) {
throw new Error("Missing required property 'ownerAccountId'");
}
if ((!args || args.vlan === undefined) && !opts.urn) {
throw new Error("Missing required property 'vlan'");
}
resourceInputs["bandwidth"] = args ? args.bandwidth : undefined;
resourceInputs["connectionId"] = args ? args.connectionId : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["ownerAccountId"] = args ? args.ownerAccountId : undefined;
resourceInputs["vlan"] = args ? args.vlan : undefined;
resourceInputs["awsDevice"] = undefined /*out*/;
resourceInputs["connectionRegion"] = undefined /*out*/;
resourceInputs["hasLogicalRedundancy"] = undefined /*out*/;
resourceInputs["jumboFrameCapable"] = undefined /*out*/;
resourceInputs["lagId"] = undefined /*out*/;
resourceInputs["loaIssueTime"] = undefined /*out*/;
resourceInputs["location"] = undefined /*out*/;
resourceInputs["partnerName"] = undefined /*out*/;
resourceInputs["providerName"] = undefined /*out*/;
resourceInputs["region"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(HostedConnection.__pulumiType, name, resourceInputs, opts);
}
}
exports.HostedConnection = HostedConnection;
/** @internal */
HostedConnection.__pulumiType = 'aws:directconnect/hostedConnection:HostedConnection';
//# sourceMappingURL=hostedConnection.js.map