Skip to main content

documentation_parts

Creates, updates, deletes or gets a documentation_part resource or lists documentation_parts in a region

Overview

Namedocumentation_parts
TypeResource
DescriptionThe 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*.
Idaws.apigateway.documentation_parts

Fields

NameDatatypeDescription
documentation_part_idstring
locationobjectThe location of the targeted API entity of the to-be-created documentation part.
propertiesstringThe 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_idstringThe string identifier of the associated RestApi.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTLocation, Properties, RestApiId, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.apigateway.documentation_parts (
Location,
Properties,
RestApiId,
region
)
SELECT
'{{ Location }}',
'{{ Properties }}',
'{{ RestApiId }}',
'{{ region }}';

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