deployments
Creates, updates, deletes, gets or lists a deployments resource.
Overview
| Name | deployments |
| Type | Resource |
| Id | aws.apigateway.deployments |
Fields
The following fields are returned by SELECT queries:
- get_deployment
- get_deployments
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier for the deployment resource. |
api_summary | object | A summary of the RestApi at the date and time that the deployment resource was created. |
created_date | string (date-time) | The date and time that the deployment resource was created. |
description | string | The description for the deployment resource. |
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier for the deployment resource. |
api_summary | object | A summary of the RestApi at the date and time that the deployment resource was created. |
created_date | string (date-time) | The date and time that the deployment resource was created. |
description | string | The description for the deployment resource. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_deployment | select | restapi_id, deployment_id, region | embed | Gets information about a Deployment resource. |
get_deployments | select | restapi_id, region | position, limit | Gets information about a Deployments collection. |
create_deployment | insert | restapi_id, region | Creates a Deployment resource, which makes a specified RestApi callable over the internet. | |
update_deployment | update | restapi_id, deployment_id, region | Changes information about a Deployment resource. | |
delete_deployment | delete | restapi_id, deployment_id, region | Deletes a Deployment resource. Deleting a deployment will only succeed if there are no Stage resources associated with it. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
deployment_id | string | The identifier of the Deployment resource to delete. |
region | string | AWS region (default: us-east-1) |
restapi_id | string | The string identifier of the associated RestApi. |
embed | array | A query parameter to retrieve the specified embedded resources of the returned Deployment resource in the response. In a REST API call, this embed parameter value is a list of comma-separated strings, as in GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=var1,var2. The SDK and other platform-dependent libraries might use a different format for the list. Currently, this request supports only retrieval of the embedded API summary this way. Hence, the parameter value must be a single-valued list containing only the "apisummary" string. For example, GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=apisummary. |
limit | integer | The maximum number of returned results per page. The default value is 25 and the maximum value is 500. |
position | string | The current pagination position in the paged result set. |
SELECT examples
- get_deployment
- get_deployments
Gets information about a Deployment resource.
SELECT
id,
api_summary,
created_date,
description
FROM aws.apigateway.deployments
WHERE restapi_id = '{{ restapi_id }}' -- required
AND deployment_id = '{{ deployment_id }}' -- required
AND region = '{{ region }}' -- required
AND embed = '{{ embed }}'
;
Gets information about a Deployments collection.
SELECT
id,
api_summary,
created_date,
description
FROM aws.apigateway.deployments
WHERE restapi_id = '{{ restapi_id }}' -- required
AND region = '{{ region }}' -- required
AND position = '{{ position }}'
AND limit = '{{ limit }}'
;
INSERT examples
- create_deployment
- Manifest
Creates a Deployment resource, which makes a specified RestApi callable over the internet.
INSERT INTO aws.apigateway.deployments (
stageName,
stageDescription,
description,
cacheClusterEnabled,
cacheClusterSize,
variables,
canarySettings,
tracingEnabled,
restapi_id,
region
)
SELECT
'{{ stageName }}',
'{{ stageDescription }}',
'{{ description }}',
{{ cacheClusterEnabled }},
'{{ cacheClusterSize }}',
'{{ variables }}',
'{{ canarySettings }}',
{{ tracingEnabled }},
'{{ restapi_id }}',
'{{ region }}'
RETURNING
id,
api_summary,
created_date,
description
;
# Description fields are for documentation purposes
- name: deployments
props:
- name: restapi_id
value: "{{ restapi_id }}"
description: Required parameter for the deployments resource.
- name: region
value: "{{ region }}"
description: Required parameter for the deployments resource.
- name: stageName
value: "{{ stageName }}"
- name: stageDescription
value: "{{ stageDescription }}"
- name: description
value: "{{ description }}"
- name: cacheClusterEnabled
value: {{ cacheClusterEnabled }}
- name: cacheClusterSize
value: "{{ cacheClusterSize }}"
description: |
Returns the size of the CacheCluster.
valid_values: ['0.5', '1.6', '6.1', '13.5', '28.4', '58.2', '118', '237']
- name: variables
value: "{{ variables }}"
- name: canarySettings
description: |
The input configuration for a canary deployment.
value:
percentTraffic: {{ percentTraffic }}
stageVariableOverrides: "{{ stageVariableOverrides }}"
useStageCache: {{ useStageCache }}
- name: tracingEnabled
value: {{ tracingEnabled }}
UPDATE examples
- update_deployment
Changes information about a Deployment resource.
UPDATE aws.apigateway.deployments
SET
patchOperations = '{{ patchOperations }}'
WHERE
restapi_id = '{{ restapi_id }}' --required
AND deployment_id = '{{ deployment_id }}' --required
AND region = '{{ region }}' --required
RETURNING
id,
api_summary,
created_date,
description;
DELETE examples
- delete_deployment
Deletes a Deployment resource. Deleting a deployment will only succeed if there are no Stage resources associated with it.
DELETE FROM aws.apigateway.deployments
WHERE restapi_id = '{{ restapi_id }}' --required
AND deployment_id = '{{ deployment_id }}' --required
AND region = '{{ region }}' --required
;