public class RunCommandRequest extends AbstractModel
Constructor and Description |
---|
RunCommandRequest() |
RunCommandRequest(RunCommandRequest source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
String |
getCommandName()
Get Command name.
|
String |
getCommandType()
Get Command type.
|
String |
getContent()
Get Base64-encoded command.
|
String |
getDefaultParameters()
Get The default value of the custom parameter value when it is enabled.
|
String |
getDescription()
Get Command description.
|
Boolean |
getEnableParameter()
Get Whether to enable the custom parameter feature.
|
String[] |
getInstanceIds()
Get IDs of instances about to execute commands.
|
String |
getOutputCOSBucketUrl()
Get The COS bucket URL for uploading logs.
|
String |
getOutputCOSKeyPrefix()
Get The COS bucket directory where the logs are saved.
|
String |
getParameters()
Get Custom parameters of `Command`.
|
Boolean |
getSaveCommand()
Get Whether to save the command.
|
Tag[] |
getTags()
Get The tags of the command.
|
Long |
getTimeout()
Get Command timeout period.
|
String |
getUsername()
Get The username used to execute the command on the CVM or Lighthouse instance.
|
String |
getWorkingDirectory()
Get Command execution path.
|
void |
setCommandName(String CommandName)
Set Command name.
|
void |
setCommandType(String CommandType)
Set Command type.
|
void |
setContent(String Content)
Set Base64-encoded command.
|
void |
setDefaultParameters(String DefaultParameters)
Set The default value of the custom parameter value when it is enabled.
|
void |
setDescription(String Description)
Set Command description.
|
void |
setEnableParameter(Boolean EnableParameter)
Set Whether to enable the custom parameter feature.
|
void |
setInstanceIds(String[] InstanceIds)
Set IDs of instances about to execute commands.
|
void |
setOutputCOSBucketUrl(String OutputCOSBucketUrl)
Set The COS bucket URL for uploading logs.
|
void |
setOutputCOSKeyPrefix(String OutputCOSKeyPrefix)
Set The COS bucket directory where the logs are saved.
|
void |
setParameters(String Parameters)
Set Custom parameters of `Command`.
|
void |
setSaveCommand(Boolean SaveCommand)
Set Whether to save the command.
|
void |
setTags(Tag[] Tags)
Set The tags of the command.
|
void |
setTimeout(Long Timeout)
Set Command timeout period.
|
void |
setUsername(String Username)
Set The username used to execute the command on the CVM or Lighthouse instance.
|
void |
setWorkingDirectory(String WorkingDirectory)
Set Command execution path.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, getMultipartRequestParams, set, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, toJsonString
public RunCommandRequest()
public RunCommandRequest(RunCommandRequest source)
public String getContent()
public void setContent(String Content)
Content
- Base64-encoded command. The maximum length is 64 KB.public String[] getInstanceIds()
public void setInstanceIds(String[] InstanceIds)
InstanceIds
- IDs of instances about to execute commands. Up to 100 IDs are allowed. Supported instance types:
public String getCommandName()
public void setCommandName(String CommandName)
CommandName
- Command name. The name can be up to 60 bytes, and contain [a-z], [A-Z], [0-9] and [_-.].public String getDescription()
public void setDescription(String Description)
Description
- Command description. The maximum length is 120 characters.public String getCommandType()
public void setCommandType(String CommandType)
CommandType
- Command type. `SHELL` and `POWERSHELL` are supported. The default value is `SHELL`.public String getWorkingDirectory()
public void setWorkingDirectory(String WorkingDirectory)
WorkingDirectory
- Command execution path. The default value is /root for `SHELL` commands and C:\Program Files\qcloud\tat_agent\workdir for `POWERSHELL` commands.public Long getTimeout()
public void setTimeout(Long Timeout)
Timeout
- Command timeout period. Default value: 60 seconds. Value range: [1, 86400].public Boolean getSaveCommand()
public void setSaveCommand(Boolean SaveCommand)
SaveCommand
- Whether to save the command. Valid values:
public Boolean getEnableParameter()
public void setEnableParameter(Boolean EnableParameter)
EnableParameter
- Whether to enable the custom parameter feature.
This cannot be modified once created.
Default value: `false`.public String getDefaultParameters()
public void setDefaultParameters(String DefaultParameters)
DefaultParameters
- The default value of the custom parameter value when it is enabled. The field type is JSON encoded string. For example, {\"varA\": \"222\"}.
`key` is the name of the custom parameter and `value` is the default value. Both `key` and `value` are strings.
If Parameters is not provided, the default values specified here are used.
Up to 20 custom parameters are supported.
The name of the custom parameter cannot exceed 64 characters and can contain [a-z], [A-Z], [0-9] and [-_].public String getParameters()
public void setParameters(String Parameters)
Parameters
- Custom parameters of `Command`. The field type is JSON encoded string. For example, {\"varA\": \"222\"}.
`key` is the name of the custom parameter and `value` is the default value. Both `key` and `value` are strings.
If no parameter value is provided, the `DefaultParameters` is used.
Up to 20 custom parameters are supported.
The name of the custom parameter cannot exceed 64 characters and can contain [a-z], [A-Z], [0-9] and [-_].public Tag[] getTags()
public void setTags(Tag[] Tags)
Tags
- The tags of the command. It is available when `SaveCommand` is `True`. A maximum of 10 tags are allowed.public String getUsername()
public void setUsername(String Username)
Username
- The username used to execute the command on the CVM or Lighthouse instance.
The principle of least privilege is the best practice for permission management. We recommend you execute TAT commands as a general user. By default, the user `root` is used to execute commands on Linux and the user `System` is used on Windows.public String getOutputCOSBucketUrl()
public void setOutputCOSBucketUrl(String OutputCOSBucketUrl)
OutputCOSBucketUrl
- The COS bucket URL for uploading logs. The URL must start with `https`, such as `https://BucketName-123454321.cos.ap-beijing.myqcloud.com`.public String getOutputCOSKeyPrefix()
public void setOutputCOSKeyPrefix(String OutputCOSKeyPrefix)
OutputCOSKeyPrefix
- The COS bucket directory where the logs are saved. Check below for the rules of the directory name.
1. It must be a combination of number, letters, and visible characters. Up to 60 characters are allowed.
2. Use a slash (/) to create a subdirectory.
3. ".." can not be used as the folder name. It cannot start with a slash (/), and cannot contain consecutive slashes.Copyright © 2023. All rights reserved.