@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
109 lines • 5.1 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, { ...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?.awsDevice;
resourceInputs["bandwidth"] = state?.bandwidth;
resourceInputs["connectionId"] = state?.connectionId;
resourceInputs["connectionRegion"] = state?.connectionRegion;
resourceInputs["hasLogicalRedundancy"] = state?.hasLogicalRedundancy;
resourceInputs["jumboFrameCapable"] = state?.jumboFrameCapable;
resourceInputs["lagId"] = state?.lagId;
resourceInputs["loaIssueTime"] = state?.loaIssueTime;
resourceInputs["location"] = state?.location;
resourceInputs["name"] = state?.name;
resourceInputs["ownerAccountId"] = state?.ownerAccountId;
resourceInputs["partnerName"] = state?.partnerName;
resourceInputs["providerName"] = state?.providerName;
resourceInputs["region"] = state?.region;
resourceInputs["state"] = state?.state;
resourceInputs["vlan"] = state?.vlan;
}
else {
const args = argsOrState;
if (args?.bandwidth === undefined && !opts.urn) {
throw new Error("Missing required property 'bandwidth'");
}
if (args?.connectionId === undefined && !opts.urn) {
throw new Error("Missing required property 'connectionId'");
}
if (args?.ownerAccountId === undefined && !opts.urn) {
throw new Error("Missing required property 'ownerAccountId'");
}
if (args?.vlan === undefined && !opts.urn) {
throw new Error("Missing required property 'vlan'");
}
resourceInputs["bandwidth"] = args?.bandwidth;
resourceInputs["connectionId"] = args?.connectionId;
resourceInputs["name"] = args?.name;
resourceInputs["ownerAccountId"] = args?.ownerAccountId;
resourceInputs["vlan"] = args?.vlan;
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