reassign-shared-payer-account
dci reassign-shared-payer-account <customerId> <assetId> [body]
Reassigns one AWS account under a linked shared payer - a member account or the payer's own management account - to the reseller itself or to a T3 end customer within its hierarchy. Requires the SharedPayersAdmin permission and DoiT API access (platform:externalApi). User API tokens must include the permission in their scope.
customerId— Customer ID. Must match the customer resolved from the bearer token - a token scoped to a different customer gets403.assetId— Asset ID of the AWS account to reassign, as returned bylistSharedPayerAccountMappings.
Pass the request body as name: value arguments or pipe JSON on stdin — see Command structure.
Request
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | yes | Customer to reassign the account to: \{customerId\} (the reseller itself) or a T3 end customer within its hierarchy. |
Raw JSON schema
{
"type": "object",
"required": [
"customerId"
],
"properties": {
"customerId": {
"type": "string",
"description": "Customer to reassign the account to: `{customerId}` (the reseller itself) or a T3 end customer within its hierarchy."
}
}
}
Output
OK - Account reassigned.
By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.
| Field | Type | Description |
|---|---|---|
assetId | string | Asset ID of the reassigned account. |
customerId | string | Customer the account was reassigned to. |
Raw JSON schema
{
"type": "object",
"properties": {
"assetId": {
"type": "string",
"description": "Asset ID of the reassigned account."
},
"customerId": {
"type": "string",
"description": "Customer the account was reassigned to."
}
}
}
Errors
On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.
HTTP status to exit code mapping
| HTTP status | Exit code | Error code | Meaning |
|---|---|---|---|
| 400 | 30 | VALIDATION_ERROR | The arguments or request body were rejected. Review the command's flags and payload. |
| 401 | 10 | AUTHENTICATION_FAILED | Not signed in, or the API token is invalid. Run dci login or check DCI_API_KEY. |
| 403 | 11 | PERMISSION_DENIED | The DoiT user or the active customer context does not have access. |
| 404 | 20 | RESOURCE_NOT_FOUND | The requested resource does not exist. Check the identifier argument. |
| 500 | 40 | API_SERVER_ERROR | The API failed to process the request. Retryable; contact DoiT support if it persists. |
Related
- list-shared-payer-account-mappings — List shared-payer account mappings
- list-shared-payer-management-accounts — List shared-payer management accounts
- list-shared-payers — List shared payers with mapping progress
- API reference: PATCH /customers/v1/customers/{customerId}/shared-payer-accounts/{assetId}
Aliases: reassignsharedpayeraccount