Compartilhar via


Get-AzCosmosDBLocation

Liste os locais do Azure Cosmos DB e suas propriedades. Obtenha as propriedades de localização do Azure Cosmos DB para um local específico.

Sintaxe

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

Description

Liste os locais do Azure Cosmos DB com suas propriedades de localização. Inclui ID de local, nome, tipo, SupportsAvailabilityZone, IsResidencyRestricted, BackupStorageRedundancies, IsSubscriptionRegionAccessAllowedForRegular, IsSubscriptionRegionAccessAllowedForAz e Status.

Exemplos

Exemplo 1: Obter propriedades de local da conta do Azure Cosmos DB para determinado local

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"
                   }
}

Exemplo 2: Listar locais de conta do Azure Cosmos DB e suas propriedades

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"
                       }
    }
]

Parâmetros

-DefaultProfile

As credenciais, a conta, o locatário e a assinatura usados para a comunicação com o Azure.

Tipo:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Cargo:Named
Valor padrão:None
Obrigatório:False
Aceitar a entrada de pipeline:False
Aceitar caracteres curinga:False

-Location

-Nome do local na cadeia de caracteres.

Tipo:String
Cargo:Named
Valor padrão:None
Obrigatório:False
Aceitar a entrada de pipeline:False
Aceitar caracteres curinga:False

Entradas

None

Saídas

PSLocationGetResult