你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Configurations - Put
更新服务器的配置。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}?api-version=2024-11-01-preview
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
configuration
|
path | True |
string |
服务器配置的名称。 正则表达式模式: |
resource
|
path | True |
string |
资源组的名称。 名称不区分大小写。 |
server
|
path | True |
string |
服务器的名称。 正则表达式模式: |
subscription
|
path | True |
string uuid |
目标订阅的 ID。 该值必须是 UUID。 |
api-version
|
query | True |
string |
用于此操作的 API 版本。 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
properties.source |
string |
配置的源。 需要更新配置。 |
properties.value |
string |
配置的值。 需要更新配置。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
还行 |
|
201 Created |
创建 |
|
202 Accepted |
接受 标头 Location: string |
|
Other Status Codes |
描述操作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Update a user configuration
示例请求
PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/event_scheduler?api-version=2024-11-01-preview
{
"properties": {
"value": "on",
"source": "user-override"
}
}
示例响应
{
"properties": {
"value": "ON",
"description": "Indicates the status of the Event Scheduler.",
"defaultValue": "OFF",
"dataType": "Enumeration",
"allowedValues": "ON,OFF,DISABLED",
"source": "user-override"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/event_scheduler",
"name": "event_scheduler",
"type": "Microsoft.DBforPostgreSQL/flexibleServers/configurations"
}
{
"properties": {
"value": "ON",
"description": "Indicates the status of the Event Scheduler.",
"defaultValue": "OFF",
"dataType": "Enumeration",
"allowedValues": "ON,OFF,DISABLED",
"source": "user-override"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/testserver/configurations/event_scheduler",
"name": "event_scheduler",
"type": "Microsoft.DBforPostgreSQL/flexibleServers/configurations"
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2024-11-01-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2024-11-01-preview
定义
名称 | 说明 |
---|---|
Configuration |
表示配置。 |
Configuration |
配置的数据类型。 |
created |
创建资源的标识的类型。 |
Error |
资源管理错误附加信息。 |
Error |
错误详细信息。 |
Error |
错误响应 |
system |
与创建和上次修改资源相关的元数据。 |
Configuration
表示配置。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
name |
string |
资源的名称 |
properties.allowedValues |
string |
允许的配置值。 |
properties.dataType |
配置的数据类型。 |
|
properties.defaultValue |
string |
配置的默认值。 |
properties.description |
string |
配置说明。 |
properties.documentationLink |
string |
配置文档链接。 |
properties.isConfigPendingRestart |
boolean |
配置处于等待重启状态。 |
properties.isDynamicConfig |
boolean |
配置动态或静态。 |
properties.isReadOnly |
boolean |
配置只读或否。 |
properties.source |
string |
配置的源。 需要更新配置。 |
properties.unit |
string |
配置单元。 |
properties.value |
string |
配置的值。 需要更新配置。 |
systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
type |
string |
资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
ConfigurationDataType
配置的数据类型。
名称 | 类型 | 说明 |
---|---|---|
Boolean |
string |
|
Enumeration |
string |
|
Integer |
string |
|
Numeric |
string |
createdByType
创建资源的标识的类型。
名称 | 类型 | 说明 |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
ErrorAdditionalInfo
资源管理错误附加信息。
名称 | 类型 | 说明 |
---|---|---|
info |
object |
其他信息。 |
type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
additionalInfo |
错误附加信息。 |
|
code |
string |
错误代码。 |
details |
错误详细信息。 |
|
message |
string |
错误消息。 |
target |
string |
错误目标。 |
ErrorResponse
错误响应
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
systemData
与创建和上次修改资源相关的元数据。
名称 | 类型 | 说明 |
---|---|---|
createdAt |
string |
资源创建时间戳(UTC)。 |
createdBy |
string |
创建资源的标识。 |
createdByType |
创建资源的标识的类型。 |
|
lastModifiedAt |
string |
上次修改的资源时间戳(UTC) |
lastModifiedBy |
string |
上次修改资源的标识。 |
lastModifiedByType |
上次修改资源的标识的类型。 |