全部產品
Search
文件中心

Elastic Compute Service:ModifyCloudAssistantSettings - 修改雲助手服務配置

更新時間:Apr 28, 2026

修改雲助手服務配置。

調試

您可以在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 ResourceBusy.SlrCreation The ServiceLinkedRole is still being created or has not taken effect yet. Please try again later.
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 InvalidOssBucketName.AccessDenied The error message returned by the OSS API is: %s
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不存在。

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情