list-shared-payer-account-mappings
dci list-shared-payer-account-mappings <customerId> [flags]
Lists the AWS accounts under the reseller's linked shared payers, together with the end customer each is currently mapped to. \{customerId\} (the reseller itself) means the account has not yet been reassigned to an end customer. Each payer's own management account is included alongside its member 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.
Flags
| Flag | Type | Default | Example | Description |
|---|---|---|---|---|
--management-account | string | Restricts the results to accounts under this AWS management (payer) account ID. |
Every command also accepts the CLI-wide flags for output shaping — see Output formats and Table output options.
Output
OK - Shared-payer account mappings 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[].assetId | string | Asset ID of the AWS account. |
items[].accountName | string | Display name of the AWS account. |
items[].accountId | string | AWS account ID. |
items[].payerId | string | AWS account ID of the management (payer) account this account is under. |
items[].payerName | string | Display name of the management (payer) account. |
items[].customerId | string | Customer the account is currently mapped to. Equal to \{customerId\} (the reseller itself) when the account has not been reassigned to an end customer. |
items[].customerName | string | Display name of customerId. |
Raw JSON schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"description": "One AWS account under a linked shared payer - a member account or the payer's own management account - and the customer it is currently mapped to.",
"properties": {
"assetId": {
"type": "string",
"description": "Asset ID of the AWS account."
},
"accountName": {
"type": "string",
"description": "Display name of the AWS account."
},
"accountId": {
"type": "string",
"description": "AWS account ID."
},
"payerId": {
"type": "string",
"description": "AWS account ID of the management (payer) account this account is under."
},
"payerName": {
"type": "string",
"description": "Display name of the management (payer) account."
},
"customerId": {
"type": "string",
"description": "Customer the account is currently mapped to. Equal to `{customerId}` (the reseller itself) when the account has not been reassigned to an end customer."
},
"customerName": {
"type": "string",
"description": "Display name of `customerId`."
}
}
}
}
}
}
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-management-accounts — List shared-payer management accounts
- list-shared-payers — List shared payers with mapping progress
- reassign-shared-payer-account — Reassign a shared-payer account
- API reference: GET /customers/v1/customers/{customerId}/shared-payer-accounts
Aliases: listsharedpayeraccountmappings