Skip to main content

locations

Creates, updates, deletes, gets or lists a locations resource.

Overview

Namelocations
TypeResource
Idazure.cosmosdb.locations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
backupStorageRedundanciesarrayThe properties of available backup storage redundancies.
isResidencyRestrictedbooleanFlag indicating whether the location is residency sensitive.
isSubscriptionRegionAccessAllowedForAzbooleanFlag indicating whether the subscription have access in region for Availability Zones(Az).
isSubscriptionRegionAccessAllowedForRegularbooleanFlag indicating whether the subscription have access in region for Non-Availability Zones.
statusstringEnum to indicate current buildout status of the region. Known values are: "Uninitialized", "Initializing", "InternallyReady", "Online", "Deleting", "Succeeded", "Failed", "Canceled", "Updating", and "Creating". (Uninitialized, Initializing, InternallyReady, Online, Deleting, Succeeded, Failed, Canceled, Updating, Creating)
supportsAvailabilityZonebooleanFlag indicating whether the location supports availability zones or not.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectlocation, subscription_idGet the properties of an existing Cosmos DB location.
listselectsubscription_idList Cosmos DB locations and their properties.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationstringCosmos DB region, with spaces between words and each word capitalized. Required.
subscription_idstring

SELECT examples

Get the properties of an existing Cosmos DB location.

SELECT
id,
name,
backupStorageRedundancies,
isResidencyRestricted,
isSubscriptionRegionAccessAllowedForAz,
isSubscriptionRegionAccessAllowedForRegular,
status,
supportsAvailabilityZone,
systemData,
type
FROM azure.cosmosdb.locations
WHERE location = '{{ location }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;