CmdID

CmdID / aws / aws apigateway

aws apigateway create-deployment

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

3 examples 9 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

Example 1: To deploy the configured resources for an API to a new Stage

The following create-deployment example deploys the configured resources for an API to a new stage.

aws apigateway create-deployment --rest-api-id 1234123412 --stage-name dev --stage-description 'Development Stage' --description 'First deployment to the dev stage'Identify
--rest-api-idThe string identifier of the associated RestApi.
--stage-nameThe name of the Stage resource for the Deployment resource to create.
--stage-descriptionThe description of the Stage resource for the Deployment resource to create.
--descriptionThe description for the Deployment resource to create.
Its output
{
    "id": "ztt4m2",
    "description": "First deployment to the dev stage",
    "createdDate": "2022-07-18T10:11:18-07:00"
}

Example 2: To deploy the configured resources for an API to an existing stage

The following create-deployment example deploys the configured resources for an API to an existing stage.

aws apigateway create-deployment --rest-api-id 1234123412 --stage-name dev --description 'Second deployment to the dev stage'Identify
--rest-api-idThe string identifier of the associated RestApi.
--stage-nameThe name of the Stage resource for the Deployment resource to create.
--descriptionThe description for the Deployment resource to create.
Its output
{
    "id": "u3v4x5",
    "description": "Second deployment to the dev stage",
    "createdDate": "2022-07-18T10:19:04-07:00"
}

Example 3: To deploy the configured resources for an API to an existing stage with Stage Variables

The following create-deployment example deploys the configured resources for an API to an existing stage with stage variables.

aws apigateway create-deployment --rest-api-id 1234123412 --stage-name dev --description 'Third deployment to the dev stage' --variables key='value',otherKey='otherValue'Identify
--rest-api-idThe string identifier of the associated RestApi.
--stage-nameThe name of the Stage resource for the Deployment resource to create.
--descriptionThe description for the Deployment resource to create.
--variablesA map that defines the stage variables for the Stage resource that is associated with the new deployment.
Its output
{
    "id": "w5x6y7",
    "description": "Third deployment to the dev stage",
    "createdDate": "2022-07-18T10:25:42-07:00"
}

For more information, see Deploy REST APIs in API Gateway in the Amazon API Gateway Developer Guide.

Options

9 in the AWS CLI reference
--cache-cluster-enabledEnables a cache cluster for the Stage resource specified in the input.
--cache-cluster-sizeThe stage's cache capacity in GB.
--canary-settingsThe input configuration for the canary deployment when the deployment is a canary release deployment.
--descriptionThe description for the Deployment resource to create.
--rest-api-idThe string identifier of the associated RestApi.
--stage-descriptionThe description of the Stage resource for the Deployment resource to create.
--stage-nameThe name of the Stage resource for the Deployment resource to create.
--tracing-enabledSpecifies whether active tracing with X-ray is enabled for the Stage.
--variablesA map that defines the stage variables for the Stage resource that is associated with the new deployment.