Skip to content

get_product_api_page

get_product_api_page(
    product_id: ProductId,
    product_api_page_id: ProductApiPageId,
    *,
    config_overrides: Optional[APIPortalClientConfig] = None,
    resource_owner_account_id: Optional[AccountId] = None,
    include_raw_display_content: Optional[bool] = None,
) -> GetProductApiPageResponse

Returns an API page, including its body.

Parameters:

  • product_id (ProductId) –

    The identifier of the product.

  • product_api_page_id (ProductApiPageId) –

    The identifier of the API page.

  • resource_owner_account_id (Optional[AccountId], default: None ) –

    The AWS account ID that owns the product. Supply it to read a product shared with you by another account. Omit it for products in your own account.

  • include_raw_display_content (Optional[bool], default: None ) –

    Set to true to also return the page body in rawDisplayContent.

Raises:

Source code in docs_src/capo_apiportal/_services/api_portal.py
def get_product_api_page(
    self,
    product_id: "capo_apiportal.types.product_id.ProductId",
    product_api_page_id: "capo_apiportal.types.product_api_page_id.ProductApiPageId",
    *,
    config_overrides: Optional[APIPortalClientConfig] = None,
    resource_owner_account_id: Optional[
        "capo_apiportal.types.account_id.AccountId"
    ] = None,
    include_raw_display_content: Optional[bool] = None,
) -> "capo_apiportal.types.get_product_api_page_response.GetProductApiPageResponse":
    """Returns an API page, including its body.

    Args:
        product_id: The identifier of the product.
        product_api_page_id: The identifier of the API page.
        resource_owner_account_id: The AWS account ID that owns the product. Supply it to read a product shared with you by another account. Omit it for products in your own account.
        include_raw_display_content: Set to `true` to also return the page body in `rawDisplayContent`.

    Raises:
        capo_apiportal.errors.access_denied_exception.AccessDeniedException: You do not have permission to perform this operation.
        capo_apiportal.errors.bad_request_exception.BadRequestException: The request is not valid. The message identifies the field or value that failed validation.
        capo_apiportal.errors.limit_exceeded_exception.LimitExceededException: The request rate or a service quota was exceeded. Reduce the request rate or the number of resources and try again.
        capo_apiportal.errors.resource_not_found_exception.ResourceNotFoundException: The requested resource does not exist, or you do not have access to it.
        capo_apiportal.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_apiportal.types.get_product_api_page_request.GetProductApiPageRequest]",
    ) -> OperationResponse[
        "capo_apiportal.types.get_product_api_page_response.GetProductApiPageResponse"
    ]:
        import capo_apiportal._operations.api_portal_control_service.get_product_api_page

        output, http_response = (
            capo_apiportal._operations.api_portal_control_service.get_product_api_page.get_product_api_page(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetProductApiPage")
    )
    input_: capo_apiportal.types.get_product_api_page_request.GetProductApiPageRequest = {
        "product_id": product_id,
        "product_api_page_id": product_api_page_id,
    }
    if resource_owner_account_id is not None:
        input_["resource_owner_account_id"] = resource_owner_account_id
    if include_raw_display_content is not None:
        input_["include_raw_display_content"] = include_raw_display_content

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output