Skip to main content

stages

Creates, updates, deletes or gets a stage resource or lists stages in a region

Overview

Namestages
TypeResource
DescriptionThe ``AWS::ApiGateway::Stage`` resource creates a stage for a deployment.
Idawscc.apigateway.stages

Fields

NameDatatypeDescription
access_log_settingobjectThe &#96;&#96;AccessLogSetting&#96;&#96; property type specifies settings for logging access in this stage.<br />&#96;&#96;AccessLogSetting&#96;&#96; is a property of the &#91;AWS::ApiGateway::Stage&#93;(https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html) resource.
cache_cluster_enabledboolean
cache_cluster_sizestring
canary_settingobject
client_certificate_idstring
deployment_idstring
descriptionstring
documentation_versionstring
method_settingsarray
rest_api_idstring
stage_namestring
tagsarray
tracing_enabledboolean
variablesobjectA map (string-to-string map) that defines the stage variables, where the variable name is the key and the variable value is the value. Variable names are limited to alphanumeric characters. Values must match the following regular expression: &#96;&#96;&#91;A-Za-z0-9-.&#95;&#126;:/?#&=,&#93;+&#96;&#96;.
regionstringAWS region.

For more information, see AWS::ApiGateway::Stage.

Methods

NameResourceAccessible byRequired Params
create_resourcestagesINSERTRestApiId, region
delete_resourcestagesDELETEIdentifier, region
update_resourcestagesUPDATEIdentifier, PatchDocument, region
list_resourcesstages_list_onlySELECTregion
get_resourcestagesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual stage.

SELECT
region,
access_log_setting,
cache_cluster_enabled,
cache_cluster_size,
canary_setting,
client_certificate_id,
deployment_id,
description,
documentation_version,
method_settings,
rest_api_id,
stage_name,
tags,
tracing_enabled,
variables
FROM awscc.apigateway.stages
WHERE
region = 'us-east-1' AND
Identifier = '{{ rest_api_id }}|{{ stage_name }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.apigateway.stages (
RestApiId,
region
)
SELECT
'{{ rest_api_id }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.apigateway.stages
SET PatchDocument = string('{{ {
"AccessLogSetting": access_log_setting,
"CacheClusterEnabled": cache_cluster_enabled,
"CacheClusterSize": cache_cluster_size,
"CanarySetting": canary_setting,
"ClientCertificateId": client_certificate_id,
"DeploymentId": deployment_id,
"Description": description,
"DocumentationVersion": documentation_version,
"MethodSettings": method_settings,
"Tags": tags,
"TracingEnabled": tracing_enabled,
"Variables": variables
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ rest_api_id }}|{{ stage_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.apigateway.stages
WHERE
Identifier = '{{ rest_api_id }}|{{ stage_name }}' AND
region = 'us-east-1';

Permissions

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

apigateway:POST,
apigateway:PATCH,
apigateway:GET,
apigateway:PUT