UNPKG

@pulumi/aws

Version:

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

104 lines 4.54 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.PrefixListReference = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an EC2 Transit Gateway Prefix List Reference. * * ## Example Usage * * ### Attachment Routing * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ec2transitgateway.PrefixListReference("example", { * prefixListId: exampleAwsEc2ManagedPrefixList.id, * transitGatewayAttachmentId: exampleAwsEc2TransitGatewayVpcAttachment.id, * transitGatewayRouteTableId: exampleAwsEc2TransitGateway.associationDefaultRouteTableId, * }); * ``` * * ### Blackhole Routing * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ec2transitgateway.PrefixListReference("example", { * blackhole: true, * prefixListId: exampleAwsEc2ManagedPrefixList.id, * transitGatewayRouteTableId: exampleAwsEc2TransitGateway.associationDefaultRouteTableId, * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_ec2_transit_gateway_prefix_list_reference` using the EC2 Transit Gateway Route Table identifier and EC2 Prefix List identifier, separated by an underscore (`_`). For example: * * ```sh * $ pulumi import aws:ec2transitgateway/prefixListReference:PrefixListReference example tgw-rtb-12345678_pl-12345678 * ``` */ class PrefixListReference extends pulumi.CustomResource { /** * Get an existing PrefixListReference 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 PrefixListReference(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of PrefixListReference. 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'] === PrefixListReference.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["blackhole"] = state?.blackhole; resourceInputs["prefixListId"] = state?.prefixListId; resourceInputs["prefixListOwnerId"] = state?.prefixListOwnerId; resourceInputs["region"] = state?.region; resourceInputs["transitGatewayAttachmentId"] = state?.transitGatewayAttachmentId; resourceInputs["transitGatewayRouteTableId"] = state?.transitGatewayRouteTableId; } else { const args = argsOrState; if (args?.prefixListId === undefined && !opts.urn) { throw new Error("Missing required property 'prefixListId'"); } if (args?.transitGatewayRouteTableId === undefined && !opts.urn) { throw new Error("Missing required property 'transitGatewayRouteTableId'"); } resourceInputs["blackhole"] = args?.blackhole; resourceInputs["prefixListId"] = args?.prefixListId; resourceInputs["region"] = args?.region; resourceInputs["transitGatewayAttachmentId"] = args?.transitGatewayAttachmentId; resourceInputs["transitGatewayRouteTableId"] = args?.transitGatewayRouteTableId; resourceInputs["prefixListOwnerId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(PrefixListReference.__pulumiType, name, resourceInputs, opts); } } exports.PrefixListReference = PrefixListReference; /** @internal */ PrefixListReference.__pulumiType = 'aws:ec2transitgateway/prefixListReference:PrefixListReference'; //# sourceMappingURL=prefixListReference.js.map