get-aws-account
dci get-aws-account
Returns the current state of an AWS account including role, supported features, and optional S3 bucket configuration.
Output
OK - Account details returned successfully.
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 |
|---|---|---|
accountID | string | The AWS account ID. |
roleArn | string | The ARN of the IAM role. |
s3Bucket | string | S3 bucket name for real-time anomaly detection. Present only if real-time is enabled. |
s3BucketRegion | string | AWS region of the S3 bucket. Present only if s3Bucket exists. |
supportedFeatures | array of object | List of supported features and their permission status. |
supportedFeatures[].name | string | Feature name. |
supportedFeatures[].hasRequiredPermissions | boolean | Whether the role has the required permissions for this feature. |
enabledFeatures | array of string | List of supported AWS features enabled by the caller. Returned in the same order as provided. |
timeLinked | string | ISO 8601 timestamp of when the role was linked. |
Raw JSON schema
{
"type": "object",
"properties": {
"accountID": {
"type": "string",
"description": "The AWS account ID.",
"example": "123456789012"
},
"roleArn": {
"type": "string",
"description": "The ARN of the IAM role.",
"example": "arn:aws:iam::123456789012:role/DoiTRole"
},
"s3Bucket": {
"type": "string",
"description": "S3 bucket name for real-time anomaly detection. Present only if real-time is enabled."
},
"s3BucketRegion": {
"type": "string",
"description": "AWS region of the S3 bucket. Present only if s3Bucket exists.",
"example": "us-east-1"
},
"supportedFeatures": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Feature name.",
"example": "spot-scaling"
},
"hasRequiredPermissions": {
"type": "boolean",
"description": "Whether the role has the required permissions for this feature."
}
}
},
"description": "List of supported features and their permission status."
},
"enabledFeatures": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of supported AWS features enabled by the caller. Returned in the same order as provided."
},
"timeLinked": {
"type": "string",
"description": "ISO 8601 timestamp of when the role was linked.",
"example": "2024-01-15T10:30:00Z"
}
}
}
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 | 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. |
Aliases: getawsaccount