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);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:
- Api
Id string The API identifier.
- Access
Log StageSettings Access Log Settings Args Settings for logging access in this stage. Use the
aws.apigateway.Accountresource to configure permissions for CloudWatch Logging.- Auto
Deploy bool Whether updates to an API automatically trigger a new deployment. Defaults to
false.- Client
Certificate stringId The identifier of a client certificate for the stage. Use the
aws.apigateway.ClientCertificateresource to configure a client certificate. Supported only for WebSocket APIs.- Default
Route StageSettings Default Route Settings Args The default route settings for the stage.
- Deployment
Id string The deployment identifier of the stage. Use the
aws.apigatewayv2.Deploymentresource to configure a deployment.- Description string
The description for the stage.
- Name string
The name of the stage.
- Route
Settings List<StageRoute Setting Args> Route settings for the stage.
- Stage
Variables Dictionary<string, string> A map that defines the stage variables for the stage.
- Dictionary<string, string>
A map of tags to assign to the stage.
- Api
Id string The API identifier.
- Access
Log StageSettings Access Log Settings Settings for logging access in this stage. Use the
aws.apigateway.Accountresource to configure permissions for CloudWatch Logging.- Auto
Deploy bool Whether updates to an API automatically trigger a new deployment. Defaults to
false.- Client
Certificate stringId The identifier of a client certificate for the stage. Use the
aws.apigateway.ClientCertificateresource to configure a client certificate. Supported only for WebSocket APIs.- Default
Route StageSettings Default Route Settings The default route settings for the stage.
- Deployment
Id string The deployment identifier of the stage. Use the
aws.apigatewayv2.Deploymentresource to configure a deployment.- Description string
The description for the stage.
- Name string
The name of the stage.
- Route
Settings []StageRoute Setting Route settings for the stage.
- Stage
Variables map[string]string A map that defines the stage variables for the stage.
- map[string]string
A map of tags to assign to the stage.
- api
Id string The API identifier.
- access
Log StageSettings Access Log Settings Settings for logging access in this stage. Use the
aws.apigateway.Accountresource to configure permissions for CloudWatch Logging.- auto
Deploy boolean Whether updates to an API automatically trigger a new deployment. Defaults to
false.- client
Certificate stringId The identifier of a client certificate for the stage. Use the
aws.apigateway.ClientCertificateresource to configure a client certificate. Supported only for WebSocket APIs.- default
Route StageSettings Default Route Settings The default route settings for the stage.
- deployment
Id string The deployment identifier of the stage. Use the
aws.apigatewayv2.Deploymentresource to configure a deployment.- description string
The description for the stage.
- name string
The name of the stage.
- route
Settings StageRoute Setting[] Route settings for the stage.
- stage
Variables {[key: string]: string} A map that defines the stage variables for the stage.
- {[key: string]: string}
A map of tags to assign to the stage.
- api_
id str The API identifier.
- access_
log_ Dict[Stagesettings Access Log Settings] Settings for logging access in this stage. Use the
aws.apigateway.Accountresource to configure permissions for CloudWatch Logging.- auto_
deploy bool Whether updates to an API automatically trigger a new deployment. Defaults to
false.- client_
certificate_ strid The identifier of a client certificate for the stage. Use the
aws.apigateway.ClientCertificateresource to configure a client certificate. Supported only for WebSocket APIs.- default_
route_ Dict[Stagesettings Default Route Settings] The default route settings for the stage.
- deployment_
id str The deployment identifier of the stage. Use the
aws.apigatewayv2.Deploymentresource to configure a deployment.- description str
The description for the stage.
- name str
The name of the stage.
- route_
settings List[StageRoute Setting] Route settings for the stage.
- stage_
variables Dict[str, str] A map that defines the stage variables for the stage.
- 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.
- Execution
Arn string The ARN prefix to be used in an
aws.lambda.Permission’ssource_arnattribute or in anaws.iam.Policyto authorize access to the@connectionsAPI. 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.
- Invoke
Url string The URL to invoke the API pointing to the stage, e.g.
wss://z4675bid1j.execute-api.eu-west-2.amazonaws.com/example-stage, orhttps://z4675bid1j.execute-api.eu-west-2.amazonaws.com/
- Arn string
The ARN of the stage.
- Execution
Arn string The ARN prefix to be used in an
aws.lambda.Permission’ssource_arnattribute or in anaws.iam.Policyto authorize access to the@connectionsAPI. 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.
- Invoke
Url string The URL to invoke the API pointing to the stage, e.g.
wss://z4675bid1j.execute-api.eu-west-2.amazonaws.com/example-stage, orhttps://z4675bid1j.execute-api.eu-west-2.amazonaws.com/
- arn string
The ARN of the stage.
- execution
Arn string The ARN prefix to be used in an
aws.lambda.Permission’ssource_arnattribute or in anaws.iam.Policyto authorize access to the@connectionsAPI. 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.
- invoke
Url string The URL to invoke the API pointing to the stage, e.g.
wss://z4675bid1j.execute-api.eu-west-2.amazonaws.com/example-stage, orhttps://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’ssource_arnattribute or in anaws.iam.Policyto authorize access to the@connectionsAPI. 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, orhttps://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): Stagestatic 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:
- Access
Log StageSettings Access Log Settings Args Settings for logging access in this stage. Use the
aws.apigateway.Accountresource to configure permissions for CloudWatch Logging.- Api
Id string The API identifier.
- Arn string
The ARN of the stage.
- Auto
Deploy bool Whether updates to an API automatically trigger a new deployment. Defaults to
false.- Client
Certificate stringId The identifier of a client certificate for the stage. Use the
aws.apigateway.ClientCertificateresource to configure a client certificate. Supported only for WebSocket APIs.- Default
Route StageSettings Default Route Settings Args The default route settings for the stage.
- Deployment
Id string The deployment identifier of the stage. Use the
aws.apigatewayv2.Deploymentresource to configure a deployment.- Description string
The description for the stage.
- Execution
Arn string The ARN prefix to be used in an
aws.lambda.Permission’ssource_arnattribute or in anaws.iam.Policyto authorize access to the@connectionsAPI. See the Amazon API Gateway Developer Guide for details. Set only for WebSocket APIs.- Invoke
Url string The URL to invoke the API pointing to the stage, e.g.
wss://z4675bid1j.execute-api.eu-west-2.amazonaws.com/example-stage, orhttps://z4675bid1j.execute-api.eu-west-2.amazonaws.com/- Name string
The name of the stage.
- Route
Settings List<StageRoute Setting Args> Route settings for the stage.
- Stage
Variables Dictionary<string, string> A map that defines the stage variables for the stage.
- Dictionary<string, string>
A map of tags to assign to the stage.
- Access
Log StageSettings Access Log Settings Settings for logging access in this stage. Use the
aws.apigateway.Accountresource to configure permissions for CloudWatch Logging.- Api
Id string The API identifier.
- Arn string
The ARN of the stage.
- Auto
Deploy bool Whether updates to an API automatically trigger a new deployment. Defaults to
false.- Client
Certificate stringId The identifier of a client certificate for the stage. Use the
aws.apigateway.ClientCertificateresource to configure a client certificate. Supported only for WebSocket APIs.- Default
Route StageSettings Default Route Settings The default route settings for the stage.
- Deployment
Id string The deployment identifier of the stage. Use the
aws.apigatewayv2.Deploymentresource to configure a deployment.- Description string
The description for the stage.
- Execution
Arn string The ARN prefix to be used in an
aws.lambda.Permission’ssource_arnattribute or in anaws.iam.Policyto authorize access to the@connectionsAPI. See the Amazon API Gateway Developer Guide for details. Set only for WebSocket APIs.- Invoke
Url string The URL to invoke the API pointing to the stage, e.g.
wss://z4675bid1j.execute-api.eu-west-2.amazonaws.com/example-stage, orhttps://z4675bid1j.execute-api.eu-west-2.amazonaws.com/- Name string
The name of the stage.
- Route
Settings []StageRoute Setting Route settings for the stage.
- Stage
Variables map[string]string A map that defines the stage variables for the stage.
- map[string]string
A map of tags to assign to the stage.
- access
Log StageSettings Access Log Settings Settings for logging access in this stage. Use the
aws.apigateway.Accountresource to configure permissions for CloudWatch Logging.- api
Id string The API identifier.
- arn string
The ARN of the stage.
- auto
Deploy boolean Whether updates to an API automatically trigger a new deployment. Defaults to
false.- client
Certificate stringId The identifier of a client certificate for the stage. Use the
aws.apigateway.ClientCertificateresource to configure a client certificate. Supported only for WebSocket APIs.- default
Route StageSettings Default Route Settings The default route settings for the stage.
- deployment
Id string The deployment identifier of the stage. Use the
aws.apigatewayv2.Deploymentresource to configure a deployment.- description string
The description for the stage.
- execution
Arn string The ARN prefix to be used in an
aws.lambda.Permission’ssource_arnattribute or in anaws.iam.Policyto authorize access to the@connectionsAPI. See the Amazon API Gateway Developer Guide for details. Set only for WebSocket APIs.- invoke
Url string The URL to invoke the API pointing to the stage, e.g.
wss://z4675bid1j.execute-api.eu-west-2.amazonaws.com/example-stage, orhttps://z4675bid1j.execute-api.eu-west-2.amazonaws.com/- name string
The name of the stage.
- route
Settings StageRoute Setting[] Route settings for the stage.
- stage
Variables {[key: string]: string} A map that defines the stage variables for the stage.
- {[key: string]: string}
A map of tags to assign to the stage.
- access_
log_ Dict[Stagesettings Access Log Settings] Settings for logging access in this stage. Use the
aws.apigateway.Accountresource 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_ strid The identifier of a client certificate for the stage. Use the
aws.apigateway.ClientCertificateresource to configure a client certificate. Supported only for WebSocket APIs.- default_
route_ Dict[Stagesettings Default Route Settings] The default route settings for the stage.
- deployment_
id str The deployment identifier of the stage. Use the
aws.apigatewayv2.Deploymentresource 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’ssource_arnattribute or in anaws.iam.Policyto authorize access to the@connectionsAPI. 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, orhttps://z4675bid1j.execute-api.eu-west-2.amazonaws.com/- name str
The name of the stage.
- route_
settings List[StageRoute Setting] Route settings for the stage.
- stage_
variables Dict[str, str] A map that defines the stage variables for the stage.
- Dict[str, str]
A map of tags to assign to the stage.
Supporting Types
StageAccessLogSettings
- Destination
Arn 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 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 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
- Data
Trace boolEnabled 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.- Detailed
Metrics boolEnabled Whether detailed metrics are enabled for the default route. Defaults to
false.- Logging
Level string The logging level for the default route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values:
ERROR,INFO,OFF. Defaults toOFF. Supported only for WebSocket APIs.- Throttling
Burst intLimit The throttling burst limit for the default route.
- Throttling
Rate doubleLimit The throttling rate limit for the default route.
- Data
Trace boolEnabled 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.- Detailed
Metrics boolEnabled Whether detailed metrics are enabled for the default route. Defaults to
false.- Logging
Level string The logging level for the default route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values:
ERROR,INFO,OFF. Defaults toOFF. Supported only for WebSocket APIs.- Throttling
Burst intLimit The throttling burst limit for the default route.
- Throttling
Rate float64Limit The throttling rate limit for the default route.
- data
Trace booleanEnabled 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.- detailed
Metrics booleanEnabled Whether detailed metrics are enabled for the default route. Defaults to
false.- logging
Level string The logging level for the default route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values:
ERROR,INFO,OFF. Defaults toOFF. Supported only for WebSocket APIs.- throttling
Burst numberLimit The throttling burst limit for the default route.
- throttling
Rate numberLimit The throttling rate limit for the default route.
- data
Trace boolEnabled 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.- detailed
Metrics boolEnabled Whether detailed metrics are enabled for the default route. Defaults to
false.- logging
Level str The logging level for the default route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values:
ERROR,INFO,OFF. Defaults toOFF. Supported only for WebSocket APIs.- throttling
Burst floatLimit The throttling burst limit for the default route.
- throttling
Rate floatLimit The throttling rate limit for the default route.
StageRouteSetting
- Route
Key string Route key.
- Data
Trace boolEnabled 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.- Detailed
Metrics boolEnabled Whether detailed metrics are enabled for the route. Defaults to
false.- Logging
Level string The logging level for the route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values:
ERROR,INFO,OFF. Defaults toOFF. Supported only for WebSocket APIs.- Throttling
Burst intLimit The throttling burst limit for the route.
- Throttling
Rate doubleLimit The throttling rate limit for the route.
- Route
Key string Route key.
- Data
Trace boolEnabled 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.- Detailed
Metrics boolEnabled Whether detailed metrics are enabled for the route. Defaults to
false.- Logging
Level string The logging level for the route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values:
ERROR,INFO,OFF. Defaults toOFF. Supported only for WebSocket APIs.- Throttling
Burst intLimit The throttling burst limit for the route.
- Throttling
Rate float64Limit The throttling rate limit for the route.
- route
Key string Route key.
- data
Trace booleanEnabled 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.- detailed
Metrics booleanEnabled Whether detailed metrics are enabled for the route. Defaults to
false.- logging
Level string The logging level for the route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values:
ERROR,INFO,OFF. Defaults toOFF. Supported only for WebSocket APIs.- throttling
Burst numberLimit The throttling burst limit for the route.
- throttling
Rate numberLimit The throttling rate limit for the route.
- route_
key str Route key.
- data
Trace boolEnabled 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.- detailed
Metrics boolEnabled Whether detailed metrics are enabled for the route. Defaults to
false.- logging
Level str The logging level for the route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values:
ERROR,INFO,OFF. Defaults toOFF. Supported only for WebSocket APIs.- throttling
Burst floatLimit The throttling burst limit for the route.
- throttling
Rate floatLimit 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
awsTerraform Provider.