Skip to content

Api Gateway  >  Operations  >  create_deployment

create_deployment

Operation

create_deployment async

create_deployment(input: CreateDeploymentInput, plugins: list[Plugin] | None = None) -> CreateDeploymentOutput

Creates a Deployment resource, which makes a specified RestApi callable over the internet.

Parameters:

Name Type Description Default
input CreateDeploymentInput

An instance of CreateDeploymentInput.

required
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

Returns:

Type Description
CreateDeploymentOutput

An instance of CreateDeploymentOutput.

Input

CreateDeploymentInput dataclass

Requests API Gateway to create a Deployment resource.

Attributes

cache_cluster_enabled class-attribute instance-attribute
cache_cluster_enabled: bool | None = None

Enables a cache cluster for the Stage resource specified in the input.

cache_cluster_size class-attribute instance-attribute
cache_cluster_size: CacheClusterSize | None = 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: DeploymentCanarySettings | None = None

The input configuration for the canary deployment when the deployment is a canary release deployment.

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

The description for the Deployment resource to create.

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

The string identifier of the associated RestApi.

stage_description class-attribute instance-attribute
stage_description: str | None = None

The description of the Stage resource for the Deployment resource to create.

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

The name of the Stage resource for the Deployment resource to create.

tracing_enabled class-attribute instance-attribute
tracing_enabled: bool | None = None

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

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

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

Output

CreateDeploymentOutput dataclass

An immutable representation of a RestApi resource that can be called by users using Stages. A deployment must be associated with a Stage for it to be callable over the Internet.

Attributes

api_summary class-attribute instance-attribute
api_summary: dict[str, dict[str, MethodSnapshot]] | None = None

A summary of the RestApi at the date and time that the deployment resource was created.

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

The date and time that the deployment resource was created.

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

The description for the deployment resource.

id class-attribute instance-attribute
id: str | None = None

The identifier for the deployment resource.