Skip to content

get_procurement_portal_preference async

get_procurement_portal_preference(
    procurement_portal_preference_arn: ProcurementPortalPreferenceArnString,
    *,
    config_overrides: Optional[AsyncInvoicingClientConfig] = None,
) -> GetProcurementPortalPreferenceResponse

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

Retrieves the details of a specific procurement portal preference configuration.

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:

GetProcurementPortalPreference for Coupa pref

>>> await client.get_procurement_portal_preference(procurement_portal_preference_arn='arn:aws:invoicing::111111111111:procurement-portal-preference/a34fd666-7810-4414-9360-aaa4bcab0abd')
Source code in docs_src/capo_invoicing/_services/async_invoicing.py
async def get_procurement_portal_preference(
    self,
    procurement_portal_preference_arn: "capo_invoicing.types.procurement_portal_preference_arn_string.ProcurementPortalPreferenceArnString",
    *,
    config_overrides: Optional[AsyncInvoicingClientConfig] = None,
) -> "capo_invoicing.types.get_procurement_portal_preference_response.GetProcurementPortalPreferenceResponse":
    """<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>Retrieves the details of a specific procurement portal preference configuration.</p>

    Args:
        procurement_portal_preference_arn: <p>The Amazon Resource Name (ARN) of the procurement portal preference to retrieve.</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:
        GetProcurementPortalPreference for Coupa pref

        >>> await client.get_procurement_portal_preference(procurement_portal_preference_arn='arn:aws:invoicing::111111111111:procurement-portal-preference/a34fd666-7810-4414-9360-aaa4bcab0abd')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_invoicing.types.get_procurement_portal_preference_request.GetProcurementPortalPreferenceRequest]",
    ) -> AsyncOperationResponse[
        "capo_invoicing.types.get_procurement_portal_preference_response.GetProcurementPortalPreferenceResponse"
    ]:
        import capo_invoicing._operations.invoicing.get_procurement_portal_preference

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

    def _redact_output(
        output: "capo_invoicing.types.get_procurement_portal_preference_response.GetProcurementPortalPreferenceResponse",
    ) -> dict[str, Any]:
        import capo_invoicing.types.get_procurement_portal_preference_response

        return capo_invoicing.types.get_procurement_portal_preference_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "GetProcurementPortalPreference", redact_output=_redact_output
        ),
    )
    input_: capo_invoicing.types.get_procurement_portal_preference_request.GetProcurementPortalPreferenceRequest = {
        "procurement_portal_preference_arn": procurement_portal_preference_arn
    }

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