Skip to content

update_procurement_portal_preference_status

update_procurement_portal_preference_status(
    procurement_portal_preference_arn: ProcurementPortalPreferenceArnString,
    *,
    config_overrides: Optional[InvoicingClientConfig] = None,
    einvoice_delivery_preference_status: Optional[
        ProcurementPortalPreferenceStatus
    ] = None,
    einvoice_delivery_preference_status_reason: Optional[BasicString] = None,
    purchase_order_retrieval_preference_status: Optional[
        ProcurementPortalPreferenceStatus
    ] = None,
    purchase_order_retrieval_preference_status_reason: Optional[BasicString] = None,
    client_token: Optional[BasicStringWithoutSpace] = None,
) -> UpdateProcurementPortalPreferenceStatusResponse

This feature API is subject to changing at any time. For more information, see the Amazon Web Services Service Terms (Betas and Previews).

Updates the status of a procurement portal preference, including the activation state of e-invoice delivery and purchase order retrieval features.

Parameters:

  • procurement_portal_preference_arn (ProcurementPortalPreferenceArnString) –

    The Amazon Resource Name (ARN) of the procurement portal preference to update.

  • einvoice_delivery_preference_status (Optional[ProcurementPortalPreferenceStatus], default: None ) –

    The updated status of the e-invoice delivery preference.

  • einvoice_delivery_preference_status_reason (Optional[BasicString], default: None ) –

    The reason for the e-invoice delivery preference status update, providing context for the change.

  • purchase_order_retrieval_preference_status (Optional[ProcurementPortalPreferenceStatus], default: None ) –

    The updated status of the purchase order retrieval preference.

  • purchase_order_retrieval_preference_status_reason (Optional[BasicString], default: None ) –

    The reason for the purchase order retrieval preference status update, providing context for the change.

  • client_token (Optional[BasicStringWithoutSpace], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure idempotency of the request.

Raises:

  • AccessDeniedException –

    You don't have sufficient access to perform this action.

  • ConflictException –

    The request could not be completed due to a conflict with the current state of the resource. This exception occurs when a concurrent modification is detected during an update operation, or when attempting to create a resource that already exists.

  • InternalServerException –

    The processing request failed because of an unknown error, exception, or failure.

  • ResourceNotFoundException –

    The resource could not be found.

  • ServiceQuotaExceededException –

    The request was rejected because it attempted to create resources beyond the current Amazon Web Services account limits. The error message describes the limit exceeded.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The input fails to satisfy the constraints specified by an Amazon Web Services service.

  • UnknownServiceError –

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

Examples:

UpdateProcurementPortalPreference for EinvoiceDeliveryPreferenceStatus and PurchaseOrderRetrievalPreferenceStatus

>>> client.update_procurement_portal_preference_status(procurement_portal_preference_arn='arn:aws:invoicing::111111111111:procurement-portal-preference/f71dd02e-f855-4b13-b793-0fd25c0b3ecd', einvoice_delivery_preference_status='SUSPENDED', einvoice_delivery_preference_status_reason='suspended example reason', purchase_order_retrieval_preference_status='SUSPENDED', purchase_order_retrieval_preference_status_reason='suspended example reason', client_token='e362c68e-4e74-48d7-9228-0bc5aa447b46')
Source code in docs_src/capo_invoicing/_services/invoicing.py
def update_procurement_portal_preference_status(
    self,
    procurement_portal_preference_arn: "capo_invoicing.types.procurement_portal_preference_arn_string.ProcurementPortalPreferenceArnString",
    *,
    config_overrides: Optional[InvoicingClientConfig] = None,
    einvoice_delivery_preference_status: Optional[
        "capo_invoicing.types.procurement_portal_preference_status.ProcurementPortalPreferenceStatus"
    ] = None,
    einvoice_delivery_preference_status_reason: Optional[
        "capo_invoicing.types.basic_string.BasicString"
    ] = None,
    purchase_order_retrieval_preference_status: Optional[
        "capo_invoicing.types.procurement_portal_preference_status.ProcurementPortalPreferenceStatus"
    ] = None,
    purchase_order_retrieval_preference_status_reason: Optional[
        "capo_invoicing.types.basic_string.BasicString"
    ] = None,
    client_token: Optional[
        "capo_invoicing.types.basic_string_without_space.BasicStringWithoutSpace"
    ] = None,
) -> "capo_invoicing.types.update_procurement_portal_preference_status_response.UpdateProcurementPortalPreferenceStatusResponse":
    """<p> <i> <b>This feature API is subject to changing at any time. For more information, see the <a href="https://aws.amazon.com/service-terms/">Amazon Web Services Service Terms</a> (Betas and Previews).</b> </i> </p> <p>Updates the status of a procurement portal preference, including the activation state of e-invoice delivery and purchase order retrieval features.</p>

    Args:
        procurement_portal_preference_arn: <p>The Amazon Resource Name (ARN) of the procurement portal preference to update.</p>
        einvoice_delivery_preference_status: <p>The updated status of the e-invoice delivery preference.</p>
        einvoice_delivery_preference_status_reason: <p>The reason for the e-invoice delivery preference status update, providing context for the change.</p>
        purchase_order_retrieval_preference_status: <p>The updated status of the purchase order retrieval preference.</p>
        purchase_order_retrieval_preference_status_reason: <p>The reason for the purchase order retrieval preference status update, providing context for the change.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure idempotency of the request.</p>

    Raises:
        capo_invoicing.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
        capo_invoicing.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource. This exception occurs when a concurrent modification is detected during an update operation, or when attempting to create a resource that already exists.</p>
        capo_invoicing.errors.internal_server_exception.InternalServerException: <p>The processing request failed because of an unknown error, exception, or failure. </p>
        capo_invoicing.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found. </p>
        capo_invoicing.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request was rejected because it attempted to create resources beyond the current Amazon Web Services account limits. The error message describes the limit exceeded. </p>
        capo_invoicing.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_invoicing.errors.validation_exception.ValidationException: <p> The input fails to satisfy the constraints specified by an Amazon Web Services service. </p>
        capo_invoicing.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        UpdateProcurementPortalPreference for EinvoiceDeliveryPreferenceStatus and PurchaseOrderRetrievalPreferenceStatus

        >>> client.update_procurement_portal_preference_status(procurement_portal_preference_arn='arn:aws:invoicing::111111111111:procurement-portal-preference/f71dd02e-f855-4b13-b793-0fd25c0b3ecd', einvoice_delivery_preference_status='SUSPENDED', einvoice_delivery_preference_status_reason='suspended example reason', purchase_order_retrieval_preference_status='SUSPENDED', purchase_order_retrieval_preference_status_reason='suspended example reason', client_token='e362c68e-4e74-48d7-9228-0bc5aa447b46')
    """

    def _handler(
        req: "OperationRequest[capo_invoicing.types.update_procurement_portal_preference_status_request.UpdateProcurementPortalPreferenceStatusRequest]",
    ) -> OperationResponse[
        "capo_invoicing.types.update_procurement_portal_preference_status_response.UpdateProcurementPortalPreferenceStatusResponse"
    ]:
        import capo_invoicing._operations.invoicing.update_procurement_portal_preference_status

        output, http_response = (
            capo_invoicing._operations.invoicing.update_procurement_portal_preference_status.update_procurement_portal_preference_status(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateProcurementPortalPreferenceStatus"),
    )
    input_: capo_invoicing.types.update_procurement_portal_preference_status_request.UpdateProcurementPortalPreferenceStatusRequest = {
        "procurement_portal_preference_arn": procurement_portal_preference_arn
    }
    if einvoice_delivery_preference_status is not None:
        input_["einvoice_delivery_preference_status"] = (
            einvoice_delivery_preference_status
        )
    if einvoice_delivery_preference_status_reason is not None:
        input_["einvoice_delivery_preference_status_reason"] = (
            einvoice_delivery_preference_status_reason
        )
    if purchase_order_retrieval_preference_status is not None:
        input_["purchase_order_retrieval_preference_status"] = (
            purchase_order_retrieval_preference_status
        )
    if purchase_order_retrieval_preference_status_reason is not None:
        input_["purchase_order_retrieval_preference_status_reason"] = (
            purchase_order_retrieval_preference_status_reason
        )
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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