修改雲助手服務配置。
調試
您可以在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 | 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不存在。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。