Skip to content

Latest commit

 

History

History
161 lines (122 loc) · 3.95 KB

Get-AzPostgreSqlFlexibleServerConnectionString.md

File metadata and controls

161 lines (122 loc) · 3.95 KB
external help file Module Name online version schema
Az.PostgreSql-help.xml
Az.PostgreSql
2.0.0

Get-AzPostgreSqlFlexibleServerConnectionString

SYNOPSIS

Get the connection string according to client connection provider.

SYNTAX

Get (Default)

Get-AzPostgreSqlFlexibleServerConnectionString -Client <String> -Name <String> -ResourceGroupName <String>
 [-SubscriptionId <String>] [-DefaultProfile <PSObject>]
 [<CommonParameters>]

GetViaIdentity

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: System.String
Parameter Sets: (All)
Aliases:

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

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type: System.Management.Automation.PSObject
Parameter Sets: (All)
Aliases: AzureRMContext, AzureCredential

Required: False
Position: Named
Default value: None
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: Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Models.Api20210601.IServerAutoGenerated
Parameter Sets: GetViaIdentity
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name

The name of the server.

Type: System.String
Parameter Sets: Get
Aliases: ServerName

Required: True
Position: Named
Default value: None
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: System.String
Parameter Sets: Get
Aliases:

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

-SubscriptionId

The subscription ID that identifies an Azure subscription.

Type: System.String
Parameter Sets: Get
Aliases:

Required: False
Position: Named
Default value: (Get-AzContext).Subscription.Id
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Models.Api20210601.IServerAutoGenerated

OUTPUTS

System.String

NOTES

RELATED LINKS