documentation_parts
Creates, updates, deletes or gets a documentation_part
resource or lists documentation_parts
in a region
Overview
Name | documentation_parts |
Type | Resource |
Description | The AWS::ApiGateway::DocumentationPart resource creates a documentation part 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_parts |
Fields
Name | Datatype | Description |
---|---|---|
documentation_part_id | string | |
location | object | The location of the targeted API entity of the to-be-created documentation part. |
properties | string | The new documentation content map of the targeted API entity. Enclosed key-value pairs are API-specific, but only OpenAPI-compliant key-value pairs can be exported and, hence, published. |
rest_api_id | string | The string identifier of the associated RestApi. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Location, Properties, 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_parts
in a region.
SELECT
region,
documentation_part_id,
location,
properties,
rest_api_id
FROM aws.apigateway.documentation_parts
WHERE region = 'us-east-1';
Gets all properties from an individual documentation_part
.
SELECT
region,
documentation_part_id,
location,
properties,
rest_api_id
FROM aws.apigateway.documentation_parts
WHERE region = 'us-east-1' AND data__Identifier = '<DocumentationPartId>|<RestApiId>';
INSERT
example
Use the following StackQL query and manifest file to create a new documentation_part
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.apigateway.documentation_parts (
Location,
Properties,
RestApiId,
region
)
SELECT
'{{ Location }}',
'{{ Properties }}',
'{{ RestApiId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.apigateway.documentation_parts (
Location,
Properties,
RestApiId,
region
)
SELECT
'{{ Location }}',
'{{ Properties }}',
'{{ RestApiId }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: documentation_part
props:
- name: Location
value:
Method: '{{ Method }}'
Name: '{{ Name }}'
Path: '{{ Path }}'
StatusCode: '{{ StatusCode }}'
Type: '{{ Type }}'
- name: Properties
value: '{{ Properties }}'
- name: RestApiId
value: '{{ RestApiId }}'
DELETE
example
/*+ delete */
DELETE FROM aws.apigateway.documentation_parts
WHERE data__Identifier = '<DocumentationPartId|RestApiId>'
AND region = 'us-east-1';
Permissions
To operate on the documentation_parts
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