Get-AzPostgreSqlFlexibleServerConnectionString
Get the connection string according to client connection provider.
Syntax
Get-AzPostgreSqlFlexibleServerConnectionString
-Client <String>
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzPostgreSqlFlexibleServerConnectionString
-Client <String>
-InputObject <IServerAutoGenerated>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Description
Get the connection string according to client connection provider.
Examples
Example 1: Get connection string by name
Get-AzPostgreSqlFlexibleServerConnectionString -Client ADO.NET -ResourceGroupName PowershellPostgreSqlTest -Name postgresql-test
Server=postgresql-test.postgres.database.azure.com;Database={your_database};Port=5432;User Id=adminuser;Password={your_password};
This cmdlet shows connection string of a client by server name.
Example 2: Get PostgreSql server connection string by identity
Get-AzPostgreSqlFlexibleServer -ResourceGroupName PostgreSqlTestRG -ServerName PostgreSqlTestServer | Get-AzPostgreSqlFlexibleServerConnectionString -Client PHP
host=postgresqltestserver.postgres.database.azure.com port=5432 dbname={your_database} user=pwsh password={your_password} sslmode=require
This cmdlet gets PostgreSql server connection string by identity.
Parameters
-Client
Client connection provider.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
The server for the connection string To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: | IServerAutoGenerated |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
The name of the server.
Type: | String |
Aliases: | ServerName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
The name of the resource group that contains the resource, You can obtain this value from the Azure Resource Manager API or the portal.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
The subscription ID that identifies an Azure subscription.
Type: | String |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
Notes
ALIASES
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
INPUTOBJECT <IServerAutoGenerated>
: The server for the connection string
Location <String>
: The geo-location where the resource lives[Tag <ITrackedResourceTags>]
: Resource tags.[(Any) <String>]
: This indicates any property can be added to this object.
[AdministratorLogin <String>]
: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).[AdministratorLoginPassword <SecureString>]
: The administrator login password (required for server creation).[AvailabilityZone <String>]
: availability zone information of the server.[BackupGeoRedundantBackup <GeoRedundantBackupEnum?>]
: A value indicating whether Geo-Redundant backup is enabled on the server.[BackupRetentionDay <Int32?>]
: Backup retention days for the server.[CreateMode <CreateMode?>]
: The mode to create a new PostgreSQL server.[HighAvailabilityMode <HighAvailabilityMode?>]
: The HA mode for the server.[HighAvailabilityStandbyAvailabilityZone <String>]
: availability zone information of the standby.[IdentityType <ResourceIdentityType?>]
: The identity type.[MaintenanceWindowCustomWindow <String>]
: indicates whether custom window is enabled or disabled[MaintenanceWindowDayOfWeek <Int32?>]
: day of week for maintenance window[MaintenanceWindowStartHour <Int32?>]
: start hour for maintenance window[MaintenanceWindowStartMinute <Int32?>]
: start minute for maintenance window[NetworkDelegatedSubnetResourceId <String>]
: delegated subnet arm resource id.[NetworkPrivateDnsZoneArmResourceId <String>]
: private dns zone arm resource id.[PointInTimeUtc <DateTime?>]
: Restore point creation time (ISO8601 format), specifying the time to restore from. It's required when 'createMode' is 'PointInTimeRestore'.[PropertiesTag <IServerPropertiesTags>]
: Application-specific metadata in the form of key-value pairs.[(Any) <String>]
: This indicates any property can be added to this object.
[SkuName <String>]
: The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3.[SkuTier <SkuTier?>]
: The tier of the particular SKU, e.g. Burstable.[SourceServerResourceId <String>]
: The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore'.[StorageSizeGb <Int32?>]
: Max storage allowed for a server.[SystemDataCreatedAt <DateTime?>]
: The timestamp of resource creation (UTC).[SystemDataCreatedBy <String>]
: The identity that created the resource.[SystemDataCreatedByType <CreatedByType?>]
: The type of identity that created the resource.[SystemDataLastModifiedAt <DateTime?>]
: The timestamp of resource last modification (UTC)[SystemDataLastModifiedBy <String>]
: The identity that last modified the resource.[SystemDataLastModifiedByType <CreatedByType?>]
: The type of identity that last modified the resource.[Version <ServerVersion?>]
: PostgreSQL Server version.
Azure PowerShell
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for