volcenginecc.ecs.Command
自定义命令是云助手提供的满足您个性化运维需求的功能,您可以在预置的公共命令不满足需求时创建自定义命令,并通过运维任务在实例中批量执行您编写的自定义命令。
Example Usage
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
commandDemo:
type: volcenginecc:ecs:Command
name: CommandDemo
properties:
commandContent: IyEvYmluL2Jhc2gKCm1rZGlyIHt7ZGxxxxx
description: CommandDemo Example
enableParameter: true
name: commandtest
parameterDefinitions:
- type: Digit
name: dirname
required: true
default_value: '10'
min_length: 0
max_length: 0
min_value: '5'
max_value: '100'
decimal_precision: 0
projectName: default
tags:
- key: env
value: test
timeout: 60
type: Shell
username: rxxxx
workingDir: /home
Create Command Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Command(name: string, args: CommandArgs, opts?: CustomResourceOptions);
@overload
def Command(resource_name: str,
args: CommandArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Command(resource_name: str,
opts: Optional[ResourceOptions] = None,
command_content: Optional[str] = None,
name: Optional[str] = None,
type: Optional[str] = None,
content_encoding: Optional[str] = None,
description: Optional[str] = None,
enable_parameter: Optional[bool] = None,
parameter_definitions: Optional[Sequence[CommandParameterDefinitionArgs]] = None,
project_name: Optional[str] = None,
tags: Optional[Sequence[CommandTagArgs]] = None,
timeout: Optional[int] = None,
username: Optional[str] = None,
working_dir: Optional[str] = None)
func NewCommand(ctx *Context, name string, args CommandArgs, opts ...ResourceOption) (*Command, error)
public Command(string name, CommandArgs args, CustomResourceOptions? opts = null)
public Command(String name, CommandArgs args)
public Command(String name, CommandArgs args, CustomResourceOptions options)
type: volcenginecc:ecs:Command
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CommandArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CommandArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CommandArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CommandArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CommandArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var commandResource = new Volcenginecc.Ecs.Command("commandResource", new()
{
CommandContent = "string",
Name = "string",
Type = "string",
ContentEncoding = "string",
Description = "string",
EnableParameter = false,
ParameterDefinitions = new[]
{
new Volcenginecc.Ecs.Inputs.CommandParameterDefinitionArgs
{
DecimalPrecision = 0,
DefaultValue = "string",
MaxLength = 0,
MaxValue = "string",
MinLength = 0,
MinValue = "string",
Name = "string",
Required = false,
Type = "string",
},
},
ProjectName = "string",
Tags = new[]
{
new Volcenginecc.Ecs.Inputs.CommandTagArgs
{
Key = "string",
Value = "string",
},
},
Timeout = 0,
Username = "string",
WorkingDir = "string",
});
example, err := ecs.NewCommand(ctx, "commandResource", &ecs.CommandArgs{
CommandContent: pulumi.String("string"),
Name: pulumi.String("string"),
Type: pulumi.String("string"),
ContentEncoding: pulumi.String("string"),
Description: pulumi.String("string"),
EnableParameter: pulumi.Bool(false),
ParameterDefinitions: ecs.CommandParameterDefinitionArray{
&ecs.CommandParameterDefinitionArgs{
DecimalPrecision: pulumi.Int(0),
DefaultValue: pulumi.String("string"),
MaxLength: pulumi.Int(0),
MaxValue: pulumi.String("string"),
MinLength: pulumi.Int(0),
MinValue: pulumi.String("string"),
Name: pulumi.String("string"),
Required: pulumi.Bool(false),
Type: pulumi.String("string"),
},
},
ProjectName: pulumi.String("string"),
Tags: ecs.CommandTagArray{
&ecs.CommandTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Timeout: pulumi.Int(0),
Username: pulumi.String("string"),
WorkingDir: pulumi.String("string"),
})
var commandResource = new Command("commandResource", CommandArgs.builder()
.commandContent("string")
.name("string")
.type("string")
.contentEncoding("string")
.description("string")
.enableParameter(false)
.parameterDefinitions(CommandParameterDefinitionArgs.builder()
.decimalPrecision(0)
.defaultValue("string")
.maxLength(0)
.maxValue("string")
.minLength(0)
.minValue("string")
.name("string")
.required(false)
.type("string")
.build())
.projectName("string")
.tags(CommandTagArgs.builder()
.key("string")
.value("string")
.build())
.timeout(0)
.username("string")
.workingDir("string")
.build());
command_resource = volcenginecc.ecs.Command("commandResource",
command_content="string",
name="string",
type="string",
content_encoding="string",
description="string",
enable_parameter=False,
parameter_definitions=[{
"decimal_precision": 0,
"default_value": "string",
"max_length": 0,
"max_value": "string",
"min_length": 0,
"min_value": "string",
"name": "string",
"required": False,
"type": "string",
}],
project_name="string",
tags=[{
"key": "string",
"value": "string",
}],
timeout=0,
username="string",
working_dir="string")
const commandResource = new volcenginecc.ecs.Command("commandResource", {
commandContent: "string",
name: "string",
type: "string",
contentEncoding: "string",
description: "string",
enableParameter: false,
parameterDefinitions: [{
decimalPrecision: 0,
defaultValue: "string",
maxLength: 0,
maxValue: "string",
minLength: 0,
minValue: "string",
name: "string",
required: false,
type: "string",
}],
projectName: "string",
tags: [{
key: "string",
value: "string",
}],
timeout: 0,
username: "string",
workingDir: "string",
});
type: volcenginecc:ecs:Command
properties:
commandContent: string
contentEncoding: string
description: string
enableParameter: false
name: string
parameterDefinitions:
- decimalPrecision: 0
defaultValue: string
maxLength: 0
maxValue: string
minLength: 0
minValue: string
name: string
required: false
type: string
projectName: string
tags:
- key: string
value: string
timeout: 0
type: string
username: string
workingDir: string
Command Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Command resource accepts the following input properties:
- Command
Content string - 命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
- Name string
- 命令名称。字符长度1~32。不限制特殊字符。
- Type string
- 命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
- Content
Encoding string - 命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
- Description string
- 命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
- Enable
Parameter bool - 创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
- Parameter
Definitions List<Volcengine.Command Parameter Definition> - Project
Name string - 资源所属项目,一个资源只能归属于一个项目。
- List<Volcengine.
Command Tag> - Timeout int
- 创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
- Username string
- 执行命令时的用户名。
- Working
Dir string - 创建的命令在ECS实例中运行的目录。
- Command
Content string - 命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
- Name string
- 命令名称。字符长度1~32。不限制特殊字符。
- Type string
- 命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
- Content
Encoding string - 命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
- Description string
- 命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
- Enable
Parameter bool - 创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
- Parameter
Definitions []CommandParameter Definition Args - Project
Name string - 资源所属项目,一个资源只能归属于一个项目。
- []Command
Tag Args - Timeout int
- 创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
- Username string
- 执行命令时的用户名。
- Working
Dir string - 创建的命令在ECS实例中运行的目录。
- command
Content String - 命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
- name String
- 命令名称。字符长度1~32。不限制特殊字符。
- type String
- 命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
- content
Encoding String - 命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
- description String
- 命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
- enable
Parameter Boolean - 创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
- parameter
Definitions List<CommandParameter Definition> - project
Name String - 资源所属项目,一个资源只能归属于一个项目。
- List<Command
Tag> - timeout Integer
- 创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
- username String
- 执行命令时的用户名。
- working
Dir String - 创建的命令在ECS实例中运行的目录。
- command
Content string - 命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
- name string
- 命令名称。字符长度1~32。不限制特殊字符。
- type string
- 命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
- content
Encoding string - 命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
- description string
- 命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
- enable
Parameter boolean - 创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
- parameter
Definitions CommandParameter Definition[] - project
Name string - 资源所属项目,一个资源只能归属于一个项目。
- Command
Tag[] - timeout number
- 创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
- username string
- 执行命令时的用户名。
- working
Dir string - 创建的命令在ECS实例中运行的目录。
- command_
content str - 命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
- name str
- 命令名称。字符长度1~32。不限制特殊字符。
- type str
- 命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
- content_
encoding str - 命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
- description str
- 命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
- enable_
parameter bool - 创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
- parameter_
definitions Sequence[CommandParameter Definition Args] - project_
name str - 资源所属项目,一个资源只能归属于一个项目。
- Sequence[Command
Tag Args] - timeout int
- 创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
- username str
- 执行命令时的用户名。
- working_
dir str - 创建的命令在ECS实例中运行的目录。
- command
Content String - 命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
- name String
- 命令名称。字符长度1~32。不限制特殊字符。
- type String
- 命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
- content
Encoding String - 命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
- description String
- 命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
- enable
Parameter Boolean - 创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
- parameter
Definitions List<Property Map> - project
Name String - 资源所属项目,一个资源只能归属于一个项目。
- List<Property Map>
- timeout Number
- 创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
- username String
- 执行命令时的用户名。
- working
Dir String - 创建的命令在ECS实例中运行的目录。
Outputs
All input properties are implicitly available as output properties. Additionally, the Command resource produces the following output properties:
- Command
Id string - 自定义命令ID。
- Created
Time string - 创建时间。
- Id string
- The provider-assigned unique ID for this managed resource.
- Invocation
Times int - 命令被调用次数。
- Provider
Name string - 命令的提供方。
- Updated
Time string - 更新时间。
- Command
Id string - 自定义命令ID。
- Created
Time string - 创建时间。
- Id string
- The provider-assigned unique ID for this managed resource.
- Invocation
Times int - 命令被调用次数。
- Provider
Name string - 命令的提供方。
- Updated
Time string - 更新时间。
- command
Id String - 自定义命令ID。
- created
Time String - 创建时间。
- id String
- The provider-assigned unique ID for this managed resource.
- invocation
Times Integer - 命令被调用次数。
- provider
Name String - 命令的提供方。
- updated
Time String - 更新时间。
- command
Id string - 自定义命令ID。
- created
Time string - 创建时间。
- id string
- The provider-assigned unique ID for this managed resource.
- invocation
Times number - 命令被调用次数。
- provider
Name string - 命令的提供方。
- updated
Time string - 更新时间。
- command_
id str - 自定义命令ID。
- created_
time str - 创建时间。
- id str
- The provider-assigned unique ID for this managed resource.
- invocation_
times int - 命令被调用次数。
- provider_
name str - 命令的提供方。
- updated_
time str - 更新时间。
- command
Id String - 自定义命令ID。
- created
Time String - 创建时间。
- id String
- The provider-assigned unique ID for this managed resource.
- invocation
Times Number - 命令被调用次数。
- provider
Name String - 命令的提供方。
- updated
Time String - 更新时间。
Look up Existing Command Resource
Get an existing Command resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CommandState, opts?: CustomResourceOptions): Command
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
command_content: Optional[str] = None,
command_id: Optional[str] = None,
content_encoding: Optional[str] = None,
created_time: Optional[str] = None,
description: Optional[str] = None,
enable_parameter: Optional[bool] = None,
invocation_times: Optional[int] = None,
name: Optional[str] = None,
parameter_definitions: Optional[Sequence[CommandParameterDefinitionArgs]] = None,
project_name: Optional[str] = None,
provider_name: Optional[str] = None,
tags: Optional[Sequence[CommandTagArgs]] = None,
timeout: Optional[int] = None,
type: Optional[str] = None,
updated_time: Optional[str] = None,
username: Optional[str] = None,
working_dir: Optional[str] = None) -> Command
func GetCommand(ctx *Context, name string, id IDInput, state *CommandState, opts ...ResourceOption) (*Command, error)
public static Command Get(string name, Input<string> id, CommandState? state, CustomResourceOptions? opts = null)
public static Command get(String name, Output<String> id, CommandState state, CustomResourceOptions options)
resources: _: type: volcenginecc:ecs:Command get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Command
Content string - 命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
- Command
Id string - 自定义命令ID。
- Content
Encoding string - 命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
- Created
Time string - 创建时间。
- Description string
- 命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
- Enable
Parameter bool - 创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
- Invocation
Times int - 命令被调用次数。
- Name string
- 命令名称。字符长度1~32。不限制特殊字符。
- Parameter
Definitions List<Volcengine.Command Parameter Definition> - Project
Name string - 资源所属项目,一个资源只能归属于一个项目。
- Provider
Name string - 命令的提供方。
- List<Volcengine.
Command Tag> - Timeout int
- 创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
- Type string
- 命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
- Updated
Time string - 更新时间。
- Username string
- 执行命令时的用户名。
- Working
Dir string - 创建的命令在ECS实例中运行的目录。
- Command
Content string - 命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
- Command
Id string - 自定义命令ID。
- Content
Encoding string - 命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
- Created
Time string - 创建时间。
- Description string
- 命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
- Enable
Parameter bool - 创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
- Invocation
Times int - 命令被调用次数。
- Name string
- 命令名称。字符长度1~32。不限制特殊字符。
- Parameter
Definitions []CommandParameter Definition Args - Project
Name string - 资源所属项目,一个资源只能归属于一个项目。
- Provider
Name string - 命令的提供方。
- []Command
Tag Args - Timeout int
- 创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
- Type string
- 命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
- Updated
Time string - 更新时间。
- Username string
- 执行命令时的用户名。
- Working
Dir string - 创建的命令在ECS实例中运行的目录。
- command
Content String - 命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
- command
Id String - 自定义命令ID。
- content
Encoding String - 命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
- created
Time String - 创建时间。
- description String
- 命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
- enable
Parameter Boolean - 创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
- invocation
Times Integer - 命令被调用次数。
- name String
- 命令名称。字符长度1~32。不限制特殊字符。
- parameter
Definitions List<CommandParameter Definition> - project
Name String - 资源所属项目,一个资源只能归属于一个项目。
- provider
Name String - 命令的提供方。
- List<Command
Tag> - timeout Integer
- 创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
- type String
- 命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
- updated
Time String - 更新时间。
- username String
- 执行命令时的用户名。
- working
Dir String - 创建的命令在ECS实例中运行的目录。
- command
Content string - 命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
- command
Id string - 自定义命令ID。
- content
Encoding string - 命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
- created
Time string - 创建时间。
- description string
- 命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
- enable
Parameter boolean - 创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
- invocation
Times number - 命令被调用次数。
- name string
- 命令名称。字符长度1~32。不限制特殊字符。
- parameter
Definitions CommandParameter Definition[] - project
Name string - 资源所属项目,一个资源只能归属于一个项目。
- provider
Name string - 命令的提供方。
- Command
Tag[] - timeout number
- 创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
- type string
- 命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
- updated
Time string - 更新时间。
- username string
- 执行命令时的用户名。
- working
Dir string - 创建的命令在ECS实例中运行的目录。
- command_
content str - 命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
- command_
id str - 自定义命令ID。
- content_
encoding str - 命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
- created_
time str - 创建时间。
- description str
- 命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
- enable_
parameter bool - 创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
- invocation_
times int - 命令被调用次数。
- name str
- 命令名称。字符长度1~32。不限制特殊字符。
- parameter_
definitions Sequence[CommandParameter Definition Args] - project_
name str - 资源所属项目,一个资源只能归属于一个项目。
- provider_
name str - 命令的提供方。
- Sequence[Command
Tag Args] - timeout int
- 创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
- type str
- 命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
- updated_
time str - 更新时间。
- username str
- 执行命令时的用户名。
- working_
dir str - 创建的命令在ECS实例中运行的目录。
- command
Content String - 命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
- command
Id String - 自定义命令ID。
- content
Encoding String - 命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
- created
Time String - 创建时间。
- description String
- 命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
- enable
Parameter Boolean - 创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
- invocation
Times Number - 命令被调用次数。
- name String
- 命令名称。字符长度1~32。不限制特殊字符。
- parameter
Definitions List<Property Map> - project
Name String - 资源所属项目,一个资源只能归属于一个项目。
- provider
Name String - 命令的提供方。
- List<Property Map>
- timeout Number
- 创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
- type String
- 命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
- updated
Time String - 更新时间。
- username String
- 执行命令时的用户名。
- working
Dir String - 创建的命令在ECS实例中运行的目录。
Supporting Types
CommandParameterDefinition, CommandParameterDefinitionArgs
- Decimal
Precision int - 自定义参数值(数字)允许的小数点后位数。
- Default
Value string - 自定义参数默认值。
- Max
Length int - 自定义参数值(字符串)的最大长度。
- Max
Value string - 自定义参数值(数字)的最大值。
- Min
Length int - 自定义参数值(字符串)的最小长度。
- Min
Value string - 自定义参数值(数字)的最小值。
- Name string
- 自定义参数名称,需要在脚本中通过{{Param}}定义 。单个参数名不能超过64字节。遵循Shell变量命名规则,a-zA-Z0-9-_的组合。首个字符不能以数字开头。中间不能有空格,可以使用下划线。
- Required bool
- 是否必填。
- Type string
- 自定义参数类型。
- Decimal
Precision int - 自定义参数值(数字)允许的小数点后位数。
- Default
Value string - 自定义参数默认值。
- Max
Length int - 自定义参数值(字符串)的最大长度。
- Max
Value string - 自定义参数值(数字)的最大值。
- Min
Length int - 自定义参数值(字符串)的最小长度。
- Min
Value string - 自定义参数值(数字)的最小值。
- Name string
- 自定义参数名称,需要在脚本中通过{{Param}}定义 。单个参数名不能超过64字节。遵循Shell变量命名规则,a-zA-Z0-9-_的组合。首个字符不能以数字开头。中间不能有空格,可以使用下划线。
- Required bool
- 是否必填。
- Type string
- 自定义参数类型。
- decimal
Precision Integer - 自定义参数值(数字)允许的小数点后位数。
- default
Value String - 自定义参数默认值。
- max
Length Integer - 自定义参数值(字符串)的最大长度。
- max
Value String - 自定义参数值(数字)的最大值。
- min
Length Integer - 自定义参数值(字符串)的最小长度。
- min
Value String - 自定义参数值(数字)的最小值。
- name String
- 自定义参数名称,需要在脚本中通过{{Param}}定义 。单个参数名不能超过64字节。遵循Shell变量命名规则,a-zA-Z0-9-_的组合。首个字符不能以数字开头。中间不能有空格,可以使用下划线。
- required Boolean
- 是否必填。
- type String
- 自定义参数类型。
- decimal
Precision number - 自定义参数值(数字)允许的小数点后位数。
- default
Value string - 自定义参数默认值。
- max
Length number - 自定义参数值(字符串)的最大长度。
- max
Value string - 自定义参数值(数字)的最大值。
- min
Length number - 自定义参数值(字符串)的最小长度。
- min
Value string - 自定义参数值(数字)的最小值。
- name string
- 自定义参数名称,需要在脚本中通过{{Param}}定义 。单个参数名不能超过64字节。遵循Shell变量命名规则,a-zA-Z0-9-_的组合。首个字符不能以数字开头。中间不能有空格,可以使用下划线。
- required boolean
- 是否必填。
- type string
- 自定义参数类型。
- decimal_
precision int - 自定义参数值(数字)允许的小数点后位数。
- default_
value str - 自定义参数默认值。
- max_
length int - 自定义参数值(字符串)的最大长度。
- max_
value str - 自定义参数值(数字)的最大值。
- min_
length int - 自定义参数值(字符串)的最小长度。
- min_
value str - 自定义参数值(数字)的最小值。
- name str
- 自定义参数名称,需要在脚本中通过{{Param}}定义 。单个参数名不能超过64字节。遵循Shell变量命名规则,a-zA-Z0-9-_的组合。首个字符不能以数字开头。中间不能有空格,可以使用下划线。
- required bool
- 是否必填。
- type str
- 自定义参数类型。
- decimal
Precision Number - 自定义参数值(数字)允许的小数点后位数。
- default
Value String - 自定义参数默认值。
- max
Length Number - 自定义参数值(字符串)的最大长度。
- max
Value String - 自定义参数值(数字)的最大值。
- min
Length Number - 自定义参数值(字符串)的最小长度。
- min
Value String - 自定义参数值(数字)的最小值。
- name String
- 自定义参数名称,需要在脚本中通过{{Param}}定义 。单个参数名不能超过64字节。遵循Shell变量命名规则,a-zA-Z0-9-_的组合。首个字符不能以数字开头。中间不能有空格,可以使用下划线。
- required Boolean
- 是否必填。
- type String
- 自定义参数类型。
CommandTag, CommandTagArgs
Import
$ pulumi import volcenginecc:ecs/command:Command example "command_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcenginecc volcengine/pulumi-volcenginecc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
volcenginecc
Terraform Provider.