Skip to content

delete_procurement_portal_preference async

delete_procurement_portal_preference(
    procurement_portal_preference_arn: ProcurementPortalPreferenceArnString,
    *,
    config_overrides: Optional[AsyncInvoicingClientConfig] = None,
    client_token: Optional[BasicStringWithoutSpace] = None,
) -> DeleteProcurementPortalPreferenceResponse

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

Deletes an existing procurement portal preference. This action cannot be undone. Active e-invoice delivery and PO retrieval configurations will be terminated.

Parameters:

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:

DeleteProcurementPortalPreference call

>>> await client.delete_procurement_portal_preference(procurement_portal_preference_arn='arn:aws:invoicing::111111111111:procurement-portal-preference/f71dd02e-f855-4b13-b793-0fd25c0b3ecd', client_token='e362c68e-4e74-48d7-9228-0bc5aa447b47')
Source code in docs_src/capo_invoicing/_services/async_invoicing.py
async def delete_procurement_portal_preference(
    self,
    procurement_portal_preference_arn: "capo_invoicing.types.procurement_portal_preference_arn_string.ProcurementPortalPreferenceArnString",
    *,
    config_overrides: Optional[AsyncInvoicingClientConfig] = None,
    client_token: Optional[
        "capo_invoicing.types.basic_string_without_space.BasicStringWithoutSpace"
    ] = None,
) -> "capo_invoicing.types.delete_procurement_portal_preference_response.DeleteProcurementPortalPreferenceResponse":
    """<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>Deletes an existing procurement portal preference. This action cannot be undone. Active e-invoice delivery and PO retrieval configurations will be terminated.</p>

    Args:
        procurement_portal_preference_arn: <p>The Amazon Resource Name (ARN) of the procurement portal preference to delete.</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:
        DeleteProcurementPortalPreference call

        >>> await client.delete_procurement_portal_preference(procurement_portal_preference_arn='arn:aws:invoicing::111111111111:procurement-portal-preference/f71dd02e-f855-4b13-b793-0fd25c0b3ecd', client_token='e362c68e-4e74-48d7-9228-0bc5aa447b47')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_invoicing.types.delete_procurement_portal_preference_request.DeleteProcurementPortalPreferenceRequest]",
    ) -> AsyncOperationResponse[
        "capo_invoicing.types.delete_procurement_portal_preference_response.DeleteProcurementPortalPreferenceResponse"
    ]:
        import capo_invoicing._operations.invoicing.delete_procurement_portal_preference

        (
            output,
            http_response,
        ) = await capo_invoicing._operations.invoicing.delete_procurement_portal_preference.async_delete_procurement_portal_preference(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteProcurementPortalPreference")
    )
    input_: capo_invoicing.types.delete_procurement_portal_preference_request.DeleteProcurementPortalPreferenceRequest = {
        "procurement_portal_preference_arn": procurement_portal_preference_arn
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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