documentation_versions
Creates, updates, deletes or gets a documentation_version
resource or lists documentation_versions
in a region
Overview
Name | documentation_versions |
Type | Resource |
Description | The AWS::ApiGateway::DocumentationVersion resource creates a snapshot of the documentation for an API. For more information, see [Representation of API Documentation in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api-content-representation.html) in the *API Gateway Developer Guide*. |
Id | aws.apigateway.documentation_versions |
Fields
Name | Datatype | Description |
---|---|---|
description | string | A description about the new documentation snapshot. |
documentation_version | string | The version identifier of the to-be-updated documentation version. |
rest_api_id | string | The string identifier of the associated RestApi. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | DocumentationVersion, 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 documentation_versions
in a region.
SELECT
region,
description,
documentation_version,
rest_api_id
FROM aws.apigateway.documentation_versions
WHERE region = 'us-east-1';
Gets all properties from an individual documentation_version
.
SELECT
region,
description,
documentation_version,
rest_api_id
FROM aws.apigateway.documentation_versions
WHERE region = 'us-east-1' AND data__Identifier = '<DocumentationVersion>|<RestApiId>';
INSERT
example
Use the following StackQL query and manifest file to create a new documentation_version
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.apigateway.documentation_versions (
DocumentationVersion,
RestApiId,
region
)
SELECT
'{{ DocumentationVersion }}',
'{{ RestApiId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.apigateway.documentation_versions (
Description,
DocumentationVersion,
RestApiId,
region
)
SELECT
'{{ Description }}',
'{{ DocumentationVersion }}',
'{{ RestApiId }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: documentation_version
props:
- name: Description
value: '{{ Description }}'
- name: DocumentationVersion
value: '{{ DocumentationVersion }}'
- name: RestApiId
value: '{{ RestApiId }}'
DELETE
example
/*+ delete */
DELETE FROM aws.apigateway.documentation_versions
WHERE data__Identifier = '<DocumentationVersion|RestApiId>'
AND region = 'us-east-1';
Permissions
To operate on the documentation_versions
resource, the following permissions are required:
Create
apigateway:GET,
apigateway:POST
Read
apigateway:GET
Update
apigateway:GET,
apigateway:PATCH
Delete
apigateway:DELETE
List
apigateway:GET