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:

    image.png

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": "****c5f7-1b51-4751-a164-17f43a97****",
          "Type": "Folder"
        },
        {
          "Id": "****c35e-8d08-4c25-bc9a-a81ceb0****",
          "Name": "o-hsw8he13i4",
          "ParentScopeId": "awsRoot",
          "Type": "Folder"
        },
        {
          "Id": "****5282****",
          "Name": "Account1",
          "ParentScopeId": "****15f1-271e-4c9e-a71b-e6b4eb2d****",
          "Type": "CloudProvider"
        },
        {
          "Id": "****3508****",
          "Name": "Account2",
          "ParentScopeId": "****15f1-271e-4c9e-a71b-e6b4eb2d****",
          "Type": "CloudProvider"
        },
        ...
        {
          "Id": "****3976****",
          "Name": "Account3",
          "ParentScopeId": "****15f1-271e-4c9e-a71b-e6b4eb2d****",
          "Type": "CloudProvider"
        },
      ]
    }
  }
}

Did this page help you?