---
title: "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}"
method: PATCH
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}"
tags: ["Servers"]
---

# PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}

`PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}`

Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.

## Path parameters

- `subscriptionId` string, required
- `resourceGroupName` string, required
- `serverName` string, required

## Query parameters

- `api-version` string, required

## Request body

- ServerUpdateParameters — Parameters allowed to update for a server.
  - `sku` Sku — Billing information related properties of a server.
    - `name` string, required — The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
    - `tier` 'Basic' | 'GeneralPurpose' | 'MemoryOptimized' — The tier of the particular SKU, e.g. Basic.
    - `capacity` integer — The scale up/out capacity, representing server's compute units.
    - `size` string — The size code, to be interpreted by resource as appropriate.
    - `family` string — The family of hardware.
  - `properties` object — The properties that can be updated for a server.
    - `storageProfile` StorageProfile — Storage Profile properties of a server
      - `backupRetentionDays` integer — Backup retention days for the server.
      - `geoRedundantBackup` 'Enabled' | 'Disabled' — Enable Geo-redundant or not for server backup.
      - `storageMB` integer — Max storage allowed for a server.
      - `storageAutogrow` 'Enabled' | 'Disabled' — Enable Storage Auto Grow.
    - `administratorLoginPassword` string, password — The password of the administrator login.
    - `version` '9.5' | '9.6' | '10' | '10.0' | '10.2' | '11' — The version of a server.
    - `sslEnforcement` 'Enabled' | 'Disabled' — Enable ssl enforcement or not when connect to server.
    - `minimalTlsVersion` 'TLS1_0' | 'TLS1_1' | 'TLS1_2' | 'TLSEnforcementDisabled' — Enforce a minimal Tls version for the server.
    - `replicationRole` string — The replication role of the server.
  - `tags` object — Application-specific metadata in the form of key-value pairs.

## Response `200`

OK

- Server — unresolved $ref

## Other responses

- `202` — Accepted
- `default` — Error response describing why the operation failed.

## Changes

- **2021-07-02** (2017-12-01-preview) `ae137050faec` — 1 info
  - endpoint added
- **2020-09-09** (2017-12-01-preview) `47f1c002a84e` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/azure/apis/postgresqlmanagementclient/changes/subscriptions/:subscriptionId/resourceGroups/:resourceGroupName/providers/Microsoft.DBforPostgreSQL/servers/:serverName/patch.md)

---

[API](https://skmtc.dev/azure/apis/postgresqlmanagementclient.md) · [All operations](https://skmtc.dev/azure/apis/postgresqlmanagementclient/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/postgresqlmanagementclient/revisions/ae137050faec/schema)
