Get-AzPostgreSqlFlexibleServerDatabase
Gets information about a database.
Syntax
List (Default)
Get-AzPostgreSqlFlexibleServerDatabase
-ResourceGroupName <String>
-ServerName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get
Get-AzPostgreSqlFlexibleServerDatabase
-Name <String>
-ResourceGroupName <String>
-ServerName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
GetViaIdentity
Get-AzPostgreSqlFlexibleServerDatabase
-InputObject <IPostgreSqlIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Description
Gets information about a database.
Examples
Example 1: Get databases of a PostgreSql server
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
Get databases of a flexible server
Example 2: Get a database of a PostgreSql server
Get-AzPostgreSqlFlexibleServerDatabase -ResourceGroupName PowershellPostgreSqlTest -ServerName postgresql-test -Name flexibleserverdb
Name Charset Collation
---- ------- ---------
flexibleserverdb UTF8 en_US.utf8
Get a database of a flexible server by name
Example 3: Get a database of a PostgreSql server
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
Get a database of a flexible server by resource Id
Parameters
-DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
GetViaIdentity
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The name of the database.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: DatabaseName
Parameter sets
Get
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group.
The name is case insensitive.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
List
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Get
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ServerName
The name of the server.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
List
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Get
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
The ID of the target subscription.
Parameter properties
Type: String [ ]
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
List
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Get
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs