Skip to content

azureResourceGroups

Gets the Azure resource groups for the given subscription.

Arguments

Argument Type Description
tenantId (required) String!
subscriptionId (required) UUID!

Returns

ResourceGroupConnection!

Sample

query AzureResourceGroups($tenantId: String!, $subscriptionId: UUID!) {
  azureResourceGroups(
    tenantId: $tenantId
    subscriptionId: $subscriptionId
  ) {
    nodes {
      id
      name
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
{
  "tenantId": "example-string",
  "subscriptionId": "00000000-0000-0000-0000-000000000000"
}
{
  "data": {
    "azureResourceGroups": {
      "nodes": [
        [
          {
            "id": "example-string",
            "name": "example-string"
          }
        ]
      ],
      "pageInfo": {
        "endCursor": "example-string",
        "hasNextPage": true,
        "hasPreviousPage": true,
        "startCursor": "example-string"
      }
    }
  }
}