public class CreateCommandRequest
extends com.aliyun.tea.TeaModel
限定符和类型 | 类和说明 |
---|---|
static class |
CreateCommandRequest.CreateCommandRequestTag |
限定符和类型 | 字段和说明 |
---|---|
String |
commandContent
The Base64-encoded content of the command.
|
String |
contentEncoding
The encoding mode of the command content (CommandContent).
|
String |
description
The description of the command.
|
Boolean |
enableParameter
Specifies whether to use custom parameters in the command.
|
String |
name
The name of the command.
|
String |
ownerAccount |
Long |
ownerId |
String |
regionId
The ID of the region in which to create the command.
|
String |
resourceOwnerAccount |
Long |
resourceOwnerId |
List<CreateCommandRequest.CreateCommandRequestTag> |
tag
The tags to add to the command.
|
Long |
timeout
The maximum timeout period for the command execution on the instance.
|
String |
type
The command type.
|
String |
workingDir
The working directory of the command on the instance.
|
构造器和说明 |
---|
CreateCommandRequest() |
@NameInMap(value="CommandContent") public String commandContent
The Base64-encoded content of the command.
* The parameter value must be Base64-encoded and cannot exceed 18 KB in size.
* Custom parameters can be added to the command. To enable the custom parameter feature, you must set `EnableParameter` to true.
* Custom parameters are defined 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 only letters, digits, underscores (\_), and hyphens (-). The name is case-insensitive.
* 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 ID of the region.
* `{{ACS::AccountId}}`: the UID of the Alibaba Cloud account.
* `{{ACS::InstanceId}}`: the ID of the instance. When the command is run on multiple instances, if you want to specify `{{ACS::InstanceId}}` as a built-in environment variable, make sure that the version of the Cloud Assistant client is not earlier than the following ones:
* Linux: 2.2.3.309
* Windows: 2.1.3.309
* `{{ACS::InstanceName}}`: the name of the instance. If you want to run the command on multiple instances and specify `{{ACS::InstanceName}}` as a built-in environment parameter, make sure that the version of the Cloud Assistant client is not earlier than the following ones:
* Linux: 2.2.3.344
* Windows: 2.1.3.344
* `{{ACS::InvokeId}}`: the ID of the command task. If you want to specify `{{ACS::InvokeId}}` as a built-in environment variable, make sure that the version of the Cloud Assistant client is not earlier than the following one:
* Linux: 2.2.3.309
* Windows: 2.1.3.309
* `{{ACS::CommandId}}`: the ID of the command. When you call the [RunCommand](~~141751~~) operation, if you want to specify `{{ACS::CommandId}}` as a built-in environment parameter, make sure that the version of the Cloud Assistant client is not earlier than the following ones:
* Linux: 2.2.3.309
* Windows: 2.1.3.309
@NameInMap(value="ContentEncoding") public String contentEncoding
The encoding mode of the command content (CommandContent). Valid values:
* PlainText: The command content is not encoded.
* Base64: The command content is Base64-encoded.
Default value: Base64.
> If the specified value of this parameter is invalid, Base64 is used by default.
@NameInMap(value="Description") public String description
The description of the command. The description supports all character sets and can be up to 512 characters in length.
@NameInMap(value="EnableParameter") public Boolean enableParameter
Specifies whether to use custom parameters in the command.
Default value: false.
@NameInMap(value="Name") public String name
The name of the command. The name supports all character sets and can be up to 128 characters in length.
@NameInMap(value="OwnerAccount") public String ownerAccount
@NameInMap(value="OwnerId") public Long ownerId
@NameInMap(value="RegionId") public String regionId
The ID of the region in which to create the command. You can call the [DescribeRegions](~~25609~~) operation to query the most recent region list.
@NameInMap(value="ResourceOwnerAccount") public String resourceOwnerAccount
@NameInMap(value="ResourceOwnerId") public Long resourceOwnerId
@NameInMap(value="Tag") public List<CreateCommandRequest.CreateCommandRequestTag> tag
The tags to add to the command.
@NameInMap(value="Timeout") public Long timeout
The maximum timeout period for the command execution on the instance. Unit: seconds. When a command cannot be run, a timeout error occurs. After that, the command process is forcefully terminated by canceling the PID of the command.
Default value: 60.
@NameInMap(value="Type") public String type
The command type. Valid values:
* RunBatScript: batch commands. These commands are applicable to Windows instances.
* RunPowerShellScript: PowerShell commands. These commands are applicable to Windows instances.
* RunShellScript: shell commands. These commands are applicable to Linux instances.
@NameInMap(value="WorkingDir") public String workingDir
The working directory of the command on the instance.
Default value:
* For Linux instances, the default value is the home directory of the root user, which is the `/root` directory.
* For Windows instances, the default value is the directory where the Cloud Assistant client process resides. Example: `C:\Windows\System32\`.
public static CreateCommandRequest build(Map<String,?> map) throws Exception
Exception
public CreateCommandRequest setCommandContent(String commandContent)
public String getCommandContent()
public CreateCommandRequest setContentEncoding(String contentEncoding)
public String getContentEncoding()
public CreateCommandRequest setDescription(String description)
public String getDescription()
public CreateCommandRequest setEnableParameter(Boolean enableParameter)
public Boolean getEnableParameter()
public CreateCommandRequest setName(String name)
public String getName()
public CreateCommandRequest setOwnerAccount(String ownerAccount)
public String getOwnerAccount()
public CreateCommandRequest setOwnerId(Long ownerId)
public Long getOwnerId()
public CreateCommandRequest setRegionId(String regionId)
public String getRegionId()
public CreateCommandRequest setResourceOwnerAccount(String resourceOwnerAccount)
public String getResourceOwnerAccount()
public CreateCommandRequest setResourceOwnerId(Long resourceOwnerId)
public Long getResourceOwnerId()
public CreateCommandRequest setTag(List<CreateCommandRequest.CreateCommandRequestTag> tag)
public List<CreateCommandRequest.CreateCommandRequestTag> getTag()
public CreateCommandRequest setTimeout(Long timeout)
public Long getTimeout()
public CreateCommandRequest setType(String type)
public String getType()
public CreateCommandRequest setWorkingDir(String workingDir)
public String getWorkingDir()
Copyright © 2023. All rights reserved.