Resources - List

Get all the resources in a subscription.

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

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.

The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.

For example, to filter by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'

You can use substringof(value, property) in the filter. The properties you can use for substring are: name and resourceGroup.

For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', name)

You can link more than one substringof together by adding and/or operators.

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'

You can use some properties together when filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and identity/principalId.

$expand
query
  • string

The $expand query parameter. You can expand createdTime and changedTime. For example, to expand both properties, use $expand=changedTime,createdTime

$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 resources.

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

GenericResource

Resource information.

Identity

Identity for the resource.

Plan

Plan for the resource.

ResourceIdentityType

The identity type.

ResourceListResult

List of resource groups.

Sku

SKU for the resource.

UserAssignedIdentities

The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

GenericResource

Resource information.

Name Type Description
id
  • string

Resource ID

identity

The identity of the resource.

kind
  • string

The kind of the resource.

location
  • string

Resource location

managedBy
  • string

ID of the resource that manages this resource.

name
  • string

Resource name

plan

The plan of the resource.

properties
  • object

The resource properties.

sku

The SKU of the resource.

tags
  • object

Resource tags

type
  • string

Resource type

Identity

Identity for the resource.

Name Type Description
principalId
  • string

The principal ID of resource identity.

tenantId
  • string

The tenant ID of resource.

type

The identity type.

userAssignedIdentities

The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

Plan

Plan for the resource.

Name Type Description
name
  • string

The plan ID.

product
  • string

The offer ID.

promotionCode
  • string

The promotion code.

publisher
  • string

The publisher ID.

version
  • string

The plan's version.

ResourceIdentityType

The identity type.

Name Type Description
None
  • string
SystemAssigned
  • string
SystemAssigned, UserAssigned
  • string
UserAssigned
  • string

ResourceListResult

List of resource groups.

Name Type Description
nextLink
  • string

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

value

An array of resources.

Sku

SKU for the resource.

Name Type Description
capacity
  • integer

The SKU capacity.

family
  • string

The SKU family.

model
  • string

The SKU model.

name
  • string

The SKU name.

size
  • string

The SKU size.

tier
  • string

The SKU tier.

UserAssignedIdentities

The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

Name Type Description