UNPKG

@pulumi/aws

Version:

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

109 lines 4.95 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.Stage = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an Amazon API Gateway Version 2 stage. * More information can be found in the [Amazon API Gateway Developer Guide](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api.html). * * ## Example Usage * * ### Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.apigatewayv2.Stage("example", { * apiId: exampleAwsApigatewayv2Api.id, * name: "example-stage", * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_apigatewayv2_stage` using the API identifier and stage name. For example: * * ```sh * $ pulumi import aws:apigatewayv2/stage:Stage example aabbccddee/example-stage * ``` * -> __Note:__ The API Gateway managed stage created as part of [_quick_create_](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-basic-concept.html#apigateway-definition-quick-create) cannot be imported. */ class Stage extends pulumi.CustomResource { /** * Get an existing Stage 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 Stage(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Stage. 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'] === Stage.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accessLogSettings"] = state?.accessLogSettings; resourceInputs["apiId"] = state?.apiId; resourceInputs["arn"] = state?.arn; resourceInputs["autoDeploy"] = state?.autoDeploy; resourceInputs["clientCertificateId"] = state?.clientCertificateId; resourceInputs["defaultRouteSettings"] = state?.defaultRouteSettings; resourceInputs["deploymentId"] = state?.deploymentId; resourceInputs["description"] = state?.description; resourceInputs["executionArn"] = state?.executionArn; resourceInputs["invokeUrl"] = state?.invokeUrl; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["routeSettings"] = state?.routeSettings; resourceInputs["stageVariables"] = state?.stageVariables; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; if (args?.apiId === undefined && !opts.urn) { throw new Error("Missing required property 'apiId'"); } resourceInputs["accessLogSettings"] = args?.accessLogSettings; resourceInputs["apiId"] = args?.apiId; resourceInputs["autoDeploy"] = args?.autoDeploy; resourceInputs["clientCertificateId"] = args?.clientCertificateId; resourceInputs["defaultRouteSettings"] = args?.defaultRouteSettings; resourceInputs["deploymentId"] = args?.deploymentId; resourceInputs["description"] = args?.description; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["routeSettings"] = args?.routeSettings; resourceInputs["stageVariables"] = args?.stageVariables; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["executionArn"] = undefined /*out*/; resourceInputs["invokeUrl"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Stage.__pulumiType, name, resourceInputs, opts); } } exports.Stage = Stage; /** @internal */ Stage.__pulumiType = 'aws:apigatewayv2/stage:Stage'; //# sourceMappingURL=stage.js.map