aws.apigateway.Stage
Explore with Pulumi AI
Manages an API Gateway Stage. A stage is a named reference to a deployment, which can be done via the aws.apigateway.Deployment resource. Stages can be optionally managed further with the aws.apigateway.BasePathMapping resource, aws.apigateway.DomainName resource, and aws_api_method_settings resource. For more information, see the API Gateway Developer Guide.
Managing the API Logging CloudWatch Log Group
API Gateway provides the ability to enable CloudWatch API logging. To manage the CloudWatch Log Group when this feature is enabled, the aws.cloudwatch.LogGroup resource can be used where the name matches the API Gateway naming convention. If the CloudWatch Log Group previously exists, import the aws.cloudwatch.LogGroup resource into Pulumi as a one time operation. You can recreate the environment without import.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const stageName = config.get("stageName") || "example";
const example = new aws.apigateway.RestApi("example", {});
const exampleLogGroup = new aws.cloudwatch.LogGroup("example", {
    name: pulumi.interpolate`API-Gateway-Execution-Logs_${example.id}/${stageName}`,
    retentionInDays: 7,
});
const exampleStage = new aws.apigateway.Stage("example", {stageName: stageName}, {
    dependsOn: [exampleLogGroup],
});
import pulumi
import pulumi_aws as aws
config = pulumi.Config()
stage_name = config.get("stageName")
if stage_name is None:
    stage_name = "example"
example = aws.apigateway.RestApi("example")
example_log_group = aws.cloudwatch.LogGroup("example",
    name=example.id.apply(lambda id: f"API-Gateway-Execution-Logs_{id}/{stage_name}"),
    retention_in_days=7)
example_stage = aws.apigateway.Stage("example", stage_name=stage_name,
opts = pulumi.ResourceOptions(depends_on=[example_log_group]))
package main
import (
	"fmt"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		stageName := "example"
		if param := cfg.Get("stageName"); param != "" {
			stageName = param
		}
		example, err := apigateway.NewRestApi(ctx, "example", nil)
		if err != nil {
			return err
		}
		exampleLogGroup, err := cloudwatch.NewLogGroup(ctx, "example", &cloudwatch.LogGroupArgs{
			Name: example.ID().ApplyT(func(id string) (string, error) {
				return fmt.Sprintf("API-Gateway-Execution-Logs_%v/%v", id, stageName), nil
			}).(pulumi.StringOutput),
			RetentionInDays: pulumi.Int(7),
		})
		if err != nil {
			return err
		}
		_, err = apigateway.NewStage(ctx, "example", &apigateway.StageArgs{
			StageName: pulumi.String(stageName),
		}, pulumi.DependsOn([]pulumi.Resource{
			exampleLogGroup,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var stageName = config.Get("stageName") ?? "example";
    var example = new Aws.ApiGateway.RestApi("example");
    var exampleLogGroup = new Aws.CloudWatch.LogGroup("example", new()
    {
        Name = example.Id.Apply(id => $"API-Gateway-Execution-Logs_{id}/{stageName}"),
        RetentionInDays = 7,
    });
    var exampleStage = new Aws.ApiGateway.Stage("example", new()
    {
        StageName = stageName,
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            exampleLogGroup,
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.apigateway.RestApi;
import com.pulumi.aws.cloudwatch.LogGroup;
import com.pulumi.aws.cloudwatch.LogGroupArgs;
import com.pulumi.aws.apigateway.Stage;
import com.pulumi.aws.apigateway.StageArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var stageName = config.get("stageName").orElse("example");
        var example = new RestApi("example");
        var exampleLogGroup = new LogGroup("exampleLogGroup", LogGroupArgs.builder()
            .name(example.id().applyValue(id -> String.format("API-Gateway-Execution-Logs_%s/%s", id,stageName)))
            .retentionInDays(7)
            .build());
        var exampleStage = new Stage("exampleStage", StageArgs.builder()
            .stageName(stageName)
            .build(), CustomResourceOptions.builder()
                .dependsOn(exampleLogGroup)
                .build());
    }
}
configuration:
  stageName:
    type: string
    default: example
resources:
  example:
    type: aws:apigateway:RestApi
  exampleStage:
    type: aws:apigateway:Stage
    name: example
    properties:
      stageName: ${stageName}
    options:
      dependsOn:
        - ${exampleLogGroup}
  exampleLogGroup:
    type: aws:cloudwatch:LogGroup
    name: example
    properties:
      name: API-Gateway-Execution-Logs_${example.id}/${stageName}
      retentionInDays: 7 # ... potentially other configuration ...
Create Stage Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Stage(name: string, args: StageArgs, opts?: CustomResourceOptions);@overload
def Stage(resource_name: str,
          args: StageArgs,
          opts: Optional[ResourceOptions] = None)
@overload
def Stage(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          deployment: Optional[str] = None,
          stage_name: Optional[str] = None,
          rest_api: Optional[str] = None,
          canary_settings: Optional[StageCanarySettingsArgs] = None,
          client_certificate_id: Optional[str] = None,
          access_log_settings: Optional[StageAccessLogSettingsArgs] = None,
          description: Optional[str] = None,
          documentation_version: Optional[str] = None,
          cache_cluster_size: Optional[str] = None,
          cache_cluster_enabled: Optional[bool] = None,
          tags: Optional[Mapping[str, str]] = None,
          variables: Optional[Mapping[str, str]] = None,
          xray_tracing_enabled: Optional[bool] = None)func NewStage(ctx *Context, name string, args StageArgs, opts ...ResourceOption) (*Stage, error)public Stage(string name, StageArgs args, CustomResourceOptions? opts = null)type: aws:apigateway:Stage
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
- args StageArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control 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.
- name String
- The unique name of the resource.
- args StageArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var stageResource = new Aws.ApiGateway.Stage("stageResource", new()
{
    Deployment = "string",
    StageName = "string",
    RestApi = "string",
    CanarySettings = new Aws.ApiGateway.Inputs.StageCanarySettingsArgs
    {
        DeploymentId = "string",
        PercentTraffic = 0,
        StageVariableOverrides = 
        {
            { "string", "string" },
        },
        UseStageCache = false,
    },
    ClientCertificateId = "string",
    AccessLogSettings = new Aws.ApiGateway.Inputs.StageAccessLogSettingsArgs
    {
        DestinationArn = "string",
        Format = "string",
    },
    Description = "string",
    DocumentationVersion = "string",
    CacheClusterSize = "string",
    CacheClusterEnabled = false,
    Tags = 
    {
        { "string", "string" },
    },
    Variables = 
    {
        { "string", "string" },
    },
    XrayTracingEnabled = false,
});
example, err := apigateway.NewStage(ctx, "stageResource", &apigateway.StageArgs{
	Deployment: pulumi.Any("string"),
	StageName:  pulumi.String("string"),
	RestApi:    pulumi.Any("string"),
	CanarySettings: &apigateway.StageCanarySettingsArgs{
		DeploymentId:   pulumi.String("string"),
		PercentTraffic: pulumi.Float64(0),
		StageVariableOverrides: pulumi.StringMap{
			"string": pulumi.String("string"),
		},
		UseStageCache: pulumi.Bool(false),
	},
	ClientCertificateId: pulumi.String("string"),
	AccessLogSettings: &apigateway.StageAccessLogSettingsArgs{
		DestinationArn: pulumi.String("string"),
		Format:         pulumi.String("string"),
	},
	Description:          pulumi.String("string"),
	DocumentationVersion: pulumi.String("string"),
	CacheClusterSize:     pulumi.String("string"),
	CacheClusterEnabled:  pulumi.Bool(false),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Variables: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	XrayTracingEnabled: pulumi.Bool(false),
})
var stageResource = new Stage("stageResource", StageArgs.builder()
    .deployment("string")
    .stageName("string")
    .restApi("string")
    .canarySettings(StageCanarySettingsArgs.builder()
        .deploymentId("string")
        .percentTraffic(0)
        .stageVariableOverrides(Map.of("string", "string"))
        .useStageCache(false)
        .build())
    .clientCertificateId("string")
    .accessLogSettings(StageAccessLogSettingsArgs.builder()
        .destinationArn("string")
        .format("string")
        .build())
    .description("string")
    .documentationVersion("string")
    .cacheClusterSize("string")
    .cacheClusterEnabled(false)
    .tags(Map.of("string", "string"))
    .variables(Map.of("string", "string"))
    .xrayTracingEnabled(false)
    .build());
stage_resource = aws.apigateway.Stage("stageResource",
    deployment="string",
    stage_name="string",
    rest_api="string",
    canary_settings={
        "deployment_id": "string",
        "percent_traffic": 0,
        "stage_variable_overrides": {
            "string": "string",
        },
        "use_stage_cache": False,
    },
    client_certificate_id="string",
    access_log_settings={
        "destination_arn": "string",
        "format": "string",
    },
    description="string",
    documentation_version="string",
    cache_cluster_size="string",
    cache_cluster_enabled=False,
    tags={
        "string": "string",
    },
    variables={
        "string": "string",
    },
    xray_tracing_enabled=False)
const stageResource = new aws.apigateway.Stage("stageResource", {
    deployment: "string",
    stageName: "string",
    restApi: "string",
    canarySettings: {
        deploymentId: "string",
        percentTraffic: 0,
        stageVariableOverrides: {
            string: "string",
        },
        useStageCache: false,
    },
    clientCertificateId: "string",
    accessLogSettings: {
        destinationArn: "string",
        format: "string",
    },
    description: "string",
    documentationVersion: "string",
    cacheClusterSize: "string",
    cacheClusterEnabled: false,
    tags: {
        string: "string",
    },
    variables: {
        string: "string",
    },
    xrayTracingEnabled: false,
});
type: aws:apigateway:Stage
properties:
    accessLogSettings:
        destinationArn: string
        format: string
    cacheClusterEnabled: false
    cacheClusterSize: string
    canarySettings:
        deploymentId: string
        percentTraffic: 0
        stageVariableOverrides:
            string: string
        useStageCache: false
    clientCertificateId: string
    deployment: string
    description: string
    documentationVersion: string
    restApi: string
    stageName: string
    tags:
        string: string
    variables:
        string: string
    xrayTracingEnabled: false
Stage Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Stage resource accepts the following input properties:
- Deployment string | string
- ID of the deployment that the stage points to
- RestApi string | string
- ID of the associated REST API
- StageName string
- Name of the stage
- AccessLog StageSettings Access Log Settings 
- Enables access logs for the API stage. See Access Log Settings below.
- CacheCluster boolEnabled 
- Whether a cache cluster is enabled for the stage
- CacheCluster stringSize 
- Size of the cache cluster for the stage, if enabled. Allowed values include 0.5,1.6,6.1,13.5,28.4,58.2,118and237.
- CanarySettings StageCanary Settings 
- Configuration settings of a canary deployment. See Canary Settings below.
- ClientCertificate stringId 
- Identifier of a client certificate for the stage.
- Description string
- Description of the stage.
- DocumentationVersion string
- Version of the associated API documentation
- Dictionary<string, string>
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Variables Dictionary<string, string>
- Map that defines the stage variables
- XrayTracing boolEnabled 
- Whether active tracing with X-ray is enabled. Defaults to false.
- Deployment string | string
- ID of the deployment that the stage points to
- RestApi string | string
- ID of the associated REST API
- StageName string
- Name of the stage
- AccessLog StageSettings Access Log Settings Args 
- Enables access logs for the API stage. See Access Log Settings below.
- CacheCluster boolEnabled 
- Whether a cache cluster is enabled for the stage
- CacheCluster stringSize 
- Size of the cache cluster for the stage, if enabled. Allowed values include 0.5,1.6,6.1,13.5,28.4,58.2,118and237.
- CanarySettings StageCanary Settings Args 
- Configuration settings of a canary deployment. See Canary Settings below.
- ClientCertificate stringId 
- Identifier of a client certificate for the stage.
- Description string
- Description of the stage.
- DocumentationVersion string
- Version of the associated API documentation
- map[string]string
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Variables map[string]string
- Map that defines the stage variables
- XrayTracing boolEnabled 
- Whether active tracing with X-ray is enabled. Defaults to false.
- deployment String | String
- ID of the deployment that the stage points to
- restApi String | String
- ID of the associated REST API
- stageName String
- Name of the stage
- accessLog StageSettings Access Log Settings 
- Enables access logs for the API stage. See Access Log Settings below.
- cacheCluster BooleanEnabled 
- Whether a cache cluster is enabled for the stage
- cacheCluster StringSize 
- Size of the cache cluster for the stage, if enabled. Allowed values include 0.5,1.6,6.1,13.5,28.4,58.2,118and237.
- canarySettings StageCanary Settings 
- Configuration settings of a canary deployment. See Canary Settings below.
- clientCertificate StringId 
- Identifier of a client certificate for the stage.
- description String
- Description of the stage.
- documentationVersion String
- Version of the associated API documentation
- Map<String,String>
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- variables Map<String,String>
- Map that defines the stage variables
- xrayTracing BooleanEnabled 
- Whether active tracing with X-ray is enabled. Defaults to false.
- deployment string | Deployment
- ID of the deployment that the stage points to
- restApi string | RestApi 
- ID of the associated REST API
- stageName string
- Name of the stage
- accessLog StageSettings Access Log Settings 
- Enables access logs for the API stage. See Access Log Settings below.
- cacheCluster booleanEnabled 
- Whether a cache cluster is enabled for the stage
- cacheCluster stringSize 
- Size of the cache cluster for the stage, if enabled. Allowed values include 0.5,1.6,6.1,13.5,28.4,58.2,118and237.
- canarySettings StageCanary Settings 
- Configuration settings of a canary deployment. See Canary Settings below.
- clientCertificate stringId 
- Identifier of a client certificate for the stage.
- description string
- Description of the stage.
- documentationVersion string
- Version of the associated API documentation
- {[key: string]: string}
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- variables {[key: string]: string}
- Map that defines the stage variables
- xrayTracing booleanEnabled 
- Whether active tracing with X-ray is enabled. Defaults to false.
- deployment str | str
- ID of the deployment that the stage points to
- rest_api str | str
- ID of the associated REST API
- stage_name str
- Name of the stage
- access_log_ Stagesettings Access Log Settings Args 
- Enables access logs for the API stage. See Access Log Settings below.
- cache_cluster_ boolenabled 
- Whether a cache cluster is enabled for the stage
- cache_cluster_ strsize 
- Size of the cache cluster for the stage, if enabled. Allowed values include 0.5,1.6,6.1,13.5,28.4,58.2,118and237.
- canary_settings StageCanary Settings Args 
- Configuration settings of a canary deployment. See Canary Settings below.
- client_certificate_ strid 
- Identifier of a client certificate for the stage.
- description str
- Description of the stage.
- documentation_version str
- Version of the associated API documentation
- Mapping[str, str]
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- variables Mapping[str, str]
- Map that defines the stage variables
- xray_tracing_ boolenabled 
- Whether active tracing with X-ray is enabled. Defaults to false.
- deployment String |
- ID of the deployment that the stage points to
- restApi String |
- ID of the associated REST API
- stageName String
- Name of the stage
- accessLog Property MapSettings 
- Enables access logs for the API stage. See Access Log Settings below.
- cacheCluster BooleanEnabled 
- Whether a cache cluster is enabled for the stage
- cacheCluster StringSize 
- Size of the cache cluster for the stage, if enabled. Allowed values include 0.5,1.6,6.1,13.5,28.4,58.2,118and237.
- canarySettings Property Map
- Configuration settings of a canary deployment. See Canary Settings below.
- clientCertificate StringId 
- Identifier of a client certificate for the stage.
- description String
- Description of the stage.
- documentationVersion String
- Version of the associated API documentation
- Map<String>
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- variables Map<String>
- Map that defines the stage variables
- xrayTracing BooleanEnabled 
- Whether active tracing with X-ray is enabled. Defaults to false.
Outputs
All input properties are implicitly available as output properties. Additionally, the Stage resource produces the following output properties:
- Arn string
- ARN
- ExecutionArn string
- Execution ARN to be used in lambda_permission'ssource_arnwhen allowing API Gateway to invoke a Lambda function, e.g.,arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod
- Id string
- The provider-assigned unique ID for this managed resource.
- InvokeUrl string
- URL to invoke the API pointing to the stage,
e.g., https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod
- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- WebAcl stringArn 
- ARN of the WebAcl associated with the Stage.
- Arn string
- ARN
- ExecutionArn string
- Execution ARN to be used in lambda_permission'ssource_arnwhen allowing API Gateway to invoke a Lambda function, e.g.,arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod
- Id string
- The provider-assigned unique ID for this managed resource.
- InvokeUrl string
- URL to invoke the API pointing to the stage,
e.g., https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod
- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- WebAcl stringArn 
- ARN of the WebAcl associated with the Stage.
- arn String
- ARN
- executionArn String
- Execution ARN to be used in lambda_permission'ssource_arnwhen allowing API Gateway to invoke a Lambda function, e.g.,arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod
- id String
- The provider-assigned unique ID for this managed resource.
- invokeUrl String
- URL to invoke the API pointing to the stage,
e.g., https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod
- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- webAcl StringArn 
- ARN of the WebAcl associated with the Stage.
- arn string
- ARN
- executionArn string
- Execution ARN to be used in lambda_permission'ssource_arnwhen allowing API Gateway to invoke a Lambda function, e.g.,arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod
- id string
- The provider-assigned unique ID for this managed resource.
- invokeUrl string
- URL to invoke the API pointing to the stage,
e.g., https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod
- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- webAcl stringArn 
- ARN of the WebAcl associated with the Stage.
- arn str
- ARN
- execution_arn str
- Execution ARN to be used in lambda_permission'ssource_arnwhen allowing API Gateway to invoke a Lambda function, e.g.,arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod
- id str
- The provider-assigned unique ID for this managed resource.
- invoke_url str
- URL to invoke the API pointing to the stage,
e.g., https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod
- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- web_acl_ strarn 
- ARN of the WebAcl associated with the Stage.
- arn String
- ARN
- executionArn String
- Execution ARN to be used in lambda_permission'ssource_arnwhen allowing API Gateway to invoke a Lambda function, e.g.,arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod
- id String
- The provider-assigned unique ID for this managed resource.
- invokeUrl String
- URL to invoke the API pointing to the stage,
e.g., https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod
- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- webAcl StringArn 
- ARN of the WebAcl associated with the Stage.
Look up 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@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_log_settings: Optional[StageAccessLogSettingsArgs] = None,
        arn: Optional[str] = None,
        cache_cluster_enabled: Optional[bool] = None,
        cache_cluster_size: Optional[str] = None,
        canary_settings: Optional[StageCanarySettingsArgs] = None,
        client_certificate_id: Optional[str] = None,
        deployment: Optional[str] = None,
        description: Optional[str] = None,
        documentation_version: Optional[str] = None,
        execution_arn: Optional[str] = None,
        invoke_url: Optional[str] = None,
        rest_api: Optional[str] = None,
        stage_name: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        variables: Optional[Mapping[str, str]] = None,
        web_acl_arn: Optional[str] = None,
        xray_tracing_enabled: Optional[bool] = None) -> Stagefunc 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)public static Stage get(String name, Output<String> id, StageState state, CustomResourceOptions options)resources:  _:    type: aws:apigateway:Stage    get:      id: ${id}- 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.
- 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.
- AccessLog StageSettings Access Log Settings 
- Enables access logs for the API stage. See Access Log Settings below.
- Arn string
- ARN
- CacheCluster boolEnabled 
- Whether a cache cluster is enabled for the stage
- CacheCluster stringSize 
- Size of the cache cluster for the stage, if enabled. Allowed values include 0.5,1.6,6.1,13.5,28.4,58.2,118and237.
- CanarySettings StageCanary Settings 
- Configuration settings of a canary deployment. See Canary Settings below.
- ClientCertificate stringId 
- Identifier of a client certificate for the stage.
- Deployment string | string
- ID of the deployment that the stage points to
- Description string
- Description of the stage.
- DocumentationVersion string
- Version of the associated API documentation
- ExecutionArn string
- Execution ARN to be used in lambda_permission'ssource_arnwhen allowing API Gateway to invoke a Lambda function, e.g.,arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod
- InvokeUrl string
- URL to invoke the API pointing to the stage,
e.g., https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod
- RestApi string | string
- ID of the associated REST API
- StageName string
- Name of the stage
- Dictionary<string, string>
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- Variables Dictionary<string, string>
- Map that defines the stage variables
- WebAcl stringArn 
- ARN of the WebAcl associated with the Stage.
- XrayTracing boolEnabled 
- Whether active tracing with X-ray is enabled. Defaults to false.
- AccessLog StageSettings Access Log Settings Args 
- Enables access logs for the API stage. See Access Log Settings below.
- Arn string
- ARN
- CacheCluster boolEnabled 
- Whether a cache cluster is enabled for the stage
- CacheCluster stringSize 
- Size of the cache cluster for the stage, if enabled. Allowed values include 0.5,1.6,6.1,13.5,28.4,58.2,118and237.
- CanarySettings StageCanary Settings Args 
- Configuration settings of a canary deployment. See Canary Settings below.
- ClientCertificate stringId 
- Identifier of a client certificate for the stage.
- Deployment string | string
- ID of the deployment that the stage points to
- Description string
- Description of the stage.
- DocumentationVersion string
- Version of the associated API documentation
- ExecutionArn string
- Execution ARN to be used in lambda_permission'ssource_arnwhen allowing API Gateway to invoke a Lambda function, e.g.,arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod
- InvokeUrl string
- URL to invoke the API pointing to the stage,
e.g., https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod
- RestApi string | string
- ID of the associated REST API
- StageName string
- Name of the stage
- map[string]string
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- Variables map[string]string
- Map that defines the stage variables
- WebAcl stringArn 
- ARN of the WebAcl associated with the Stage.
- XrayTracing boolEnabled 
- Whether active tracing with X-ray is enabled. Defaults to false.
- accessLog StageSettings Access Log Settings 
- Enables access logs for the API stage. See Access Log Settings below.
- arn String
- ARN
- cacheCluster BooleanEnabled 
- Whether a cache cluster is enabled for the stage
- cacheCluster StringSize 
- Size of the cache cluster for the stage, if enabled. Allowed values include 0.5,1.6,6.1,13.5,28.4,58.2,118and237.
- canarySettings StageCanary Settings 
- Configuration settings of a canary deployment. See Canary Settings below.
- clientCertificate StringId 
- Identifier of a client certificate for the stage.
- deployment String | String
- ID of the deployment that the stage points to
- description String
- Description of the stage.
- documentationVersion String
- Version of the associated API documentation
- executionArn String
- Execution ARN to be used in lambda_permission'ssource_arnwhen allowing API Gateway to invoke a Lambda function, e.g.,arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod
- invokeUrl String
- URL to invoke the API pointing to the stage,
e.g., https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod
- restApi String | String
- ID of the associated REST API
- stageName String
- Name of the stage
- Map<String,String>
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- variables Map<String,String>
- Map that defines the stage variables
- webAcl StringArn 
- ARN of the WebAcl associated with the Stage.
- xrayTracing BooleanEnabled 
- Whether active tracing with X-ray is enabled. Defaults to false.
- accessLog StageSettings Access Log Settings 
- Enables access logs for the API stage. See Access Log Settings below.
- arn string
- ARN
- cacheCluster booleanEnabled 
- Whether a cache cluster is enabled for the stage
- cacheCluster stringSize 
- Size of the cache cluster for the stage, if enabled. Allowed values include 0.5,1.6,6.1,13.5,28.4,58.2,118and237.
- canarySettings StageCanary Settings 
- Configuration settings of a canary deployment. See Canary Settings below.
- clientCertificate stringId 
- Identifier of a client certificate for the stage.
- deployment string | Deployment
- ID of the deployment that the stage points to
- description string
- Description of the stage.
- documentationVersion string
- Version of the associated API documentation
- executionArn string
- Execution ARN to be used in lambda_permission'ssource_arnwhen allowing API Gateway to invoke a Lambda function, e.g.,arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod
- invokeUrl string
- URL to invoke the API pointing to the stage,
e.g., https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod
- restApi string | RestApi 
- ID of the associated REST API
- stageName string
- Name of the stage
- {[key: string]: string}
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- variables {[key: string]: string}
- Map that defines the stage variables
- webAcl stringArn 
- ARN of the WebAcl associated with the Stage.
- xrayTracing booleanEnabled 
- Whether active tracing with X-ray is enabled. Defaults to false.
- access_log_ Stagesettings Access Log Settings Args 
- Enables access logs for the API stage. See Access Log Settings below.
- arn str
- ARN
- cache_cluster_ boolenabled 
- Whether a cache cluster is enabled for the stage
- cache_cluster_ strsize 
- Size of the cache cluster for the stage, if enabled. Allowed values include 0.5,1.6,6.1,13.5,28.4,58.2,118and237.
- canary_settings StageCanary Settings Args 
- Configuration settings of a canary deployment. See Canary Settings below.
- client_certificate_ strid 
- Identifier of a client certificate for the stage.
- deployment str | str
- ID of the deployment that the stage points to
- description str
- Description of the stage.
- documentation_version str
- Version of the associated API documentation
- execution_arn str
- Execution ARN to be used in lambda_permission'ssource_arnwhen allowing API Gateway to invoke a Lambda function, e.g.,arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod
- invoke_url str
- URL to invoke the API pointing to the stage,
e.g., https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod
- rest_api str | str
- ID of the associated REST API
- stage_name str
- Name of the stage
- Mapping[str, str]
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- variables Mapping[str, str]
- Map that defines the stage variables
- web_acl_ strarn 
- ARN of the WebAcl associated with the Stage.
- xray_tracing_ boolenabled 
- Whether active tracing with X-ray is enabled. Defaults to false.
- accessLog Property MapSettings 
- Enables access logs for the API stage. See Access Log Settings below.
- arn String
- ARN
- cacheCluster BooleanEnabled 
- Whether a cache cluster is enabled for the stage
- cacheCluster StringSize 
- Size of the cache cluster for the stage, if enabled. Allowed values include 0.5,1.6,6.1,13.5,28.4,58.2,118and237.
- canarySettings Property Map
- Configuration settings of a canary deployment. See Canary Settings below.
- clientCertificate StringId 
- Identifier of a client certificate for the stage.
- deployment String |
- ID of the deployment that the stage points to
- description String
- Description of the stage.
- documentationVersion String
- Version of the associated API documentation
- executionArn String
- Execution ARN to be used in lambda_permission'ssource_arnwhen allowing API Gateway to invoke a Lambda function, e.g.,arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod
- invokeUrl String
- URL to invoke the API pointing to the stage,
e.g., https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod
- restApi String |
- ID of the associated REST API
- stageName String
- Name of the stage
- Map<String>
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- variables Map<String>
- Map that defines the stage variables
- webAcl StringArn 
- ARN of the WebAcl associated with the Stage.
- xrayTracing BooleanEnabled 
- Whether active tracing with X-ray is enabled. Defaults to false.
Supporting Types
StageAccessLogSettings, StageAccessLogSettingsArgs        
- DestinationArn string
- ARN of the CloudWatch Logs log group or Kinesis Data Firehose delivery stream to receive access logs. If you specify a Kinesis Data Firehose delivery stream, the stream name must begin with amazon-apigateway-. Automatically removes trailing:*if present.
- Format string
- Formatting and values recorded in the logs. For more information on configuring the log format rules visit the AWS documentation
- DestinationArn string
- ARN of the CloudWatch Logs log group or Kinesis Data Firehose delivery stream to receive access logs. If you specify a Kinesis Data Firehose delivery stream, the stream name must begin with amazon-apigateway-. Automatically removes trailing:*if present.
- Format string
- Formatting and values recorded in the logs. For more information on configuring the log format rules visit the AWS documentation
- destinationArn String
- ARN of the CloudWatch Logs log group or Kinesis Data Firehose delivery stream to receive access logs. If you specify a Kinesis Data Firehose delivery stream, the stream name must begin with amazon-apigateway-. Automatically removes trailing:*if present.
- format String
- Formatting and values recorded in the logs. For more information on configuring the log format rules visit the AWS documentation
- destinationArn string
- ARN of the CloudWatch Logs log group or Kinesis Data Firehose delivery stream to receive access logs. If you specify a Kinesis Data Firehose delivery stream, the stream name must begin with amazon-apigateway-. Automatically removes trailing:*if present.
- format string
- Formatting and values recorded in the logs. For more information on configuring the log format rules visit the AWS documentation
- destination_arn str
- ARN of the CloudWatch Logs log group or Kinesis Data Firehose delivery stream to receive access logs. If you specify a Kinesis Data Firehose delivery stream, the stream name must begin with amazon-apigateway-. Automatically removes trailing:*if present.
- format str
- Formatting and values recorded in the logs. For more information on configuring the log format rules visit the AWS documentation
- destinationArn String
- ARN of the CloudWatch Logs log group or Kinesis Data Firehose delivery stream to receive access logs. If you specify a Kinesis Data Firehose delivery stream, the stream name must begin with amazon-apigateway-. Automatically removes trailing:*if present.
- format String
- Formatting and values recorded in the logs. For more information on configuring the log format rules visit the AWS documentation
StageCanarySettings, StageCanarySettingsArgs      
- DeploymentId string
- ID of the deployment that the canary points to.
- PercentTraffic double
- Percent 0.0-100.0of traffic to divert to the canary deployment.
- StageVariable Dictionary<string, string>Overrides 
- Map of overridden stage variables(including new variables) for the canary deployment.
- UseStage boolCache 
- Whether the canary deployment uses the stage cache. Defaults to false.
- DeploymentId string
- ID of the deployment that the canary points to.
- PercentTraffic float64
- Percent 0.0-100.0of traffic to divert to the canary deployment.
- StageVariable map[string]stringOverrides 
- Map of overridden stage variables(including new variables) for the canary deployment.
- UseStage boolCache 
- Whether the canary deployment uses the stage cache. Defaults to false.
- deploymentId String
- ID of the deployment that the canary points to.
- percentTraffic Double
- Percent 0.0-100.0of traffic to divert to the canary deployment.
- stageVariable Map<String,String>Overrides 
- Map of overridden stage variables(including new variables) for the canary deployment.
- useStage BooleanCache 
- Whether the canary deployment uses the stage cache. Defaults to false.
- deploymentId string
- ID of the deployment that the canary points to.
- percentTraffic number
- Percent 0.0-100.0of traffic to divert to the canary deployment.
- stageVariable {[key: string]: string}Overrides 
- Map of overridden stage variables(including new variables) for the canary deployment.
- useStage booleanCache 
- Whether the canary deployment uses the stage cache. Defaults to false.
- deployment_id str
- ID of the deployment that the canary points to.
- percent_traffic float
- Percent 0.0-100.0of traffic to divert to the canary deployment.
- stage_variable_ Mapping[str, str]overrides 
- Map of overridden stage variables(including new variables) for the canary deployment.
- use_stage_ boolcache 
- Whether the canary deployment uses the stage cache. Defaults to false.
- deploymentId String
- ID of the deployment that the canary points to.
- percentTraffic Number
- Percent 0.0-100.0of traffic to divert to the canary deployment.
- stageVariable Map<String>Overrides 
- Map of overridden stage variables(including new variables) for the canary deployment.
- useStage BooleanCache 
- Whether the canary deployment uses the stage cache. Defaults to false.
Import
Using pulumi import, import aws_api_gateway_stage using REST-API-ID/STAGE-NAME. For example:
$ pulumi import aws:apigateway/stage:Stage example 12345abcde/example
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.