Skip to content

update_purchase_orders async

update_purchase_orders(
    purchase_orders: PurchaseOrders,
    *,
    config_overrides: Optional[AsyncMarketplaceAgreementClientConfig] = None,
) -> UpdatePurchaseOrdersOutput

Allows acceptors to associate purchase orders with agreement charges after an agreement is created.

Parameters:

  • purchase_orders (PurchaseOrders) –

    Contains information about purchase order associations.

Raises:

Source code in docs_src/capo_marketplace_agreement/_services/async_marketplace_agreement.py
async def update_purchase_orders(
    self,
    purchase_orders: "capo_marketplace_agreement.types.purchase_orders.PurchaseOrders",
    *,
    config_overrides: Optional[AsyncMarketplaceAgreementClientConfig] = None,
) -> "capo_marketplace_agreement.types.update_purchase_orders_output.UpdatePurchaseOrdersOutput":
    """<p>Allows acceptors to associate purchase orders with agreement charges after an agreement is created.</p>

    Args:
        purchase_orders: <p>Contains information about purchase order associations.</p>

    Raises:
        capo_marketplace_agreement.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_marketplace_agreement.errors.conflict_exception.ConflictException: <p>Request was denied due to a resource conflict.</p>
        capo_marketplace_agreement.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_marketplace_agreement.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
        capo_marketplace_agreement.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
        capo_marketplace_agreement.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_marketplace_agreement.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_marketplace_agreement.types.update_purchase_orders_input.UpdatePurchaseOrdersInput]",
    ) -> AsyncOperationResponse[
        "capo_marketplace_agreement.types.update_purchase_orders_output.UpdatePurchaseOrdersOutput"
    ]:
        import capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.update_purchase_orders

        (
            output,
            http_response,
        ) = await capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.update_purchase_orders.async_update_purchase_orders(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdatePurchaseOrders")
    )
    input_: capo_marketplace_agreement.types.update_purchase_orders_input.UpdatePurchaseOrdersInput = {
        "purchase_orders": purchase_orders
    }

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