All Products
Search
Document Center

Elastic Compute Service:ModifyCloudAssistantSettings

Last Updated:Sep 29, 2024

Modifies the configurations of a Cloud Assistant feature.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:ModifyCloudAssistantSettingsupdate
  • ServiceSettings
    acs:ecs:{#regionId}:{#accountId}:servicesettings/{#servicesettingId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

cn-hangzhou
SettingTypestringYes

The Cloud Assistant feature. Valid values:

  • SessionManagerDelivery: the Session Record Delivery feature
  • InvocationDelivery: the Operation Content and Result Delivery feature
SessionManagerDelivery
OssDeliveryConfigobjectNo

The configurations for delivering records to Object Storage Service (OSS).

EnabledbooleanNo

Specifies whether to deliver records to OSS. Default value: false.

false
BucketNamestringNo

The name of the OSS bucket.

example-bucket
PrefixstringNo

The prefix of the OSS bucket directory. The prefix must meet the following requirements:

  • The prefix can be up to 254 characters in length.
  • The prefix cannot start with a forward slash (/) or a backslash (\).

Note: If you do not need a directory prefix, specify a pair of double quotation marks ("") for this parameter to clear the directory prefix that you specified.

sessionmanager/audit
EncryptionTypestringNo

The OSS encryption method. Valid values:

  • Inherit: the encryption method used by the specified bucket.
  • OssManaged: server-side encryption by using OSS-managed keys (SSE-OSS).
  • KMS: server-side encryption by using Key Management Service managed keys (SSE-KMS).
Inherit
EncryptionAlgorithmstringNo

The OSS encryption algorithm. Valid values:

  • AES256
  • SM4
AES256
EncryptionKeyIdstringNo

The ID of the customer master key (CMK) when EncryptionType is set to KMS.

a807****7a70e
SlsDeliveryConfigobjectNo

The configurations for delivering records to Simple Log Service.

EnabledbooleanNo

Specifies whether to deliver records to Simple Log Service. Default value: false.

false
ProjectNamestringNo

The name of the Simple Log Service project.

example-project
LogstoreNamestringNo

The name of the Logstore.

example-logstore
AgentUpgradeConfigobjectNo

The configurations for upgrading Cloud Assistant Agent.

EnabledbooleanNo

Specifies whether to enable custom upgrade for Cloud Assistant Agent. If you set this parameter to false, an upgrade attempt is performed for Cloud Assistant Agent every 30 minutes.

Default value: false.

true
AllowedUpgradeWindowarrayNo

The time windows during which Cloud Assistant Agent can be upgraded. The time windows can be accurate to minutes. The Coordinated Universal Time (UTC) time zone is used by default.

Make sure that the upgrade windows specified by this parameter are not shorter than 1 hour.

Specify each upgrade window in the following format: <Start time in the HH:mm format>-<End time in the HH:mm format>.

For example, [ "02:00-03:00", "05:00-06:00" ] specifies that Cloud Assistant Agent can be upgraded from 2:00:00 to 3:00:00 and from 5:00:00 to 6:00:00 every day in the UTC time zone.

stringNo

The time windows during which Cloud Assistant Agent can be upgraded. The time windows can be accurate to minutes. The default time zone is UTC.

Make sure that the upgrade windows specified by this parameter are not shorter than 1 hour.

Specify each upgrade window in the following format: <Start time in the HH:mm format>-<End time in the HH:mm format>.

For example, [ "02:00-03:00", "05:00-06:00" ] specifies that Cloud Assistant Agent can be upgraded from 2:00:00 to 3:00:00 and from 5:00:00 to 6:00:00 every day in the UTC time zone.

[ "02:00-03:00", "05:00-06:00" ]
TimeZonestringNo

The time zone of the time windows. Default value: UTC. You can specify a time zone in the following forms:

  • The time zone name. Examples: Asia/Shanghai and America/Los_Angeles.
  • The time offset from GMT. Examples: GMT+8:00 (UTC+8) and GMT-7:00 (UTC-7). You cannot add leading zeros to the hour value.
Asia/Shanghai

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameter.SettingTypeThe specified parameter SettingType is not valid.The specified parameter SettingType is illegal.
400InvalidParameter.OssEncryptionTypeThe specified parameter OssDeliveryConfig.EncryptionType is not valid.The specified parameter OssDeliveryConfig.EncryptionType is not valid.
400InvalidParameter.OssEncryptionAlgorithmThe specified parameter OssDeliveryConfig.EncryptionAlgorithm is not valid.The specified parameter OssDeliveryConfig.EncryptionAlgorithm is illegal.
400InvalidParameter.OssEncryptionKeyIdThe specified parameter OssDeliveryConfig.EncryptionKeyId is not valid.The specified parameter OssDeliveryConfig.EncryptionKeyId is illegal.
400InvalidParameter.OssBucketNameThe specified parameter OssDeliveryConfig.BucketName is not valid.The specified parameter OssDeliveryConfig.BucketName is illegal.
400InvalidParameter.OssPrefixThe specified parameter OssDeliveryConfig.Prefix is not valid.-
400InvalidOssBucketName.InOtherRegionThe specified parameter OssDeliveryConfig.BucketName is in another region.The OSS bucket corresponding to the specified parameter OssDeliveryConfig.BucketName is in another region.
400InvalidParameter.SlsProjectNameThe specified parameter SlsDeliveryConfig.ProjectName is not valid.-
400InvalidParameter.SlsLogstoreNameThe specified parameter SlsDeliveryConfig.LogstoreName is not valid.-
400InvalidParameter.AllowedUpgradeWindowThe specified parameter AgentUpgradeConfig.AllowedUpgradeWindow is not valid.The specified parameter AgentUpgradeConfig.AllowedUpgradeWindow is illegal.
400InvalidAllowedUpgradeWindow.DurationTooShortThe duration of the specified parameter AgentUpgradeConfig.AllowedUpgradeWindow cannot be less than one hour.-
400InvalidParameter.TimeZoneThe specified parameter AgentUpgradeConfig.TimeZone is not valid.-
400InvalidAllowedUpgradeWindow.RequiredThe specified parameter AgentUpgradeConfig.AllowedUpgradeWindow is required.-
403CreateServiceLinkedRole.NoPermissionYou do not have permission to create ServiceLinkedRole.-
403InvalidOperation.OssEncryptionUnsupportedThe configuration of OSS Encryption is not supported.The current service does not support setting the OSS encryption mode.
403InvalidAllowedUpgradeWindow.CountLimitExceededThe count of the parameter AgentUpgradeConfig.AllowedUpgradeWindow exceeds the limit of 5.The number of parameters AgentUpgradeConfig.AllowedUpgradeWindow exceeds the limit of 5.
404InvalidSlsProjectName.NotFoundThe specified parameter SlsDeliveryConfig.ProjectName does not exist.-
404InvalidSlsLogstoreName.NotFoundThe specified parameter SlsDeliveryConfig.LogstoreName does not exist.-
404InvalidOssBucketName.NotFoundThe specified parameter OssDeliveryConfig.BucketName does not exist.-
404InvalidRegionId.NotFoundThe specified parameter RegionId does not exist.-
500InternalErrorAn error occurred when you dispatched the request.An error occurred while sending the request, please try again later.

For a list of error codes, visit the Service error codes.