list-aws-member-accounts
dci list-aws-member-accounts <managementAccountId> [flags]
Returns all member AWS accounts under the specified AWS organization that have active or historical commitment coverage. Includes 30-day statistics and estimated monthly potential savings (monthlyPotentialSavings) per Savings Plan (SP) type.
managementAccountId— 12-digit AWS management (payer) account ID (the account that owns the AWS Organization) that scopes the request.
Examples
# Member accounts with active or historical commitment coverage, with 30-day stats and potential savings.
dci list-aws-member-accounts <management-account-id>
# A larger page (the server caps `--max-results` at 500).
dci list-aws-member-accounts <management-account-id> --max-results 200
# Every page as JSON, for scripts.
dci list-aws-member-accounts <management-account-id> --all --output json
# Browse in the full-screen viewer.
dci list-aws-member-accounts <management-account-id> -M interactive
Flags
| Flag | Type | Default | Example | Description |
|---|---|---|---|---|
--page-token | string | Opaque cursor token returned by a previous list response. Omit to start from the beginning; an empty or absent token in a response means there are no more results. Do not parse it. A structurally invalid cursor returns 400 with code pagination_token_invalid; an expired cursor returns 400 with code pagination_token_expired — restart pagination from the beginning. | ||
--max-results | integer | 50 | Maximum number of items to return. Server may return fewer. Defaults to 50; maximum 500. |
Every command also accepts the CLI-wide flags for output shaping — see Output formats and Table output options.
Output
List of member accounts.
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[].memberAccountId | string | 12-digit AWS member account ID. |
items[].managementAccountId | string | 12-digit AWS management (payer) account ID of the parent AWS Organization. |
items[].displayName | string | Human-readable account name, if available. Defaults to the AWS Organizations account name; may be overridden by a custom name set on the asset in the DoiT Console. Null when no name is available. |
items[].stats30d | object | Trailing 30-day aggregate metrics per SP type (compute, database). |
items[].stats30d.compute | object | Minimal 30-day aggregate. Only esr and savings are persisted at this granularity. Responses are denominated in USD. |
items[].stats30d.compute.esr | number (double) | Effective Savings Rate (ESR) over the last 30 days, as a fraction from 0 to 1 (for example, 0.187 is 18.7%). Measures what share of eligible spend is saved through active commitments compared with equivalent on-demand cost. Higher ESR means greater realized savings. Null when not yet available. |
items[].stats30d.compute.savings | object | Total savings realized over the last 30 days from active commitments (USD). Nested fields omitted — see the raw JSON schema. |
items[].stats30d.database | object | Minimal 30-day aggregate. Only esr and savings are persisted at this granularity. Responses are denominated in USD. |
items[].stats30d.database.esr | number (double) | Effective Savings Rate (ESR) over the last 30 days, as a fraction from 0 to 1 (for example, 0.187 is 18.7%). Measures what share of eligible spend is saved through active commitments compared with equivalent on-demand cost. Higher ESR means greater realized savings. Null when not yet available. |
items[].stats30d.database.savings | object | Total savings realized over the last 30 days from active commitments (USD). Nested fields omitted — see the raw JSON schema. |
items[].monthlyPotentialSavings | object | Estimated monthly additional savings per SP type for this member account, attributed from the parent AWS organization's projection by share of trailing-60-day Savings Plan-eligible on-demand cost. |
items[].monthlyPotentialSavings.compute | object | |
items[].monthlyPotentialSavings.compute.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
items[].monthlyPotentialSavings.compute.currency | string | ISO 4217 currency code. |
items[].monthlyPotentialSavings.database | object | |
items[].monthlyPotentialSavings.database.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
items[].monthlyPotentialSavings.database.currency | string | ISO 4217 currency code. |
pageToken | string | |
rowCount | integer (int64) | Best-effort count for the filtered result set. May be null or omitted for expensive counts. |
Raw JSON schema
{
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"memberAccountId",
"managementAccountId"
],
"properties": {
"memberAccountId": {
"type": "string",
"description": "12-digit AWS member account ID."
},
"managementAccountId": {
"type": "string",
"description": "12-digit AWS management (payer) account ID of the parent AWS Organization."
},
"displayName": {
"type": "string",
"description": "Human-readable account name, if available. Defaults to the AWS Organizations account name; may be overridden by a custom name set on the asset in the DoiT Console. Null when no name is available.",
"nullable": true,
"example": "prod-web"
},
"stats30d": {
"type": "object",
"description": "Trailing 30-day aggregate metrics per SP type (`compute`, `database`).",
"properties": {
"compute": {
"type": "object",
"description": "Minimal 30-day aggregate. Only `esr` and `savings` are persisted at this granularity. Responses are denominated in USD.",
"properties": {
"esr": {
"type": "number",
"format": "double",
"description": "Effective Savings Rate (ESR) over the last 30 days, as a fraction from 0 to 1 (for example, `0.187` is 18.7%). Measures what share of eligible spend is saved through active commitments compared with equivalent on-demand cost. Higher ESR means greater realized savings. Null when not yet available.",
"nullable": true,
"example": 0.187
},
"savings": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Total savings realized over the last 30 days from active commitments (USD)."
}
}
},
"database": {
"type": "object",
"description": "Minimal 30-day aggregate. Only `esr` and `savings` are persisted at this granularity. Responses are denominated in USD.",
"properties": {
"esr": {
"type": "number",
"format": "double",
"description": "Effective Savings Rate (ESR) over the last 30 days, as a fraction from 0 to 1 (for example, `0.187` is 18.7%). Measures what share of eligible spend is saved through active commitments compared with equivalent on-demand cost. Higher ESR means greater realized savings. Null when not yet available.",
"nullable": true,
"example": 0.187
},
"savings": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Total savings realized over the last 30 days from active commitments (USD)."
}
}
}
}
},
"monthlyPotentialSavings": {
"allOf": [
{
"type": "object",
"description": "Estimated monthly additional savings per Savings Plan (SP) type, taken from the latest PerfectScale for Commitments purchase projection. Unlike `savingsTotals` (realized YTD/lifetime savings), this is a forward-looking estimate of the monthly savings achievable if the recommended commitments are purchased. For member accounts, the AWS organization figure is attributed by each member account's share of trailing-60-day SP-eligible on-demand cost. A per-SP-type value of `0.00` means the latest projection is missing, expired, or empty. The field is omitted entirely only for accounts that have never had potential savings computed.",
"properties": {
"compute": {
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
},
"database": {
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
}
}
],
"description": "Estimated monthly additional savings per SP type for this member account, attributed from the parent AWS organization's projection by share of trailing-60-day Savings Plan-eligible on-demand cost."
}
}
}
},
"pageToken": {
"type": "string",
"nullable": true
},
"rowCount": {
"type": "integer",
"format": "int64",
"description": "Best-effort count for the filtered result set. May be null or omitted for expensive counts.",
"nullable": true
}
}
}
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, 503 | 40 | API_SERVER_ERROR | The API failed to process the request. Retryable; contact DoiT support if it persists. |
Related
- get-aws-member-account — Get a member account
- list-aws-organizations — List AWS organizations
- get-aws-organization — Get an AWS organization
- list-aws-savings-plans — List AWS Savings Plans
- API reference: GET /ps4commitments/v1/aws/organizations/{managementAccountId}/member-accounts
Aliases: listawsmemberaccounts