deployments
Creates, updates, deletes or gets a deployment
resource or lists deployments
in a region
Overview
Name | deployments |
Type | Resource |
Description | The AWS::ApiGatewayV2::Deployment resource creates a deployment for an API. |
Id | aws.apigatewayv2.deployments |
Fields
Name | Datatype | Description |
---|---|---|
deployment_id | string | |
description | string | The description for the deployment resource. |
stage_name | string | The name of an existing stage to associate with the deployment. |
api_id | string | The API identifier. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ApiId, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.apigatewayv2.deployments (
ApiId,
region
)
SELECT
'{{ ApiId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.apigatewayv2.deployments (
Description,
StageName,
ApiId,
region
)
SELECT
'{{ Description }}',
'{{ StageName }}',
'{{ ApiId }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: deployment
props:
- name: Description
value: '{{ Description }}'
- name: StageName
value: '{{ StageName }}'
- name: ApiId
value: '{{ ApiId }}'
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