list-shared-payers
dci list-shared-payers <customerId>
Lists every shared payer linked to the reseller, including ones still mid-onboarding, with per-payer counts of linked and mapped accounts. 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.
The list includes payers that are still onboarding (completed: false); those have no accounts yet.
linkedAccounts counts the payer's own management account as well as its member accounts, and
mappedAssets counts the accounts already reassigned to an end customer. Requires the
SharedPayersAdmin permission and DoiT API access (platform:externalApi); user API tokens must
include the permission in their scope.
Examples
# Every shared payer linked to the reseller, with how many of its accounts are already mapped to an end customer.
dci list-shared-payers <customer-id>
# Just the onboarding and mapping progress per payer.
dci list-shared-payers <customer-id> --fields payerId,payerName,mappedAssets,totalAssets,completed
# Everything as JSON, for scripts.
dci list-shared-payers <customer-id> --output json
Output
OK - Shared payers returned.
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 |
|---|---|---|
items | array of object | |
items[].payerId | string | AWS account ID of the management (payer) account. |
items[].payerName | string | Display name of the management (payer) account. |
items[].linkedAccounts | integer | Number of AWS accounts under this payer, including the payer's own management account. |
items[].mappedAssets | integer | Number of those accounts already reassigned to an end customer. |
items[].totalAssets | integer | Same as linkedAccounts. |
items[].completed | boolean | Whether the payer has finished onboarding. A payer still mid-onboarding has no accounts yet. |
Raw JSON schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"description": "A shared payer linked to the reseller, with its account-mapping progress.",
"properties": {
"payerId": {
"type": "string",
"description": "AWS account ID of the management (payer) account."
},
"payerName": {
"type": "string",
"description": "Display name of the management (payer) account."
},
"linkedAccounts": {
"type": "integer",
"description": "Number of AWS accounts under this payer, including the payer's own management account."
},
"mappedAssets": {
"type": "integer",
"description": "Number of those accounts already reassigned to an end customer."
},
"totalAssets": {
"type": "integer",
"description": "Same as `linkedAccounts`."
},
"completed": {
"type": "boolean",
"description": "Whether the payer has finished onboarding. A payer still mid-onboarding has no accounts yet."
}
}
}
}
}
}
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. |
| 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
- reassign-shared-payer-account — Reassign a shared-payer account
- API reference: GET /customers/v1/customers/{customerId}/shared-payer-accounts/payers
Aliases: listsharedpayers