Skip to content

update_product_rest_endpoint_page async

update_product_rest_endpoint_page(
    portal_product_id: __string,
    product_rest_endpoint_page_id: __string,
    *,
    config_overrides: Optional[AsyncApiGatewayV2ClientConfig] = None,
    display_content: Optional[EndpointDisplayContent] = None,
    try_it_state: Optional[TryItState] = None,
) -> UpdateProductRestEndpointPageResponse

Updates a product REST endpoint page.

Parameters:

  • display_content (Optional[EndpointDisplayContent], default: None ) –

    The display content.

  • portal_product_id (__string) –

    The portal product identifier.

  • product_rest_endpoint_page_id (__string) –

    The product REST endpoint identifier.

  • try_it_state (Optional[TryItState], default: None ) –

    The try it state of a product REST endpoint page.

Raises:

  • BadRequestException –

    The request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.

  • NotFoundException –

    The resource specified in the request was not found. See the message field for more information.

  • TooManyRequestsException –

    A limit has been exceeded. See the accompanying error message for details.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_apigatewayv2/_services/async_api_gateway_v2.py
async def update_product_rest_endpoint_page(
    self,
    portal_product_id: "capo_apigatewayv2.types.__string.__string",
    product_rest_endpoint_page_id: "capo_apigatewayv2.types.__string.__string",
    *,
    config_overrides: Optional[AsyncApiGatewayV2ClientConfig] = None,
    display_content: Optional[
        "capo_apigatewayv2.types.endpoint_display_content.EndpointDisplayContent"
    ] = None,
    try_it_state: Optional[
        "capo_apigatewayv2.types.try_it_state.TryItState"
    ] = None,
) -> "capo_apigatewayv2.types.update_product_rest_endpoint_page_response.UpdateProductRestEndpointPageResponse":
    """<p>Updates a product REST endpoint page.</p>

    Args:
        display_content: <p>The display content.</p>
        portal_product_id: <p>The portal product identifier.</p>
        product_rest_endpoint_page_id: <p>The product REST endpoint identifier.</p>
        try_it_state: <p>The try it state of a product REST endpoint page.</p>

    Raises:
        capo_apigatewayv2.errors.access_denied_exception.AccessDeniedException
        capo_apigatewayv2.errors.bad_request_exception.BadRequestException: <p>The request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.</p>
        capo_apigatewayv2.errors.not_found_exception.NotFoundException: <p>The resource specified in the request was not found. See the message field for more information.</p>
        capo_apigatewayv2.errors.too_many_requests_exception.TooManyRequestsException: <p>A limit has been exceeded. See the accompanying error message for details.</p>
        capo_apigatewayv2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_apigatewayv2.types.update_product_rest_endpoint_page_request.UpdateProductRestEndpointPageRequest]",
    ) -> AsyncOperationResponse[
        "capo_apigatewayv2.types.update_product_rest_endpoint_page_response.UpdateProductRestEndpointPageResponse"
    ]:
        import capo_apigatewayv2._operations.api_gateway_v2.update_product_rest_endpoint_page

        (
            output,
            http_response,
        ) = await capo_apigatewayv2._operations.api_gateway_v2.update_product_rest_endpoint_page.async_update_product_rest_endpoint_page(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateProductRestEndpointPage")
    )
    input_: capo_apigatewayv2.types.update_product_rest_endpoint_page_request.UpdateProductRestEndpointPageRequest = {
        "portal_product_id": portal_product_id,
        "product_rest_endpoint_page_id": product_rest_endpoint_page_id,
    }
    if display_content is not None:
        input_["display_content"] = display_content
    if try_it_state is not None:
        input_["try_it_state"] = try_it_state

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output