Documentation
¶
Index ¶
- type AddLogConfigRequest
- type AddLogConfigResponse
- type AddLogConfigResult
- type CreateCommandRequest
- func NewCreateCommandRequest(regionId string, commandName string, commandContent string) *CreateCommandRequest
- func NewCreateCommandRequestWithAllParams(regionId string, commandName string, commandType *string, ...) *CreateCommandRequest
- func NewCreateCommandRequestWithoutParam() *CreateCommandRequest
- func (r CreateCommandRequest) GetRegionId() string
- func (r *CreateCommandRequest) SetCommandContent(commandContent string)
- func (r *CreateCommandRequest) SetCommandDescription(commandDescription string)
- func (r *CreateCommandRequest) SetCommandName(commandName string)
- func (r *CreateCommandRequest) SetCommandType(commandType string)
- func (r *CreateCommandRequest) SetEnableParameter(enableParameter bool)
- func (r *CreateCommandRequest) SetRegionId(regionId string)
- func (r *CreateCommandRequest) SetTimeout(timeout int)
- func (r *CreateCommandRequest) SetUsername(username string)
- func (r *CreateCommandRequest) SetWorkdir(workdir string)
- type CreateCommandResponse
- type CreateCommandResult
- type DeleteCommandsRequest
- type DeleteCommandsResponse
- type DeleteCommandsResult
- type DescribeCommandsRequest
- func (r DescribeCommandsRequest) GetRegionId() string
- func (r *DescribeCommandsRequest) SetCommandIds(commandIds []string)
- func (r *DescribeCommandsRequest) SetCommandNames(commandNames []string)
- func (r *DescribeCommandsRequest) SetCommandTypes(commandTypes []string)
- func (r *DescribeCommandsRequest) SetPageNumber(pageNumber int)
- func (r *DescribeCommandsRequest) SetPageSize(pageSize int)
- func (r *DescribeCommandsRequest) SetRegionId(regionId string)
- func (r *DescribeCommandsRequest) SetSourceType(sourceType string)
- func (r *DescribeCommandsRequest) SetUsernames(usernames []string)
- type DescribeCommandsResponse
- type DescribeCommandsResult
- type DescribeInvocationsRequest
- func NewDescribeInvocationsRequest(regionId string) *DescribeInvocationsRequest
- func NewDescribeInvocationsRequestWithAllParams(regionId string, pageNumber *int, pageSize *int, invokeIds []string, ...) *DescribeInvocationsRequest
- func NewDescribeInvocationsRequestWithoutParam() *DescribeInvocationsRequest
- func (r DescribeInvocationsRequest) GetRegionId() string
- func (r *DescribeInvocationsRequest) SetCommandIds(commandIds []string)
- func (r *DescribeInvocationsRequest) SetCommandNames(commandNames []string)
- func (r *DescribeInvocationsRequest) SetCommandTypes(commandTypes []string)
- func (r *DescribeInvocationsRequest) SetInvokeIds(invokeIds []string)
- func (r *DescribeInvocationsRequest) SetPageNumber(pageNumber int)
- func (r *DescribeInvocationsRequest) SetPageSize(pageSize int)
- func (r *DescribeInvocationsRequest) SetRegionId(regionId string)
- func (r *DescribeInvocationsRequest) SetStatus(status []string)
- func (r *DescribeInvocationsRequest) SetUserNames(userNames []string)
- type DescribeInvocationsResponse
- type DescribeInvocationsResult
- type InvokeCommandRequest
- func (r InvokeCommandRequest) GetRegionId() string
- func (r *InvokeCommandRequest) SetCommandId(commandId string)
- func (r *InvokeCommandRequest) SetEnableParameter(enableParameter bool)
- func (r *InvokeCommandRequest) SetExecTime(execTime string)
- func (r *InvokeCommandRequest) SetInstances(instances []string)
- func (r *InvokeCommandRequest) SetParameters(parameters []assistant.Parameter)
- func (r *InvokeCommandRequest) SetRegionId(regionId string)
- func (r *InvokeCommandRequest) SetTags(tags []common.TagFilter)
- func (r *InvokeCommandRequest) SetTimeout(timeout int)
- func (r *InvokeCommandRequest) SetUsername(username string)
- func (r *InvokeCommandRequest) SetWindowsPassword(windowsPassword string)
- func (r *InvokeCommandRequest) SetWorkdir(workdir string)
- type InvokeCommandResponse
- type InvokeCommandResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddLogConfigRequest ¶
type AddLogConfigRequest struct {
core.JDCloudRequest
/* 地域ID。 */
RegionId string `json:"regionId"`
/* 用户日志集名字
(Optional) */
Logset *string `json:"logset"`
/* 用户日志主题名字
*/
Logtopic string `json:"logtopic"`
}
func NewAddLogConfigRequest ¶
func NewAddLogConfigRequest( regionId string, logtopic string, ) *AddLogConfigRequest
* param regionId: 地域ID。 (Required) * param logtopic: 用户日志主题名字 (Required) * * @Deprecated, not compatible when mandatory parameters changed
func NewAddLogConfigRequestWithAllParams ¶
func NewAddLogConfigRequestWithAllParams( regionId string, logset *string, logtopic string, ) *AddLogConfigRequest
* param regionId: 地域ID。 (Required) * param logset: 用户日志集名字 (Optional) * param logtopic: 用户日志主题名字 (Required)
func NewAddLogConfigRequestWithoutParam ¶
func NewAddLogConfigRequestWithoutParam() *AddLogConfigRequest
This constructor has better compatible ability when API parameters changed
func (AddLogConfigRequest) GetRegionId ¶
func (r AddLogConfigRequest) GetRegionId() string
GetRegionId returns path parameter 'regionId' if exist, otherwise return empty string
func (*AddLogConfigRequest) SetLogset ¶
func (r *AddLogConfigRequest) SetLogset(logset string)
param logset: 用户日志集名字
(Optional)
func (*AddLogConfigRequest) SetLogtopic ¶
func (r *AddLogConfigRequest) SetLogtopic(logtopic string)
param logtopic: 用户日志主题名字
(Required)
func (*AddLogConfigRequest) SetRegionId ¶
func (r *AddLogConfigRequest) SetRegionId(regionId string)
param regionId: 地域ID。(Required)
type AddLogConfigResponse ¶
type AddLogConfigResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result AddLogConfigResult `json:"result"`
}
type AddLogConfigResult ¶
type AddLogConfigResult struct {
}
type CreateCommandRequest ¶
type CreateCommandRequest struct {
core.JDCloudRequest
/* 地域ID。 */
RegionId string `json:"regionId"`
/* 命令名称,长度为1\~128个字符,只允许中文、数字、大小写字母、英文下划线(\_)、连字符(-)及点(.)。
*/
CommandName string `json:"commandName"`
/* 命令类型,可选值:shell和powershell,默认shell
(Optional) */
CommandType *string `json:"commandType"`
/* 以base64编码的命令内容,编码后长度小于36KB
*/
CommandContent string `json:"commandContent"`
/* 超时时间,取值范围:[10, 86400], 超过该时间后,尚未执行完的命令会置为失败。默认60s
(Optional) */
Timeout *int `json:"timeout"`
/* 用户名,执行该命令时的用户身份。在linux上默认是root,windows上默认是administrator。长度小于256
(Optional) */
Username *string `json:"username"`
/* 命令执行路径。在linux上默认是/root,windows上默认是C:\Windows\System32。长度小于256。
(Optional) */
Workdir *string `json:"workdir"`
/* 命令描述,描述该命令详细信息,如功能、使用注意事项等。长度小于256。
(Optional) */
CommandDescription *string `json:"commandDescription"`
/* 是否使用参数, 默认false,不使用参数 (Optional) */
EnableParameter *bool `json:"enableParameter"`
}
func NewCreateCommandRequest ¶
func NewCreateCommandRequest( regionId string, commandName string, commandContent string, ) *CreateCommandRequest
* param regionId: 地域ID。 (Required) * param commandName: 命令名称,长度为1\~128个字符,只允许中文、数字、大小写字母、英文下划线(\_)、连字符(-)及点(.)。 (Required) * param commandContent: 以base64编码的命令内容,编码后长度小于36KB (Required) * * @Deprecated, not compatible when mandatory parameters changed
func NewCreateCommandRequestWithAllParams ¶
func NewCreateCommandRequestWithAllParams( regionId string, commandName string, commandType *string, commandContent string, timeout *int, username *string, workdir *string, commandDescription *string, enableParameter *bool, ) *CreateCommandRequest
* param regionId: 地域ID。 (Required) * param commandName: 命令名称,长度为1\~128个字符,只允许中文、数字、大小写字母、英文下划线(\_)、连字符(-)及点(.)。 (Required) * param commandType: 命令类型,可选值:shell和powershell,默认shell (Optional) * param commandContent: 以base64编码的命令内容,编码后长度小于36KB (Required) * param timeout: 超时时间,取值范围:[10, 86400], 超过该时间后,尚未执行完的命令会置为失败。默认60s (Optional) * param username: 用户名,执行该命令时的用户身份。在linux上默认是root,windows上默认是administrator。长度小于256 (Optional) * param workdir: 命令执行路径。在linux上默认是/root,windows上默认是C:\Windows\System32。长度小于256。 (Optional) * param commandDescription: 命令描述,描述该命令详细信息,如功能、使用注意事项等。长度小于256。 (Optional) * param enableParameter: 是否使用参数, 默认false,不使用参数 (Optional)
func NewCreateCommandRequestWithoutParam ¶
func NewCreateCommandRequestWithoutParam() *CreateCommandRequest
This constructor has better compatible ability when API parameters changed
func (CreateCommandRequest) GetRegionId ¶
func (r CreateCommandRequest) GetRegionId() string
GetRegionId returns path parameter 'regionId' if exist, otherwise return empty string
func (*CreateCommandRequest) SetCommandContent ¶
func (r *CreateCommandRequest) SetCommandContent(commandContent string)
param commandContent: 以base64编码的命令内容,编码后长度小于36KB
(Required)
func (*CreateCommandRequest) SetCommandDescription ¶
func (r *CreateCommandRequest) SetCommandDescription(commandDescription string)
param commandDescription: 命令描述,描述该命令详细信息,如功能、使用注意事项等。长度小于256。
(Optional)
func (*CreateCommandRequest) SetCommandName ¶
func (r *CreateCommandRequest) SetCommandName(commandName string)
param commandName: 命令名称,长度为1\~128个字符,只允许中文、数字、大小写字母、英文下划线(\_)、连字符(-)及点(.)。
(Required)
func (*CreateCommandRequest) SetCommandType ¶
func (r *CreateCommandRequest) SetCommandType(commandType string)
param commandType: 命令类型,可选值:shell和powershell,默认shell
(Optional)
func (*CreateCommandRequest) SetEnableParameter ¶
func (r *CreateCommandRequest) SetEnableParameter(enableParameter bool)
param enableParameter: 是否使用参数, 默认false,不使用参数(Optional)
func (*CreateCommandRequest) SetRegionId ¶
func (r *CreateCommandRequest) SetRegionId(regionId string)
param regionId: 地域ID。(Required)
func (*CreateCommandRequest) SetTimeout ¶
func (r *CreateCommandRequest) SetTimeout(timeout int)
param timeout: 超时时间,取值范围:[10, 86400], 超过该时间后,尚未执行完的命令会置为失败。默认60s
(Optional)
func (*CreateCommandRequest) SetUsername ¶
func (r *CreateCommandRequest) SetUsername(username string)
param username: 用户名,执行该命令时的用户身份。在linux上默认是root,windows上默认是administrator。长度小于256
(Optional)
func (*CreateCommandRequest) SetWorkdir ¶
func (r *CreateCommandRequest) SetWorkdir(workdir string)
param workdir: 命令执行路径。在linux上默认是/root,windows上默认是C:\Windows\System32。长度小于256。
(Optional)
type CreateCommandResponse ¶
type CreateCommandResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result CreateCommandResult `json:"result"`
}
type CreateCommandResult ¶
type CreateCommandResult struct {
CommandId string `json:"commandId"`
}
type DeleteCommandsRequest ¶
type DeleteCommandsRequest struct {
core.JDCloudRequest
/* 地域ID。 */
RegionId string `json:"regionId"`
/* 用户创建的命令Id
*/
CommandIds []string `json:"commandIds"`
}
func NewDeleteCommandsRequest ¶
func NewDeleteCommandsRequest( regionId string, commandIds []string, ) *DeleteCommandsRequest
* param regionId: 地域ID。 (Required) * param commandIds: 用户创建的命令Id (Required) * * @Deprecated, not compatible when mandatory parameters changed
func NewDeleteCommandsRequestWithAllParams ¶
func NewDeleteCommandsRequestWithAllParams( regionId string, commandIds []string, ) *DeleteCommandsRequest
* param regionId: 地域ID。 (Required) * param commandIds: 用户创建的命令Id (Required)
func NewDeleteCommandsRequestWithoutParam ¶
func NewDeleteCommandsRequestWithoutParam() *DeleteCommandsRequest
This constructor has better compatible ability when API parameters changed
func (DeleteCommandsRequest) GetRegionId ¶
func (r DeleteCommandsRequest) GetRegionId() string
GetRegionId returns path parameter 'regionId' if exist, otherwise return empty string
func (*DeleteCommandsRequest) SetCommandIds ¶
func (r *DeleteCommandsRequest) SetCommandIds(commandIds []string)
param commandIds: 用户创建的命令Id
(Required)
func (*DeleteCommandsRequest) SetRegionId ¶
func (r *DeleteCommandsRequest) SetRegionId(regionId string)
param regionId: 地域ID。(Required)
type DeleteCommandsResponse ¶
type DeleteCommandsResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result DeleteCommandsResult `json:"result"`
}
type DeleteCommandsResult ¶
type DeleteCommandsResult struct {
CommandId string `json:"commandId"`
}
type DescribeCommandsRequest ¶
type DescribeCommandsRequest struct {
core.JDCloudRequest
/* 地域ID。 */
RegionId string `json:"regionId"`
/* 页数,默认是第一页,取值为 1
(Optional) */
PageNumber *int `json:"pageNumber"`
/* 每页命令数,默认为20,最大为100
(Optional) */
PageSize *int `json:"pageSize"`
/* 命令Id,最多可传入100个命令Id
(Optional) */
CommandIds []string `json:"commandIds"`
/* 命令名称,长度为1\~128个字符,只允许中文、数字、大小写字母、英文下划线(\_)、连字符(-)及点(.)。最多可传入100个命令名称。
(Optional) */
CommandNames []string `json:"commandNames"`
/* 命令类型,可选值:shell和powershell,默认shell
(Optional) */
CommandTypes []string `json:"commandTypes"`
/* 命令来源,可选值:jdcloud(官方)和self,默认self
(Optional) */
SourceType *string `json:"sourceType"`
/* 用户名,执行该命令时的用户身份。在linux上默认是root,windows上默认是administrator。长度小于256
(Optional) */
Usernames []string `json:"usernames"`
}
func NewDescribeCommandsRequest ¶
func NewDescribeCommandsRequest( regionId string, ) *DescribeCommandsRequest
* param regionId: 地域ID。 (Required) * * @Deprecated, not compatible when mandatory parameters changed
func NewDescribeCommandsRequestWithAllParams ¶
func NewDescribeCommandsRequestWithAllParams( regionId string, pageNumber *int, pageSize *int, commandIds []string, commandNames []string, commandTypes []string, sourceType *string, usernames []string, ) *DescribeCommandsRequest
* param regionId: 地域ID。 (Required) * param pageNumber: 页数,默认是第一页,取值为 1 (Optional) * param pageSize: 每页命令数,默认为20,最大为100 (Optional) * param commandIds: 命令Id,最多可传入100个命令Id (Optional) * param commandNames: 命令名称,长度为1\~128个字符,只允许中文、数字、大小写字母、英文下划线(\_)、连字符(-)及点(.)。最多可传入100个命令名称。 (Optional) * param commandTypes: 命令类型,可选值:shell和powershell,默认shell (Optional) * param sourceType: 命令来源,可选值:jdcloud(官方)和self,默认self (Optional) * param usernames: 用户名,执行该命令时的用户身份。在linux上默认是root,windows上默认是administrator。长度小于256 (Optional)
func NewDescribeCommandsRequestWithoutParam ¶
func NewDescribeCommandsRequestWithoutParam() *DescribeCommandsRequest
This constructor has better compatible ability when API parameters changed
func (DescribeCommandsRequest) GetRegionId ¶
func (r DescribeCommandsRequest) GetRegionId() string
GetRegionId returns path parameter 'regionId' if exist, otherwise return empty string
func (*DescribeCommandsRequest) SetCommandIds ¶
func (r *DescribeCommandsRequest) SetCommandIds(commandIds []string)
param commandIds: 命令Id,最多可传入100个命令Id
(Optional)
func (*DescribeCommandsRequest) SetCommandNames ¶
func (r *DescribeCommandsRequest) SetCommandNames(commandNames []string)
param commandNames: 命令名称,长度为1\~128个字符,只允许中文、数字、大小写字母、英文下划线(\_)、连字符(-)及点(.)。最多可传入100个命令名称。
(Optional)
func (*DescribeCommandsRequest) SetCommandTypes ¶
func (r *DescribeCommandsRequest) SetCommandTypes(commandTypes []string)
param commandTypes: 命令类型,可选值:shell和powershell,默认shell
(Optional)
func (*DescribeCommandsRequest) SetPageNumber ¶
func (r *DescribeCommandsRequest) SetPageNumber(pageNumber int)
param pageNumber: 页数,默认是第一页,取值为 1
(Optional)
func (*DescribeCommandsRequest) SetPageSize ¶
func (r *DescribeCommandsRequest) SetPageSize(pageSize int)
param pageSize: 每页命令数,默认为20,最大为100
(Optional)
func (*DescribeCommandsRequest) SetRegionId ¶
func (r *DescribeCommandsRequest) SetRegionId(regionId string)
param regionId: 地域ID。(Required)
func (*DescribeCommandsRequest) SetSourceType ¶
func (r *DescribeCommandsRequest) SetSourceType(sourceType string)
param sourceType: 命令来源,可选值:jdcloud(官方)和self,默认self
(Optional)
func (*DescribeCommandsRequest) SetUsernames ¶
func (r *DescribeCommandsRequest) SetUsernames(usernames []string)
param usernames: 用户名,执行该命令时的用户身份。在linux上默认是root,windows上默认是administrator。长度小于256
(Optional)
type DescribeCommandsResponse ¶
type DescribeCommandsResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result DescribeCommandsResult `json:"result"`
}
type DescribeCommandsResult ¶
type DescribeInvocationsRequest ¶
type DescribeInvocationsRequest struct {
core.JDCloudRequest
/* 地域ID。 */
RegionId string `json:"regionId"`
/* 页数,默认是第一页,取值1
(Optional) */
PageNumber *int `json:"pageNumber"`
/* 每页大小,默认20, 最大100
(Optional) */
PageSize *int `json:"pageSize"`
/* 命令执行Id
(Optional) */
InvokeIds []string `json:"invokeIds"`
/* 命令Id
(Optional) */
CommandIds []string `json:"commandIds"`
/* 命令执行状态
(Optional) */
Status []string `json:"status"`
/* 命令名字
(Optional) */
CommandNames []string `json:"commandNames"`
/* 命令类型, shell or powershell
(Optional) */
CommandTypes []string `json:"commandTypes"`
/* 命令执行用户
(Optional) */
UserNames []string `json:"userNames"`
}
func NewDescribeInvocationsRequest ¶
func NewDescribeInvocationsRequest( regionId string, ) *DescribeInvocationsRequest
* param regionId: 地域ID。 (Required) * * @Deprecated, not compatible when mandatory parameters changed
func NewDescribeInvocationsRequestWithAllParams ¶
func NewDescribeInvocationsRequestWithAllParams( regionId string, pageNumber *int, pageSize *int, invokeIds []string, commandIds []string, status []string, commandNames []string, commandTypes []string, userNames []string, ) *DescribeInvocationsRequest
* param regionId: 地域ID。 (Required) * param pageNumber: 页数,默认是第一页,取值1 (Optional) * param pageSize: 每页大小,默认20, 最大100 (Optional) * param invokeIds: 命令执行Id (Optional) * param commandIds: 命令Id (Optional) * param status: 命令执行状态 (Optional) * param commandNames: 命令名字 (Optional) * param commandTypes: 命令类型, shell or powershell (Optional) * param userNames: 命令执行用户 (Optional)
func NewDescribeInvocationsRequestWithoutParam ¶
func NewDescribeInvocationsRequestWithoutParam() *DescribeInvocationsRequest
This constructor has better compatible ability when API parameters changed
func (DescribeInvocationsRequest) GetRegionId ¶
func (r DescribeInvocationsRequest) GetRegionId() string
GetRegionId returns path parameter 'regionId' if exist, otherwise return empty string
func (*DescribeInvocationsRequest) SetCommandIds ¶
func (r *DescribeInvocationsRequest) SetCommandIds(commandIds []string)
param commandIds: 命令Id
(Optional)
func (*DescribeInvocationsRequest) SetCommandNames ¶
func (r *DescribeInvocationsRequest) SetCommandNames(commandNames []string)
param commandNames: 命令名字
(Optional)
func (*DescribeInvocationsRequest) SetCommandTypes ¶
func (r *DescribeInvocationsRequest) SetCommandTypes(commandTypes []string)
param commandTypes: 命令类型, shell or powershell
(Optional)
func (*DescribeInvocationsRequest) SetInvokeIds ¶
func (r *DescribeInvocationsRequest) SetInvokeIds(invokeIds []string)
param invokeIds: 命令执行Id
(Optional)
func (*DescribeInvocationsRequest) SetPageNumber ¶
func (r *DescribeInvocationsRequest) SetPageNumber(pageNumber int)
param pageNumber: 页数,默认是第一页,取值1
(Optional)
func (*DescribeInvocationsRequest) SetPageSize ¶
func (r *DescribeInvocationsRequest) SetPageSize(pageSize int)
param pageSize: 每页大小,默认20, 最大100
(Optional)
func (*DescribeInvocationsRequest) SetRegionId ¶
func (r *DescribeInvocationsRequest) SetRegionId(regionId string)
param regionId: 地域ID。(Required)
func (*DescribeInvocationsRequest) SetStatus ¶
func (r *DescribeInvocationsRequest) SetStatus(status []string)
param status: 命令执行状态
(Optional)
func (*DescribeInvocationsRequest) SetUserNames ¶
func (r *DescribeInvocationsRequest) SetUserNames(userNames []string)
param userNames: 命令执行用户
(Optional)
type DescribeInvocationsResponse ¶
type DescribeInvocationsResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result DescribeInvocationsResult `json:"result"`
}
type DescribeInvocationsResult ¶
type DescribeInvocationsResult struct {
TotalCount int `json:"totalCount"`
Invocations []assistant.Invocation `json:"invocations"`
}
type InvokeCommandRequest ¶
type InvokeCommandRequest struct {
core.JDCloudRequest
/* 地域ID。 */
RegionId string `json:"regionId"`
/* 命令Id
*/
CommandId string `json:"commandId"`
/* 运行该命令的云主机,与tags查到云主机取并集,一次最多云主机数50
(Optional) */
Instances []string `json:"instances"`
/* 根据tags确定运行该命令的云主机,与指定instances云主机取并集,一次最多云主机数50
(Optional) */
Tags []common.TagFilter `json:"tags"`
/* 配置运行该命令的时刻,格式`yyyy-MM-dd HH:mm:ss`。不传该参数,立即执行命令。默认为空,可配置的时间范围为`当前时间+10minute`~`当前时间+6month`。
(Optional) */
ExecTime *string `json:"execTime"`
/* 超时时间,取值范围:[10, 86400], 超过该时间后,尚未执行完的命令会置为失败。默认60s
(Optional) */
Timeout *int `json:"timeout"`
/* 用户名,执行该命令时的用户身份。在linux上默认是root,windows上默认是administrator。长度小于256
(Optional) */
Username *string `json:"username"`
/* 命令执行路径,在linux上默认为用户的home目录:/root, 在windows上默认为:C:\Windows\system32
(Optional) */
Workdir *string `json:"workdir"`
/* 和用户名相匹配的密码,仅适用于windows系统
(Optional) */
WindowsPassword *string `json:"windowsPassword"`
/* 脚本中是否启用参数,true:启用,false:不启用。
(Optional) */
EnableParameter *bool `json:"enableParameter"`
/* 用户自定义参数和对应的参数值,数量不超过20。
(Optional) */
Parameters []assistant.Parameter `json:"parameters"`
}
func NewInvokeCommandRequest ¶
func NewInvokeCommandRequest( regionId string, commandId string, ) *InvokeCommandRequest
* param regionId: 地域ID。 (Required) * param commandId: 命令Id (Required) * * @Deprecated, not compatible when mandatory parameters changed
func NewInvokeCommandRequestWithAllParams ¶
func NewInvokeCommandRequestWithAllParams( regionId string, commandId string, instances []string, tags []common.TagFilter, execTime *string, timeout *int, username *string, workdir *string, windowsPassword *string, enableParameter *bool, parameters []assistant.Parameter, ) *InvokeCommandRequest
* param regionId: 地域ID。 (Required) * param commandId: 命令Id (Required) * param instances: 运行该命令的云主机,与tags查到云主机取并集,一次最多云主机数50 (Optional) * param tags: 根据tags确定运行该命令的云主机,与指定instances云主机取并集,一次最多云主机数50 (Optional) * param execTime: 配置运行该命令的时刻,格式`yyyy-MM-dd HH:mm:ss`。不传该参数,立即执行命令。默认为空,可配置的时间范围为`当前时间+10minute`~`当前时间+6month`。 (Optional) * param timeout: 超时时间,取值范围:[10, 86400], 超过该时间后,尚未执行完的命令会置为失败。默认60s (Optional) * param username: 用户名,执行该命令时的用户身份。在linux上默认是root,windows上默认是administrator。长度小于256 (Optional) * param workdir: 命令执行路径,在linux上默认为用户的home目录:/root, 在windows上默认为:C:\Windows\system32 (Optional) * param windowsPassword: 和用户名相匹配的密码,仅适用于windows系统 (Optional) * param enableParameter: 脚本中是否启用参数,true:启用,false:不启用。 (Optional) * param parameters: 用户自定义参数和对应的参数值,数量不超过20。 (Optional)
func NewInvokeCommandRequestWithoutParam ¶
func NewInvokeCommandRequestWithoutParam() *InvokeCommandRequest
This constructor has better compatible ability when API parameters changed
func (InvokeCommandRequest) GetRegionId ¶
func (r InvokeCommandRequest) GetRegionId() string
GetRegionId returns path parameter 'regionId' if exist, otherwise return empty string
func (*InvokeCommandRequest) SetCommandId ¶
func (r *InvokeCommandRequest) SetCommandId(commandId string)
param commandId: 命令Id
(Required)
func (*InvokeCommandRequest) SetEnableParameter ¶
func (r *InvokeCommandRequest) SetEnableParameter(enableParameter bool)
param enableParameter: 脚本中是否启用参数,true:启用,false:不启用。
(Optional)
func (*InvokeCommandRequest) SetExecTime ¶
func (r *InvokeCommandRequest) SetExecTime(execTime string)
param execTime: 配置运行该命令的时刻,格式`yyyy-MM-dd HH:mm:ss`。不传该参数,立即执行命令。默认为空,可配置的时间范围为`当前时间+10minute`~`当前时间+6month`。
(Optional)
func (*InvokeCommandRequest) SetInstances ¶
func (r *InvokeCommandRequest) SetInstances(instances []string)
param instances: 运行该命令的云主机,与tags查到云主机取并集,一次最多云主机数50
(Optional)
func (*InvokeCommandRequest) SetParameters ¶
func (r *InvokeCommandRequest) SetParameters(parameters []assistant.Parameter)
param parameters: 用户自定义参数和对应的参数值,数量不超过20。
(Optional)
func (*InvokeCommandRequest) SetRegionId ¶
func (r *InvokeCommandRequest) SetRegionId(regionId string)
param regionId: 地域ID。(Required)
func (*InvokeCommandRequest) SetTags ¶
func (r *InvokeCommandRequest) SetTags(tags []common.TagFilter)
param tags: 根据tags确定运行该命令的云主机,与指定instances云主机取并集,一次最多云主机数50
(Optional)
func (*InvokeCommandRequest) SetTimeout ¶
func (r *InvokeCommandRequest) SetTimeout(timeout int)
param timeout: 超时时间,取值范围:[10, 86400], 超过该时间后,尚未执行完的命令会置为失败。默认60s
(Optional)
func (*InvokeCommandRequest) SetUsername ¶
func (r *InvokeCommandRequest) SetUsername(username string)
param username: 用户名,执行该命令时的用户身份。在linux上默认是root,windows上默认是administrator。长度小于256
(Optional)
func (*InvokeCommandRequest) SetWindowsPassword ¶
func (r *InvokeCommandRequest) SetWindowsPassword(windowsPassword string)
param windowsPassword: 和用户名相匹配的密码,仅适用于windows系统
(Optional)
func (*InvokeCommandRequest) SetWorkdir ¶
func (r *InvokeCommandRequest) SetWorkdir(workdir string)
param workdir: 命令执行路径,在linux上默认为用户的home目录:/root, 在windows上默认为:C:\Windows\system32
(Optional)
type InvokeCommandResponse ¶
type InvokeCommandResponse struct {
RequestID string `json:"requestId"`
Error core.ErrorResponse `json:"error"`
Result InvokeCommandResult `json:"result"`
}
type InvokeCommandResult ¶
type InvokeCommandResult struct {
InvokeId string `json:"invokeId"`
}