TransferCredit
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.
Request Syntax
{
"clientToken": "string",
"creditId": "string",
"destinationAccountId": "string",
"dryRun": boolean
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- clientToken
-
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.Type: String
Pattern:
[a-zA-Z0-9-]+Required: No
- creditId
-
The ID of the credit to transfer.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 32.
Pattern:
[0-9]+Required: Yes
- destinationAccountId
-
The AWS 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.
Type: String
Pattern:
[0-9]{12}Required: Yes
- dryRun
-
Specifies whether to validate the request and return the result without changing the credit.
Type: Boolean
Required: No
Response Syntax
{
"amount": "string",
"destinationAccountId": "string",
"dryRun": boolean,
"newCreditId": "string",
"sourceCreditId": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- amount
-
The available balance of the credit, which is its remaining balance minus any amount reserved for a bill that isn't finalized.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 32.
Pattern:
[0-9]{1,25}(\.[0-9]{1,6})? - destinationAccountId
-
The AWS account ID that owns the credit after the transfer.
Type: String
Pattern:
[0-9]{12} - dryRun
-
Specifies whether the request was a dry run. If
true, the operation didn't change the credit.Type: Boolean
- newCreditId
-
Always the same as
sourceCreditId, because a transfer moves the credit and creates no new one. A dry run omits this field.Type: String
Length Constraints: Minimum length of 1. Maximum length of 32.
Pattern:
[0-9]+ - sourceCreditId
-
The ID of the transferred credit. The credit keeps this ID.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 32.
Pattern:
[0-9]+
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedException
-
You don't have sufficient access to perform this action.
HTTP Status Code: 400
- 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.
- resourceId
-
The identifier for the service resource associated with the request.
- resourceType
-
The type of resource associated with the request.
HTTP Status Code: 400
- InternalServerException
-
The request processing failed because of an unknown error, exception, or failure.
HTTP Status Code: 500
- ResourceNotFoundException
-
The specified ARN in the request doesn't exist.
- resourceId
-
Value is a list of resource IDs that were not found.
- resourceType
-
Value is the type of resource that was not found.
HTTP Status Code: 400
- ServiceQuotaExceededException
-
You've reached the limit of resources you can create, or exceeded the size of an individual resource.
- quotaCode
-
The container for the
quotaCode. - resourceId
-
The ID of the resource.
- resourceType
-
The type of AWS resource.
- serviceCode
-
The container for the
serviceCode.
HTTP Status Code: 400
- ThrottlingException
-
The request was denied due to request throttling.
HTTP Status Code: 400
- ValidationException
-
The input fails to satisfy the constraints specified by an AWS service.
- fieldList
-
The input fails to satisfy the constraints specified by an AWS service.
- reason
-
The input fails to satisfy the constraints specified by an AWS service.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: