Vaults - List

The List operation gets information about the vaults associated with the subscription.

GET https://management.azure.com/subscriptions/{subscriptionId}/resources?$filter=resourceType eq 'Microsoft.KeyVault/vaults'&api-version=2015-11-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resources?$filter=resourceType eq 'Microsoft.KeyVault/vaults'&$top={$top}&api-version=2015-11-01

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

$filter
query True

VaultListFilterTypes

The filter to apply on the operation.

api-version
query True

ResourceManagerApiVersions

Azure Resource Manager Api Version.

$top
query

integer

int32

Maximum number of results to return.

Responses

Name Type Description
200 OK

ResourceListResult

Get information about all key vaults in the subscription.

Other Status Codes

CloudError

Error response describing why the operation failed.

Examples

List vaults in the specified subscription

Sample Request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceType eq 'Microsoft.KeyVault/vaults'&$top=1&api-version=2015-11-01

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault",
      "name": "sample-vault",
      "type": "Microsoft.KeyVault/vaults",
      "location": "westus",
      "tags": {}
    }
  ],
  "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?%24filter=resourceType+eq+%27Microsoft.KeyVault%2fvaults%27&%24top=4&api-version=2015-11-01&%24skiptoken=eyJuZXh0UGFydGl0aW9uS2V5IjoiMSE4IVEwTTJNVGMtIiwibmV4dFJvd0tleSI6IjEhMTMyIU5rUTRSVEU1UXpJelFUWXdORGd4UmpoRlFrSXhNVGhFUXpNd01EZEROVVJmVkVkT1RDMU5TVU5TVDFOUFJsUTZNa1ZMUlZsV1FWVk1WRG95UmxaQlZVeFVVeTFUVTFKSExVcEpUVG95UkZSRlUxUTZNa1JXUVZWTVZDMVhSVk5VVlZNLSJ9"
}

Definitions

Name Description
CloudError

An error response from Key Vault resource provider

CloudErrorBody

An error response from Key Vault resource provider

Resource

Key Vault resource

ResourceListResult

List of vault resources.

ResourceManagerApiVersions

Azure Resource Manager Api Version.

VaultListFilterTypes

The filter to apply on the operation.

CloudError

An error response from Key Vault resource provider

Name Type Description
error

CloudErrorBody

An error response from Key Vault resource provider

CloudErrorBody

An error response from Key Vault resource provider

Name Type Description
code

string

Error code. This is a mnemonic that can be consumed programmatically.

message

string

User friendly error message. The message is typically localized and may vary with service version.

Resource

Key Vault resource

Name Type Description
id

string

Fully qualified identifier of the key vault resource.

location

string

Azure location of the key vault resource.

name

string

Name of the key vault resource.

tags

object

Tags assigned to the key vault resource.

type

string

Resource type of the key vault resource.

ResourceListResult

List of vault resources.

Name Type Description
nextLink

string

The URL to get the next set of vault resources.

value

Resource[]

The list of vault resources.

ResourceManagerApiVersions

Azure Resource Manager Api Version.

Name Type Description
2015-11-01

string

VaultListFilterTypes

The filter to apply on the operation.

Name Type Description
resourceType eq 'Microsoft.KeyVault/vaults'

string