deployments
Creates, updates, deletes or gets a deployment
resource or lists deployments
in a region
Overview
Name | deployments |
Type | Resource |
Description | The AWS::ApiGateway::Deployment resource deploys an API Gateway RestApi resource to a stage so that clients can call the API over the internet. The stage acts as an environment. |
Id | aws.apigateway.deployments |
Fields
Name | Datatype | Description |
---|---|---|
deployment_id | string | |
description | string | The description for the Deployment resource to create. |
stage_description | object | The description of the Stage resource for the Deployment resource to create. To specify a stage description, you must also provide a stage name. |
stage_name | string | The name of the Stage resource for the Deployment resource to create. |
rest_api_id | string | The string identifier of the associated RestApi. |
deployment_canary_settings | object | The input configuration for a canary deployment. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | RestApiId, 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_description,
stage_name,
rest_api_id,
deployment_canary_settings
FROM aws.apigateway.deployments
WHERE region = 'us-east-1';
Gets all properties from an individual deployment
.
SELECT
region,
deployment_id,
description,
stage_description,
stage_name,
rest_api_id,
deployment_canary_settings
FROM aws.apigateway.deployments
WHERE region = 'us-east-1' AND data__Identifier = '<DeploymentId>|<RestApiId>';
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.apigateway.deployments (
RestApiId,
region
)
SELECT
'{{ RestApiId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.apigateway.deployments (
Description,
StageDescription,
StageName,
RestApiId,
DeploymentCanarySettings,
region
)
SELECT
'{{ Description }}',
'{{ StageDescription }}',
'{{ StageName }}',
'{{ RestApiId }}',
'{{ DeploymentCanarySettings }}',
'{{ 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: StageDescription
value:
CacheTtlInSeconds: '{{ CacheTtlInSeconds }}'
Description: '{{ Description }}'
LoggingLevel: '{{ LoggingLevel }}'
CanarySetting:
DeploymentId: '{{ DeploymentId }}'
PercentTraffic: null
StageVariableOverrides: {}
UseStageCache: '{{ UseStageCache }}'
ThrottlingRateLimit: null
ClientCertificateId: '{{ ClientCertificateId }}'
Variables: {}
DocumentationVersion: '{{ DocumentationVersion }}'
CacheDataEncrypted: '{{ CacheDataEncrypted }}'
DataTraceEnabled: '{{ DataTraceEnabled }}'
ThrottlingBurstLimit: '{{ ThrottlingBurstLimit }}'
CachingEnabled: '{{ CachingEnabled }}'
TracingEnabled: '{{ TracingEnabled }}'
MethodSettings:
- CacheDataEncrypted: '{{ CacheDataEncrypted }}'
CacheTtlInSeconds: '{{ CacheTtlInSeconds }}'
CachingEnabled: '{{ CachingEnabled }}'
DataTraceEnabled: '{{ DataTraceEnabled }}'
HttpMethod: '{{ HttpMethod }}'
LoggingLevel: '{{ LoggingLevel }}'
MetricsEnabled: '{{ MetricsEnabled }}'
ResourcePath: '{{ ResourcePath }}'
ThrottlingBurstLimit: '{{ ThrottlingBurstLimit }}'
ThrottlingRateLimit: null
AccessLogSetting:
DestinationArn: '{{ DestinationArn }}'
Format: '{{ Format }}'
CacheClusterSize: '{{ CacheClusterSize }}'
MetricsEnabled: '{{ MetricsEnabled }}'
Tags:
- Value: '{{ Value }}'
Key: '{{ Key }}'
CacheClusterEnabled: '{{ CacheClusterEnabled }}'
- name: StageName
value: '{{ StageName }}'
- name: RestApiId
value: '{{ RestApiId }}'
- name: DeploymentCanarySettings
value:
StageVariableOverrides: {}
PercentTraffic: null
UseStageCache: '{{ UseStageCache }}'
DELETE
example
/*+ delete */
DELETE FROM aws.apigateway.deployments
WHERE data__Identifier = '<DeploymentId|RestApiId>'
AND region = 'us-east-1';
Permissions
To operate on the deployments
resource, the following permissions are required:
Read
apigateway:GET
Create
apigateway:POST,
apigateway:PATCH,
apigateway:PUT,
apigateway:GET
Update
apigateway:PATCH,
apigateway:GET,
apigateway:PUT,
apigateway:DELETE
List
apigateway:GET
Delete
apigateway:GET,
apigateway:DELETE