Condividi tramite


Get-AzPostgreSqlFlexibleServerDatabase

Ottiene informazioni su un database.

Sintassi

Get-AzPostgreSqlFlexibleServerDatabase
   -ResourceGroupName <String>
   -ServerName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzPostgreSqlFlexibleServerDatabase
   -Name <String>
   -ResourceGroupName <String>
   -ServerName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzPostgreSqlFlexibleServerDatabase
   -InputObject <IPostgreSqlIdentity>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

Descrizione

Ottiene informazioni su un database.

Esempio

Esempio 1: Ottenere database di un server PostgreSql

Get-AzPostgreSqlFlexibleServerDatabase -ResourceGroupName PowershellPostgreSqlTest -ServerName postgresql-test

Name              Charset Collation
----              ------- ---------
azure_maintenance UTF8    en_US.utf8
postgres          UTF8    en_US.utf8
azure_sys         UTF8    en_US.utf8
flexibleserverdb  UTF8    en_US.utf8

Ottenere database di un server flessibile

Esempio 2: Ottenere un database di un server PostgreSql

Get-AzPostgreSqlFlexibleServerDatabase -ResourceGroupName PowershellPostgreSqlTest -ServerName postgresql-test -Name flexibleserverdb

Name             Charset Collation
----             ------- ---------
flexibleserverdb UTF8    en_US.utf8

Ottenere un database di un server flessibile in base al nome

Esempio 3: Ottenere un database di un server PostgreSql

Get-AzPostgreSqlFlexibleServerDatabase -InputObject /subscriptions/0000000000-0000-0000-0000-000000000000/resourceGroups/PowershellPostgreSqlTest/providers/Microsoft.DBforPostgreSQL/flexibleServers/postgresql-test/databases/flexibleserverdb

Name             Charset Collation
----             ------- ---------
flexibleserverdb UTF8    en_US.utf8

Ottenere un database di un server flessibile in base all'ID risorsa

Parametri

-DefaultProfile

Il parametro DefaultProfile non è funzionale. Usare il parametro SubscriptionId quando disponibile se si esegue il cmdlet su una sottoscrizione diversa.

Tipo:PSObject
Alias:AzureRMContext, AzureCredential
Posizione:Named
Valore predefinito:None
Necessario:False
Accettare l'input della pipeline:False
Accettare caratteri jolly:False

-InputObject

Parametro Identity Per costruire, vedere la sezione NOTES per le proprietà INPUTOBJECT e creare una tabella hash.

Tipo:IPostgreSqlIdentity
Posizione:Named
Valore predefinito:None
Necessario:True
Accettare l'input della pipeline:True
Accettare caratteri jolly:False

-Name

Nome del database.

Tipo:String
Alias:DatabaseName
Posizione:Named
Valore predefinito:None
Necessario:True
Accettare l'input della pipeline:False
Accettare caratteri jolly:False

-ResourceGroupName

Nome del gruppo di risorse. Il nome non fa distinzione tra maiuscole e minuscole.

Tipo:String
Posizione:Named
Valore predefinito:None
Necessario:True
Accettare l'input della pipeline:False
Accettare caratteri jolly:False

-ServerName

Nome del server.

Tipo:String
Posizione:Named
Valore predefinito:None
Necessario:True
Accettare l'input della pipeline:False
Accettare caratteri jolly:False

-SubscriptionId

ID della sottoscrizione di destinazione.

Tipo:String[]
Posizione:Named
Valore predefinito:(Get-AzContext).Subscription.Id
Necessario:False
Accettare l'input della pipeline:False
Accettare caratteri jolly:False

Input

IPostgreSqlIdentity

Output

IDatabaseAutoGenerated