Change the Cloud Assistant settings.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:ModifyCloudAssistantSettings |
update |
*ServiceSettings
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The ID of the region. |
cn-hangzhou |
| SettingType |
string |
Yes |
The type of the service configurations. Valid values:
|
SessionManagerDelivery |
| OssDeliveryConfig |
object |
No |
The configurations of delivering records to OSS. |
|
| Enabled |
boolean |
No |
Specifies whether to enable the feature of delivering records to OSS. Default value: false. |
false |
| BucketName |
string |
No |
The name of the OSS bucket. |
example-bucket |
| Prefix |
string |
No |
The prefix of the directory in the OSS bucket. The following limits apply:
Note: If you want to deliver records to the root directory of the bucket, enter "". To clear the prefix that is previously set, enter "". |
sessionmanager/audit |
| EncryptionType |
string |
No |
The OSS encryption mode. Valid values:
|
Inherit |
| EncryptionAlgorithm |
string |
No |
The OSS encryption algorithm. Valid values:
|
AES256 |
| EncryptionKeyId |
string |
No |
The ID of the customer master key (CMK) when KMS encryption is used. |
a807****7a70e |
| SlsDeliveryConfig |
object |
No |
The configurations of delivering records to SLS. |
|
| Enabled |
boolean |
No |
Specifies whether to enable the feature of delivering records to SLS. Default value: false. |
false |
| ProjectName |
string |
No |
The name of the SLS project. |
example-project |
| LogstoreName |
string |
No |
The name of the SLS Logstore. |
example-logstore |
| AgentUpgradeConfig |
object |
No |
The configurations of upgrading the Cloud Assistant agent. |
|
| Enabled |
boolean |
No |
Specifies whether to enable custom upgrade configurations for the agent. If you set this parameter to false, the agent attempts to upgrade every 30 minutes by default. Default value: false. |
true |
| AllowedUpgradeWindow |
array |
No |
A list of time windows during which the agent is allowed to be upgraded. The time windows are accurate to minutes and are in UTC by default. The interval between two consecutive time windows must be at least 1 hour. Format: StartTime(HH:mm)-EndTime(HH:mm). For example, [ "02:00-03:00", "05:00-06:00" ] indicates that the agent can be upgraded from 2:00 to 3:00 and from 5:00 to 6:00 every day in UTC. |
|
|
string |
No |
A list of time windows during which the agent is allowed to be upgraded. The time windows are accurate to minutes and are in UTC by default. The interval between two consecutive time windows must be at least 1 hour. Format: StartTime(HH:mm)-EndTime(HH:mm). For example, [ "02:00-03:00", "05:00-06:00" ] indicates that the agent can be upgraded from 2:00 to 3:00 and from 5:00 to 6:00 every day in UTC. |
[ "02:00-03:00", "05:00-06:00" ] |
|
| TimeZone |
string |
No |
The time zone of the time windows for agent upgrade. Default value: UTC. The following formats are supported for the time zone:
|
Asia/Shanghai |
| BootstrapUpgrade |
boolean |
No |
Specifies whether to immediately check the version and perform an update when the Cloud Assistant agent is started. Default value: true. This setting takes effect only when the version of the Cloud Assistant agent is not earlier than the following versions:
|
true |
| DisableUpgrade |
boolean |
No |
Specifies whether to disallow the Cloud Assistant agent to check for or perform updates. Default value: false. This setting takes effect only when the version of the Cloud Assistant agent is not earlier than the following versions:
|
false |
| ResourceUsageConfig |
object |
No |
The configurations of resource usage for Cloud Assistant. This setting takes effect only when the version of the Cloud Assistant agent is not earlier than the following versions:
|
|
| CpuLimit |
integer |
No |
The maximum CPU usage that is allowed for the main process of the Cloud Assistant agent.
|
20 |
| MemoryLimit |
string |
No |
The maximum memory usage that is allowed for the main process of the Cloud Assistant agent. You must specify a unit (B, KB, or MB).
|
50MB |
| OverloadLimit |
integer |
No |
The maximum number of consecutive times that CPU or memory usage can exceed the specified limits. If the limits are consecutively exceeded for the specified number of times, the Cloud Assistant agent is automatically stopped.
|
3 |
| LogFileCountLimit |
integer |
No |
The maximum number of Cloud Assistant log files that can be retained.
|
30 |
| LogSizeLimit |
string |
No |
The maximum size of a single Cloud Assistant log file. You must specify a unit (B, KB, or MB).
|
10MB |
| KeepScriptFile |
boolean |
No |
Specifies whether to retain the script file of a command in the Cloud Assistant directory after the command execution is complete. Default value: false. |
false |
| SessionManagerConfig |
object |
No |
The configurations of the Session Manager feature. |
|
| SessionManagerEnabled |
boolean |
No |
The switch for the Session Manager feature. Valid values:
Note:
|
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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. | The specified parameter SettingType is illegal. |
| 400 | InvalidParameter.OssEncryptionType | The specified parameter OssDeliveryConfig.EncryptionType is not valid. | The specified parameter OssDeliveryConfig.EncryptionType is not valid. |
| 400 | InvalidParameter.OssEncryptionAlgorithm | The specified parameter OssDeliveryConfig.EncryptionAlgorithm is not valid. | The specified parameter OssDeliveryConfig.EncryptionAlgorithm is illegal. |
| 400 | InvalidParameter.OssEncryptionKeyId | The specified parameter OssDeliveryConfig.EncryptionKeyId is not valid. | The specified parameter OssDeliveryConfig.EncryptionKeyId is illegal. |
| 400 | InvalidParameter.OssBucketName | The specified parameter OssDeliveryConfig.BucketName is not valid. | The specified parameter OssDeliveryConfig.BucketName is illegal. |
| 400 | InvalidParameter.OssPrefix | The specified parameter OssDeliveryConfig.Prefix is not valid. | |
| 400 | InvalidOssBucketName.InOtherRegion | The specified parameter OssDeliveryConfig.BucketName is in another region. | The OSS bucket corresponding to the specified parameter OssDeliveryConfig.BucketName is in another region. |
| 400 | InvalidParameter.SlsProjectName | The specified parameter SlsDeliveryConfig.ProjectName is not valid. | |
| 400 | InvalidParameter.SlsLogstoreName | The specified parameter SlsDeliveryConfig.LogstoreName is not valid. | |
| 400 | InvalidParameter.AllowedUpgradeWindow | The specified parameter AgentUpgradeConfig.AllowedUpgradeWindow is not valid. | The specified parameter AgentUpgradeConfig.AllowedUpgradeWindow is illegal. |
| 400 | InvalidAllowedUpgradeWindow.DurationTooShort | The duration of the specified parameter AgentUpgradeConfig.AllowedUpgradeWindow cannot be less than one hour. | |
| 400 | InvalidParameter.TimeZone | The specified parameter AgentUpgradeConfig.TimeZone is not valid. | |
| 400 | InvalidAllowedUpgradeWindow.Required | The specified parameter AgentUpgradeConfig.AllowedUpgradeWindow is required. | |
| 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. | An error occurred while sending the request, please try again later. |
| 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. | The current service does not support setting the OSS encryption mode. |
| 403 | InvalidAllowedUpgradeWindow.CountLimitExceeded | The count of the parameter AgentUpgradeConfig.AllowedUpgradeWindow exceeds the limit of 5. | The number of parameters AgentUpgradeConfig.AllowedUpgradeWindow exceeds the limit of 5. |
| 403 | InvalidOperation.SessionManagerDeliveryUnsupported | The delivery configuration of Session Manager is not supported. | |
| 403 | InvalidDisableUpgrade.Conflict | The parameter DisableUpgrade cannot be specified with parameter BootstrapUpgrade. | |
| 404 | InvalidSlsProjectName.NotFound | The specified parameter SlsDeliveryConfig.ProjectName does not exist. | |
| 404 | InvalidSlsLogstoreName.NotFound | The specified parameter SlsDeliveryConfig.LogstoreName does not exist. | |
| 404 | InvalidOssBucketName.NotFound | The specified parameter OssDeliveryConfig.BucketName does not exist. | |
| 404 | InvalidRegionId.NotFound | The specified parameter RegionId does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.