UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

142 lines 6.05 kB
"use strict"; // *** 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.AttachmentAccepter = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an AWS Network Manager Attachment Accepter. * * Use this resource to accept cross-account attachments in AWS Network Manager. When an attachment is created in one account and needs to be accepted by another account that owns the core network, this resource handles the acceptance process. * * ## Example Usage * * ### VPC Attachment * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkmanager.AttachmentAccepter("example", { * attachmentId: exampleAwsNetworkmanagerVpcAttachment.id, * attachmentType: exampleAwsNetworkmanagerVpcAttachment.attachmentType, * }); * ``` * * ### Site-to-Site VPN Attachment * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkmanager.AttachmentAccepter("example", { * attachmentId: exampleAwsNetworkmanagerSiteToSiteVpnAttachment.id, * attachmentType: exampleAwsNetworkmanagerSiteToSiteVpnAttachment.attachmentType, * }); * ``` * * ### Connect Attachment * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkmanager.AttachmentAccepter("example", { * attachmentId: exampleAwsNetworkmanagerConnectAttachment.id, * attachmentType: exampleAwsNetworkmanagerConnectAttachment.attachmentType, * }); * ``` * * ### Transit Gateway Route Table Attachment * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkmanager.AttachmentAccepter("example", { * attachmentId: exampleAwsNetworkmanagerTransitGatewayRouteTableAttachment.id, * attachmentType: exampleAwsNetworkmanagerTransitGatewayRouteTableAttachment.attachmentType, * }); * ``` * * ### Direct Connect Gateway Attachment * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkmanager.AttachmentAccepter("example", { * attachmentId: exampleAwsNetworkmanagerDxGatewayAttachment.id, * attachmentType: exampleAwsNetworkmanagerDxGatewayAttachment.attachmentType, * }); * ``` */ class AttachmentAccepter extends pulumi.CustomResource { /** * Get an existing AttachmentAccepter 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 AttachmentAccepter(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of AttachmentAccepter. 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'] === AttachmentAccepter.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["attachmentId"] = state?.attachmentId; resourceInputs["attachmentPolicyRuleNumber"] = state?.attachmentPolicyRuleNumber; resourceInputs["attachmentType"] = state?.attachmentType; resourceInputs["coreNetworkArn"] = state?.coreNetworkArn; resourceInputs["coreNetworkId"] = state?.coreNetworkId; resourceInputs["edgeLocation"] = state?.edgeLocation; resourceInputs["edgeLocations"] = state?.edgeLocations; resourceInputs["ownerAccountId"] = state?.ownerAccountId; resourceInputs["resourceArn"] = state?.resourceArn; resourceInputs["segmentName"] = state?.segmentName; resourceInputs["state"] = state?.state; } else { const args = argsOrState; if (args?.attachmentId === undefined && !opts.urn) { throw new Error("Missing required property 'attachmentId'"); } if (args?.attachmentType === undefined && !opts.urn) { throw new Error("Missing required property 'attachmentType'"); } resourceInputs["attachmentId"] = args?.attachmentId; resourceInputs["attachmentType"] = args?.attachmentType; resourceInputs["attachmentPolicyRuleNumber"] = undefined /*out*/; resourceInputs["coreNetworkArn"] = undefined /*out*/; resourceInputs["coreNetworkId"] = undefined /*out*/; resourceInputs["edgeLocation"] = undefined /*out*/; resourceInputs["edgeLocations"] = undefined /*out*/; resourceInputs["ownerAccountId"] = undefined /*out*/; resourceInputs["resourceArn"] = undefined /*out*/; resourceInputs["segmentName"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AttachmentAccepter.__pulumiType, name, resourceInputs, opts); } } exports.AttachmentAccepter = AttachmentAccepter; /** @internal */ AttachmentAccepter.__pulumiType = 'aws:networkmanager/attachmentAccepter:AttachmentAccepter'; //# sourceMappingURL=attachmentAccepter.js.map