修改设置
PUT /accounts/{account_id}/core/v1/settings/{setting_id}
将整个存储资源替换为提供的 JSON 请求正文,同时保留不可由用户修改的键值。
参数
| 名称 | Type | 在 | Required | Description |
|---|---|---|---|---|
account_id |
string |
path |
True |
包含帐户资源的 ID
|
setting_id |
string |
path |
True |
要列出的设置集合的 ID |
请求正文
将整个存储资源替换为提供的 JSON 请求正文,同时保留不可由用户修改的键值。
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
资源的媒体类型。定义的值为:
|
version |
string |
True |
资源的版本。定义的值为:
|
id |
string |
False |
资源的全局唯一标识符。定义的值为:
|
name |
string |
False |
包含设置名称的 JSON 字符串,采用分层点表示法(.)。定义的值是:
|
currentConfig |
False |
包含构成此设置的当前配置的键和值的 JSON 对象。此对象的内容必须符合 configSchema 字段中包含的 JSON Schema。默认值由 configmap 提供。用户更改默认值后,它们将不会被覆盖。 |
|
desiredConfig |
False |
JSON 对象包含组成此设置的请求配置的键和值。此对象的内容必须符合 configSchema 字段中包含的 JSON 架构。该对象在指定之前不存在。指定后,这将触发功能服务通知相应服务请求可以应用所需配置。然后,相应的服务可以执行验证并将所需配置应用于当前配置。 |
|
configSchema |
False |
包含此资源中 config 属性的 JSON 架构的 JSON 对象。必须符合 JSON Schema Draft 7。如果资源中存在配置值,则必须根据所示的 configSchema 进行验证。作为一种常见的约定,建议在适当的时候配置具有"isEnabled"字段。"isEnabled"字段包含一个值,该值指示设置是打开("true")还是关闭("false")。 |
|
状态 |
string |
False |
包含指示应用程序操作状态的值的 JSON 字符串。定义的值是:
|
stateUnready |
数组[string] |
False |
JSON 字符串的 JSON 数组,每个字符串指示未成功应用设置的原因。定义的值为:
|
元数据 |
False |
与资源关联的客户端和服务指定的元数据。定义的值为:
|
请求示例
{
"type": "application/astra-setting",
"version": "1.1",
"desiredConfig": {
"credential": "e3d2ea77-398e-49be-85fd-ec66d9426a06",
"port": 587,
"relayServer": "smtp.sendgrid.net",
"isEnabled": "true"
}
}
响应
Status: 204, Indicates if the setting resource was updated.
响应
Status: 401, Unauthorized
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
响应示例
{
"type": "https://astra.netapp.io/problems/3",
"title": "Missing bearer token",
"detail": "The request is missing the required bearer token.",
"status": "401"
}
响应
Status: 400, Bad request
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
|
invalidFields |
数组["invalidFields"] |
False |
无效请求正文字段列表 |
响应示例
{
"type": "https://astra.netapp.io/problems/5",
"title": "Invalid query parameters",
"detail": "The supplied query parameters are invalid.",
"status": "400"
}
响应
Status: 409, Conflict
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
|
invalidFields |
数组["invalidFields"] |
False |
无效请求正文字段列表 |
响应示例
{
"type": "https://astra.netapp.io/problems/10",
"title": "JSON resource conflict",
"detail": "The request body JSON contains a field that conflicts with an idempotent value.",
"status": "409"
}
响应
Status: 403, Forbidden
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
响应示例
{
"type": "https://astra.netapp.io/problems/11",
"title": "Operation not permitted",
"detail": "The requested operation isn't permitted.",
"status": "403"
}
响应
Status: 503, Service unavailable
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
响应示例
{
"type": "https://astra.netapp.io/problems/41",
"title": "Service not ready",
"detail": "Currently, the service can't respond to this request.",
"status": "503"
}
错误
Status: 404, Not found
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
错误响应示例
{
"type": "https://astra.netapp.io/problems/2",
"title": "Collection not found",
"detail": "The collection specified in the request URI wasn't found.",
"status": "404"
}
定义
查看定义
type_json
包含构成此设置的当前配置的键和值的 JSON 对象。此对象的内容必须符合 configSchema 字段中包含的 JSON Schema。默认值由 configmap 提供。用户更改默认值后,它们将不会被覆盖。
type_json
JSON 对象包含组成此设置的请求配置的键和值。此对象的内容必须符合 configSchema 字段中包含的 JSON 架构。该对象在指定之前不存在。指定后,这将触发功能服务通知相应服务请求可以应用所需配置。然后,相应的服务可以执行验证并将所需配置应用于当前配置。
属性
类型_json_schema
包含此资源中 config 属性的 JSON 架构的 JSON 对象。必须符合 JSON Schema Draft 7。如果资源中存在配置值,则必须根据所示的 configSchema 进行验证。作为一种常见的约定,建议在适当的时候配置具有"isEnabled"字段。"isEnabled"字段包含一个值,该值指示设置是打开("true")还是关闭("false")。
| 名称 | Type | Required | Description |
|---|---|---|---|
$schema |
string |
True |
|
type |
string |
True |
|
属性 |
True |
||
additionalProperties |
布尔值 |
True |
|
必填 |
数组[string] |
True |
类型 Astra 标签
| 名称 | Type | Required | Description |
|---|---|---|---|
name |
string |
True |
|
value |
string |
True |
type_astra_metadata_update
与资源关联的客户端和服务指定的元数据。定义的值为:
-
符合 Astra 元数据架构如果在更新时未指定,则元数据对象的标签、creationTimestamp 和 createdBy 将不加修改地保留。
| 名称 | Type | Required | Description |
|---|---|---|---|
labels |
数组["类型 Astra 标签"] |
False |
|
creationTimestamp |
string |
False |
|
modificationTimestamp |
string |
False |
|
已创建 |
string |
False |
|
modifiedBy |
string |
False |
invalidParams
| 名称 | Type | Required | Description |
|---|---|---|---|
name |
string |
True |
无效查询参数的名称 |
原因 |
string |
True |
查询参数无效的原因 |
invalidFields
| 名称 | Type | Required | Description |
|---|---|---|---|
name |
string |
True |
无效请求正文字段的名称 |
原因 |
string |
True |
请求正文字段无效的原因 |