Skip to content

get_billing_transfer_preference async

get_billing_transfer_preference(
    responsibility_transfer_arn: ResponsibilityTransferArn,
    *,
    config_overrides: Optional[AsyncbillingconductorClientConfig] = None,
) -> GetBillingTransferPreferenceOutput

Retrieves the auto billing group creation preference for a billing transfer.

Parameters:

  • responsibility_transfer_arn (ResponsibilityTransferArn) –

    The Amazon Resource Name (ARN) of the billing transfer whose preference you want to retrieve.

Raises:

Source code in docs_src/capo_billingconductor/_services/async_billingconductor.py
async def get_billing_transfer_preference(
    self,
    responsibility_transfer_arn: "capo_billingconductor.types.responsibility_transfer_arn.ResponsibilityTransferArn",
    *,
    config_overrides: Optional[AsyncbillingconductorClientConfig] = None,
) -> "capo_billingconductor.types.get_billing_transfer_preference_output.GetBillingTransferPreferenceOutput":
    """<p>Retrieves the auto billing group creation preference for a billing transfer.</p>

    Args:
        responsibility_transfer_arn: <p>The Amazon Resource Name (ARN) of the billing transfer whose preference you want to retrieve.</p>

    Raises:
        capo_billingconductor.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. </p>
        capo_billingconductor.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing a request. </p>
        capo_billingconductor.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource that doesn't exist. </p>
        capo_billingconductor.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. </p>
        capo_billingconductor.errors.validation_exception.ValidationException: <p>The input doesn't match with the constraints specified by Amazon Web Services services.</p>
        capo_billingconductor.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_billingconductor.types.get_billing_transfer_preference_input.GetBillingTransferPreferenceInput]",
    ) -> AsyncOperationResponse[
        "capo_billingconductor.types.get_billing_transfer_preference_output.GetBillingTransferPreferenceOutput"
    ]:
        import capo_billingconductor._operations.aws_billing_conductor.get_billing_transfer_preference

        (
            output,
            http_response,
        ) = await capo_billingconductor._operations.aws_billing_conductor.get_billing_transfer_preference.async_get_billing_transfer_preference(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetBillingTransferPreference")
    )
    input_: capo_billingconductor.types.get_billing_transfer_preference_input.GetBillingTransferPreferenceInput = {
        "responsibility_transfer_arn": responsibility_transfer_arn
    }

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