public class CreateCommandRequest extends AbstractModel
Constructor and Description |
---|
CreateCommandRequest() |
CreateCommandRequest(CreateCommandRequest 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 |
getOutputCOSBucketUrl()
Get The COS bucket URL for uploading logs.
|
String |
getOutputCOSKeyPrefix()
Get The COS bucket directory where the logs are saved.
|
Tag[] |
getTags()
Get Tags bound to 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 |
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 |
setTags(Tag[] Tags)
Set Tags bound to 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 CreateCommandRequest()
public CreateCommandRequest(CreateCommandRequest source)
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 getContent()
public void setContent(String Content)
Content
- Base64-encoded command. The maximum length is 64 KB.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 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 no parameter value is provided in the `InvokeCommand` API, the default value 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
- Tags bound to the command. At most 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 root user is used to execute commands on Linux and the System user 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. Consecutive dots (.) and slashes (/) are not allowed. It can not start with a slash (/).Copyright © 2023. All rights reserved.