Scopes

List basic cloud account information

📘

Note

This general query lists basic account information, and can be run by users with any role. For more advanced queries, users with the administrator role can use cloud-specific queries. For example, you can use the AwsAccounts query to list all AWS accounts with onboarding issues.

Use the Scopes query to retrieve basic information for all, or a subset of, your cloud accounts. For example, the following query lists account IDs and names for all onboarded AWS accounts.

  • IncludeChildScopes — True/False. Whether to include all children account for the listed Ids.

  • Types — The type of the account scope. For example, CloudProvider, IdentityProvider, or Folder.

  • By filtering for awsRoot, and including all children account, this query example parallels the following scope, as shown in the Tenable One Cloud Exposure Console:

    The account scope tree with the AWS folder and its accounts selected

query{
  Scopes(
    filter: {
      Ids: "awsRoot",
      IncludeChildScopes: true,
      Types: [CloudProvider, Folder]}) {
    nodes {
      Id
      Name
      ParentScopeId
      Type
    }
  }
}

Sample Response

{
  "data": {
    "Scopes": {
      "nodes": [
        {
          "Id": "awsRoot",
          "Name": "AWS",
          "ParentScopeId": "ac0c4b9a-11cb-42fc-80bb-b138f1712800",
          "Type": "Folder"
        },
        {
          "Id": "84dfc3d5-0bea-4cac-8554-ca8d046859d1",
          "Name": "o-asbhqj94uy",
          "ParentScopeId": "awsRoot",
          "Type": "Folder"
        },
        {
          "Id": "111122223333",
          "Name": "Account1",
          "ParentScopeId": "c9af3eb5-5ae9-47e0-86d9-41108a70f80b",
          "Type": "CloudProvider"
        },
        {
          "Id": "444455556666",
          "Name": "Account2",
          "ParentScopeId": "c9af3eb5-5ae9-47e0-86d9-41108a70f80b",
          "Type": "CloudProvider"
        },
        {
          "Id": "123456789012",
          "Name": "Account3",
          "ParentScopeId": "c9af3eb5-5ae9-47e0-86d9-41108a70f80b",
          "Type": "CloudProvider"
        }
      ]
    }
  }
}

Did this page help you?