Stage

Manages an Amazon API Gateway Version 2 stage. More information can be found in the Amazon API Gateway Developer Guide.

Example Usage

Basic

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.ApiGatewayV2.Stage("example", new Aws.ApiGatewayV2.StageArgs
        {
            ApiId = aws_apigatewayv2_api.Example.Id,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/apigatewayv2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := apigatewayv2.NewStage(ctx, "example", &apigatewayv2.StageArgs{
            ApiId: pulumi.String(aws_apigatewayv2_api.Example.Id),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.apigatewayv2.Stage("example", api_id=aws_apigatewayv2_api["example"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.apigatewayv2.Stage("example", {
    apiId: aws_apigatewayv2_api_example.id,
});

Create a Stage Resource

new Stage(name: string, args: StageArgs, opts?: CustomResourceOptions);
def Stage(resource_name, opts=None, access_log_settings=None, api_id=None, auto_deploy=None, client_certificate_id=None, default_route_settings=None, deployment_id=None, description=None, name=None, route_settings=None, stage_variables=None, tags=None, __props__=None);
func NewStage(ctx *Context, name string, args StageArgs, opts ...ResourceOption) (*Stage, error)
public Stage(string name, StageArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args StageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args StageArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args StageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Stage Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Stage resource accepts the following input properties:

ApiId string

The API identifier.

AccessLogSettings StageAccessLogSettingsArgs

Settings for logging access in this stage. Use the aws.apigateway.Account resource to configure permissions for CloudWatch Logging.

AutoDeploy bool

Whether updates to an API automatically trigger a new deployment. Defaults to false.

ClientCertificateId string

The identifier of a client certificate for the stage. Use the aws.apigateway.ClientCertificate resource to configure a client certificate. Supported only for WebSocket APIs.

DefaultRouteSettings StageDefaultRouteSettingsArgs

The default route settings for the stage.

DeploymentId string

The deployment identifier of the stage. Use the aws.apigatewayv2.Deployment resource to configure a deployment.

Description string

The description for the stage.

Name string

The name of the stage.

RouteSettings List<StageRouteSettingArgs>

Route settings for the stage.

StageVariables Dictionary<string, string>

A map that defines the stage variables for the stage.

Tags Dictionary<string, string>

A map of tags to assign to the stage.

ApiId string

The API identifier.

AccessLogSettings StageAccessLogSettings

Settings for logging access in this stage. Use the aws.apigateway.Account resource to configure permissions for CloudWatch Logging.

AutoDeploy bool

Whether updates to an API automatically trigger a new deployment. Defaults to false.

ClientCertificateId string

The identifier of a client certificate for the stage. Use the aws.apigateway.ClientCertificate resource to configure a client certificate. Supported only for WebSocket APIs.

DefaultRouteSettings StageDefaultRouteSettings

The default route settings for the stage.

DeploymentId string

The deployment identifier of the stage. Use the aws.apigatewayv2.Deployment resource to configure a deployment.

Description string

The description for the stage.

Name string

The name of the stage.

RouteSettings []StageRouteSetting

Route settings for the stage.

StageVariables map[string]string

A map that defines the stage variables for the stage.

Tags map[string]string

A map of tags to assign to the stage.

apiId string

The API identifier.

accessLogSettings StageAccessLogSettings

Settings for logging access in this stage. Use the aws.apigateway.Account resource to configure permissions for CloudWatch Logging.

autoDeploy boolean

Whether updates to an API automatically trigger a new deployment. Defaults to false.

clientCertificateId string

The identifier of a client certificate for the stage. Use the aws.apigateway.ClientCertificate resource to configure a client certificate. Supported only for WebSocket APIs.

defaultRouteSettings StageDefaultRouteSettings

The default route settings for the stage.

deploymentId string

The deployment identifier of the stage. Use the aws.apigatewayv2.Deployment resource to configure a deployment.

description string

The description for the stage.

name string

The name of the stage.

routeSettings StageRouteSetting[]

Route settings for the stage.

stageVariables {[key: string]: string}

A map that defines the stage variables for the stage.

tags {[key: string]: string}

A map of tags to assign to the stage.

api_id str

The API identifier.

access_log_settings Dict[StageAccessLogSettings]

Settings for logging access in this stage. Use the aws.apigateway.Account resource to configure permissions for CloudWatch Logging.

auto_deploy bool

Whether updates to an API automatically trigger a new deployment. Defaults to false.

client_certificate_id str

The identifier of a client certificate for the stage. Use the aws.apigateway.ClientCertificate resource to configure a client certificate. Supported only for WebSocket APIs.

default_route_settings Dict[StageDefaultRouteSettings]

The default route settings for the stage.

deployment_id str

The deployment identifier of the stage. Use the aws.apigatewayv2.Deployment resource to configure a deployment.

description str

The description for the stage.

name str

The name of the stage.

route_settings List[StageRouteSetting]

Route settings for the stage.

stage_variables Dict[str, str]

A map that defines the stage variables for the stage.

tags Dict[str, str]

A map of tags to assign to the stage.

Outputs

All input properties are implicitly available as output properties. Additionally, the Stage resource produces the following output properties:

Arn string

The ARN of the stage.

ExecutionArn string

The ARN prefix to be used in an aws.lambda.Permission’s source_arn attribute or in an aws.iam.Policy to authorize access to the @connections API. See the Amazon API Gateway Developer Guide for details. Set only for WebSocket APIs.

Id string
The provider-assigned unique ID for this managed resource.
InvokeUrl string

The URL to invoke the API pointing to the stage, e.g. wss://z4675bid1j.execute-api.eu-west-2.amazonaws.com/example-stage, or https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/

Arn string

The ARN of the stage.

ExecutionArn string

The ARN prefix to be used in an aws.lambda.Permission’s source_arn attribute or in an aws.iam.Policy to authorize access to the @connections API. See the Amazon API Gateway Developer Guide for details. Set only for WebSocket APIs.

Id string
The provider-assigned unique ID for this managed resource.
InvokeUrl string

The URL to invoke the API pointing to the stage, e.g. wss://z4675bid1j.execute-api.eu-west-2.amazonaws.com/example-stage, or https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/

arn string

The ARN of the stage.

executionArn string

The ARN prefix to be used in an aws.lambda.Permission’s source_arn attribute or in an aws.iam.Policy to authorize access to the @connections API. See the Amazon API Gateway Developer Guide for details. Set only for WebSocket APIs.

id string
The provider-assigned unique ID for this managed resource.
invokeUrl string

The URL to invoke the API pointing to the stage, e.g. wss://z4675bid1j.execute-api.eu-west-2.amazonaws.com/example-stage, or https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/

arn str

The ARN of the stage.

execution_arn str

The ARN prefix to be used in an aws.lambda.Permission’s source_arn attribute or in an aws.iam.Policy to authorize access to the @connections API. See the Amazon API Gateway Developer Guide for details. Set only for WebSocket APIs.

id str
The provider-assigned unique ID for this managed resource.
invoke_url str

The URL to invoke the API pointing to the stage, e.g. wss://z4675bid1j.execute-api.eu-west-2.amazonaws.com/example-stage, or https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/

Look up an Existing Stage Resource

Get an existing Stage resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: StageState, opts?: CustomResourceOptions): Stage
static get(resource_name, id, opts=None, access_log_settings=None, api_id=None, arn=None, auto_deploy=None, client_certificate_id=None, default_route_settings=None, deployment_id=None, description=None, execution_arn=None, invoke_url=None, name=None, route_settings=None, stage_variables=None, tags=None, __props__=None);
func GetStage(ctx *Context, name string, id IDInput, state *StageState, opts ...ResourceOption) (*Stage, error)
public static Stage Get(string name, Input<string> id, StageState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AccessLogSettings StageAccessLogSettingsArgs

Settings for logging access in this stage. Use the aws.apigateway.Account resource to configure permissions for CloudWatch Logging.

ApiId string

The API identifier.

Arn string

The ARN of the stage.

AutoDeploy bool

Whether updates to an API automatically trigger a new deployment. Defaults to false.

ClientCertificateId string

The identifier of a client certificate for the stage. Use the aws.apigateway.ClientCertificate resource to configure a client certificate. Supported only for WebSocket APIs.

DefaultRouteSettings StageDefaultRouteSettingsArgs

The default route settings for the stage.

DeploymentId string

The deployment identifier of the stage. Use the aws.apigatewayv2.Deployment resource to configure a deployment.

Description string

The description for the stage.

ExecutionArn string

The ARN prefix to be used in an aws.lambda.Permission’s source_arn attribute or in an aws.iam.Policy to authorize access to the @connections API. See the Amazon API Gateway Developer Guide for details. Set only for WebSocket APIs.

InvokeUrl string

The URL to invoke the API pointing to the stage, e.g. wss://z4675bid1j.execute-api.eu-west-2.amazonaws.com/example-stage, or https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/

Name string

The name of the stage.

RouteSettings List<StageRouteSettingArgs>

Route settings for the stage.

StageVariables Dictionary<string, string>

A map that defines the stage variables for the stage.

Tags Dictionary<string, string>

A map of tags to assign to the stage.

AccessLogSettings StageAccessLogSettings

Settings for logging access in this stage. Use the aws.apigateway.Account resource to configure permissions for CloudWatch Logging.

ApiId string

The API identifier.

Arn string

The ARN of the stage.

AutoDeploy bool

Whether updates to an API automatically trigger a new deployment. Defaults to false.

ClientCertificateId string

The identifier of a client certificate for the stage. Use the aws.apigateway.ClientCertificate resource to configure a client certificate. Supported only for WebSocket APIs.

DefaultRouteSettings StageDefaultRouteSettings

The default route settings for the stage.

DeploymentId string

The deployment identifier of the stage. Use the aws.apigatewayv2.Deployment resource to configure a deployment.

Description string

The description for the stage.

ExecutionArn string

The ARN prefix to be used in an aws.lambda.Permission’s source_arn attribute or in an aws.iam.Policy to authorize access to the @connections API. See the Amazon API Gateway Developer Guide for details. Set only for WebSocket APIs.

InvokeUrl string

The URL to invoke the API pointing to the stage, e.g. wss://z4675bid1j.execute-api.eu-west-2.amazonaws.com/example-stage, or https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/

Name string

The name of the stage.

RouteSettings []StageRouteSetting

Route settings for the stage.

StageVariables map[string]string

A map that defines the stage variables for the stage.

Tags map[string]string

A map of tags to assign to the stage.

accessLogSettings StageAccessLogSettings

Settings for logging access in this stage. Use the aws.apigateway.Account resource to configure permissions for CloudWatch Logging.

apiId string

The API identifier.

arn string

The ARN of the stage.

autoDeploy boolean

Whether updates to an API automatically trigger a new deployment. Defaults to false.

clientCertificateId string

The identifier of a client certificate for the stage. Use the aws.apigateway.ClientCertificate resource to configure a client certificate. Supported only for WebSocket APIs.

defaultRouteSettings StageDefaultRouteSettings

The default route settings for the stage.

deploymentId string

The deployment identifier of the stage. Use the aws.apigatewayv2.Deployment resource to configure a deployment.

description string

The description for the stage.

executionArn string

The ARN prefix to be used in an aws.lambda.Permission’s source_arn attribute or in an aws.iam.Policy to authorize access to the @connections API. See the Amazon API Gateway Developer Guide for details. Set only for WebSocket APIs.

invokeUrl string

The URL to invoke the API pointing to the stage, e.g. wss://z4675bid1j.execute-api.eu-west-2.amazonaws.com/example-stage, or https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/

name string

The name of the stage.

routeSettings StageRouteSetting[]

Route settings for the stage.

stageVariables {[key: string]: string}

A map that defines the stage variables for the stage.

tags {[key: string]: string}

A map of tags to assign to the stage.

access_log_settings Dict[StageAccessLogSettings]

Settings for logging access in this stage. Use the aws.apigateway.Account resource to configure permissions for CloudWatch Logging.

api_id str

The API identifier.

arn str

The ARN of the stage.

auto_deploy bool

Whether updates to an API automatically trigger a new deployment. Defaults to false.

client_certificate_id str

The identifier of a client certificate for the stage. Use the aws.apigateway.ClientCertificate resource to configure a client certificate. Supported only for WebSocket APIs.

default_route_settings Dict[StageDefaultRouteSettings]

The default route settings for the stage.

deployment_id str

The deployment identifier of the stage. Use the aws.apigatewayv2.Deployment resource to configure a deployment.

description str

The description for the stage.

execution_arn str

The ARN prefix to be used in an aws.lambda.Permission’s source_arn attribute or in an aws.iam.Policy to authorize access to the @connections API. See the Amazon API Gateway Developer Guide for details. Set only for WebSocket APIs.

invoke_url str

The URL to invoke the API pointing to the stage, e.g. wss://z4675bid1j.execute-api.eu-west-2.amazonaws.com/example-stage, or https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/

name str

The name of the stage.

route_settings List[StageRouteSetting]

Route settings for the stage.

stage_variables Dict[str, str]

A map that defines the stage variables for the stage.

tags Dict[str, str]

A map of tags to assign to the stage.

Supporting Types

StageAccessLogSettings

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

DestinationArn string

The ARN of the CloudWatch Logs log group to receive access logs. Any trailing :* is trimmed from the ARN.

Format string

A single line format of the access logs of data, as specified by selected $context variables.

DestinationArn string

The ARN of the CloudWatch Logs log group to receive access logs. Any trailing :* is trimmed from the ARN.

Format string

A single line format of the access logs of data, as specified by selected $context variables.

destinationArn string

The ARN of the CloudWatch Logs log group to receive access logs. Any trailing :* is trimmed from the ARN.

format string

A single line format of the access logs of data, as specified by selected $context variables.

destination_arn str

The ARN of the CloudWatch Logs log group to receive access logs. Any trailing :* is trimmed from the ARN.

format str

A single line format of the access logs of data, as specified by selected $context variables.

StageDefaultRouteSettings

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

DataTraceEnabled bool

Whether data trace logging is enabled for the default route. Affects the log entries pushed to Amazon CloudWatch Logs. Defaults to false. Supported only for WebSocket APIs.

DetailedMetricsEnabled bool

Whether detailed metrics are enabled for the default route. Defaults to false.

LoggingLevel string

The logging level for the default route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values: ERROR, INFO, OFF. Defaults to OFF. Supported only for WebSocket APIs.

ThrottlingBurstLimit int

The throttling burst limit for the default route.

ThrottlingRateLimit double

The throttling rate limit for the default route.

DataTraceEnabled bool

Whether data trace logging is enabled for the default route. Affects the log entries pushed to Amazon CloudWatch Logs. Defaults to false. Supported only for WebSocket APIs.

DetailedMetricsEnabled bool

Whether detailed metrics are enabled for the default route. Defaults to false.

LoggingLevel string

The logging level for the default route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values: ERROR, INFO, OFF. Defaults to OFF. Supported only for WebSocket APIs.

ThrottlingBurstLimit int

The throttling burst limit for the default route.

ThrottlingRateLimit float64

The throttling rate limit for the default route.

dataTraceEnabled boolean

Whether data trace logging is enabled for the default route. Affects the log entries pushed to Amazon CloudWatch Logs. Defaults to false. Supported only for WebSocket APIs.

detailedMetricsEnabled boolean

Whether detailed metrics are enabled for the default route. Defaults to false.

loggingLevel string

The logging level for the default route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values: ERROR, INFO, OFF. Defaults to OFF. Supported only for WebSocket APIs.

throttlingBurstLimit number

The throttling burst limit for the default route.

throttlingRateLimit number

The throttling rate limit for the default route.

dataTraceEnabled bool

Whether data trace logging is enabled for the default route. Affects the log entries pushed to Amazon CloudWatch Logs. Defaults to false. Supported only for WebSocket APIs.

detailedMetricsEnabled bool

Whether detailed metrics are enabled for the default route. Defaults to false.

loggingLevel str

The logging level for the default route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values: ERROR, INFO, OFF. Defaults to OFF. Supported only for WebSocket APIs.

throttlingBurstLimit float

The throttling burst limit for the default route.

throttlingRateLimit float

The throttling rate limit for the default route.

StageRouteSetting

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

RouteKey string

Route key.

DataTraceEnabled bool

Whether data trace logging is enabled for the route. Affects the log entries pushed to Amazon CloudWatch Logs. Defaults to false. Supported only for WebSocket APIs.

DetailedMetricsEnabled bool

Whether detailed metrics are enabled for the route. Defaults to false.

LoggingLevel string

The logging level for the route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values: ERROR, INFO, OFF. Defaults to OFF. Supported only for WebSocket APIs.

ThrottlingBurstLimit int

The throttling burst limit for the route.

ThrottlingRateLimit double

The throttling rate limit for the route.

RouteKey string

Route key.

DataTraceEnabled bool

Whether data trace logging is enabled for the route. Affects the log entries pushed to Amazon CloudWatch Logs. Defaults to false. Supported only for WebSocket APIs.

DetailedMetricsEnabled bool

Whether detailed metrics are enabled for the route. Defaults to false.

LoggingLevel string

The logging level for the route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values: ERROR, INFO, OFF. Defaults to OFF. Supported only for WebSocket APIs.

ThrottlingBurstLimit int

The throttling burst limit for the route.

ThrottlingRateLimit float64

The throttling rate limit for the route.

routeKey string

Route key.

dataTraceEnabled boolean

Whether data trace logging is enabled for the route. Affects the log entries pushed to Amazon CloudWatch Logs. Defaults to false. Supported only for WebSocket APIs.

detailedMetricsEnabled boolean

Whether detailed metrics are enabled for the route. Defaults to false.

loggingLevel string

The logging level for the route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values: ERROR, INFO, OFF. Defaults to OFF. Supported only for WebSocket APIs.

throttlingBurstLimit number

The throttling burst limit for the route.

throttlingRateLimit number

The throttling rate limit for the route.

route_key str

Route key.

dataTraceEnabled bool

Whether data trace logging is enabled for the route. Affects the log entries pushed to Amazon CloudWatch Logs. Defaults to false. Supported only for WebSocket APIs.

detailedMetricsEnabled bool

Whether detailed metrics are enabled for the route. Defaults to false.

loggingLevel str

The logging level for the route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values: ERROR, INFO, OFF. Defaults to OFF. Supported only for WebSocket APIs.

throttlingBurstLimit float

The throttling burst limit for the route.

throttlingRateLimit float

The throttling rate limit for the route.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.