@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
88 lines • 4.39 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.TransitGatewayConnectPeerAssociation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a Network Manager transit gateway Connect peer association. Associates a transit gateway Connect peer with a device, and optionally, with a link. If you specify a link, it must be associated with the specified device.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.networkmanager.TransitGatewayConnectPeerAssociation("example", {
* globalNetworkId: exampleAwsNetworkmanagerGlobalNetwork.id,
* deviceId: exampleAwsNetworkmanagerDevice.id,
* transitGatewayConnectPeerArn: exampleAwsEc2TransitGatewayConnectPeer.arn,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_networkmanager_transit_gateway_connect_peer_association` using the global network ID and Connect peer ARN. For example:
*
* ```sh
* $ pulumi import aws:networkmanager/transitGatewayConnectPeerAssociation:TransitGatewayConnectPeerAssociation example global-network-0d47f6t230mz46dy4,arn:aws:ec2:us-west-2:123456789012:transit-gateway-connect-peer/tgw-connect-peer-12345678
* ```
*/
class TransitGatewayConnectPeerAssociation extends pulumi.CustomResource {
/**
* Get an existing TransitGatewayConnectPeerAssociation 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 TransitGatewayConnectPeerAssociation(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of TransitGatewayConnectPeerAssociation. 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'] === TransitGatewayConnectPeerAssociation.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["deviceId"] = state?.deviceId;
resourceInputs["globalNetworkId"] = state?.globalNetworkId;
resourceInputs["linkId"] = state?.linkId;
resourceInputs["transitGatewayConnectPeerArn"] = state?.transitGatewayConnectPeerArn;
}
else {
const args = argsOrState;
if (args?.deviceId === undefined && !opts.urn) {
throw new Error("Missing required property 'deviceId'");
}
if (args?.globalNetworkId === undefined && !opts.urn) {
throw new Error("Missing required property 'globalNetworkId'");
}
if (args?.transitGatewayConnectPeerArn === undefined && !opts.urn) {
throw new Error("Missing required property 'transitGatewayConnectPeerArn'");
}
resourceInputs["deviceId"] = args?.deviceId;
resourceInputs["globalNetworkId"] = args?.globalNetworkId;
resourceInputs["linkId"] = args?.linkId;
resourceInputs["transitGatewayConnectPeerArn"] = args?.transitGatewayConnectPeerArn;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(TransitGatewayConnectPeerAssociation.__pulumiType, name, resourceInputs, opts);
}
}
exports.TransitGatewayConnectPeerAssociation = TransitGatewayConnectPeerAssociation;
/** @internal */
TransitGatewayConnectPeerAssociation.__pulumiType = 'aws:networkmanager/transitGatewayConnectPeerAssociation:TransitGatewayConnectPeerAssociation';
//# sourceMappingURL=transitGatewayConnectPeerAssociation.js.map
;