Update-AzPostgreSqlServer
Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. Use Update-AzPostSqlConfiguration instead if you want update server parameters such as wait_timeout or net_retry_count.
Syntax
Update-AzPostgreSqlServer
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-AdministratorLoginPassword <SecureString>]
[-BackupRetentionDay <Int32>]
[-MinimalTlsVersion <MinimalTlsVersionEnum>]
[-PublicNetworkAccess <PublicNetworkAccessEnum>]
[-ReplicationRole <String>]
[-Sku <String>]
[-SkuCapacity <Int32>]
[-SkuFamily <String>]
[-SkuTier <SkuTier>]
[-SslEnforcement <SslEnforcementEnum>]
[-StorageAutogrow <StorageAutogrow>]
[-StorageInMb <Int32>]
[-Tag <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-Confirm]
[-WhatIf]
[<CommonParameters>]
Update-AzPostgreSqlServer
-InputObject <IPostgreSqlIdentity>
[-AdministratorLoginPassword <SecureString>]
[-BackupRetentionDay <Int32>]
[-MinimalTlsVersion <MinimalTlsVersionEnum>]
[-PublicNetworkAccess <PublicNetworkAccessEnum>]
[-ReplicationRole <String>]
[-Sku <String>]
[-SkuCapacity <Int32>]
[-SkuFamily <String>]
[-SkuTier <SkuTier>]
[-SslEnforcement <SslEnforcementEnum>]
[-StorageAutogrow <StorageAutogrow>]
[-StorageInMb <Int32>]
[-Tag <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-Confirm]
[-WhatIf]
[<CommonParameters>]
Description
Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. Use Update-AzPostSqlConfiguration instead if you want update server parameters such as wait_timeout or net_retry_count.
Examples
Example 1: Update PostgreSql server by resource group and server name
Update-AzPostgreSqlServer -ResourceGroupName PostgreSqlTestRG -ServerName PostgreSqlTestServer -SslEnforcement Disabled
Name Location AdministratorLogin Version StorageProfileStorageMb SkuName SkuTier SslEnforcement
---- -------- ------------------ ------- ----------------------- ------- ------- --------------
postgresqltestserver eastus pwsh 9.6 5120 GP_Gen5_4 GeneralPurpose Disabled
This cmdlet updates PostgreSql server by resource group and server name.
Example 2: Update PostgreSql server by identity.
Get-AzPostgreSqlServer -ResourceGroupName PostgreSqlTestRG -ServerName PostgreSqlTestServer | Update-AzPostgreSqlServer -BackupRetentionDay 23
Name Location AdministratorLogin Version StorageProfileStorageMb SkuName SkuTier SslEnforcement
---- -------- ------------------ ------- ----------------------- ------- ------- --------------
postgresqltestserver eastus pwsh 9.6 5120 GP_Gen5_4 GeneralPurpose Disabled
This cmdlet updates PostgreSql server by identity.
Parameters
-AdministratorLoginPassword
The password of the administrator login.
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AsJob
Run the command as a job.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BackupRetentionDay
Backup retention days for the server. Day count is between 7 and 35.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
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
Identity Parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: | IPostgreSqlIdentity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MinimalTlsVersion
Set the minimal TLS version for connections to server when SSL is enabled. Default is TLSEnforcementDisabled.accepted values: TLS1_0, TLS1_1, TLS1_2, TLSEnforcementDisabled.
Type: | MinimalTlsVersionEnum |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
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 |
-NoWait
Run the command asynchronously.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PublicNetworkAccess
Enable or disable public network access
Type: | PublicNetworkAccessEnum |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReplicationRole
The replication role of the server.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
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 |
-Sku
The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SkuCapacity
The scale up/out capacity, representing server's compute units.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SkuFamily
The family of hardware.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SkuTier
The tier of the particular SKU, e.g. Basic.
Type: | SkuTier |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SslEnforcement
Enable ssl enforcement or not when connect to server.
Type: | SslEnforcementEnum |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageAutogrow
Enable Storage Auto Grow.
Type: | StorageAutogrow |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageInMb
Max storage allowed for a server.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
-Tag
Application-specific metadata in the form of key-value pairs.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
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 <IPostgreSqlIdentity>
: Identity Parameter.
[ConfigurationName <String>]
: The name of the server configuration.[DatabaseName <String>]
: The name of the database.[FirewallRuleName <String>]
: The name of the server firewall rule.[Id <String>]
: Resource identity path[LocationName <String>]
: The name of the location.[ResourceGroupName <String>]
: The name of the resource group. The name is case insensitive.[SecurityAlertPolicyName <SecurityAlertPolicyName?>]
: The name of the security alert policy.[ServerName <String>]
: The name of the server.[SubscriptionId <String>]
: The ID of the target subscription.[VirtualNetworkRuleName <String>]
: The name of the virtual network rule.
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