ModifyCloudAssistantSettings - 修改云助手服务配置

更新时间:
复制为 MD 格式

修改云助手服务配置。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

ecs:ModifyCloudAssistantSettings

update

*ServiceSettings

acs:ecs:{#regionId}:{#accountId}:servicesettings/{#servicesettingId}

请求参数

名称

类型

必填

描述

示例值

RegionId

string

地域 ID。

cn-hangzhou

SettingType

string

服务配置类型。当前取值范围:

  • SessionManagerDelivery:会话操作记录投递。

  • InvocationDelivery:任务执行记录投递。

  • AgentUpgradeConfig:云助手 Agent 升级配置。

  • SessionManagerConfig: 云助手 SessionManager 配置。

SessionManagerDelivery

OssDeliveryConfig

object

OSS 投递配置信息。

Enabled

boolean

是否开启投递到 OSS 功能。默认值:false。

false

BucketName

string

OSS 存储空间名称。

example-bucket

Prefix

string

OSS 存储空间目录前缀。约束如下:

  • 长度不得超过 254 个字符。

  • 不能以正斜线(/)或者反斜线(\)开头。

注:传入""表示不需要目录前缀;若之前设置过,而当前不再需要目录前缀可传入""清空。

sessionmanager/audit

EncryptionType

string

OSS 加密方式,可选值:

  • Inherit:继承 Bucket;

  • OssManaged:OSS 完全托管;

  • KMS:KMS 加密。

Inherit

EncryptionAlgorithm

string

OSS 加密算法,可选值:

  • AES256

  • SM4

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(中国/上海时间)、America/Los_Angeles(美国/洛杉矶时间)等。

  • 时区相对于格林威治时间的偏移量: 如 GMT+8:00(东八区)、GMT-7:00(西七区)等。小时位不支持添加前导零。

Asia/Shanghai

BootstrapUpgrade

boolean

是否在云助手 Agent 启动时立即检查版本和进行更新。默认值:true。

确保云助手 Agent 版本不低于以下版本才会生效:

  • Windows:2.1.4.1065

  • Linux:2.2.4.1065

true

DisableUpgrade

boolean

是否禁止云助手 Agent 检查和进行更新。默认值:false。

确保云助手 Agent 版本不低于以下版本才会生效:

  • Windows:2.1.4.1065

  • Linux:2.2.4.1065

false

ResourceUsageConfig

object

云助手资源占用配置。确保云助手 Agent 版本不低于以下版本才会生效:

  • Windows:2.1.4.1065

  • Linux:2.2.4.1065

CpuLimit

integer

云助手 Agent 主进程最大允许的 CPU 占用限制。

  • 单位:百分比。

  • 取值范围:10-95。

  • 默认值:20。

20

MemoryLimit

string

云助手 Agent 主进程最大允许的内存占用限制,必须指定单位(B|KB|MB)。

  • 默认值:50MB。

  • 最小值:35MB。

  • 最大值:1024MB。

50MB

OverloadLimit

integer

CPU 或内存资源占用连续超限次数上限,达到上限后云助手 Agent 自动终止运行。

  • 默认值:3。

  • 最小值:3。

3

LogFileCountLimit

integer

云助手日志文件的最大保存数量。

  • 默认:30。

  • 最小值:7。

  • 最大值:365。

30

LogSizeLimit

string

单个云助手日志文件的大小限制,必须指定单位(B|KB|MB)。

  • 默认值:100MB。

  • 最小值:10MB。

  • 最大值:1024MB。

10MB

KeepScriptFile

boolean

命令执行完成后,是否保留脚本文件到云助手目录。 默认值:false。

false

SessionManagerConfig

object

云助手会话功能配置。

SessionManagerEnabled

boolean

云助手会话功能开关。取值范围:

  • true: 开启;

  • false: 关闭。

注意事项:

  • 会话功能开启/关闭对全部地域生效。

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不存在。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情