@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
106 lines • 5.33 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, Object.assign(Object.assign({}, 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 ? state.arn : undefined;
resourceInputs["connectionId"] = state ? state.connectionId : undefined;
resourceInputs["connectionsBandwidth"] = state ? state.connectionsBandwidth : undefined;
resourceInputs["forceDestroy"] = state ? state.forceDestroy : undefined;
resourceInputs["hasLogicalRedundancy"] = state ? state.hasLogicalRedundancy : undefined;
resourceInputs["jumboFrameCapable"] = state ? state.jumboFrameCapable : undefined;
resourceInputs["location"] = state ? state.location : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["ownerAccountId"] = state ? state.ownerAccountId : undefined;
resourceInputs["providerName"] = state ? state.providerName : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
}
else {
const args = argsOrState;
if ((!args || args.connectionsBandwidth === undefined) && !opts.urn) {
throw new Error("Missing required property 'connectionsBandwidth'");
}
if ((!args || args.location === undefined) && !opts.urn) {
throw new Error("Missing required property 'location'");
}
resourceInputs["connectionId"] = args ? args.connectionId : undefined;
resourceInputs["connectionsBandwidth"] = args ? args.connectionsBandwidth : undefined;
resourceInputs["forceDestroy"] = args ? args.forceDestroy : undefined;
resourceInputs["location"] = args ? args.location : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["providerName"] = args ? args.providerName : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
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