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.
Idaws.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.

Methods

NameAccessible byRequired Params
create_resourceINSERTApiId, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all deployments in a region.

SELECT
region,
deployment_id,
description,
stage_name,
api_id
FROM aws.apigatewayv2.deployments
WHERE region = 'us-east-1';

Gets all properties from an individual deployment.

SELECT
region,
deployment_id,
description,
stage_name,
api_id
FROM aws.apigatewayv2.deployments
WHERE region = 'us-east-1' AND data__Identifier = '<ApiId>|<DeploymentId>';

INSERT example

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

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

DELETE example

/*+ delete */
DELETE FROM aws.apigatewayv2.deployments
WHERE data__Identifier = '<ApiId|DeploymentId>'
AND region = 'us-east-1';

Permissions

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

Create

apigateway:POST

Update

apigateway:PATCH,
apigateway:GET,
apigateway:PUT

Read

apigateway:GET

Delete

apigateway:GET,
apigateway:DELETE

List

apigateway:GET