ModifyCloudAssistantSettings
Modifies Cloud Assistant service configurations.
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 region ID. |
cn-hangzhou |
| SettingType |
string |
Yes |
The service configuration type. Valid values:
|
SessionManagerDelivery |
| OssDeliveryConfig |
object |
No |
The OSS delivery configuration. |
|
| BucketName |
string |
No |
The name of the OSS bucket. |
example-bucket |
| Enabled |
boolean |
No |
Specifies whether to enable delivery to OSS. Default value: false. |
false |
| EncryptionAlgorithm |
string |
No |
The OSS encryption algorithm. Valid values:
|
AES256 |
| EncryptionKeyId |
string |
No |
The customer master key (CMK) ID when the encryption method is set to KMS. |
a807****7a70e |
| EncryptionType |
string |
No |
The OSS encryption method. Valid values:
|
Inherit |
| Prefix |
string |
No |
The directory prefix of the OSS bucket. Constraints:
Note
Note: Pass an empty string ("") to indicate that no directory prefix is required. If a prefix was previously set and is no longer needed, pass an empty string ("") to clear it. |
sessionmanager/audit |
| SlsDeliveryConfig |
object |
No |
The Simple Log Service (SLS) delivery configuration. |
|
| Enabled |
boolean |
No |
Specifies whether to enable delivery to SLS. Default value: false. |
false |
| LogstoreName |
string |
No |
The name of the SLS Logstore. |
example-logstore |
| ProjectName |
string |
No |
The name of the SLS project. |
example-project |
| AgentUpgradeConfig |
object |
No |
The Cloud Assistant Agent upgrade configuration. |
|
| AllowedUpgradeWindow |
array |
No |
The list of time windows during which upgrades are allowed. The time can be specified down to the minute. The default time zone is UTC. The interval between time windows cannot be less than 1 hour. Format: start time (HH:mm)-end time (HH:mm). For example, [ "02:00-03:00", "05:00-06:00" ] indicates that upgrades are allowed daily from 02:00 to 03:00 and from 05:00 to 06:00 in the UTC time zone. |
|
|
string |
No |
The list of time windows during which upgrades are allowed. The time can be specified down to the minute. The default time zone is UTC. The interval between time windows cannot be less than 1 hour. Format: start time (HH:mm)-end time (HH:mm). For example, [ "02:00-03:00", "05:00-06:00" ] indicates that upgrades are allowed daily from 02:00 to 03:00 and from 05:00 to 06:00 in the UTC time zone. |
[ "02:00-03:00", "05:00-06:00" ] |
|
| BootstrapUpgrade |
boolean |
No |
Specifies whether the Cloud Assistant Agent checks for version updates and performs upgrades immediately upon startup. Default value: true. This setting takes effect only when the Cloud Assistant Agent version is not earlier than the following versions:
|
true |
| DisableUpgrade |
boolean |
No |
Specifies whether to prevent the Cloud Assistant Agent from checking for and performing updates. Default value: false. This setting takes effect only when the Cloud Assistant Agent version is not earlier than the following versions:
|
false |
| Enabled |
boolean |
No |
Specifies whether to enable custom Agent upgrade configuration. If set to false, the default behavior of attempting an upgrade every 30 minutes is retained. Default value: false. |
true |
| TimeZone |
string |
No |
The time zone for the allowed upgrade time windows. The default time zone is UTC. The time zone can be specified in the following two formats:
|
Asia/Shanghai |
| ResourceUsageConfig |
object |
No |
The Cloud Assistant resource usage configuration. This setting takes effect only when the Cloud Assistant Agent version is not earlier than the following versions:
|
|
| CpuLimit |
integer |
No |
The maximum CPU usage allowed for the Cloud Assistant Agent main process.
|
20 |
| KeepScriptFile |
boolean |
No |
Specifies whether to retain the script file in the Cloud Assistant directory after command execution is complete. Default value: false. |
false |
| LogFileCountLimit |
integer |
No |
The maximum number of Cloud Assistant log files to retain.
|
30 |
| LogSizeLimit |
string |
No |
The size limit of a single Cloud Assistant log file. You must specify the unit (B|KB|MB).
|
10MB |
| MemoryLimit |
string |
No |
The maximum memory usage allowed for the Cloud Assistant Agent main process. You must specify the unit (B|KB|MB).
|
50MB |
| OverloadLimit |
integer |
No |
The maximum number of consecutive times that CPU or memory resources usage can exceed the limit. When this limit is reached, the Cloud Assistant Agent automatically stops running.
|
3 |
| SessionManagerConfig |
object |
No |
The Cloud Assistant session feature configuration. |
|
| SessionManagerEnabled |
boolean |
No |
Specifies whether to enable the Cloud Assistant session feature. Valid values:
Precautions:
|
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. | The specified OssDeliveryConfig.Prefix parameter is invalid. |
| 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. | The specified SlsDeliveryConfig.ProjectName parameter is invalid. |
| 400 | InvalidParameter.SlsLogstoreName | The specified parameter SlsDeliveryConfig.LogstoreName is not valid. | The specified SlsDeliveryConfig.LogstoreName parameter is invalid. |
| 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. | The interval of the AllowedUpgradeWindow parameter cannot be shorter than half an hour. |
| 400 | InvalidParameter.TimeZone | The specified parameter AgentUpgradeConfig.TimeZone is not valid. | The specified AgentUpgradeConfig.TimeZone parameter is invalid. |
| 400 | InvalidAllowedUpgradeWindow.Required | The specified parameter AgentUpgradeConfig.AllowedUpgradeWindow is required. | When you enable the custom agent upgrade configuration 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 | InvalidParameterCharacter | The specified parameter %s contains illegal characters. | |
| 403 | InvalidOssBucketName.AccessDenied | The error message returned by the OSS API is: %s | |
| 403 | CreateServiceLinkedRole.NoPermission | You do not have permission to create ServiceLinkedRole. | You do not have the permission to create service-linked roles. |
| 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. | Enabling Session Manager delivery configuration 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. | The specified Simple Log Service (SLS) project does not exist. |
| 404 | InvalidSlsLogstoreName.NotFound | The specified parameter SlsDeliveryConfig.LogstoreName does not exist. | The specified Simple Log Service (SLS) Logstore does not exist. |
| 404 | InvalidOssBucketName.NotFound | The specified parameter OssDeliveryConfig.BucketName does not exist. | The specified OSS bucket does not exist. |
| 404 | InvalidRegionId.NotFound | The specified parameter RegionId does not exist. | The specified RegionId does not exist. Check whether the product is available in this region. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.