@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
116 lines • 4.47 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.RouteServer = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource for managing a VPC (Virtual Private Cloud) Route Server.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.vpc.RouteServer("test", {
* amazonSideAsn: 65534,
* tags: {
* Name: "Test",
* },
* });
* ```
*
* ### Persist Route and SNS Notification
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.vpc.RouteServer("test", {
* amazonSideAsn: 65534,
* persistRoutes: "enable",
* persistRoutesDuration: 2,
* snsNotificationsEnabled: true,
* tags: {
* Name: "Main Route Server",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import VPC (Virtual Private Cloud) Route Server using the `route_server_id`. For example:
*
* ```sh
* $ pulumi import aws:vpc/routeServer:RouteServer example rs-12345678
* ```
*/
class RouteServer extends pulumi.CustomResource {
/**
* Get an existing RouteServer 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 RouteServer(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of RouteServer. 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'] === RouteServer.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["amazonSideAsn"] = state?.amazonSideAsn;
resourceInputs["arn"] = state?.arn;
resourceInputs["persistRoutes"] = state?.persistRoutes;
resourceInputs["persistRoutesDuration"] = state?.persistRoutesDuration;
resourceInputs["region"] = state?.region;
resourceInputs["routeServerId"] = state?.routeServerId;
resourceInputs["snsNotificationsEnabled"] = state?.snsNotificationsEnabled;
resourceInputs["snsTopicArn"] = state?.snsTopicArn;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["timeouts"] = state?.timeouts;
}
else {
const args = argsOrState;
if (args?.amazonSideAsn === undefined && !opts.urn) {
throw new Error("Missing required property 'amazonSideAsn'");
}
resourceInputs["amazonSideAsn"] = args?.amazonSideAsn;
resourceInputs["persistRoutes"] = args?.persistRoutes;
resourceInputs["persistRoutesDuration"] = args?.persistRoutesDuration;
resourceInputs["region"] = args?.region;
resourceInputs["snsNotificationsEnabled"] = args?.snsNotificationsEnabled;
resourceInputs["tags"] = args?.tags;
resourceInputs["timeouts"] = args?.timeouts;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["routeServerId"] = undefined /*out*/;
resourceInputs["snsTopicArn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(RouteServer.__pulumiType, name, resourceInputs, opts);
}
}
exports.RouteServer = RouteServer;
/** @internal */
RouteServer.__pulumiType = 'aws:vpc/routeServer:RouteServer';
//# sourceMappingURL=routeServer.js.map