public static final class ModifyInvocationAttributeRequest.Builder extends Object
限定符和类型 | 方法和说明 |
---|---|
ModifyInvocationAttributeRequest |
build() |
ModifyInvocationAttributeRequest.Builder |
commandContent(String commandContent)
The content of the command after modification.
|
ModifyInvocationAttributeRequest.Builder |
contentEncoding(String contentEncoding)
The encoding mode of the command content that is specified by `CommandContent`.
|
ModifyInvocationAttributeRequest.Builder |
enableParameter(Boolean enableParameter)
Specifies whether to include custom parameters in the command.
|
ModifyInvocationAttributeRequest.Builder |
frequency(String frequency)
The frequency at which to run the command.
|
ModifyInvocationAttributeRequest.Builder |
instanceId(List<String> instanceId)
The IDs of the ECS instances or managed instances that you want to add to the scheduled command task.
|
ModifyInvocationAttributeRequest.Builder |
invokeId(String invokeId)
The execution ID of the command.
|
ModifyInvocationAttributeRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
ModifyInvocationAttributeRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
ModifyInvocationAttributeRequest.Builder |
parameters(Map<String,?> parameters)
The key-value pairs of the custom parameters that are passed in if custom parameters are included in the command.
|
ModifyInvocationAttributeRequest.Builder |
regionId(String regionId)
The region ID.
|
ModifyInvocationAttributeRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
ModifyInvocationAttributeRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
ModifyInvocationAttributeRequest.Builder |
sourceRegionId(String sourceRegionId)
SourceRegionId.
|
public ModifyInvocationAttributeRequest.Builder sourceRegionId(String sourceRegionId)
public ModifyInvocationAttributeRequest.Builder commandContent(String commandContent)
* You can specify whether to retain the command after the command is run when you created the command. If you specified to retain the command, the Base64-encoded command content cannot exceed 18 KB in size. If you specified not to retain the command, the Base64-encoded command content cannot exceed 24 KB in size. * If the command content is Base64-encoded, set `ContentEncoding` to Base64. * If you set `EnableParameter` to true, the custom parameter feature is enabled and you can configure custom parameters based on the following rules: * You can define custom parameters in the `{{}}` format. Within `{{}}`, the spaces and line feeds before and after the parameter names are ignored. * The number of custom parameters cannot exceed 20. * A custom parameter name can contain letters, digits, underscores (\_), and hyphens (-). The name is case-insensitive. The ACS:: prefix cannot be used to specify non-built-in environment parameters. * Each custom parameter name cannot exceed 64 bytes in length. * You can specify built-in environment parameters as custom parameters. Then, when you run the command, these parameters are automatically specified by Cloud Assistant. You can specify the following built-in environment parameters: * `{{ACS::RegionId}}`: the region ID. * `{{ACS::AccountId}}`: the UID of the Alibaba Cloud account. * `{{ACS::InstanceId}}`: the instance ID. If you want to specify `{{ACS::InstanceId}}` as a built-in environment variable, make sure that the Cloud Assistant Agent version is not earlier than the following ones: * Linux: 2.2.3.309 * Windows: 2.1.3.309 * `{{ACS::InstanceName}}`: the instance name. When the command is run on multiple instances, if you want to specify `{{ACS::InstanceName}}` as a built-in environment variable, make sure that the Cloud Assistant Agent version is not earlier than the following ones: * Linux: 2.2.3.344 * Windows: 2.1.3.344 * `{{ACS::InvokeId}}`: the ID of the task. If you want to specify `{{ACS::InvokeId}}` as a built-in environment parameter, make sure that the Cloud Assistant Agent version is not earlier than the following ones: * Linux: 2.2.3.309 * Windows: 2.1.3.309 * `{{ACS::CommandId}}`: the command ID. If you want to specify `{{ACS::CommandId}}` as a built-in environment parameter, make sure that the Cloud Assistant Agent version is not earlier than the following ones: * Linux: 2.2.3.309 * Windows: 2.1.3.309
public ModifyInvocationAttributeRequest.Builder contentEncoding(String contentEncoding)
* PlainText: The command content is not encoded. * Base64: The command content is encoded in Base64. Default value: PlainText. If the value is invalid, the PlainText mode is used.
public ModifyInvocationAttributeRequest.Builder enableParameter(Boolean enableParameter)
* If you want to enable the custom parameter feature, or configure `Parameters` to modify the custom parameters in the command, set EnableParameter to `true`. * If you do not want to configure `Parameters` to modify the custom parameters in the command, leave EnableParameter empty or set it to `false`.
public ModifyInvocationAttributeRequest.Builder frequency(String frequency)
* To run the command at a fixed interval, use a rate expression to specify the interval. You can specify the interval in seconds, minutes, hours, or days. This option is suitable for scenarios in which tasks need to be executed at a fixed interval. Specify the interval in the following format: `rate(
public ModifyInvocationAttributeRequest.Builder instanceId(List<String> instanceId)
public ModifyInvocationAttributeRequest.Builder invokeId(String invokeId)
public ModifyInvocationAttributeRequest.Builder ownerAccount(String ownerAccount)
public ModifyInvocationAttributeRequest.Builder ownerId(Long ownerId)
public ModifyInvocationAttributeRequest.Builder parameters(Map<String,?> parameters)
You can specify 0 to 10 custom parameters. Take note of the following items: * The key of a custom parameter can be up to 64 characters in length and cannot be an empty string. * The value of a custom parameter can be an empty string. * If you specified to retain the command when you create the command task, the total size of the custom parameters and original command content that are encoded in Base64 cannot exceed 18 KB. If you specified not to retain the command when you create the command task, the total size of the custom parameters and original command content that are encoded in Base64 cannot exceed 24 KB. * The custom parameter names that are specified by Parameters must be included in the custom parameter names that you specified when you created the command. You can use empty strings to represent the parameters that are not passed in. This parameter is empty by default, which indicates not to modify the key-value pairs of the custom parameters.
public ModifyInvocationAttributeRequest.Builder regionId(String regionId)
public ModifyInvocationAttributeRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public ModifyInvocationAttributeRequest.Builder resourceOwnerId(Long resourceOwnerId)
public ModifyInvocationAttributeRequest build()
Copyright © 2024. All rights reserved.