Skip to main content

deployments

Creates, updates, deletes or gets a deployment resource or lists deployments in a region

Overview

Namedeployments
TypeResource
DescriptionThe ``AWS::ApiGatewayV2::Deployment`` resource creates a deployment for an API.
Idawscc.apigatewayv2.deployments

Fields

NameDatatypeDescription
deployment_idstring
descriptionstringThe description for the deployment resource.
stage_namestringThe name of an existing stage to associate with the deployment.
api_idstringThe API identifier.
regionstringAWS region.

For more information, see AWS::ApiGatewayV2::Deployment.

Methods

NameResourceAccessible byRequired Params
create_resourcedeploymentsINSERTApiId, region
delete_resourcedeploymentsDELETEIdentifier, region
update_resourcedeploymentsUPDATEIdentifier, PatchDocument, region
list_resourcesdeployments_list_onlySELECTregion
get_resourcedeploymentsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual deployment.

SELECT
region,
deployment_id,
description,
stage_name,
api_id
FROM awscc.apigatewayv2.deployments
WHERE
region = 'us-east-1' AND
Identifier = '{{ api_id }}|{{ deployment_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new deployment resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.apigatewayv2.deployments (
ApiId,
region
)
SELECT
'{{ api_id }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a deployment resource, using stack-deploy.

/*+ update */
UPDATE awscc.apigatewayv2.deployments
SET PatchDocument = string('{{ {
"Description": description,
"StageName": stage_name
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ api_id }}|{{ deployment_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.apigatewayv2.deployments
WHERE
Identifier = '{{ api_id }}|{{ deployment_id }}' AND
region = 'us-east-1';

Permissions

To operate on the deployments resource, the following permissions are required:

apigateway:POST