Поделиться через


Get-AzCosmosDBLocation

Вывод списка расположений Azure Cosmos DB и их свойств. Получение свойств расположения Azure Cosmos DB для определенного расположения.

Синтаксис

Get-AzCosmosDBLocation
   [-Location <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Описание

Вывод списка расположений Azure Cosmos DB со своими свойствами расположения. Он включает идентификатор расположения, имя, тип, SupportsAvailabilityZone, IsResidencyRestricted, Backup служба хранилища Redundancies, IsSubscriptionRegionAccessAllowedForRegular, IsSubscriptionRegionAccessAllowedForAz и Status.

Примеры

Пример 1. Получение свойств расположения учетной записи Azure Cosmos DB для заданного расположения

Get-AzCosmosDBLocation -Location "Central US"

Id                                                                                                      Name       Type                           Properties
--                                                                                                      ----       ----                           ----------
subscriptionId/subscriptionId/providers/Microsoft.DocumentDB/locations/centralus/ Central US Microsoft.DocumentDB/locations Microsoft.Azure.Commands.CosmosDB.Models.PSLocationP...


Get-AzCosmosDBLocation -Location "Central US" | ConvertTo-Json
{
    "Id":  "subscriptionId/<subscriptionId>/providers/Microsoft.DocumentDB/locations/centralus/",
    "Name":  "Central US",
    "Type":  "Microsoft.DocumentDB/locations",
    "Properties":  {
                       "SupportsAvailabilityZone":  true,
                       "IsResidencyRestricted":  false,
                       "BackupStorageRedundancies":  [
                                                         "Geo",
                                                         "Zone",
                                                         "Local"
                                                     ],
                        "IsSubscriptionRegionAccessAllowedForRegular": true,
                        "IsSubscriptionRegionAccessAllowedForAz": false,
                        "Status": "Online"
                   }
}

Пример 2. Перечисление расположений учетных записей Azure Cosmos DB и их свойств

Get-AzCosmosDBLocation

Id                                                                                                               Name                 Type                           Properties
--                                                                                                               ----                 ----                           ----------
subscriptionId/<subscriptionId>/providers/Microsoft.DocumentDB/locations/brazilsoutheast/    Brazil Southeast     Microsoft.DocumentDB/locations Microsoft.Azure.Commands.CosmosDB...
subscriptionId/<subscriptionId>/providers/Microsoft.DocumentDB/locations/centralus/          Central US           Microsoft.DocumentDB/locations Microsoft.Azure.Commands.CosmosDB...
....


Get-AzCosmosDBLocation | ConvertTo-Json
[
    {
        "Id":  "subscriptionId/<subscriptionId>/providers/Microsoft.DocumentDB/locations/brazilsoutheast/",
        "Name":  "Brazil Southeast",
        "Type":  "Microsoft.DocumentDB/locations",
        "Properties":  {
                           "SupportsAvailabilityZone":  true,
                           "IsResidencyRestricted":  false,
                           "BackupStorageRedundancies":  "Geo Local",
                           "IsSubscriptionRegionAccessAllowedForRegular": true,
                           "IsSubscriptionRegionAccessAllowedForAz": false,
                           "Status": "Online"
                       }
    },
    {
        "Id":  "subscriptionId/<subscriptionId>/providers/Microsoft.DocumentDB/locations/centralus/",
        "Name":  "Central US",
        "Type":  "Microsoft.DocumentDB/locations",
        "Properties":  {
                           "SupportsAvailabilityZone":  true,
                           "IsResidencyRestricted":  false,
                           "BackupStorageRedundancies":  "Geo Zone Local",
                           "IsSubscriptionRegionAccessAllowedForRegular": false,
                           "IsSubscriptionRegionAccessAllowedForAz": true,
                           "Status": "Online"
                       }
    },
    {
        "Id":  "subscriptionId/<subscriptionId>/providers/Microsoft.DocumentDB/locations/australiasoutheast/",
        "Name":  "Australia Southeast",
        "Type":  "Microsoft.DocumentDB/locations",
        "Properties":  {
                           "SupportsAvailabilityZone":  false,
                           "IsResidencyRestricted":  false,
                           "BackupStorageRedundancies":  "Geo Local",
                           "IsSubscriptionRegionAccessAllowedForRegular": true,
                           "IsSubscriptionRegionAccessAllowedForAz": true,
                           "Status": "Online"
                       }
    }
]

Параметры

-DefaultProfile

Учетные данные, учетная запись, клиент и подписка, используемые для взаимодействия с Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Location

-Имя расположения в строке.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Входные данные

None

Выходные данные

PSLocationGetResult