transfer_credit
async
¶
transfer_credit(
credit_id: CreditId,
destination_account_id: AccountId,
*,
config_overrides: Optional[AsyncBillingClientConfig] = None,
client_token: Optional[ClientToken] = None,
dry_run: Optional[bool] = None,
) -> TransferCreditResponse
Moves a credit to another account in the same consolidated billing family. The credit keeps its ID, balance, end date, and applicable products. Only the account that owns the credit changes.
The transfer removes the credit's sharing settings. The new owner or the payer can set them again. Any amount reserved for a bill that isn't finalized moves with the credit and still applies to that bill.
You must be the payer of both accounts. You can't transfer a credit that has ended, has no available balance, or is the original credit of a split. A transfer creates no credit, so it doesn't count toward the split limit, and the payer can transfer the credit back. This operation is idempotent and supports a dry run.
Parameters:
-
credit_id(CreditId) –The ID of the credit to transfer.
-
destination_account_id(AccountId) –The Amazon Web Services account ID that becomes the owner of the credit. The account must be in your consolidated billing family and must not be the current owner.
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If you retry a successful request with the same client token and parameters, the retry completes without performing any further actions. If you reuse a client token with different parameters, the request fails with a
ValidationException. -
dry_run(Optional[bool], default:None) –Specifies whether to validate the request and return the result without changing the credit.
Raises:
-
AccessDeniedException–You don't have sufficient access to perform this action.
-
ConflictException–The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.
-
InternalServerException–The request processing failed because of an unknown error, exception, or failure.
-
ResourceNotFoundException–The specified ARN in the request doesn't exist.
-
ServiceQuotaExceededException–You've reached the limit of resources you can create, or exceeded the size of an individual resource.
-
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.
Source code in docs_src/capo_billing/_services/async_billing.py
2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 | |