public class ModifyCommandRequest extends AbstractModel
header, skipSign| Constructor and Description | 
|---|
| ModifyCommandRequest() | 
| ModifyCommandRequest(ModifyCommandRequest 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 | getCommandId()Get 命令ID。可通过 [DescribeCommands(查询命令详情)](https://cloud.tencent.com/document/api/1340/52681) 接口获取。 | 
| String | getCommandName()Get 命令名称。名称仅支持中文、英文、数字、下划线、分隔符"-"、小数点,最大长度不能超60个字节。 | 
| String | getCommandType()Get 命令类型,目前支持取值:SHELL、POWERSHELL、BAT。 | 
| String | getContent()Get Base64编码后的命令内容,长度不可超过64KB。 | 
| DefaultParameterConf[] | getDefaultParameterConfs()Get 自定义参数数组。如果 InvokeCommand 时未提供参数取值,将使用这里的默认值进行替换。
参数不支持同时指定 `DefaultParameters` 和 `DefaultParameterConfs` 。
仅在命令的 EnableParameter 为 true 时,才允许修改此参数。可通过 [DescribeCommands(查询命令详情)](https://cloud.tencent.com/document/api/1340/52681) 接口获取命令的 EnableParameter 设置。
自定义参数最多20个。 | 
| String | getDefaultParameters()Get 启用自定义参数功能时,自定义参数的默认取值。字段类型为json encoded string。如:{"varA": "222"}。
参数不支持同时指定 `DefaultParameters` 和 `DefaultParameterConfs` 。
采取整体全覆盖式修改,即修改时必须提供所有新默认值。
仅在命令的 EnableParameter 为 true 时,才允许修改此参数。可通过 [DescribeCommands(查询命令详情)](https://cloud.tencent.com/document/api/1340/52681) 接口获取命令的 EnableParameter 设置。
key为自定义参数名称,value为该参数的默认取值。kv均为字符串型。
自定义参数最多20个。
自定义参数名称需符合以下规范:字符数目上限64,可选范围【a-zA-Z0-9-_】。 | 
| String | getDescription()Get 命令描述。不超过120字符。 | 
| String | getOutputCOSBucketUrl()Get 指定日志上传的cos bucket 地址,必须以https开头,如 https://BucketName-123454321.cos.ap-beijing.myqcloud.com。 | 
| String | getOutputCOSKeyPrefix()Get 指定日志在cos bucket中的目录,目录命名有如下规则:
1. | 
| Long | getTimeout()Get 命令超时时间。取值范围[1, 86400]。 | 
| String | getUsername()Get 在 CVM 或 Lighthouse 实例中执行命令的用户名称。
使用最小权限执行命令是权限管理的最佳实践,建议您以普通用户身份执行云助手命令。 | 
| String | getWorkingDirectory()Get 命令执行路径。 | 
| void | setCommandId(String CommandId)Set 命令ID。可通过 [DescribeCommands(查询命令详情)](https://cloud.tencent.com/document/api/1340/52681) 接口获取。 | 
| void | setCommandName(String CommandName)Set 命令名称。名称仅支持中文、英文、数字、下划线、分隔符"-"、小数点,最大长度不能超60个字节。 | 
| void | setCommandType(String CommandType)Set 命令类型,目前支持取值:SHELL、POWERSHELL、BAT。 | 
| void | setContent(String Content)Set Base64编码后的命令内容,长度不可超过64KB。 | 
| void | setDefaultParameterConfs(DefaultParameterConf[] DefaultParameterConfs)Set 自定义参数数组。如果 InvokeCommand 时未提供参数取值,将使用这里的默认值进行替换。
参数不支持同时指定 `DefaultParameters` 和 `DefaultParameterConfs` 。
仅在命令的 EnableParameter 为 true 时,才允许修改此参数。可通过 [DescribeCommands(查询命令详情)](https://cloud.tencent.com/document/api/1340/52681) 接口获取命令的 EnableParameter 设置。
自定义参数最多20个。 | 
| void | setDefaultParameters(String DefaultParameters)Set 启用自定义参数功能时,自定义参数的默认取值。字段类型为json encoded string。如:{"varA": "222"}。
参数不支持同时指定 `DefaultParameters` 和 `DefaultParameterConfs` 。
采取整体全覆盖式修改,即修改时必须提供所有新默认值。
仅在命令的 EnableParameter 为 true 时,才允许修改此参数。可通过 [DescribeCommands(查询命令详情)](https://cloud.tencent.com/document/api/1340/52681) 接口获取命令的 EnableParameter 设置。
key为自定义参数名称,value为该参数的默认取值。kv均为字符串型。
自定义参数最多20个。
自定义参数名称需符合以下规范:字符数目上限64,可选范围【a-zA-Z0-9-_】。 | 
| void | setDescription(String Description)Set 命令描述。不超过120字符。 | 
| void | setOutputCOSBucketUrl(String OutputCOSBucketUrl)Set 指定日志上传的cos bucket 地址,必须以https开头,如 https://BucketName-123454321.cos.ap-beijing.myqcloud.com。 | 
| void | setOutputCOSKeyPrefix(String OutputCOSKeyPrefix)Set 指定日志在cos bucket中的目录,目录命名有如下规则:
1. | 
| void | setTimeout(Long Timeout)Set 命令超时时间。取值范围[1, 86400]。 | 
| void | setUsername(String Username)Set 在 CVM 或 Lighthouse 实例中执行命令的用户名称。
使用最小权限执行命令是权限管理的最佳实践,建议您以普通用户身份执行云助手命令。 | 
| void | setWorkingDirectory(String WorkingDirectory)Set 命令执行路径。 | 
| void | toMap(HashMap<String,String> map,
     String prefix)Internal implementation, normal users should not use it. | 
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonStringpublic ModifyCommandRequest()
public ModifyCommandRequest(ModifyCommandRequest source)
public String getCommandId()
public void setCommandId(String CommandId)
CommandId - 命令ID。可通过 [DescribeCommands(查询命令详情)](https://cloud.tencent.com/document/api/1340/52681) 接口获取。public String getCommandName()
public void setCommandName(String CommandName)
CommandName - 命令名称。名称仅支持中文、英文、数字、下划线、分隔符"-"、小数点,最大长度不能超60个字节。public String getDescription()
public void setDescription(String Description)
Description - 命令描述。不超过120字符。public String getContent()
public void setContent(String Content)
Content - Base64编码后的命令内容,长度不可超过64KB。public String getCommandType()
public void setCommandType(String CommandType)
CommandType - 命令类型,目前支持取值:SHELL、POWERSHELL、BAT。public String getWorkingDirectory()
public void setWorkingDirectory(String WorkingDirectory)
WorkingDirectory - 命令执行路径。public Long getTimeout()
public void setTimeout(Long Timeout)
Timeout - 命令超时时间。取值范围[1, 86400]。public String getDefaultParameters()
public void setDefaultParameters(String DefaultParameters)
DefaultParameters - 启用自定义参数功能时,自定义参数的默认取值。字段类型为json encoded string。如:{"varA": "222"}。
参数不支持同时指定 `DefaultParameters` 和 `DefaultParameterConfs` 。
采取整体全覆盖式修改,即修改时必须提供所有新默认值。
仅在命令的 EnableParameter 为 true 时,才允许修改此参数。可通过 [DescribeCommands(查询命令详情)](https://cloud.tencent.com/document/api/1340/52681) 接口获取命令的 EnableParameter 设置。
key为自定义参数名称,value为该参数的默认取值。kv均为字符串型。
自定义参数最多20个。
自定义参数名称需符合以下规范:字符数目上限64,可选范围【a-zA-Z0-9-_】。public DefaultParameterConf[] getDefaultParameterConfs()
public void setDefaultParameterConfs(DefaultParameterConf[] DefaultParameterConfs)
DefaultParameterConfs - 自定义参数数组。如果 InvokeCommand 时未提供参数取值,将使用这里的默认值进行替换。
参数不支持同时指定 `DefaultParameters` 和 `DefaultParameterConfs` 。
仅在命令的 EnableParameter 为 true 时,才允许修改此参数。可通过 [DescribeCommands(查询命令详情)](https://cloud.tencent.com/document/api/1340/52681) 接口获取命令的 EnableParameter 设置。
自定义参数最多20个。public String getUsername()
public void setUsername(String Username)
Username - 在 CVM 或 Lighthouse 实例中执行命令的用户名称。
使用最小权限执行命令是权限管理的最佳实践,建议您以普通用户身份执行云助手命令。public String getOutputCOSBucketUrl()
public void setOutputCOSBucketUrl(String OutputCOSBucketUrl)
OutputCOSBucketUrl - 指定日志上传的cos bucket 地址,必须以https开头,如 https://BucketName-123454321.cos.ap-beijing.myqcloud.com。public String getOutputCOSKeyPrefix()
public void setOutputCOSKeyPrefix(String OutputCOSKeyPrefix)
OutputCOSKeyPrefix - 指定日志在cos bucket中的目录,目录命名有如下规则:
1. 可用数字、中英文和可见字符的组合,长度最多为60。
2. 用 / 分割路径,可快速创建子目录。
3. 不允许连续 / ;不允许以 / 开头;不允许以..作为文件夹名称。Copyright © 2025. All rights reserved.