共用方式為


Configurations - Put

使用 Put 動詞更新分配給伺服器的特定可修改配置(也稱為伺服器參數)的值。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}?api-version=2025-08-01

URI 參數

名稱 位於 必要 類型 Description
configurationName
path True

string

minLength: 1
maxLength: 256
pattern: ^[-\w\._]+$

配置的名稱(也稱為伺服器參數)。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

資源群組的名稱。 名稱不區分大小寫。

serverName
path True

string

minLength: 3
maxLength: 63
pattern: ^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*

伺服器的名稱。

subscriptionId
path True

string (uuid)

目標訂用帳戶的標識碼。 此值必須是 UUID。

api-version
query True

string

minLength: 1

用於此作業的 API 版本。

要求本文

名稱 類型 Description
properties.source

string

分配給配置的值的源(也稱為伺服器參數)。 更新分配給特定可修改配置的值時需要。

properties.value

string

配置的值(也稱為伺服器參數)。 更新分配給特定可修改配置的值時需要。

回應

名稱 類型 Description
202 Accepted

已接受資源作業。

標題

  • Azure-AsyncOperation: string
  • Location: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

未預期的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 流程。

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

Update, using Put verb, the value assigned to a specific modifiable configuration (also known as server parameter) of a server.

範例要求

PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver/configurations/constraint_exclusion?api-version=2025-08-01

{
  "properties": {
    "source": "user-override",
    "value": "on"
  }
}

範例回覆

Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa?api-version=2025-06-01-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb?api-version=2025-06-01-preview

定義

名稱 Description
ConfigurationDataType

配置的數據類型(也稱為伺服器參數)。

ConfigurationForUpdate

配置(也稱為伺服器參數)。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細資料。

ErrorResponse

錯誤回應

ConfigurationDataType

配置的數據類型(也稱為伺服器參數)。

Description
Boolean
Numeric
Integer
Enumeration
String
Set

ConfigurationForUpdate

配置(也稱為伺服器參數)。

名稱 類型 Description
properties.allowedValues

string

配置的允許值(也稱為伺服器參數)。

properties.dataType

ConfigurationDataType

配置的數據類型(也稱為伺服器參數)。

properties.defaultValue

string

預設分配給配置的值(也稱為伺服器參數)。

properties.description

string

配置說明(也稱為伺服器參數)。

properties.documentationLink

string

指向配置文件的連結(也稱為伺服器參數)。

properties.isConfigPendingRestart

boolean

指示分配給配置的值(也稱為伺服器參數)是否正在等待伺服器重新啟動才能生效。

properties.isDynamicConfig

boolean

指示它是動態 (true) 還是靜態 (false) 配置(也稱為伺服器參數)。 靜態伺服器參數需要在更改分配給它們的值后重新啟動伺服器,更改才能生效。 動態伺服器參數在更改分配給它們的值后不需要重新啟動伺服器,更改就會生效。

properties.isReadOnly

boolean

指示它是只讀 (true) 還是可修改 (false) 配置(也稱為伺服器參數)。

properties.source

string

分配給配置的值的源(也稱為伺服器參數)。 更新分配給特定可修改配置的值時需要。

properties.unit

string

表示配置(也稱為伺服器參數)值的單位。

properties.value

string

配置的值(也稱為伺服器參數)。 更新分配給特定可修改配置的值時需要。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細資料。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細數據。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

error 物件。