Resource Groups - List

Gets all the resource groups for a subscription.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups?api-version=2019-10-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups?$filter={$filter}&$top={$top}&api-version=2019-10-01

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

The ID of the target subscription.

$filter
query
  • string

The filter to apply on the operation.

You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'

$top
query
  • integer
int32

The number of results to return. If null is passed, returns all resource groups.

api-version
query True
  • string

The API version to use for this operation.

Responses

Name Type Description
200 OK

OK - Returns an array of resource groups.

Other Status Codes

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Definitions

CloudError

An error response for a resource management request.

ErrorAdditionalInfo

The resource management error additional info.

ErrorResponse

The resource management error response.

ResourceGroup

Resource group information.

ResourceGroupListResult

List of resource groups.

ResourceGroupProperties

The resource group properties.

CloudError

An error response for a resource management request.

Name Type Description
error

The resource management error response.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info
  • object

The additional info.

type
  • string

The additional info type.

ErrorResponse

The resource management error response.

Name Type Description
additionalInfo

The error additional info.

code
  • string

The error code.

details

The error details.

message
  • string

The error message.

target
  • string

The error target.

ResourceGroup

Resource group information.

Name Type Description
id
  • string

The ID of the resource group.

location
  • string

The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.

managedBy
  • string

The ID of the resource that manages this resource group.

name
  • string

The name of the resource group.

properties

The resource group properties.

tags
  • object

The tags attached to the resource group.

type
  • string

The type of the resource group.

ResourceGroupListResult

List of resource groups.

Name Type Description
nextLink
  • string

The URL to use for getting the next set of results.

value

An array of resource groups.

ResourceGroupProperties

The resource group properties.

Name Type Description
provisioningState
  • string

The provisioning state.