Skip to content

create_stage

Operation

create_stage

create_stage(request: CreateStageInput | CreateStageInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateStageInputDict]) -> CreateStageOutput

Creates a new Stage resource that references a pre-existing Deployment for the API.

Parameters:

Name Type Description Default
request CreateStageInput | CreateStageInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[CreateStageInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateStageOutput

An instance of CreateStageOutput.

create_stage async

create_stage(request: CreateStageInput | CreateStageInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateStageInputDict]) -> CreateStageOutput

Creates a new Stage resource that references a pre-existing Deployment for the API.

Parameters:

Name Type Description Default
request CreateStageInput | CreateStageInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[CreateStageInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateStageOutput

An instance of CreateStageOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

CreateStageInputDict

Bases: TypedDict

Dictionary form of CreateStageInput.

Attributes

cache_cluster_enabled instance-attribute
cache_cluster_enabled: bool | None

Whether cache clustering is enabled for the stage.

cache_cluster_size instance-attribute
cache_cluster_size: str | None

The stage's cache capacity in GB. For more information about choosing a cache size, see Enabling API caching to enhance responsiveness.

canary_settings instance-attribute
canary_settings: CanarySettings | CanarySettingsDict | None

The canary deployment settings of this stage.

deployment_id instance-attribute
deployment_id: Required[str]

The identifier of the Deployment resource for the Stage resource.

description instance-attribute
description: str | None

The description of the Stage resource.

documentation_version instance-attribute
documentation_version: str | None

The version of the associated API documentation.

rest_api_id instance-attribute
rest_api_id: Required[str]

The string identifier of the associated RestApi.

stage_name instance-attribute
stage_name: Required[str]

The name for the Stage resource. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

tags instance-attribute
tags: Mapping[str, str] | None

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with aws:. The tag value can be up to 256 characters.

tracing_enabled instance-attribute
tracing_enabled: bool | None

Specifies whether active tracing with X-ray is enabled for the Stage.

variables instance-attribute
variables: Mapping[str, str] | None

A map that defines the stage variables for the new Stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

CreateStageInput dataclass

Bases: _SerdeShape

Requests API Gateway to create a Stage resource.

Attributes

cache_cluster_enabled class-attribute instance-attribute
cache_cluster_enabled: bool = ...

Whether cache clustering is enabled for the stage.

cache_cluster_size class-attribute instance-attribute
cache_cluster_size: str | None = ...

The stage's cache capacity in GB. For more information about choosing a cache size, see Enabling API caching to enhance responsiveness.

canary_settings class-attribute instance-attribute
canary_settings: CanarySettings | None = ...

The canary deployment settings of this stage.

deployment_id class-attribute instance-attribute
deployment_id: str | None = ...

The identifier of the Deployment resource for the Stage resource.

description class-attribute instance-attribute
description: str | None = ...

The description of the Stage resource.

documentation_version class-attribute instance-attribute
documentation_version: str | None = ...

The version of the associated API documentation.

rest_api_id class-attribute instance-attribute
rest_api_id: str | None = ...

The string identifier of the associated RestApi.

stage_name class-attribute instance-attribute
stage_name: str | None = ...

The name for the Stage resource. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

tags class-attribute instance-attribute
tags: dict[str, str] | None = ...

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with aws:. The tag value can be up to 256 characters.

tracing_enabled class-attribute instance-attribute
tracing_enabled: bool = ...

Specifies whether active tracing with X-ray is enabled for the Stage.

variables class-attribute instance-attribute
variables: dict[str, str] | None = ...

A map that defines the stage variables for the new Stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

Output

CreateStageOutput dataclass

Bases: _SerdeShape

Represents a unique identifier for a version of a deployed RestApi that is callable by users.

Attributes

access_log_settings class-attribute instance-attribute
access_log_settings: AccessLogSettings | None = ...

Settings for logging access in this stage.

cache_cluster_enabled class-attribute instance-attribute
cache_cluster_enabled: bool = ...

Specifies whether a cache cluster is enabled for the stage. To activate a method-level cache, set CachingEnabled to true for a method.

cache_cluster_size class-attribute instance-attribute
cache_cluster_size: str | None = ...

The stage's cache capacity in GB. For more information about choosing a cache size, see Enabling API caching to enhance responsiveness.

cache_cluster_status class-attribute instance-attribute
cache_cluster_status: str | None = ...

The status of the cache cluster for the stage, if enabled.

canary_settings class-attribute instance-attribute
canary_settings: CanarySettings | None = ...

Settings for the canary deployment in this stage.

client_certificate_id class-attribute instance-attribute
client_certificate_id: str | None = ...

The identifier of a client certificate for an API stage.

created_date class-attribute instance-attribute
created_date: datetime | None = ...

The timestamp when the stage was created.

deployment_id class-attribute instance-attribute
deployment_id: str | None = ...

The identifier of the Deployment that the stage points to.

description class-attribute instance-attribute
description: str | None = ...

The stage's description.

documentation_version class-attribute instance-attribute
documentation_version: str | None = ...

The version of the associated API documentation.

last_updated_date class-attribute instance-attribute
last_updated_date: datetime | None = ...

The timestamp when the stage last updated.

method_settings class-attribute instance-attribute
method_settings: dict[str, MethodSetting] | None = ...

A map that defines the method settings for a Stage resource. Keys (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /\*/\* for overriding all methods in the stage.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

stage_name class-attribute instance-attribute
stage_name: str | None = ...

The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to API Gateway. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

tags class-attribute instance-attribute
tags: dict[str, str] | None = ...

The collection of tags. Each tag element is associated with a given resource.

tracing_enabled class-attribute instance-attribute
tracing_enabled: bool = ...

Specifies whether active tracing with X-ray is enabled for the Stage.

variables class-attribute instance-attribute
variables: dict[str, str] | None = ...

A map that defines the stage variables for a Stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

web_acl_arn class-attribute instance-attribute
web_acl_arn: str | None = ...

The ARN of the WebAcl associated with the Stage.