1. Packages
  2. Volcenginecc Provider
  3. API Docs
  4. ecs
  5. Command
volcenginecc v0.0.2 published on Saturday, Oct 11, 2025 by Volcengine

volcenginecc.ecs.Command

Deploy with Pulumi
volcenginecc logo
volcenginecc v0.0.2 published on Saturday, Oct 11, 2025 by Volcengine

    自定义命令是云助手提供的满足您个性化运维需求的功能,您可以在预置的公共命令不满足需求时创建自定义命令,并通过运维任务在实例中批量执行您编写的自定义命令。

    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:

    CommandContent string
    命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
    Name string
    命令名称。字符长度1~32。不限制特殊字符。
    Type string
    命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
    ContentEncoding string
    命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
    Description string
    命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
    EnableParameter bool
    创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
    ParameterDefinitions List<Volcengine.CommandParameterDefinition>
    ProjectName string
    资源所属项目,一个资源只能归属于一个项目。
    Tags List<Volcengine.CommandTag>
    Timeout int
    创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
    Username string
    执行命令时的用户名。
    WorkingDir string
    创建的命令在ECS实例中运行的目录。
    CommandContent string
    命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
    Name string
    命令名称。字符长度1~32。不限制特殊字符。
    Type string
    命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
    ContentEncoding string
    命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
    Description string
    命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
    EnableParameter bool
    创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
    ParameterDefinitions []CommandParameterDefinitionArgs
    ProjectName string
    资源所属项目,一个资源只能归属于一个项目。
    Tags []CommandTagArgs
    Timeout int
    创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
    Username string
    执行命令时的用户名。
    WorkingDir string
    创建的命令在ECS实例中运行的目录。
    commandContent String
    命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
    name String
    命令名称。字符长度1~32。不限制特殊字符。
    type String
    命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
    contentEncoding String
    命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
    description String
    命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
    enableParameter Boolean
    创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
    parameterDefinitions List<CommandParameterDefinition>
    projectName String
    资源所属项目,一个资源只能归属于一个项目。
    tags List<CommandTag>
    timeout Integer
    创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
    username String
    执行命令时的用户名。
    workingDir String
    创建的命令在ECS实例中运行的目录。
    commandContent string
    命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
    name string
    命令名称。字符长度1~32。不限制特殊字符。
    type string
    命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
    contentEncoding string
    命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
    description string
    命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
    enableParameter boolean
    创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
    parameterDefinitions CommandParameterDefinition[]
    projectName string
    资源所属项目,一个资源只能归属于一个项目。
    tags CommandTag[]
    timeout number
    创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
    username string
    执行命令时的用户名。
    workingDir 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[CommandParameterDefinitionArgs]
    project_name str
    资源所属项目,一个资源只能归属于一个项目。
    tags Sequence[CommandTagArgs]
    timeout int
    创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
    username str
    执行命令时的用户名。
    working_dir str
    创建的命令在ECS实例中运行的目录。
    commandContent String
    命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
    name String
    命令名称。字符长度1~32。不限制特殊字符。
    type String
    命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
    contentEncoding String
    命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
    description String
    命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
    enableParameter Boolean
    创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
    parameterDefinitions List<Property Map>
    projectName String
    资源所属项目,一个资源只能归属于一个项目。
    tags List<Property Map>
    timeout Number
    创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
    username String
    执行命令时的用户名。
    workingDir String
    创建的命令在ECS实例中运行的目录。

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Command resource produces the following output properties:

    CommandId string
    自定义命令ID。
    CreatedTime string
    创建时间。
    Id string
    The provider-assigned unique ID for this managed resource.
    InvocationTimes int
    命令被调用次数。
    ProviderName string
    命令的提供方。
    UpdatedTime string
    更新时间。
    CommandId string
    自定义命令ID。
    CreatedTime string
    创建时间。
    Id string
    The provider-assigned unique ID for this managed resource.
    InvocationTimes int
    命令被调用次数。
    ProviderName string
    命令的提供方。
    UpdatedTime string
    更新时间。
    commandId String
    自定义命令ID。
    createdTime String
    创建时间。
    id String
    The provider-assigned unique ID for this managed resource.
    invocationTimes Integer
    命令被调用次数。
    providerName String
    命令的提供方。
    updatedTime String
    更新时间。
    commandId string
    自定义命令ID。
    createdTime string
    创建时间。
    id string
    The provider-assigned unique ID for this managed resource.
    invocationTimes number
    命令被调用次数。
    providerName string
    命令的提供方。
    updatedTime 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
    更新时间。
    commandId String
    自定义命令ID。
    createdTime String
    创建时间。
    id String
    The provider-assigned unique ID for this managed resource.
    invocationTimes Number
    命令被调用次数。
    providerName String
    命令的提供方。
    updatedTime 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.
    The following state arguments are supported:
    CommandContent string
    命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
    CommandId string
    自定义命令ID。
    ContentEncoding string
    命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
    CreatedTime string
    创建时间。
    Description string
    命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
    EnableParameter bool
    创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
    InvocationTimes int
    命令被调用次数。
    Name string
    命令名称。字符长度1~32。不限制特殊字符。
    ParameterDefinitions List<Volcengine.CommandParameterDefinition>
    ProjectName string
    资源所属项目,一个资源只能归属于一个项目。
    ProviderName string
    命令的提供方。
    Tags List<Volcengine.CommandTag>
    Timeout int
    创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
    Type string
    命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
    UpdatedTime string
    更新时间。
    Username string
    执行命令时的用户名。
    WorkingDir string
    创建的命令在ECS实例中运行的目录。
    CommandContent string
    命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
    CommandId string
    自定义命令ID。
    ContentEncoding string
    命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
    CreatedTime string
    创建时间。
    Description string
    命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
    EnableParameter bool
    创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
    InvocationTimes int
    命令被调用次数。
    Name string
    命令名称。字符长度1~32。不限制特殊字符。
    ParameterDefinitions []CommandParameterDefinitionArgs
    ProjectName string
    资源所属项目,一个资源只能归属于一个项目。
    ProviderName string
    命令的提供方。
    Tags []CommandTagArgs
    Timeout int
    创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
    Type string
    命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
    UpdatedTime string
    更新时间。
    Username string
    执行命令时的用户名。
    WorkingDir string
    创建的命令在ECS实例中运行的目录。
    commandContent String
    命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
    commandId String
    自定义命令ID。
    contentEncoding String
    命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
    createdTime String
    创建时间。
    description String
    命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
    enableParameter Boolean
    创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
    invocationTimes Integer
    命令被调用次数。
    name String
    命令名称。字符长度1~32。不限制特殊字符。
    parameterDefinitions List<CommandParameterDefinition>
    projectName String
    资源所属项目,一个资源只能归属于一个项目。
    providerName String
    命令的提供方。
    tags List<CommandTag>
    timeout Integer
    创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
    type String
    命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
    updatedTime String
    更新时间。
    username String
    执行命令时的用户名。
    workingDir String
    创建的命令在ECS实例中运行的目录。
    commandContent string
    命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
    commandId string
    自定义命令ID。
    contentEncoding string
    命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
    createdTime string
    创建时间。
    description string
    命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
    enableParameter boolean
    创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
    invocationTimes number
    命令被调用次数。
    name string
    命令名称。字符长度1~32。不限制特殊字符。
    parameterDefinitions CommandParameterDefinition[]
    projectName string
    资源所属项目,一个资源只能归属于一个项目。
    providerName string
    命令的提供方。
    tags CommandTag[]
    timeout number
    创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
    type string
    命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
    updatedTime string
    更新时间。
    username string
    执行命令时的用户名。
    workingDir 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[CommandParameterDefinitionArgs]
    project_name str
    资源所属项目,一个资源只能归属于一个项目。
    provider_name str
    命令的提供方。
    tags Sequence[CommandTagArgs]
    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实例中运行的目录。
    commandContent String
    命令内容。请根据ContentEncoding参数传入相应命令内容。命令内容不能超过16KB。
    commandId String
    自定义命令ID。
    contentEncoding String
    命令内容是否经过Base64编码处理。Base64(默认):经过Base64编码处理。PlainText: 未进行编码处理。
    createdTime String
    创建时间。
    description String
    命令描述,默认为空字符串。字符长度0~256。不限制特殊字符。
    enableParameter Boolean
    创建的命令是否使用自定义参数。false:默认,表示不使用自定义参数。true:表示使用自定义参数。
    invocationTimes Number
    命令被调用次数。
    name String
    命令名称。字符长度1~32。不限制特殊字符。
    parameterDefinitions List<Property Map>
    projectName String
    资源所属项目,一个资源只能归属于一个项目。
    providerName String
    命令的提供方。
    tags List<Property Map>
    timeout Number
    创建的命令在ECS实例中执行时最大的超时时间,单位为秒。取值范围:30~86400。默认值:60。
    type String
    命令的类型。Shell:表示创建一个在Linux实例中运行的Shell脚本。Python:表示创建一个Python脚本。Bat:表示创建一个Bat脚本。PowerShell:表示创建一个PowerShell脚本。
    updatedTime String
    更新时间。
    username String
    执行命令时的用户名。
    workingDir String
    创建的命令在ECS实例中运行的目录。

    Supporting Types

    CommandParameterDefinition, CommandParameterDefinitionArgs

    DecimalPrecision int
    自定义参数值(数字)允许的小数点后位数。
    DefaultValue string
    自定义参数默认值。
    MaxLength int
    自定义参数值(字符串)的最大长度。
    MaxValue string
    自定义参数值(数字)的最大值。
    MinLength int
    自定义参数值(字符串)的最小长度。
    MinValue string
    自定义参数值(数字)的最小值。
    Name string
    自定义参数名称,需要在脚本中通过{{Param}}定义 。单个参数名不能超过64字节。遵循Shell变量命名规则,a-zA-Z0-9-_的组合。首个字符不能以数字开头。中间不能有空格,可以使用下划线。
    Required bool
    是否必填。
    Type string
    自定义参数类型。
    DecimalPrecision int
    自定义参数值(数字)允许的小数点后位数。
    DefaultValue string
    自定义参数默认值。
    MaxLength int
    自定义参数值(字符串)的最大长度。
    MaxValue string
    自定义参数值(数字)的最大值。
    MinLength int
    自定义参数值(字符串)的最小长度。
    MinValue string
    自定义参数值(数字)的最小值。
    Name string
    自定义参数名称,需要在脚本中通过{{Param}}定义 。单个参数名不能超过64字节。遵循Shell变量命名规则,a-zA-Z0-9-_的组合。首个字符不能以数字开头。中间不能有空格,可以使用下划线。
    Required bool
    是否必填。
    Type string
    自定义参数类型。
    decimalPrecision Integer
    自定义参数值(数字)允许的小数点后位数。
    defaultValue String
    自定义参数默认值。
    maxLength Integer
    自定义参数值(字符串)的最大长度。
    maxValue String
    自定义参数值(数字)的最大值。
    minLength Integer
    自定义参数值(字符串)的最小长度。
    minValue String
    自定义参数值(数字)的最小值。
    name String
    自定义参数名称,需要在脚本中通过{{Param}}定义 。单个参数名不能超过64字节。遵循Shell变量命名规则,a-zA-Z0-9-_的组合。首个字符不能以数字开头。中间不能有空格,可以使用下划线。
    required Boolean
    是否必填。
    type String
    自定义参数类型。
    decimalPrecision number
    自定义参数值(数字)允许的小数点后位数。
    defaultValue string
    自定义参数默认值。
    maxLength number
    自定义参数值(字符串)的最大长度。
    maxValue string
    自定义参数值(数字)的最大值。
    minLength number
    自定义参数值(字符串)的最小长度。
    minValue 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
    自定义参数类型。
    decimalPrecision Number
    自定义参数值(数字)允许的小数点后位数。
    defaultValue String
    自定义参数默认值。
    maxLength Number
    自定义参数值(字符串)的最大长度。
    maxValue String
    自定义参数值(数字)的最大值。
    minLength Number
    自定义参数值(字符串)的最小长度。
    minValue String
    自定义参数值(数字)的最小值。
    name String
    自定义参数名称,需要在脚本中通过{{Param}}定义 。单个参数名不能超过64字节。遵循Shell变量命名规则,a-zA-Z0-9-_的组合。首个字符不能以数字开头。中间不能有空格,可以使用下划线。
    required Boolean
    是否必填。
    type String
    自定义参数类型。

    CommandTag, CommandTagArgs

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    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.
    volcenginecc logo
    volcenginecc v0.0.2 published on Saturday, Oct 11, 2025 by Volcengine
      Meet Neo: Your AI Platform Teammate