メインコンテンツへスキップ

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 gets 403.

Flags​

FlagTypeDefaultExampleDescription
--management-accountstringRestricts 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.

FieldTypeDescription
itemsarray of object
items[].assetIdstringAsset ID of the AWS account.
items[].accountNamestringDisplay name of the AWS account.
items[].accountIdstringAWS account ID.
items[].payerIdstringAWS account ID of the management (payer) account this account is under.
items[].payerNamestringDisplay name of the management (payer) account.
items[].customerIdstringCustomer the account is currently mapped to. Equal to \{customerId\} (the reseller itself) when the account has not been reassigned to an end customer.
items[].customerNamestringDisplay 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 statusExit codeError codeMeaning
40030VALIDATION_ERRORThe arguments or request body were rejected. Review the command's flags and payload.
40110AUTHENTICATION_FAILEDNot signed in, or the API token is invalid. Run dci login or check DCI_API_KEY.
40311PERMISSION_DENIEDThe DoiT user or the active customer context does not have access.
50040API_SERVER_ERRORThe API failed to process the request. Retryable; contact DoiT support if it persists.

Aliases: listsharedpayeraccountmappings