APIPortal / Client / create_product_api_page
create_product_api_page¶
- APIPortal.Client.create_product_api_page(**kwargs)¶
Creates an API page that documents a Managed API in a product. The page content is generated asynchronously. Use
statusto track it.See also: AWS API Documentation
Request Syntax
response = client.create_product_api_page( productId='string', managedApiId='string', displayContent={ 'none': {} , 'overrides': { 'operationName': 'string', 'apiUrl': 'string', 'body': 'string' } }, tryItState='ENABLED'|'DISABLED', tags={ 'string': 'string' } )
- Parameters:
productId (string) –
[REQUIRED]
The identifier of the product.
managedApiId (string) –
[REQUIRED]
The Managed API this page documents. It must already be associated with the product, and the page’s API identifier is taken from the Managed API rather than supplied by the caller.
displayContent (dict) –
Exactly one of the members is set:
noneto use default display content, oroverridesto customize it. Modeled as a union so the “exactly one” choice is enforced by type.Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
none,overrides.none (dict) –
Use the content generated from the Managed API.
overrides (dict) –
Replace the generated content with your own.
operationName (string) –
The operation name shown as the page title, from 1 to 255 characters.
apiUrl (string) –
The invoke URL shown on the page and used for Try-It and the portal’s allowed-domain list: http(s)://host[:port][/path], with no whitespace, quotes or angle brackets. On this request member only, as ApiEndpoint is also returned in responses.
body (string) –
The Markdown body of the page, from 1 to 32,768 characters.
tryItState (string) – Whether readers can call the API from the page with Try-It. Defaults to
DISABLED. To enable it, the page’s API URL must use HTTPS on a domain that supports Try-It.tags (dict) –
Up to 50 tags per request, matching API Gateway’s limit of 50 tags per resource.
(string) –
A tag key of 1-128 Unicode characters, per the AWS tagging limits.
(string) –
A tag value of 0-256 Unicode characters, per the AWS tagging limits; an empty value is valid.
- Return type:
dict
- Returns:
Response Syntax
{ 'productApiPageId': 'string', 'productApiPageArn': 'string', 'apiId': { 'identifierParts': { 'path': 'string', 'method': 'string', 'resourceArn': 'string' } }, 'displayContent': { 'operationName': 'string', 'apiUrl': 'string', 'body': 'string' }, 'tryItState': 'ENABLED'|'DISABLED', 'updatedAt': datetime(2015, 1, 1), 'status': 'AVAILABLE'|'IN_PROGRESS'|'FAILED', 'statusException': { 'exception': 'INTERNAL_FAILURE'|'RESOURCE_DELETED'|'MEMBER_LEFT_ORG', 'message': 'string' }, 'tags': { 'string': 'string' } }
Response Structure
(dict) –
productApiPageId (string) –
The identifier of the API page.
productApiPageArn (string) –
The ARN of the API page.
apiId (dict) –
The API the page documents.
identifierParts (dict) –
The resource, method, and path that identify the API.
path (string) –
The request path of the API.
method (string) –
The HTTP method of the API.
resourceArn (string) –
The ARN of the resource that serves the API.
displayContent (dict) –
The content shown on the page.
operationName (string) –
The operation name shown as the page title.
apiUrl (string) –
The invoke URL shown on the page and used by Try-It.
body (string) –
The Markdown body of the page. Absent while the page is
IN_PROGRESS.
tryItState (string) –
Whether Try-It is enabled on the page.
updatedAt (datetime) –
When the resource was last updated.
status (string) –
The status of the page content:
IN_PROGRESSwhile it is generated, thenAVAILABLEorFAILED.statusException (dict) –
Failure detail attached to a ProductApiPage’s status: a typed reason plus an optional human-readable message.
exception (string) –
treat any unrecognized value as INTERNAL_FAILURE.
message (string) –
A description of the failure.
tags (dict) –
Up to 50 tags per request, matching API Gateway’s limit of 50 tags per resource.
(string) –
A tag key of 1-128 Unicode characters, per the AWS tagging limits.
(string) –
A tag value of 0-256 Unicode characters, per the AWS tagging limits; an empty value is valid.
Exceptions
APIPortal.Client.exceptions.ResourceNotFoundExceptionAPIPortal.Client.exceptions.LimitExceededExceptionAPIPortal.Client.exceptions.BadRequestExceptionAPIPortal.Client.exceptions.AccessDeniedException