@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
106 lines • 4.89 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.LinkAggregationGroup = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a Direct Connect LAG. Connections can be added to the LAG via the `aws.directconnect.Connection` and `aws.directconnect.ConnectionAssociation` resources.
*
* > *NOTE:* When creating a LAG, if no existing connection is specified, Direct Connect will create a connection and this provider will remove this unmanaged connection during resource creation.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const hoge = new aws.directconnect.LinkAggregationGroup("hoge", {
* name: "tf-dx-lag",
* connectionsBandwidth: "1Gbps",
* location: "EqDC2",
* forceDestroy: true,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Direct Connect LAGs using the LAG `id`. For example:
*
* ```sh
* $ pulumi import aws:directconnect/linkAggregationGroup:LinkAggregationGroup test_lag dxlag-fgnsp5rq
* ```
*/
class LinkAggregationGroup extends pulumi.CustomResource {
/**
* Get an existing LinkAggregationGroup 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 LinkAggregationGroup(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of LinkAggregationGroup. 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'] === LinkAggregationGroup.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["connectionId"] = state?.connectionId;
resourceInputs["connectionsBandwidth"] = state?.connectionsBandwidth;
resourceInputs["forceDestroy"] = state?.forceDestroy;
resourceInputs["hasLogicalRedundancy"] = state?.hasLogicalRedundancy;
resourceInputs["jumboFrameCapable"] = state?.jumboFrameCapable;
resourceInputs["location"] = state?.location;
resourceInputs["name"] = state?.name;
resourceInputs["ownerAccountId"] = state?.ownerAccountId;
resourceInputs["providerName"] = state?.providerName;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.connectionsBandwidth === undefined && !opts.urn) {
throw new Error("Missing required property 'connectionsBandwidth'");
}
if (args?.location === undefined && !opts.urn) {
throw new Error("Missing required property 'location'");
}
resourceInputs["connectionId"] = args?.connectionId;
resourceInputs["connectionsBandwidth"] = args?.connectionsBandwidth;
resourceInputs["forceDestroy"] = args?.forceDestroy;
resourceInputs["location"] = args?.location;
resourceInputs["name"] = args?.name;
resourceInputs["providerName"] = args?.providerName;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["hasLogicalRedundancy"] = undefined /*out*/;
resourceInputs["jumboFrameCapable"] = undefined /*out*/;
resourceInputs["ownerAccountId"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(LinkAggregationGroup.__pulumiType, name, resourceInputs, opts);
}
}
exports.LinkAggregationGroup = LinkAggregationGroup;
/** @internal */
LinkAggregationGroup.__pulumiType = 'aws:directconnect/linkAggregationGroup:LinkAggregationGroup';
//# sourceMappingURL=linkAggregationGroup.js.map
;