修改云助手服务配置。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ecs:ModifyCloudAssistantSettings |
update |
*ServiceSettings
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
地域 ID。 |
cn-hangzhou |
| SettingType |
string |
是 |
服务配置类型。当前取值范围:
|
SessionManagerDelivery |
| OssDeliveryConfig |
object |
否 |
OSS 投递配置信息。 |
|
| Enabled |
boolean |
否 |
是否开启投递到 OSS 功能。默认值:false。 |
false |
| BucketName |
string |
否 |
OSS 存储空间名称。 |
example-bucket |
| Prefix |
string |
否 |
OSS 存储空间目录前缀。约束如下:
注:传入""表示不需要目录前缀;若之前设置过,而当前不再需要目录前缀可传入""清空。 |
sessionmanager/audit |
| EncryptionType |
string |
否 |
OSS 加密方式,可选值:
|
Inherit |
| EncryptionAlgorithm |
string |
否 |
OSS 加密算法,可选值:
|
AES256 |
| EncryptionKeyId |
string |
否 |
加密方式为 KMS 时,用户的主密钥 CMK ID。 |
a807****7a70e |
| SlsDeliveryConfig |
object |
否 |
SLS 投递配置信息。 |
|
| Enabled |
boolean |
否 |
是否开启投递到 SLS 功能。 默认值:false |
false |
| ProjectName |
string |
否 |
SLS 项目名称。 |
example-project |
| LogstoreName |
string |
否 |
SLS 日志库名称。 |
example-logstore |
| AgentUpgradeConfig |
object |
否 |
云助手 Agent 升级配置。 |
|
| Enabled |
boolean |
否 |
是否开启自定义 Agent 升级配置。如设置为 false,默认保持每 30 分钟尝试升级一次。 默认值:false。 |
true |
| AllowedUpgradeWindow |
array |
否 |
允许升级的时间段列表,可精确到分,默认为 UTC 时区。 各时间段的间隔不能小于 1 小时。 格式:开始时间(HH:mm)-结束时间(HH:mm)。 如[ "02:00-03:00", "05:00-06:00" ] 代表在 UTC 时区的每天 2 点-3 点、5 点-6 点允许升级。 |
|
|
string |
否 |
允许升级的时间段列表,可精确到分,默认为 UTC 时区。 各时间段的间隔不能小于 1 小时。 格式:开始时间(HH:mm)-结束时间(HH:mm)。 如[ "02:00-03:00", "05:00-06:00" ] 代表在 UTC 时区的每天 2 点-3 点、5 点-6 点允许升级。 |
[ "02:00-03:00", "05:00-06:00" ] |
|
| TimeZone |
string |
否 |
允许升级时间段的时区。默认为 UTC 时区。 时区支持以下两种形式:
|
Asia/Shanghai |
| BootstrapUpgrade |
boolean |
否 |
是否在云助手 Agent 启动时立即检查版本和进行更新。默认值:true。 确保云助手 Agent 版本不低于以下版本才会生效:
|
true |
| DisableUpgrade |
boolean |
否 |
是否禁止云助手 Agent 检查和进行更新。默认值:false。 确保云助手 Agent 版本不低于以下版本才会生效:
|
false |
| ResourceUsageConfig |
object |
否 |
云助手资源占用配置。确保云助手 Agent 版本不低于以下版本才会生效:
|
|
| CpuLimit |
integer |
否 |
云助手 Agent 主进程最大允许的 CPU 占用限制。
|
20 |
| MemoryLimit |
string |
否 |
云助手 Agent 主进程最大允许的内存占用限制,必须指定单位(B|KB|MB)。
|
50MB |
| OverloadLimit |
integer |
否 |
CPU 或内存资源占用连续超限次数上限,达到上限后云助手 Agent 自动终止运行。
|
3 |
| LogFileCountLimit |
integer |
否 |
云助手日志文件的最大保存数量。
|
30 |
| LogSizeLimit |
string |
否 |
单个云助手日志文件的大小限制,必须指定单位(B|KB|MB)。
|
10MB |
| KeepScriptFile |
boolean |
否 |
命令执行完成后,是否保留脚本文件到云助手目录。 默认值:false。 |
false |
| SessionManagerConfig |
object |
否 |
云助手会话功能配置。 |
|
| SessionManagerEnabled |
boolean |
否 |
云助手会话功能开关。取值范围:
注意事项:
|
true |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
示例
正常返回示例
JSON格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter.SettingType | The specified parameter SettingType is not valid. | 指定的参数SettingType不合法。 |
| 400 | InvalidParameter.OssEncryptionType | The specified parameter OssDeliveryConfig.EncryptionType is not valid. | 指定的参数OssDeliveryConfig.EncryptionType不合法。 |
| 400 | InvalidParameter.OssEncryptionAlgorithm | The specified parameter OssDeliveryConfig.EncryptionAlgorithm is not valid. | 指定的参数OssDeliveryConfig.EncryptionAlgorithm 不合法。 |
| 400 | InvalidParameter.OssEncryptionKeyId | The specified parameter OssDeliveryConfig.EncryptionKeyId is not valid. | 指定的参数OssDeliveryConfig.EncryptionKeyId不合法。 |
| 400 | InvalidParameter.OssBucketName | The specified parameter OssDeliveryConfig.BucketName is not valid. | 指定的参数OssDeliveryConfig.BucketName不合法。 |
| 400 | InvalidParameter.OssPrefix | The specified parameter OssDeliveryConfig.Prefix is not valid. | 指定的参数OssDeliveryConfig.Prefix不合法。 |
| 400 | InvalidOssBucketName.InOtherRegion | The specified parameter OssDeliveryConfig.BucketName is in another region. | 指定的参数OssDeliveryConfig.BucketName对应的OSS存储空间在其他地域。 |
| 400 | InvalidParameter.SlsProjectName | The specified parameter SlsDeliveryConfig.ProjectName is not valid. | 指定的参数SlsDeliveryConfig.ProjectName不合法。 |
| 400 | InvalidParameter.SlsLogstoreName | The specified parameter SlsDeliveryConfig.LogstoreName is not valid. | 指定的参数SlsDeliveryConfig.LogstoreName不合法。 |
| 400 | InvalidParameter.AllowedUpgradeWindow | The specified parameter AgentUpgradeConfig.AllowedUpgradeWindow is not valid. | 指定的参数AgentUpgradeConfig.AllowedUpgradeWindow不合法。 |
| 400 | InvalidAllowedUpgradeWindow.DurationTooShort | The duration of the specified parameter AgentUpgradeConfig.AllowedUpgradeWindow cannot be less than one hour. | 参数AllowedUpgradeWindow的间隔不能短于1小时。 |
| 400 | InvalidParameter.TimeZone | The specified parameter AgentUpgradeConfig.TimeZone is not valid. | 指定的参数AgentUpgradeConfig.TimeZone不合法。 |
| 400 | InvalidAllowedUpgradeWindow.Required | The specified parameter AgentUpgradeConfig.AllowedUpgradeWindow is required. | 当您开启自定义Agent升级配置参数时,AgentUpgradeConfig.AllowedUpgradeWindow是必填的。 |
| 400 | InvalidParameter.CpuLimit | The specified parameter CpuLimit is not valid. | |
| 400 | InvalidParameter.MemoryLimit | The specified parameter MemoryLimit is not valid. | |
| 400 | InvalidParameter.OverloadLimit | The specified parameter OverloadLimit is not valid. | |
| 400 | InvalidParameter.LogFileCountLimit | The specified parameter LogFileCountLimit is not valid. | |
| 400 | InvalidParameter.LogSizeLimit | The specified parameter LogSizeLimit is not valid. | |
| 500 | InternalError | An error occurred when you dispatched the request. | 发送请求时发生错误,请稍后重试。 |
| 403 | CreateServiceLinkedRole.NoPermission | You do not have permission to create ServiceLinkedRole. | 您没有创建服务关联角色的权限。 |
| 403 | InvalidOperation.OssEncryptionUnsupported | The configuration of OSS Encryption is not supported. | 当前服务不支持设置OSS加密方式。 |
| 403 | InvalidAllowedUpgradeWindow.CountLimitExceeded | The count of the parameter AgentUpgradeConfig.AllowedUpgradeWindow exceeds the limit of 5. | 参数 AgentUpgradeConfig.AllowedUpgradeWindow的数量超过了5的限制。 |
| 403 | InvalidOperation.SessionManagerDeliveryUnsupported | The delivery configuration of Session Manager is not supported. | 不支持启用Session Manager投递配置。 |
| 403 | InvalidDisableUpgrade.Conflict | The parameter DisableUpgrade cannot be specified with parameter BootstrapUpgrade. | |
| 404 | InvalidSlsProjectName.NotFound | The specified parameter SlsDeliveryConfig.ProjectName does not exist. | 指定的SLS项目不存在。 |
| 404 | InvalidSlsLogstoreName.NotFound | The specified parameter SlsDeliveryConfig.LogstoreName does not exist. | 指定的SLS日志库不存在。 |
| 404 | InvalidOssBucketName.NotFound | The specified parameter OssDeliveryConfig.BucketName does not exist. | 指定的OSS存储空间不存在。 |
| 404 | InvalidRegionId.NotFound | The specified parameter RegionId does not exist. | 指定的地域ID不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。