@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
104 lines • 5.14 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.TransitGatewayRouteTableAttachment = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a Network Manager transit gateway route table attachment.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.networkmanager.TransitGatewayRouteTableAttachment("example", {
* peeringId: exampleAwsNetworkmanagerTransitGatewayPeering.id,
* transitGatewayRouteTableArn: exampleAwsEc2TransitGatewayRouteTable.arn,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_networkmanager_transit_gateway_route_table_attachment` using the attachment ID. For example:
*
* ```sh
* $ pulumi import aws:networkmanager/transitGatewayRouteTableAttachment:TransitGatewayRouteTableAttachment example attachment-0f8fa60d2238d1bd8
* ```
*/
class TransitGatewayRouteTableAttachment extends pulumi.CustomResource {
/**
* Get an existing TransitGatewayRouteTableAttachment 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 TransitGatewayRouteTableAttachment(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of TransitGatewayRouteTableAttachment. 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'] === TransitGatewayRouteTableAttachment.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["attachmentPolicyRuleNumber"] = state?.attachmentPolicyRuleNumber;
resourceInputs["attachmentType"] = state?.attachmentType;
resourceInputs["coreNetworkArn"] = state?.coreNetworkArn;
resourceInputs["coreNetworkId"] = state?.coreNetworkId;
resourceInputs["edgeLocation"] = state?.edgeLocation;
resourceInputs["ownerAccountId"] = state?.ownerAccountId;
resourceInputs["peeringId"] = state?.peeringId;
resourceInputs["resourceArn"] = state?.resourceArn;
resourceInputs["segmentName"] = state?.segmentName;
resourceInputs["state"] = state?.state;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["transitGatewayRouteTableArn"] = state?.transitGatewayRouteTableArn;
}
else {
const args = argsOrState;
if (args?.peeringId === undefined && !opts.urn) {
throw new Error("Missing required property 'peeringId'");
}
if (args?.transitGatewayRouteTableArn === undefined && !opts.urn) {
throw new Error("Missing required property 'transitGatewayRouteTableArn'");
}
resourceInputs["peeringId"] = args?.peeringId;
resourceInputs["tags"] = args?.tags;
resourceInputs["transitGatewayRouteTableArn"] = args?.transitGatewayRouteTableArn;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["attachmentPolicyRuleNumber"] = undefined /*out*/;
resourceInputs["attachmentType"] = undefined /*out*/;
resourceInputs["coreNetworkArn"] = undefined /*out*/;
resourceInputs["coreNetworkId"] = undefined /*out*/;
resourceInputs["edgeLocation"] = undefined /*out*/;
resourceInputs["ownerAccountId"] = undefined /*out*/;
resourceInputs["resourceArn"] = undefined /*out*/;
resourceInputs["segmentName"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(TransitGatewayRouteTableAttachment.__pulumiType, name, resourceInputs, opts);
}
}
exports.TransitGatewayRouteTableAttachment = TransitGatewayRouteTableAttachment;
/** @internal */
TransitGatewayRouteTableAttachment.__pulumiType = 'aws:networkmanager/transitGatewayRouteTableAttachment:TransitGatewayRouteTableAttachment';
//# sourceMappingURL=transitGatewayRouteTableAttachment.js.map