应用参数模版
更新时间:2023-11-29
请求说明
应用参数模版到实例。
请求结构
                Plain Text
                
            
            1POST /v2/template/apply/{templateShowId} HTTP/1.1
2Host: redis.{region}.baidubce.com
3Authorization: authorization string
4{
5    "rebootType" : rebootType,
6    "extra" : "extra",
7    "cacheClusterList" : [ {
8        "cacheClusterShowId" : "cacheClusterShowId",
9        "region" : "region"
10    } ],
11    "parameters" : [ {
12        "confName" : "confName",
13        "confModule" : confModule,
14        "confValue" : "confValue0,confValue1",
15        "confType" : confType
16    } ]
17}请求头域
除公共头域外,无其它特殊头域。
请求参数
| 参数名称 | 类型 | 是否必选 | 参数位置 | 描述 | 
|---|---|---|---|---|
| templateShowId | String | 否 | URL参数 | 模版ID | 
| extra | String | 是 | RequestBody参数 | 是否有额外的修改(0:无;1:有),没有修改的参数不需要传parameters | 
| cacheClusterList | List<cacheClusterShowIdItem> | 否 | RequestBody参数 | 实例ID集合 | 
| rebootType | Integer | 否 | RequestBody参数 | 是否需要重启(0 不重启 1 维护时间重启 2 立即重启 如果是热活的主集群的话不可以重启) | 
| parameters | List <Parameters> | 否 | RequestBody参数 | 参数模版中需要修改的参数,extra=1时有效 | 
Parameters
| 参数名称 | 类型 | 是否必选 | 描述 | 
|---|---|---|---|
| confName | String | 是 | 参数名称(可参考系统模版) | 
| confValue | String | 是 | 参数值(可修改对应的值,可参考系统模版在confRange的允许范围内修改) | 
| confType | Integer | 是 | 参数类型(可参考系统模版) | 
| confModule | Integer | 是 | 可参考系统模版 | 
cacheClusterShowIdItem
| 参数名称 | 类型 | 是否必选 | 描述 | 
|---|---|---|---|
| region | String | 是 | 实例所在地域 | 
| cacheClusterShowId | String | 是 | 实例ID | 
返回头域
除公共头域外,无其它特殊头域。
返回参数
无特殊返回参数。
请求示例
                Plain Text
                
            
            1POST /v2/template/apply/scs-tmpl-dycgmxbxlbow HTTP/1.1
2HOST: redis.bj.baidubce.com
3Content-Type: application/json 
4Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
5{
6    "rebootType" : 0,
7    "extra" : "0",
8    "cacheClusterList" : [ {
9        "cacheClusterShowId" : "scs-tmpl-jlbohgyzkxgs",
10        "region" : "bd"
11    } ],
12    "parameters" : [ {
13        "confName" : "disable_commands",
14        "confModule" : 1,
15        "confValue" : "flushall,flushdb",
16        "confType" : 3
17    } ]
18}返回示例
                Plain Text
                
            
            1HTTP/1.1 200 OK
2Content-Type: application/json;charset=UTF-8
3x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5