@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
93 lines • 4.31 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.PeeringAttachmentAccepter = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages the accepter's side of an EC2 Transit Gateway Peering Attachment.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.ec2transitgateway.PeeringAttachmentAccepter("example", {
* transitGatewayAttachmentId: exampleAwsEc2TransitGatewayPeeringAttachment.id,
* tags: {
* Name: "Example cross-account attachment",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_ec2_transit_gateway_peering_attachment_accepter` using the EC2 Transit Gateway Attachment identifier. For example:
*
* ```sh
* $ pulumi import aws:ec2transitgateway/peeringAttachmentAccepter:PeeringAttachmentAccepter example tgw-attach-12345678
* ```
*/
class PeeringAttachmentAccepter extends pulumi.CustomResource {
/**
* Get an existing PeeringAttachmentAccepter 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 PeeringAttachmentAccepter(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of PeeringAttachmentAccepter. 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'] === PeeringAttachmentAccepter.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["peerAccountId"] = state?.peerAccountId;
resourceInputs["peerRegion"] = state?.peerRegion;
resourceInputs["peerTransitGatewayId"] = state?.peerTransitGatewayId;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["transitGatewayAttachmentId"] = state?.transitGatewayAttachmentId;
resourceInputs["transitGatewayId"] = state?.transitGatewayId;
}
else {
const args = argsOrState;
if (args?.transitGatewayAttachmentId === undefined && !opts.urn) {
throw new Error("Missing required property 'transitGatewayAttachmentId'");
}
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["transitGatewayAttachmentId"] = args?.transitGatewayAttachmentId;
resourceInputs["peerAccountId"] = undefined /*out*/;
resourceInputs["peerRegion"] = undefined /*out*/;
resourceInputs["peerTransitGatewayId"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
resourceInputs["transitGatewayId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const aliasOpts = { aliases: [{ type: "aws:ec2/transitGatewayPeeringAttachmentAccepter:TransitGatewayPeeringAttachmentAccepter" }] };
opts = pulumi.mergeOptions(opts, aliasOpts);
super(PeeringAttachmentAccepter.__pulumiType, name, resourceInputs, opts);
}
}
exports.PeeringAttachmentAccepter = PeeringAttachmentAccepter;
/** @internal */
PeeringAttachmentAccepter.__pulumiType = 'aws:ec2transitgateway/peeringAttachmentAccepter:PeeringAttachmentAccepter';
//# sourceMappingURL=peeringAttachmentAccepter.js.map