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 property specifies the location of the Amazon API Gateway API entity that the documentation applies to. Location is a property of the [AWS::ApiGateway::DocumentationPart](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-documentationpart.html) resource.For more information about each property, including constraints and valid values, see [DocumentationPart](https://docs.aws.amazon.com/apigateway/latest/api/API_DocumentationPartLocation.html) in the *Amazon API Gateway REST API Reference*. |
properties | string | |
rest_api_id | string | |
region | string | AWS region. |
For more information, see AWS::ApiGateway::DocumentationPart
.
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