1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. eflo
  5. Invocation
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.eflo.Invocation

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

    Import

    Eflo Invocation can be imported using the id, e.g.

    $ pulumi import alicloud:eflo/invocation:Invocation example <id>
    

    Create Invocation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Invocation(name: string, args?: InvocationArgs, opts?: CustomResourceOptions);
    @overload
    def Invocation(resource_name: str,
                   args: Optional[InvocationArgs] = None,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Invocation(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   command_content: Optional[str] = None,
                   command_id: Optional[str] = None,
                   content_encoding: Optional[str] = None,
                   description: Optional[str] = None,
                   enable_parameter: Optional[bool] = None,
                   frequency: Optional[str] = None,
                   launcher: Optional[str] = None,
                   name: Optional[str] = None,
                   node_id_lists: Optional[Sequence[str]] = None,
                   parameters: Optional[Mapping[str, str]] = None,
                   repeat_mode: Optional[str] = None,
                   termination_mode: Optional[str] = None,
                   timeout: Optional[int] = None,
                   username: Optional[str] = None,
                   working_dir: Optional[str] = None)
    func NewInvocation(ctx *Context, name string, args *InvocationArgs, opts ...ResourceOption) (*Invocation, error)
    public Invocation(string name, InvocationArgs? args = null, CustomResourceOptions? opts = null)
    public Invocation(String name, InvocationArgs args)
    public Invocation(String name, InvocationArgs args, CustomResourceOptions options)
    
    type: alicloud:eflo:Invocation
    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 InvocationArgs
    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 InvocationArgs
    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 InvocationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InvocationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InvocationArgs
    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 invocationResource = new AliCloud.Eflo.Invocation("invocationResource", new()
    {
        CommandContent = "string",
        CommandId = "string",
        ContentEncoding = "string",
        Description = "string",
        EnableParameter = false,
        Frequency = "string",
        Launcher = "string",
        Name = "string",
        NodeIdLists = new[]
        {
            "string",
        },
        Parameters = 
        {
            { "string", "string" },
        },
        RepeatMode = "string",
        TerminationMode = "string",
        Timeout = 0,
        Username = "string",
        WorkingDir = "string",
    });
    
    example, err := eflo.NewInvocation(ctx, "invocationResource", &eflo.InvocationArgs{
    	CommandContent:  pulumi.String("string"),
    	CommandId:       pulumi.String("string"),
    	ContentEncoding: pulumi.String("string"),
    	Description:     pulumi.String("string"),
    	EnableParameter: pulumi.Bool(false),
    	Frequency:       pulumi.String("string"),
    	Launcher:        pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	NodeIdLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Parameters: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	RepeatMode:      pulumi.String("string"),
    	TerminationMode: pulumi.String("string"),
    	Timeout:         pulumi.Int(0),
    	Username:        pulumi.String("string"),
    	WorkingDir:      pulumi.String("string"),
    })
    
    var invocationResource = new Invocation("invocationResource", InvocationArgs.builder()
        .commandContent("string")
        .commandId("string")
        .contentEncoding("string")
        .description("string")
        .enableParameter(false)
        .frequency("string")
        .launcher("string")
        .name("string")
        .nodeIdLists("string")
        .parameters(Map.of("string", "string"))
        .repeatMode("string")
        .terminationMode("string")
        .timeout(0)
        .username("string")
        .workingDir("string")
        .build());
    
    invocation_resource = alicloud.eflo.Invocation("invocationResource",
        command_content="string",
        command_id="string",
        content_encoding="string",
        description="string",
        enable_parameter=False,
        frequency="string",
        launcher="string",
        name="string",
        node_id_lists=["string"],
        parameters={
            "string": "string",
        },
        repeat_mode="string",
        termination_mode="string",
        timeout=0,
        username="string",
        working_dir="string")
    
    const invocationResource = new alicloud.eflo.Invocation("invocationResource", {
        commandContent: "string",
        commandId: "string",
        contentEncoding: "string",
        description: "string",
        enableParameter: false,
        frequency: "string",
        launcher: "string",
        name: "string",
        nodeIdLists: ["string"],
        parameters: {
            string: "string",
        },
        repeatMode: "string",
        terminationMode: "string",
        timeout: 0,
        username: "string",
        workingDir: "string",
    });
    
    type: alicloud:eflo:Invocation
    properties:
        commandContent: string
        commandId: string
        contentEncoding: string
        description: string
        enableParameter: false
        frequency: string
        launcher: string
        name: string
        nodeIdLists:
            - string
        parameters:
            string: string
        repeatMode: string
        terminationMode: string
        timeout: 0
        username: string
        workingDir: string
    

    Invocation 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 Invocation resource accepts the following input properties:

    CommandContent string
    The command content. You need to pay attention:

    • Specify the parameter 'EnableParameter = true' to enable the custom parameter feature in the command content.
    • Define custom parameters in the form of {{}} inclusion, and spaces and line breaks before and after the parameter name in '{{}}' are ignored.
    • The number of custom parameters cannot exceed 20.
    • Custom parameter names can a-zA-Z0-9 a combination of-_. Other characters are not supported. Parameter names are not case-sensitive.
    • A single custom parameter name cannot exceed 64 bytes.
    CommandId string
    Command ID
    ContentEncoding string

    The encoding of the script content. Value range:

    • PlainText: no encoding, using PlainText transmission.
    • Base64:Base64 encoding.

    Default value: PlainText. If you fill it randomly or wrongly, the value will be treated as a PlainText.

    Description string
    The command description.
    EnableParameter bool
    Whether custom parameters are included in the command. Default value: false.
    Frequency string

    The execution time of the scheduled execution command. Currently, three scheduled execution methods are supported: fixed interval execution (based on Rate expression), only once at a specified time, and timed execution based on clock (based on Cron expression).

    • Fixed time interval execution: Based on the Rate expression, the command is executed at the set time interval. Time intervals can be selected by seconds (s), minutes (m), hours (h), and days (d), which is suitable for scenarios where tasks are executed at fixed time intervals. The format is rate( ). If the execution is performed every 5 minutes, the format is rate(5m). Executing with a fixed time interval has the following limitations:
    • The set time interval is no more than 7 days and no less than 60 seconds, and must be greater than the timeout period of the scheduled task.
    • The execution interval is based only on a fixed frequency, independent of the time the task actually takes to execute. For example, if the command is executed every 5 minutes and the task takes 2 minutes to complete, the next round will be executed 3 minutes after the task is completed.
    • The task is not executed immediately when it is created. For example, if a command is executed every 5 minutes, the command is not executed immediately when a task is created, but is executed 5 minutes after the task is created.
    • Execute only once at the specified time: Execute the command once according to the set time zone and execution time point. The format is at(yyyy-MM-dd HH:mm:ss ), that is, at (year-month-day time: minute: Second ). If you do not specify a time zone, the default is the UTC time zone. Time zones can be in the following three formats: the full name of the time zone, such as Asia/Shanghai (China/Shanghai time), America/los_angles (United States/Los Angeles time), and so on. The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros. Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported. If it is specified to be executed once 13:15:30 June 06, 2022, China/Shanghai time, the format is at (Asia/Shanghai, 2022-06-06 13:15:30); If it is specified to be executed once 13:15:30 June 06, 2022, the format is at(2022-06-06 13:15:30 GMT-7:00).
    • Timing based on clock (based on Cron expression): Based on Cron expression, commands are executed according to the set timing task. The format is , that is, . In the specified time zone, calculate the execution time of the scheduled task based on the Cron expression and execute it. If no time zone is specified, the default time zone is the internal time zone of the scheduled task instance. For more information about Cron expressions, see Cron Expressions. Time zones support the following three forms:
    • Full time zone name: such as Asia/Shanghai (China/Shanghai time), America/los_angles (US/Los Angeles time), etc.
    • The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros.
    • Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported.

    For example, in China/Shanghai time, the command will be executed once every day at 10:15 am in 2022 in the format 0 15 10? * * 2022 Asia/Shanghai; In the eastern 8th District time, it will be executed every half hour from 10:00 a.m. to 11:30 a.m. every day in 2022, in the format of 0 0/30 10-11 * ? 2022 GMT +8:00; In UTC time, starting from 2022, it will be executed every 5 minutes from 14:00 P.M. to 14:55 p. M. Every two years in October, in the format of 0 0/5 1410? 2022/2 UTC.

    Launcher string
    The bootstrapper for script execution. The length cannot exceed 1KB.
    Name string
    The command name.
    NodeIdLists List<string>
    A list of nodes.
    Parameters Dictionary<string, string>

    When the command contains custom parameters, the key-value pair of the custom parameters passed in when the command is executed. For example, if the command content is 'echo {{name}}', the key-value pair'{"name":"Jack"}'can be passed through the 'Parameter' parameter'. The custom parameter will automatically replace the variable value 'name' to get a new command that actually executes 'echo Jack '.

    The number of custom parameters ranges from 0 to 10, and you need to pay attention:

    • The key is not allowed to be an empty string and supports a maximum of 64 characters.
    • The value is allowed to be an empty string.
    • After the custom parameters and the original command content are encoded in Base64, if the command is saved, the size of the command content after Base64 encoding cannot exceed 18KB. If the command is not saved, the size of the command content after Base64 encoding cannot exceed 24KB. You can set whether to keep the command through 'KeepCommand.
    • The set of custom parameter names must be a subset of the parameter set defined when the command is created. For parameters that are not passed in, you can use an empty string instead.

    The default value is empty, which means that the parameter is unset and the custom parameter is disabled.

    RepeatMode string

    Sets the way the command is executed. Value range:

    • Once: Execute the command immediately.
    • Period: executes the command regularly. When the value of this parameter is 'Period', the 'Frequency' parameter must also be specified.
    • NextRebootOnly: Automatically execute the command when the instance is next started.
    • EveryReboot: The command is automatically executed every time the instance is started.

    Default:

    • When the'frequency' parameter is not specified, the default value is'once '.
    • When the'frequency' parameter is specified, regardless of whether the parameter value has been set or not, it will be processed according to'period.
    TerminationMode string
    The mode when the task is stopped (manually stopped or execution time-out interrupted). Possible values: Process: Stops the current script Process. ProcessTree: Stops the current process tree (the script process and the collection of all child processes it created)
    Timeout int
    The timeout period for command execution. Unit: seconds. A timeout occurs when a command cannot be run due to a process, a missing module, or a missing cloud assistant Agent. After the timeout, the command process is forcibly terminated. Default value: 60.
    Username string
    The name of the user who executed the command in the instance. The length must not exceed 255 characters. The instance of the Linux system. By default, the root user runs commands.
    WorkingDir string
    You can customize the command execution path. The default path is as follows: Linux instance: the execution path is in the/home directory of the root user by default.
    CommandContent string
    The command content. You need to pay attention:

    • Specify the parameter 'EnableParameter = true' to enable the custom parameter feature in the command content.
    • Define custom parameters in the form of {{}} inclusion, and spaces and line breaks before and after the parameter name in '{{}}' are ignored.
    • The number of custom parameters cannot exceed 20.
    • Custom parameter names can a-zA-Z0-9 a combination of-_. Other characters are not supported. Parameter names are not case-sensitive.
    • A single custom parameter name cannot exceed 64 bytes.
    CommandId string
    Command ID
    ContentEncoding string

    The encoding of the script content. Value range:

    • PlainText: no encoding, using PlainText transmission.
    • Base64:Base64 encoding.

    Default value: PlainText. If you fill it randomly or wrongly, the value will be treated as a PlainText.

    Description string
    The command description.
    EnableParameter bool
    Whether custom parameters are included in the command. Default value: false.
    Frequency string

    The execution time of the scheduled execution command. Currently, three scheduled execution methods are supported: fixed interval execution (based on Rate expression), only once at a specified time, and timed execution based on clock (based on Cron expression).

    • Fixed time interval execution: Based on the Rate expression, the command is executed at the set time interval. Time intervals can be selected by seconds (s), minutes (m), hours (h), and days (d), which is suitable for scenarios where tasks are executed at fixed time intervals. The format is rate( ). If the execution is performed every 5 minutes, the format is rate(5m). Executing with a fixed time interval has the following limitations:
    • The set time interval is no more than 7 days and no less than 60 seconds, and must be greater than the timeout period of the scheduled task.
    • The execution interval is based only on a fixed frequency, independent of the time the task actually takes to execute. For example, if the command is executed every 5 minutes and the task takes 2 minutes to complete, the next round will be executed 3 minutes after the task is completed.
    • The task is not executed immediately when it is created. For example, if a command is executed every 5 minutes, the command is not executed immediately when a task is created, but is executed 5 minutes after the task is created.
    • Execute only once at the specified time: Execute the command once according to the set time zone and execution time point. The format is at(yyyy-MM-dd HH:mm:ss ), that is, at (year-month-day time: minute: Second ). If you do not specify a time zone, the default is the UTC time zone. Time zones can be in the following three formats: the full name of the time zone, such as Asia/Shanghai (China/Shanghai time), America/los_angles (United States/Los Angeles time), and so on. The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros. Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported. If it is specified to be executed once 13:15:30 June 06, 2022, China/Shanghai time, the format is at (Asia/Shanghai, 2022-06-06 13:15:30); If it is specified to be executed once 13:15:30 June 06, 2022, the format is at(2022-06-06 13:15:30 GMT-7:00).
    • Timing based on clock (based on Cron expression): Based on Cron expression, commands are executed according to the set timing task. The format is , that is, . In the specified time zone, calculate the execution time of the scheduled task based on the Cron expression and execute it. If no time zone is specified, the default time zone is the internal time zone of the scheduled task instance. For more information about Cron expressions, see Cron Expressions. Time zones support the following three forms:
    • Full time zone name: such as Asia/Shanghai (China/Shanghai time), America/los_angles (US/Los Angeles time), etc.
    • The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros.
    • Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported.

    For example, in China/Shanghai time, the command will be executed once every day at 10:15 am in 2022 in the format 0 15 10? * * 2022 Asia/Shanghai; In the eastern 8th District time, it will be executed every half hour from 10:00 a.m. to 11:30 a.m. every day in 2022, in the format of 0 0/30 10-11 * ? 2022 GMT +8:00; In UTC time, starting from 2022, it will be executed every 5 minutes from 14:00 P.M. to 14:55 p. M. Every two years in October, in the format of 0 0/5 1410? 2022/2 UTC.

    Launcher string
    The bootstrapper for script execution. The length cannot exceed 1KB.
    Name string
    The command name.
    NodeIdLists []string
    A list of nodes.
    Parameters map[string]string

    When the command contains custom parameters, the key-value pair of the custom parameters passed in when the command is executed. For example, if the command content is 'echo {{name}}', the key-value pair'{"name":"Jack"}'can be passed through the 'Parameter' parameter'. The custom parameter will automatically replace the variable value 'name' to get a new command that actually executes 'echo Jack '.

    The number of custom parameters ranges from 0 to 10, and you need to pay attention:

    • The key is not allowed to be an empty string and supports a maximum of 64 characters.
    • The value is allowed to be an empty string.
    • After the custom parameters and the original command content are encoded in Base64, if the command is saved, the size of the command content after Base64 encoding cannot exceed 18KB. If the command is not saved, the size of the command content after Base64 encoding cannot exceed 24KB. You can set whether to keep the command through 'KeepCommand.
    • The set of custom parameter names must be a subset of the parameter set defined when the command is created. For parameters that are not passed in, you can use an empty string instead.

    The default value is empty, which means that the parameter is unset and the custom parameter is disabled.

    RepeatMode string

    Sets the way the command is executed. Value range:

    • Once: Execute the command immediately.
    • Period: executes the command regularly. When the value of this parameter is 'Period', the 'Frequency' parameter must also be specified.
    • NextRebootOnly: Automatically execute the command when the instance is next started.
    • EveryReboot: The command is automatically executed every time the instance is started.

    Default:

    • When the'frequency' parameter is not specified, the default value is'once '.
    • When the'frequency' parameter is specified, regardless of whether the parameter value has been set or not, it will be processed according to'period.
    TerminationMode string
    The mode when the task is stopped (manually stopped or execution time-out interrupted). Possible values: Process: Stops the current script Process. ProcessTree: Stops the current process tree (the script process and the collection of all child processes it created)
    Timeout int
    The timeout period for command execution. Unit: seconds. A timeout occurs when a command cannot be run due to a process, a missing module, or a missing cloud assistant Agent. After the timeout, the command process is forcibly terminated. Default value: 60.
    Username string
    The name of the user who executed the command in the instance. The length must not exceed 255 characters. The instance of the Linux system. By default, the root user runs commands.
    WorkingDir string
    You can customize the command execution path. The default path is as follows: Linux instance: the execution path is in the/home directory of the root user by default.
    commandContent String
    The command content. You need to pay attention:

    • Specify the parameter 'EnableParameter = true' to enable the custom parameter feature in the command content.
    • Define custom parameters in the form of {{}} inclusion, and spaces and line breaks before and after the parameter name in '{{}}' are ignored.
    • The number of custom parameters cannot exceed 20.
    • Custom parameter names can a-zA-Z0-9 a combination of-_. Other characters are not supported. Parameter names are not case-sensitive.
    • A single custom parameter name cannot exceed 64 bytes.
    commandId String
    Command ID
    contentEncoding String

    The encoding of the script content. Value range:

    • PlainText: no encoding, using PlainText transmission.
    • Base64:Base64 encoding.

    Default value: PlainText. If you fill it randomly or wrongly, the value will be treated as a PlainText.

    description String
    The command description.
    enableParameter Boolean
    Whether custom parameters are included in the command. Default value: false.
    frequency String

    The execution time of the scheduled execution command. Currently, three scheduled execution methods are supported: fixed interval execution (based on Rate expression), only once at a specified time, and timed execution based on clock (based on Cron expression).

    • Fixed time interval execution: Based on the Rate expression, the command is executed at the set time interval. Time intervals can be selected by seconds (s), minutes (m), hours (h), and days (d), which is suitable for scenarios where tasks are executed at fixed time intervals. The format is rate( ). If the execution is performed every 5 minutes, the format is rate(5m). Executing with a fixed time interval has the following limitations:
    • The set time interval is no more than 7 days and no less than 60 seconds, and must be greater than the timeout period of the scheduled task.
    • The execution interval is based only on a fixed frequency, independent of the time the task actually takes to execute. For example, if the command is executed every 5 minutes and the task takes 2 minutes to complete, the next round will be executed 3 minutes after the task is completed.
    • The task is not executed immediately when it is created. For example, if a command is executed every 5 minutes, the command is not executed immediately when a task is created, but is executed 5 minutes after the task is created.
    • Execute only once at the specified time: Execute the command once according to the set time zone and execution time point. The format is at(yyyy-MM-dd HH:mm:ss ), that is, at (year-month-day time: minute: Second ). If you do not specify a time zone, the default is the UTC time zone. Time zones can be in the following three formats: the full name of the time zone, such as Asia/Shanghai (China/Shanghai time), America/los_angles (United States/Los Angeles time), and so on. The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros. Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported. If it is specified to be executed once 13:15:30 June 06, 2022, China/Shanghai time, the format is at (Asia/Shanghai, 2022-06-06 13:15:30); If it is specified to be executed once 13:15:30 June 06, 2022, the format is at(2022-06-06 13:15:30 GMT-7:00).
    • Timing based on clock (based on Cron expression): Based on Cron expression, commands are executed according to the set timing task. The format is , that is, . In the specified time zone, calculate the execution time of the scheduled task based on the Cron expression and execute it. If no time zone is specified, the default time zone is the internal time zone of the scheduled task instance. For more information about Cron expressions, see Cron Expressions. Time zones support the following three forms:
    • Full time zone name: such as Asia/Shanghai (China/Shanghai time), America/los_angles (US/Los Angeles time), etc.
    • The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros.
    • Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported.

    For example, in China/Shanghai time, the command will be executed once every day at 10:15 am in 2022 in the format 0 15 10? * * 2022 Asia/Shanghai; In the eastern 8th District time, it will be executed every half hour from 10:00 a.m. to 11:30 a.m. every day in 2022, in the format of 0 0/30 10-11 * ? 2022 GMT +8:00; In UTC time, starting from 2022, it will be executed every 5 minutes from 14:00 P.M. to 14:55 p. M. Every two years in October, in the format of 0 0/5 1410? 2022/2 UTC.

    launcher String
    The bootstrapper for script execution. The length cannot exceed 1KB.
    name String
    The command name.
    nodeIdLists List<String>
    A list of nodes.
    parameters Map<String,String>

    When the command contains custom parameters, the key-value pair of the custom parameters passed in when the command is executed. For example, if the command content is 'echo {{name}}', the key-value pair'{"name":"Jack"}'can be passed through the 'Parameter' parameter'. The custom parameter will automatically replace the variable value 'name' to get a new command that actually executes 'echo Jack '.

    The number of custom parameters ranges from 0 to 10, and you need to pay attention:

    • The key is not allowed to be an empty string and supports a maximum of 64 characters.
    • The value is allowed to be an empty string.
    • After the custom parameters and the original command content are encoded in Base64, if the command is saved, the size of the command content after Base64 encoding cannot exceed 18KB. If the command is not saved, the size of the command content after Base64 encoding cannot exceed 24KB. You can set whether to keep the command through 'KeepCommand.
    • The set of custom parameter names must be a subset of the parameter set defined when the command is created. For parameters that are not passed in, you can use an empty string instead.

    The default value is empty, which means that the parameter is unset and the custom parameter is disabled.

    repeatMode String

    Sets the way the command is executed. Value range:

    • Once: Execute the command immediately.
    • Period: executes the command regularly. When the value of this parameter is 'Period', the 'Frequency' parameter must also be specified.
    • NextRebootOnly: Automatically execute the command when the instance is next started.
    • EveryReboot: The command is automatically executed every time the instance is started.

    Default:

    • When the'frequency' parameter is not specified, the default value is'once '.
    • When the'frequency' parameter is specified, regardless of whether the parameter value has been set or not, it will be processed according to'period.
    terminationMode String
    The mode when the task is stopped (manually stopped or execution time-out interrupted). Possible values: Process: Stops the current script Process. ProcessTree: Stops the current process tree (the script process and the collection of all child processes it created)
    timeout Integer
    The timeout period for command execution. Unit: seconds. A timeout occurs when a command cannot be run due to a process, a missing module, or a missing cloud assistant Agent. After the timeout, the command process is forcibly terminated. Default value: 60.
    username String
    The name of the user who executed the command in the instance. The length must not exceed 255 characters. The instance of the Linux system. By default, the root user runs commands.
    workingDir String
    You can customize the command execution path. The default path is as follows: Linux instance: the execution path is in the/home directory of the root user by default.
    commandContent string
    The command content. You need to pay attention:

    • Specify the parameter 'EnableParameter = true' to enable the custom parameter feature in the command content.
    • Define custom parameters in the form of {{}} inclusion, and spaces and line breaks before and after the parameter name in '{{}}' are ignored.
    • The number of custom parameters cannot exceed 20.
    • Custom parameter names can a-zA-Z0-9 a combination of-_. Other characters are not supported. Parameter names are not case-sensitive.
    • A single custom parameter name cannot exceed 64 bytes.
    commandId string
    Command ID
    contentEncoding string

    The encoding of the script content. Value range:

    • PlainText: no encoding, using PlainText transmission.
    • Base64:Base64 encoding.

    Default value: PlainText. If you fill it randomly or wrongly, the value will be treated as a PlainText.

    description string
    The command description.
    enableParameter boolean
    Whether custom parameters are included in the command. Default value: false.
    frequency string

    The execution time of the scheduled execution command. Currently, three scheduled execution methods are supported: fixed interval execution (based on Rate expression), only once at a specified time, and timed execution based on clock (based on Cron expression).

    • Fixed time interval execution: Based on the Rate expression, the command is executed at the set time interval. Time intervals can be selected by seconds (s), minutes (m), hours (h), and days (d), which is suitable for scenarios where tasks are executed at fixed time intervals. The format is rate( ). If the execution is performed every 5 minutes, the format is rate(5m). Executing with a fixed time interval has the following limitations:
    • The set time interval is no more than 7 days and no less than 60 seconds, and must be greater than the timeout period of the scheduled task.
    • The execution interval is based only on a fixed frequency, independent of the time the task actually takes to execute. For example, if the command is executed every 5 minutes and the task takes 2 minutes to complete, the next round will be executed 3 minutes after the task is completed.
    • The task is not executed immediately when it is created. For example, if a command is executed every 5 minutes, the command is not executed immediately when a task is created, but is executed 5 minutes after the task is created.
    • Execute only once at the specified time: Execute the command once according to the set time zone and execution time point. The format is at(yyyy-MM-dd HH:mm:ss ), that is, at (year-month-day time: minute: Second ). If you do not specify a time zone, the default is the UTC time zone. Time zones can be in the following three formats: the full name of the time zone, such as Asia/Shanghai (China/Shanghai time), America/los_angles (United States/Los Angeles time), and so on. The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros. Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported. If it is specified to be executed once 13:15:30 June 06, 2022, China/Shanghai time, the format is at (Asia/Shanghai, 2022-06-06 13:15:30); If it is specified to be executed once 13:15:30 June 06, 2022, the format is at(2022-06-06 13:15:30 GMT-7:00).
    • Timing based on clock (based on Cron expression): Based on Cron expression, commands are executed according to the set timing task. The format is , that is, . In the specified time zone, calculate the execution time of the scheduled task based on the Cron expression and execute it. If no time zone is specified, the default time zone is the internal time zone of the scheduled task instance. For more information about Cron expressions, see Cron Expressions. Time zones support the following three forms:
    • Full time zone name: such as Asia/Shanghai (China/Shanghai time), America/los_angles (US/Los Angeles time), etc.
    • The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros.
    • Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported.

    For example, in China/Shanghai time, the command will be executed once every day at 10:15 am in 2022 in the format 0 15 10? * * 2022 Asia/Shanghai; In the eastern 8th District time, it will be executed every half hour from 10:00 a.m. to 11:30 a.m. every day in 2022, in the format of 0 0/30 10-11 * ? 2022 GMT +8:00; In UTC time, starting from 2022, it will be executed every 5 minutes from 14:00 P.M. to 14:55 p. M. Every two years in October, in the format of 0 0/5 1410? 2022/2 UTC.

    launcher string
    The bootstrapper for script execution. The length cannot exceed 1KB.
    name string
    The command name.
    nodeIdLists string[]
    A list of nodes.
    parameters {[key: string]: string}

    When the command contains custom parameters, the key-value pair of the custom parameters passed in when the command is executed. For example, if the command content is 'echo {{name}}', the key-value pair'{"name":"Jack"}'can be passed through the 'Parameter' parameter'. The custom parameter will automatically replace the variable value 'name' to get a new command that actually executes 'echo Jack '.

    The number of custom parameters ranges from 0 to 10, and you need to pay attention:

    • The key is not allowed to be an empty string and supports a maximum of 64 characters.
    • The value is allowed to be an empty string.
    • After the custom parameters and the original command content are encoded in Base64, if the command is saved, the size of the command content after Base64 encoding cannot exceed 18KB. If the command is not saved, the size of the command content after Base64 encoding cannot exceed 24KB. You can set whether to keep the command through 'KeepCommand.
    • The set of custom parameter names must be a subset of the parameter set defined when the command is created. For parameters that are not passed in, you can use an empty string instead.

    The default value is empty, which means that the parameter is unset and the custom parameter is disabled.

    repeatMode string

    Sets the way the command is executed. Value range:

    • Once: Execute the command immediately.
    • Period: executes the command regularly. When the value of this parameter is 'Period', the 'Frequency' parameter must also be specified.
    • NextRebootOnly: Automatically execute the command when the instance is next started.
    • EveryReboot: The command is automatically executed every time the instance is started.

    Default:

    • When the'frequency' parameter is not specified, the default value is'once '.
    • When the'frequency' parameter is specified, regardless of whether the parameter value has been set or not, it will be processed according to'period.
    terminationMode string
    The mode when the task is stopped (manually stopped or execution time-out interrupted). Possible values: Process: Stops the current script Process. ProcessTree: Stops the current process tree (the script process and the collection of all child processes it created)
    timeout number
    The timeout period for command execution. Unit: seconds. A timeout occurs when a command cannot be run due to a process, a missing module, or a missing cloud assistant Agent. After the timeout, the command process is forcibly terminated. Default value: 60.
    username string
    The name of the user who executed the command in the instance. The length must not exceed 255 characters. The instance of the Linux system. By default, the root user runs commands.
    workingDir string
    You can customize the command execution path. The default path is as follows: Linux instance: the execution path is in the/home directory of the root user by default.
    command_content str
    The command content. You need to pay attention:

    • Specify the parameter 'EnableParameter = true' to enable the custom parameter feature in the command content.
    • Define custom parameters in the form of {{}} inclusion, and spaces and line breaks before and after the parameter name in '{{}}' are ignored.
    • The number of custom parameters cannot exceed 20.
    • Custom parameter names can a-zA-Z0-9 a combination of-_. Other characters are not supported. Parameter names are not case-sensitive.
    • A single custom parameter name cannot exceed 64 bytes.
    command_id str
    Command ID
    content_encoding str

    The encoding of the script content. Value range:

    • PlainText: no encoding, using PlainText transmission.
    • Base64:Base64 encoding.

    Default value: PlainText. If you fill it randomly or wrongly, the value will be treated as a PlainText.

    description str
    The command description.
    enable_parameter bool
    Whether custom parameters are included in the command. Default value: false.
    frequency str

    The execution time of the scheduled execution command. Currently, three scheduled execution methods are supported: fixed interval execution (based on Rate expression), only once at a specified time, and timed execution based on clock (based on Cron expression).

    • Fixed time interval execution: Based on the Rate expression, the command is executed at the set time interval. Time intervals can be selected by seconds (s), minutes (m), hours (h), and days (d), which is suitable for scenarios where tasks are executed at fixed time intervals. The format is rate( ). If the execution is performed every 5 minutes, the format is rate(5m). Executing with a fixed time interval has the following limitations:
    • The set time interval is no more than 7 days and no less than 60 seconds, and must be greater than the timeout period of the scheduled task.
    • The execution interval is based only on a fixed frequency, independent of the time the task actually takes to execute. For example, if the command is executed every 5 minutes and the task takes 2 minutes to complete, the next round will be executed 3 minutes after the task is completed.
    • The task is not executed immediately when it is created. For example, if a command is executed every 5 minutes, the command is not executed immediately when a task is created, but is executed 5 minutes after the task is created.
    • Execute only once at the specified time: Execute the command once according to the set time zone and execution time point. The format is at(yyyy-MM-dd HH:mm:ss ), that is, at (year-month-day time: minute: Second ). If you do not specify a time zone, the default is the UTC time zone. Time zones can be in the following three formats: the full name of the time zone, such as Asia/Shanghai (China/Shanghai time), America/los_angles (United States/Los Angeles time), and so on. The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros. Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported. If it is specified to be executed once 13:15:30 June 06, 2022, China/Shanghai time, the format is at (Asia/Shanghai, 2022-06-06 13:15:30); If it is specified to be executed once 13:15:30 June 06, 2022, the format is at(2022-06-06 13:15:30 GMT-7:00).
    • Timing based on clock (based on Cron expression): Based on Cron expression, commands are executed according to the set timing task. The format is , that is, . In the specified time zone, calculate the execution time of the scheduled task based on the Cron expression and execute it. If no time zone is specified, the default time zone is the internal time zone of the scheduled task instance. For more information about Cron expressions, see Cron Expressions. Time zones support the following three forms:
    • Full time zone name: such as Asia/Shanghai (China/Shanghai time), America/los_angles (US/Los Angeles time), etc.
    • The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros.
    • Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported.

    For example, in China/Shanghai time, the command will be executed once every day at 10:15 am in 2022 in the format 0 15 10? * * 2022 Asia/Shanghai; In the eastern 8th District time, it will be executed every half hour from 10:00 a.m. to 11:30 a.m. every day in 2022, in the format of 0 0/30 10-11 * ? 2022 GMT +8:00; In UTC time, starting from 2022, it will be executed every 5 minutes from 14:00 P.M. to 14:55 p. M. Every two years in October, in the format of 0 0/5 1410? 2022/2 UTC.

    launcher str
    The bootstrapper for script execution. The length cannot exceed 1KB.
    name str
    The command name.
    node_id_lists Sequence[str]
    A list of nodes.
    parameters Mapping[str, str]

    When the command contains custom parameters, the key-value pair of the custom parameters passed in when the command is executed. For example, if the command content is 'echo {{name}}', the key-value pair'{"name":"Jack"}'can be passed through the 'Parameter' parameter'. The custom parameter will automatically replace the variable value 'name' to get a new command that actually executes 'echo Jack '.

    The number of custom parameters ranges from 0 to 10, and you need to pay attention:

    • The key is not allowed to be an empty string and supports a maximum of 64 characters.
    • The value is allowed to be an empty string.
    • After the custom parameters and the original command content are encoded in Base64, if the command is saved, the size of the command content after Base64 encoding cannot exceed 18KB. If the command is not saved, the size of the command content after Base64 encoding cannot exceed 24KB. You can set whether to keep the command through 'KeepCommand.
    • The set of custom parameter names must be a subset of the parameter set defined when the command is created. For parameters that are not passed in, you can use an empty string instead.

    The default value is empty, which means that the parameter is unset and the custom parameter is disabled.

    repeat_mode str

    Sets the way the command is executed. Value range:

    • Once: Execute the command immediately.
    • Period: executes the command regularly. When the value of this parameter is 'Period', the 'Frequency' parameter must also be specified.
    • NextRebootOnly: Automatically execute the command when the instance is next started.
    • EveryReboot: The command is automatically executed every time the instance is started.

    Default:

    • When the'frequency' parameter is not specified, the default value is'once '.
    • When the'frequency' parameter is specified, regardless of whether the parameter value has been set or not, it will be processed according to'period.
    termination_mode str
    The mode when the task is stopped (manually stopped or execution time-out interrupted). Possible values: Process: Stops the current script Process. ProcessTree: Stops the current process tree (the script process and the collection of all child processes it created)
    timeout int
    The timeout period for command execution. Unit: seconds. A timeout occurs when a command cannot be run due to a process, a missing module, or a missing cloud assistant Agent. After the timeout, the command process is forcibly terminated. Default value: 60.
    username str
    The name of the user who executed the command in the instance. The length must not exceed 255 characters. The instance of the Linux system. By default, the root user runs commands.
    working_dir str
    You can customize the command execution path. The default path is as follows: Linux instance: the execution path is in the/home directory of the root user by default.
    commandContent String
    The command content. You need to pay attention:

    • Specify the parameter 'EnableParameter = true' to enable the custom parameter feature in the command content.
    • Define custom parameters in the form of {{}} inclusion, and spaces and line breaks before and after the parameter name in '{{}}' are ignored.
    • The number of custom parameters cannot exceed 20.
    • Custom parameter names can a-zA-Z0-9 a combination of-_. Other characters are not supported. Parameter names are not case-sensitive.
    • A single custom parameter name cannot exceed 64 bytes.
    commandId String
    Command ID
    contentEncoding String

    The encoding of the script content. Value range:

    • PlainText: no encoding, using PlainText transmission.
    • Base64:Base64 encoding.

    Default value: PlainText. If you fill it randomly or wrongly, the value will be treated as a PlainText.

    description String
    The command description.
    enableParameter Boolean
    Whether custom parameters are included in the command. Default value: false.
    frequency String

    The execution time of the scheduled execution command. Currently, three scheduled execution methods are supported: fixed interval execution (based on Rate expression), only once at a specified time, and timed execution based on clock (based on Cron expression).

    • Fixed time interval execution: Based on the Rate expression, the command is executed at the set time interval. Time intervals can be selected by seconds (s), minutes (m), hours (h), and days (d), which is suitable for scenarios where tasks are executed at fixed time intervals. The format is rate( ). If the execution is performed every 5 minutes, the format is rate(5m). Executing with a fixed time interval has the following limitations:
    • The set time interval is no more than 7 days and no less than 60 seconds, and must be greater than the timeout period of the scheduled task.
    • The execution interval is based only on a fixed frequency, independent of the time the task actually takes to execute. For example, if the command is executed every 5 minutes and the task takes 2 minutes to complete, the next round will be executed 3 minutes after the task is completed.
    • The task is not executed immediately when it is created. For example, if a command is executed every 5 minutes, the command is not executed immediately when a task is created, but is executed 5 minutes after the task is created.
    • Execute only once at the specified time: Execute the command once according to the set time zone and execution time point. The format is at(yyyy-MM-dd HH:mm:ss ), that is, at (year-month-day time: minute: Second ). If you do not specify a time zone, the default is the UTC time zone. Time zones can be in the following three formats: the full name of the time zone, such as Asia/Shanghai (China/Shanghai time), America/los_angles (United States/Los Angeles time), and so on. The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros. Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported. If it is specified to be executed once 13:15:30 June 06, 2022, China/Shanghai time, the format is at (Asia/Shanghai, 2022-06-06 13:15:30); If it is specified to be executed once 13:15:30 June 06, 2022, the format is at(2022-06-06 13:15:30 GMT-7:00).
    • Timing based on clock (based on Cron expression): Based on Cron expression, commands are executed according to the set timing task. The format is , that is, . In the specified time zone, calculate the execution time of the scheduled task based on the Cron expression and execute it. If no time zone is specified, the default time zone is the internal time zone of the scheduled task instance. For more information about Cron expressions, see Cron Expressions. Time zones support the following three forms:
    • Full time zone name: such as Asia/Shanghai (China/Shanghai time), America/los_angles (US/Los Angeles time), etc.
    • The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros.
    • Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported.

    For example, in China/Shanghai time, the command will be executed once every day at 10:15 am in 2022 in the format 0 15 10? * * 2022 Asia/Shanghai; In the eastern 8th District time, it will be executed every half hour from 10:00 a.m. to 11:30 a.m. every day in 2022, in the format of 0 0/30 10-11 * ? 2022 GMT +8:00; In UTC time, starting from 2022, it will be executed every 5 minutes from 14:00 P.M. to 14:55 p. M. Every two years in October, in the format of 0 0/5 1410? 2022/2 UTC.

    launcher String
    The bootstrapper for script execution. The length cannot exceed 1KB.
    name String
    The command name.
    nodeIdLists List<String>
    A list of nodes.
    parameters Map<String>

    When the command contains custom parameters, the key-value pair of the custom parameters passed in when the command is executed. For example, if the command content is 'echo {{name}}', the key-value pair'{"name":"Jack"}'can be passed through the 'Parameter' parameter'. The custom parameter will automatically replace the variable value 'name' to get a new command that actually executes 'echo Jack '.

    The number of custom parameters ranges from 0 to 10, and you need to pay attention:

    • The key is not allowed to be an empty string and supports a maximum of 64 characters.
    • The value is allowed to be an empty string.
    • After the custom parameters and the original command content are encoded in Base64, if the command is saved, the size of the command content after Base64 encoding cannot exceed 18KB. If the command is not saved, the size of the command content after Base64 encoding cannot exceed 24KB. You can set whether to keep the command through 'KeepCommand.
    • The set of custom parameter names must be a subset of the parameter set defined when the command is created. For parameters that are not passed in, you can use an empty string instead.

    The default value is empty, which means that the parameter is unset and the custom parameter is disabled.

    repeatMode String

    Sets the way the command is executed. Value range:

    • Once: Execute the command immediately.
    • Period: executes the command regularly. When the value of this parameter is 'Period', the 'Frequency' parameter must also be specified.
    • NextRebootOnly: Automatically execute the command when the instance is next started.
    • EveryReboot: The command is automatically executed every time the instance is started.

    Default:

    • When the'frequency' parameter is not specified, the default value is'once '.
    • When the'frequency' parameter is specified, regardless of whether the parameter value has been set or not, it will be processed according to'period.
    terminationMode String
    The mode when the task is stopped (manually stopped or execution time-out interrupted). Possible values: Process: Stops the current script Process. ProcessTree: Stops the current process tree (the script process and the collection of all child processes it created)
    timeout Number
    The timeout period for command execution. Unit: seconds. A timeout occurs when a command cannot be run due to a process, a missing module, or a missing cloud assistant Agent. After the timeout, the command process is forcibly terminated. Default value: 60.
    username String
    The name of the user who executed the command in the instance. The length must not exceed 255 characters. The instance of the Linux system. By default, the root user runs commands.
    workingDir String
    You can customize the command execution path. The default path is as follows: Linux instance: the execution path is in the/home directory of the root user by default.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Invocation Resource

    Get an existing Invocation 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?: InvocationState, opts?: CustomResourceOptions): Invocation
    @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,
            description: Optional[str] = None,
            enable_parameter: Optional[bool] = None,
            frequency: Optional[str] = None,
            launcher: Optional[str] = None,
            name: Optional[str] = None,
            node_id_lists: Optional[Sequence[str]] = None,
            parameters: Optional[Mapping[str, str]] = None,
            repeat_mode: Optional[str] = None,
            termination_mode: Optional[str] = None,
            timeout: Optional[int] = None,
            username: Optional[str] = None,
            working_dir: Optional[str] = None) -> Invocation
    func GetInvocation(ctx *Context, name string, id IDInput, state *InvocationState, opts ...ResourceOption) (*Invocation, error)
    public static Invocation Get(string name, Input<string> id, InvocationState? state, CustomResourceOptions? opts = null)
    public static Invocation get(String name, Output<String> id, InvocationState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:eflo:Invocation    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
    The command content. You need to pay attention:

    • Specify the parameter 'EnableParameter = true' to enable the custom parameter feature in the command content.
    • Define custom parameters in the form of {{}} inclusion, and spaces and line breaks before and after the parameter name in '{{}}' are ignored.
    • The number of custom parameters cannot exceed 20.
    • Custom parameter names can a-zA-Z0-9 a combination of-_. Other characters are not supported. Parameter names are not case-sensitive.
    • A single custom parameter name cannot exceed 64 bytes.
    CommandId string
    Command ID
    ContentEncoding string

    The encoding of the script content. Value range:

    • PlainText: no encoding, using PlainText transmission.
    • Base64:Base64 encoding.

    Default value: PlainText. If you fill it randomly or wrongly, the value will be treated as a PlainText.

    Description string
    The command description.
    EnableParameter bool
    Whether custom parameters are included in the command. Default value: false.
    Frequency string

    The execution time of the scheduled execution command. Currently, three scheduled execution methods are supported: fixed interval execution (based on Rate expression), only once at a specified time, and timed execution based on clock (based on Cron expression).

    • Fixed time interval execution: Based on the Rate expression, the command is executed at the set time interval. Time intervals can be selected by seconds (s), minutes (m), hours (h), and days (d), which is suitable for scenarios where tasks are executed at fixed time intervals. The format is rate( ). If the execution is performed every 5 minutes, the format is rate(5m). Executing with a fixed time interval has the following limitations:
    • The set time interval is no more than 7 days and no less than 60 seconds, and must be greater than the timeout period of the scheduled task.
    • The execution interval is based only on a fixed frequency, independent of the time the task actually takes to execute. For example, if the command is executed every 5 minutes and the task takes 2 minutes to complete, the next round will be executed 3 minutes after the task is completed.
    • The task is not executed immediately when it is created. For example, if a command is executed every 5 minutes, the command is not executed immediately when a task is created, but is executed 5 minutes after the task is created.
    • Execute only once at the specified time: Execute the command once according to the set time zone and execution time point. The format is at(yyyy-MM-dd HH:mm:ss ), that is, at (year-month-day time: minute: Second ). If you do not specify a time zone, the default is the UTC time zone. Time zones can be in the following three formats: the full name of the time zone, such as Asia/Shanghai (China/Shanghai time), America/los_angles (United States/Los Angeles time), and so on. The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros. Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported. If it is specified to be executed once 13:15:30 June 06, 2022, China/Shanghai time, the format is at (Asia/Shanghai, 2022-06-06 13:15:30); If it is specified to be executed once 13:15:30 June 06, 2022, the format is at(2022-06-06 13:15:30 GMT-7:00).
    • Timing based on clock (based on Cron expression): Based on Cron expression, commands are executed according to the set timing task. The format is , that is, . In the specified time zone, calculate the execution time of the scheduled task based on the Cron expression and execute it. If no time zone is specified, the default time zone is the internal time zone of the scheduled task instance. For more information about Cron expressions, see Cron Expressions. Time zones support the following three forms:
    • Full time zone name: such as Asia/Shanghai (China/Shanghai time), America/los_angles (US/Los Angeles time), etc.
    • The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros.
    • Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported.

    For example, in China/Shanghai time, the command will be executed once every day at 10:15 am in 2022 in the format 0 15 10? * * 2022 Asia/Shanghai; In the eastern 8th District time, it will be executed every half hour from 10:00 a.m. to 11:30 a.m. every day in 2022, in the format of 0 0/30 10-11 * ? 2022 GMT +8:00; In UTC time, starting from 2022, it will be executed every 5 minutes from 14:00 P.M. to 14:55 p. M. Every two years in October, in the format of 0 0/5 1410? 2022/2 UTC.

    Launcher string
    The bootstrapper for script execution. The length cannot exceed 1KB.
    Name string
    The command name.
    NodeIdLists List<string>
    A list of nodes.
    Parameters Dictionary<string, string>

    When the command contains custom parameters, the key-value pair of the custom parameters passed in when the command is executed. For example, if the command content is 'echo {{name}}', the key-value pair'{"name":"Jack"}'can be passed through the 'Parameter' parameter'. The custom parameter will automatically replace the variable value 'name' to get a new command that actually executes 'echo Jack '.

    The number of custom parameters ranges from 0 to 10, and you need to pay attention:

    • The key is not allowed to be an empty string and supports a maximum of 64 characters.
    • The value is allowed to be an empty string.
    • After the custom parameters and the original command content are encoded in Base64, if the command is saved, the size of the command content after Base64 encoding cannot exceed 18KB. If the command is not saved, the size of the command content after Base64 encoding cannot exceed 24KB. You can set whether to keep the command through 'KeepCommand.
    • The set of custom parameter names must be a subset of the parameter set defined when the command is created. For parameters that are not passed in, you can use an empty string instead.

    The default value is empty, which means that the parameter is unset and the custom parameter is disabled.

    RepeatMode string

    Sets the way the command is executed. Value range:

    • Once: Execute the command immediately.
    • Period: executes the command regularly. When the value of this parameter is 'Period', the 'Frequency' parameter must also be specified.
    • NextRebootOnly: Automatically execute the command when the instance is next started.
    • EveryReboot: The command is automatically executed every time the instance is started.

    Default:

    • When the'frequency' parameter is not specified, the default value is'once '.
    • When the'frequency' parameter is specified, regardless of whether the parameter value has been set or not, it will be processed according to'period.
    TerminationMode string
    The mode when the task is stopped (manually stopped or execution time-out interrupted). Possible values: Process: Stops the current script Process. ProcessTree: Stops the current process tree (the script process and the collection of all child processes it created)
    Timeout int
    The timeout period for command execution. Unit: seconds. A timeout occurs when a command cannot be run due to a process, a missing module, or a missing cloud assistant Agent. After the timeout, the command process is forcibly terminated. Default value: 60.
    Username string
    The name of the user who executed the command in the instance. The length must not exceed 255 characters. The instance of the Linux system. By default, the root user runs commands.
    WorkingDir string
    You can customize the command execution path. The default path is as follows: Linux instance: the execution path is in the/home directory of the root user by default.
    CommandContent string
    The command content. You need to pay attention:

    • Specify the parameter 'EnableParameter = true' to enable the custom parameter feature in the command content.
    • Define custom parameters in the form of {{}} inclusion, and spaces and line breaks before and after the parameter name in '{{}}' are ignored.
    • The number of custom parameters cannot exceed 20.
    • Custom parameter names can a-zA-Z0-9 a combination of-_. Other characters are not supported. Parameter names are not case-sensitive.
    • A single custom parameter name cannot exceed 64 bytes.
    CommandId string
    Command ID
    ContentEncoding string

    The encoding of the script content. Value range:

    • PlainText: no encoding, using PlainText transmission.
    • Base64:Base64 encoding.

    Default value: PlainText. If you fill it randomly or wrongly, the value will be treated as a PlainText.

    Description string
    The command description.
    EnableParameter bool
    Whether custom parameters are included in the command. Default value: false.
    Frequency string

    The execution time of the scheduled execution command. Currently, three scheduled execution methods are supported: fixed interval execution (based on Rate expression), only once at a specified time, and timed execution based on clock (based on Cron expression).

    • Fixed time interval execution: Based on the Rate expression, the command is executed at the set time interval. Time intervals can be selected by seconds (s), minutes (m), hours (h), and days (d), which is suitable for scenarios where tasks are executed at fixed time intervals. The format is rate( ). If the execution is performed every 5 minutes, the format is rate(5m). Executing with a fixed time interval has the following limitations:
    • The set time interval is no more than 7 days and no less than 60 seconds, and must be greater than the timeout period of the scheduled task.
    • The execution interval is based only on a fixed frequency, independent of the time the task actually takes to execute. For example, if the command is executed every 5 minutes and the task takes 2 minutes to complete, the next round will be executed 3 minutes after the task is completed.
    • The task is not executed immediately when it is created. For example, if a command is executed every 5 minutes, the command is not executed immediately when a task is created, but is executed 5 minutes after the task is created.
    • Execute only once at the specified time: Execute the command once according to the set time zone and execution time point. The format is at(yyyy-MM-dd HH:mm:ss ), that is, at (year-month-day time: minute: Second ). If you do not specify a time zone, the default is the UTC time zone. Time zones can be in the following three formats: the full name of the time zone, such as Asia/Shanghai (China/Shanghai time), America/los_angles (United States/Los Angeles time), and so on. The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros. Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported. If it is specified to be executed once 13:15:30 June 06, 2022, China/Shanghai time, the format is at (Asia/Shanghai, 2022-06-06 13:15:30); If it is specified to be executed once 13:15:30 June 06, 2022, the format is at(2022-06-06 13:15:30 GMT-7:00).
    • Timing based on clock (based on Cron expression): Based on Cron expression, commands are executed according to the set timing task. The format is , that is, . In the specified time zone, calculate the execution time of the scheduled task based on the Cron expression and execute it. If no time zone is specified, the default time zone is the internal time zone of the scheduled task instance. For more information about Cron expressions, see Cron Expressions. Time zones support the following three forms:
    • Full time zone name: such as Asia/Shanghai (China/Shanghai time), America/los_angles (US/Los Angeles time), etc.
    • The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros.
    • Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported.

    For example, in China/Shanghai time, the command will be executed once every day at 10:15 am in 2022 in the format 0 15 10? * * 2022 Asia/Shanghai; In the eastern 8th District time, it will be executed every half hour from 10:00 a.m. to 11:30 a.m. every day in 2022, in the format of 0 0/30 10-11 * ? 2022 GMT +8:00; In UTC time, starting from 2022, it will be executed every 5 minutes from 14:00 P.M. to 14:55 p. M. Every two years in October, in the format of 0 0/5 1410? 2022/2 UTC.

    Launcher string
    The bootstrapper for script execution. The length cannot exceed 1KB.
    Name string
    The command name.
    NodeIdLists []string
    A list of nodes.
    Parameters map[string]string

    When the command contains custom parameters, the key-value pair of the custom parameters passed in when the command is executed. For example, if the command content is 'echo {{name}}', the key-value pair'{"name":"Jack"}'can be passed through the 'Parameter' parameter'. The custom parameter will automatically replace the variable value 'name' to get a new command that actually executes 'echo Jack '.

    The number of custom parameters ranges from 0 to 10, and you need to pay attention:

    • The key is not allowed to be an empty string and supports a maximum of 64 characters.
    • The value is allowed to be an empty string.
    • After the custom parameters and the original command content are encoded in Base64, if the command is saved, the size of the command content after Base64 encoding cannot exceed 18KB. If the command is not saved, the size of the command content after Base64 encoding cannot exceed 24KB. You can set whether to keep the command through 'KeepCommand.
    • The set of custom parameter names must be a subset of the parameter set defined when the command is created. For parameters that are not passed in, you can use an empty string instead.

    The default value is empty, which means that the parameter is unset and the custom parameter is disabled.

    RepeatMode string

    Sets the way the command is executed. Value range:

    • Once: Execute the command immediately.
    • Period: executes the command regularly. When the value of this parameter is 'Period', the 'Frequency' parameter must also be specified.
    • NextRebootOnly: Automatically execute the command when the instance is next started.
    • EveryReboot: The command is automatically executed every time the instance is started.

    Default:

    • When the'frequency' parameter is not specified, the default value is'once '.
    • When the'frequency' parameter is specified, regardless of whether the parameter value has been set or not, it will be processed according to'period.
    TerminationMode string
    The mode when the task is stopped (manually stopped or execution time-out interrupted). Possible values: Process: Stops the current script Process. ProcessTree: Stops the current process tree (the script process and the collection of all child processes it created)
    Timeout int
    The timeout period for command execution. Unit: seconds. A timeout occurs when a command cannot be run due to a process, a missing module, or a missing cloud assistant Agent. After the timeout, the command process is forcibly terminated. Default value: 60.
    Username string
    The name of the user who executed the command in the instance. The length must not exceed 255 characters. The instance of the Linux system. By default, the root user runs commands.
    WorkingDir string
    You can customize the command execution path. The default path is as follows: Linux instance: the execution path is in the/home directory of the root user by default.
    commandContent String
    The command content. You need to pay attention:

    • Specify the parameter 'EnableParameter = true' to enable the custom parameter feature in the command content.
    • Define custom parameters in the form of {{}} inclusion, and spaces and line breaks before and after the parameter name in '{{}}' are ignored.
    • The number of custom parameters cannot exceed 20.
    • Custom parameter names can a-zA-Z0-9 a combination of-_. Other characters are not supported. Parameter names are not case-sensitive.
    • A single custom parameter name cannot exceed 64 bytes.
    commandId String
    Command ID
    contentEncoding String

    The encoding of the script content. Value range:

    • PlainText: no encoding, using PlainText transmission.
    • Base64:Base64 encoding.

    Default value: PlainText. If you fill it randomly or wrongly, the value will be treated as a PlainText.

    description String
    The command description.
    enableParameter Boolean
    Whether custom parameters are included in the command. Default value: false.
    frequency String

    The execution time of the scheduled execution command. Currently, three scheduled execution methods are supported: fixed interval execution (based on Rate expression), only once at a specified time, and timed execution based on clock (based on Cron expression).

    • Fixed time interval execution: Based on the Rate expression, the command is executed at the set time interval. Time intervals can be selected by seconds (s), minutes (m), hours (h), and days (d), which is suitable for scenarios where tasks are executed at fixed time intervals. The format is rate( ). If the execution is performed every 5 minutes, the format is rate(5m). Executing with a fixed time interval has the following limitations:
    • The set time interval is no more than 7 days and no less than 60 seconds, and must be greater than the timeout period of the scheduled task.
    • The execution interval is based only on a fixed frequency, independent of the time the task actually takes to execute. For example, if the command is executed every 5 minutes and the task takes 2 minutes to complete, the next round will be executed 3 minutes after the task is completed.
    • The task is not executed immediately when it is created. For example, if a command is executed every 5 minutes, the command is not executed immediately when a task is created, but is executed 5 minutes after the task is created.
    • Execute only once at the specified time: Execute the command once according to the set time zone and execution time point. The format is at(yyyy-MM-dd HH:mm:ss ), that is, at (year-month-day time: minute: Second ). If you do not specify a time zone, the default is the UTC time zone. Time zones can be in the following three formats: the full name of the time zone, such as Asia/Shanghai (China/Shanghai time), America/los_angles (United States/Los Angeles time), and so on. The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros. Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported. If it is specified to be executed once 13:15:30 June 06, 2022, China/Shanghai time, the format is at (Asia/Shanghai, 2022-06-06 13:15:30); If it is specified to be executed once 13:15:30 June 06, 2022, the format is at(2022-06-06 13:15:30 GMT-7:00).
    • Timing based on clock (based on Cron expression): Based on Cron expression, commands are executed according to the set timing task. The format is , that is, . In the specified time zone, calculate the execution time of the scheduled task based on the Cron expression and execute it. If no time zone is specified, the default time zone is the internal time zone of the scheduled task instance. For more information about Cron expressions, see Cron Expressions. Time zones support the following three forms:
    • Full time zone name: such as Asia/Shanghai (China/Shanghai time), America/los_angles (US/Los Angeles time), etc.
    • The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros.
    • Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported.

    For example, in China/Shanghai time, the command will be executed once every day at 10:15 am in 2022 in the format 0 15 10? * * 2022 Asia/Shanghai; In the eastern 8th District time, it will be executed every half hour from 10:00 a.m. to 11:30 a.m. every day in 2022, in the format of 0 0/30 10-11 * ? 2022 GMT +8:00; In UTC time, starting from 2022, it will be executed every 5 minutes from 14:00 P.M. to 14:55 p. M. Every two years in October, in the format of 0 0/5 1410? 2022/2 UTC.

    launcher String
    The bootstrapper for script execution. The length cannot exceed 1KB.
    name String
    The command name.
    nodeIdLists List<String>
    A list of nodes.
    parameters Map<String,String>

    When the command contains custom parameters, the key-value pair of the custom parameters passed in when the command is executed. For example, if the command content is 'echo {{name}}', the key-value pair'{"name":"Jack"}'can be passed through the 'Parameter' parameter'. The custom parameter will automatically replace the variable value 'name' to get a new command that actually executes 'echo Jack '.

    The number of custom parameters ranges from 0 to 10, and you need to pay attention:

    • The key is not allowed to be an empty string and supports a maximum of 64 characters.
    • The value is allowed to be an empty string.
    • After the custom parameters and the original command content are encoded in Base64, if the command is saved, the size of the command content after Base64 encoding cannot exceed 18KB. If the command is not saved, the size of the command content after Base64 encoding cannot exceed 24KB. You can set whether to keep the command through 'KeepCommand.
    • The set of custom parameter names must be a subset of the parameter set defined when the command is created. For parameters that are not passed in, you can use an empty string instead.

    The default value is empty, which means that the parameter is unset and the custom parameter is disabled.

    repeatMode String

    Sets the way the command is executed. Value range:

    • Once: Execute the command immediately.
    • Period: executes the command regularly. When the value of this parameter is 'Period', the 'Frequency' parameter must also be specified.
    • NextRebootOnly: Automatically execute the command when the instance is next started.
    • EveryReboot: The command is automatically executed every time the instance is started.

    Default:

    • When the'frequency' parameter is not specified, the default value is'once '.
    • When the'frequency' parameter is specified, regardless of whether the parameter value has been set or not, it will be processed according to'period.
    terminationMode String
    The mode when the task is stopped (manually stopped or execution time-out interrupted). Possible values: Process: Stops the current script Process. ProcessTree: Stops the current process tree (the script process and the collection of all child processes it created)
    timeout Integer
    The timeout period for command execution. Unit: seconds. A timeout occurs when a command cannot be run due to a process, a missing module, or a missing cloud assistant Agent. After the timeout, the command process is forcibly terminated. Default value: 60.
    username String
    The name of the user who executed the command in the instance. The length must not exceed 255 characters. The instance of the Linux system. By default, the root user runs commands.
    workingDir String
    You can customize the command execution path. The default path is as follows: Linux instance: the execution path is in the/home directory of the root user by default.
    commandContent string
    The command content. You need to pay attention:

    • Specify the parameter 'EnableParameter = true' to enable the custom parameter feature in the command content.
    • Define custom parameters in the form of {{}} inclusion, and spaces and line breaks before and after the parameter name in '{{}}' are ignored.
    • The number of custom parameters cannot exceed 20.
    • Custom parameter names can a-zA-Z0-9 a combination of-_. Other characters are not supported. Parameter names are not case-sensitive.
    • A single custom parameter name cannot exceed 64 bytes.
    commandId string
    Command ID
    contentEncoding string

    The encoding of the script content. Value range:

    • PlainText: no encoding, using PlainText transmission.
    • Base64:Base64 encoding.

    Default value: PlainText. If you fill it randomly or wrongly, the value will be treated as a PlainText.

    description string
    The command description.
    enableParameter boolean
    Whether custom parameters are included in the command. Default value: false.
    frequency string

    The execution time of the scheduled execution command. Currently, three scheduled execution methods are supported: fixed interval execution (based on Rate expression), only once at a specified time, and timed execution based on clock (based on Cron expression).

    • Fixed time interval execution: Based on the Rate expression, the command is executed at the set time interval. Time intervals can be selected by seconds (s), minutes (m), hours (h), and days (d), which is suitable for scenarios where tasks are executed at fixed time intervals. The format is rate( ). If the execution is performed every 5 minutes, the format is rate(5m). Executing with a fixed time interval has the following limitations:
    • The set time interval is no more than 7 days and no less than 60 seconds, and must be greater than the timeout period of the scheduled task.
    • The execution interval is based only on a fixed frequency, independent of the time the task actually takes to execute. For example, if the command is executed every 5 minutes and the task takes 2 minutes to complete, the next round will be executed 3 minutes after the task is completed.
    • The task is not executed immediately when it is created. For example, if a command is executed every 5 minutes, the command is not executed immediately when a task is created, but is executed 5 minutes after the task is created.
    • Execute only once at the specified time: Execute the command once according to the set time zone and execution time point. The format is at(yyyy-MM-dd HH:mm:ss ), that is, at (year-month-day time: minute: Second ). If you do not specify a time zone, the default is the UTC time zone. Time zones can be in the following three formats: the full name of the time zone, such as Asia/Shanghai (China/Shanghai time), America/los_angles (United States/Los Angeles time), and so on. The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros. Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported. If it is specified to be executed once 13:15:30 June 06, 2022, China/Shanghai time, the format is at (Asia/Shanghai, 2022-06-06 13:15:30); If it is specified to be executed once 13:15:30 June 06, 2022, the format is at(2022-06-06 13:15:30 GMT-7:00).
    • Timing based on clock (based on Cron expression): Based on Cron expression, commands are executed according to the set timing task. The format is , that is, . In the specified time zone, calculate the execution time of the scheduled task based on the Cron expression and execute it. If no time zone is specified, the default time zone is the internal time zone of the scheduled task instance. For more information about Cron expressions, see Cron Expressions. Time zones support the following three forms:
    • Full time zone name: such as Asia/Shanghai (China/Shanghai time), America/los_angles (US/Los Angeles time), etc.
    • The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros.
    • Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported.

    For example, in China/Shanghai time, the command will be executed once every day at 10:15 am in 2022 in the format 0 15 10? * * 2022 Asia/Shanghai; In the eastern 8th District time, it will be executed every half hour from 10:00 a.m. to 11:30 a.m. every day in 2022, in the format of 0 0/30 10-11 * ? 2022 GMT +8:00; In UTC time, starting from 2022, it will be executed every 5 minutes from 14:00 P.M. to 14:55 p. M. Every two years in October, in the format of 0 0/5 1410? 2022/2 UTC.

    launcher string
    The bootstrapper for script execution. The length cannot exceed 1KB.
    name string
    The command name.
    nodeIdLists string[]
    A list of nodes.
    parameters {[key: string]: string}

    When the command contains custom parameters, the key-value pair of the custom parameters passed in when the command is executed. For example, if the command content is 'echo {{name}}', the key-value pair'{"name":"Jack"}'can be passed through the 'Parameter' parameter'. The custom parameter will automatically replace the variable value 'name' to get a new command that actually executes 'echo Jack '.

    The number of custom parameters ranges from 0 to 10, and you need to pay attention:

    • The key is not allowed to be an empty string and supports a maximum of 64 characters.
    • The value is allowed to be an empty string.
    • After the custom parameters and the original command content are encoded in Base64, if the command is saved, the size of the command content after Base64 encoding cannot exceed 18KB. If the command is not saved, the size of the command content after Base64 encoding cannot exceed 24KB. You can set whether to keep the command through 'KeepCommand.
    • The set of custom parameter names must be a subset of the parameter set defined when the command is created. For parameters that are not passed in, you can use an empty string instead.

    The default value is empty, which means that the parameter is unset and the custom parameter is disabled.

    repeatMode string

    Sets the way the command is executed. Value range:

    • Once: Execute the command immediately.
    • Period: executes the command regularly. When the value of this parameter is 'Period', the 'Frequency' parameter must also be specified.
    • NextRebootOnly: Automatically execute the command when the instance is next started.
    • EveryReboot: The command is automatically executed every time the instance is started.

    Default:

    • When the'frequency' parameter is not specified, the default value is'once '.
    • When the'frequency' parameter is specified, regardless of whether the parameter value has been set or not, it will be processed according to'period.
    terminationMode string
    The mode when the task is stopped (manually stopped or execution time-out interrupted). Possible values: Process: Stops the current script Process. ProcessTree: Stops the current process tree (the script process and the collection of all child processes it created)
    timeout number
    The timeout period for command execution. Unit: seconds. A timeout occurs when a command cannot be run due to a process, a missing module, or a missing cloud assistant Agent. After the timeout, the command process is forcibly terminated. Default value: 60.
    username string
    The name of the user who executed the command in the instance. The length must not exceed 255 characters. The instance of the Linux system. By default, the root user runs commands.
    workingDir string
    You can customize the command execution path. The default path is as follows: Linux instance: the execution path is in the/home directory of the root user by default.
    command_content str
    The command content. You need to pay attention:

    • Specify the parameter 'EnableParameter = true' to enable the custom parameter feature in the command content.
    • Define custom parameters in the form of {{}} inclusion, and spaces and line breaks before and after the parameter name in '{{}}' are ignored.
    • The number of custom parameters cannot exceed 20.
    • Custom parameter names can a-zA-Z0-9 a combination of-_. Other characters are not supported. Parameter names are not case-sensitive.
    • A single custom parameter name cannot exceed 64 bytes.
    command_id str
    Command ID
    content_encoding str

    The encoding of the script content. Value range:

    • PlainText: no encoding, using PlainText transmission.
    • Base64:Base64 encoding.

    Default value: PlainText. If you fill it randomly or wrongly, the value will be treated as a PlainText.

    description str
    The command description.
    enable_parameter bool
    Whether custom parameters are included in the command. Default value: false.
    frequency str

    The execution time of the scheduled execution command. Currently, three scheduled execution methods are supported: fixed interval execution (based on Rate expression), only once at a specified time, and timed execution based on clock (based on Cron expression).

    • Fixed time interval execution: Based on the Rate expression, the command is executed at the set time interval. Time intervals can be selected by seconds (s), minutes (m), hours (h), and days (d), which is suitable for scenarios where tasks are executed at fixed time intervals. The format is rate( ). If the execution is performed every 5 minutes, the format is rate(5m). Executing with a fixed time interval has the following limitations:
    • The set time interval is no more than 7 days and no less than 60 seconds, and must be greater than the timeout period of the scheduled task.
    • The execution interval is based only on a fixed frequency, independent of the time the task actually takes to execute. For example, if the command is executed every 5 minutes and the task takes 2 minutes to complete, the next round will be executed 3 minutes after the task is completed.
    • The task is not executed immediately when it is created. For example, if a command is executed every 5 minutes, the command is not executed immediately when a task is created, but is executed 5 minutes after the task is created.
    • Execute only once at the specified time: Execute the command once according to the set time zone and execution time point. The format is at(yyyy-MM-dd HH:mm:ss ), that is, at (year-month-day time: minute: Second ). If you do not specify a time zone, the default is the UTC time zone. Time zones can be in the following three formats: the full name of the time zone, such as Asia/Shanghai (China/Shanghai time), America/los_angles (United States/Los Angeles time), and so on. The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros. Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported. If it is specified to be executed once 13:15:30 June 06, 2022, China/Shanghai time, the format is at (Asia/Shanghai, 2022-06-06 13:15:30); If it is specified to be executed once 13:15:30 June 06, 2022, the format is at(2022-06-06 13:15:30 GMT-7:00).
    • Timing based on clock (based on Cron expression): Based on Cron expression, commands are executed according to the set timing task. The format is , that is, . In the specified time zone, calculate the execution time of the scheduled task based on the Cron expression and execute it. If no time zone is specified, the default time zone is the internal time zone of the scheduled task instance. For more information about Cron expressions, see Cron Expressions. Time zones support the following three forms:
    • Full time zone name: such as Asia/Shanghai (China/Shanghai time), America/los_angles (US/Los Angeles time), etc.
    • The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros.
    • Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported.

    For example, in China/Shanghai time, the command will be executed once every day at 10:15 am in 2022 in the format 0 15 10? * * 2022 Asia/Shanghai; In the eastern 8th District time, it will be executed every half hour from 10:00 a.m. to 11:30 a.m. every day in 2022, in the format of 0 0/30 10-11 * ? 2022 GMT +8:00; In UTC time, starting from 2022, it will be executed every 5 minutes from 14:00 P.M. to 14:55 p. M. Every two years in October, in the format of 0 0/5 1410? 2022/2 UTC.

    launcher str
    The bootstrapper for script execution. The length cannot exceed 1KB.
    name str
    The command name.
    node_id_lists Sequence[str]
    A list of nodes.
    parameters Mapping[str, str]

    When the command contains custom parameters, the key-value pair of the custom parameters passed in when the command is executed. For example, if the command content is 'echo {{name}}', the key-value pair'{"name":"Jack"}'can be passed through the 'Parameter' parameter'. The custom parameter will automatically replace the variable value 'name' to get a new command that actually executes 'echo Jack '.

    The number of custom parameters ranges from 0 to 10, and you need to pay attention:

    • The key is not allowed to be an empty string and supports a maximum of 64 characters.
    • The value is allowed to be an empty string.
    • After the custom parameters and the original command content are encoded in Base64, if the command is saved, the size of the command content after Base64 encoding cannot exceed 18KB. If the command is not saved, the size of the command content after Base64 encoding cannot exceed 24KB. You can set whether to keep the command through 'KeepCommand.
    • The set of custom parameter names must be a subset of the parameter set defined when the command is created. For parameters that are not passed in, you can use an empty string instead.

    The default value is empty, which means that the parameter is unset and the custom parameter is disabled.

    repeat_mode str

    Sets the way the command is executed. Value range:

    • Once: Execute the command immediately.
    • Period: executes the command regularly. When the value of this parameter is 'Period', the 'Frequency' parameter must also be specified.
    • NextRebootOnly: Automatically execute the command when the instance is next started.
    • EveryReboot: The command is automatically executed every time the instance is started.

    Default:

    • When the'frequency' parameter is not specified, the default value is'once '.
    • When the'frequency' parameter is specified, regardless of whether the parameter value has been set or not, it will be processed according to'period.
    termination_mode str
    The mode when the task is stopped (manually stopped or execution time-out interrupted). Possible values: Process: Stops the current script Process. ProcessTree: Stops the current process tree (the script process and the collection of all child processes it created)
    timeout int
    The timeout period for command execution. Unit: seconds. A timeout occurs when a command cannot be run due to a process, a missing module, or a missing cloud assistant Agent. After the timeout, the command process is forcibly terminated. Default value: 60.
    username str
    The name of the user who executed the command in the instance. The length must not exceed 255 characters. The instance of the Linux system. By default, the root user runs commands.
    working_dir str
    You can customize the command execution path. The default path is as follows: Linux instance: the execution path is in the/home directory of the root user by default.
    commandContent String
    The command content. You need to pay attention:

    • Specify the parameter 'EnableParameter = true' to enable the custom parameter feature in the command content.
    • Define custom parameters in the form of {{}} inclusion, and spaces and line breaks before and after the parameter name in '{{}}' are ignored.
    • The number of custom parameters cannot exceed 20.
    • Custom parameter names can a-zA-Z0-9 a combination of-_. Other characters are not supported. Parameter names are not case-sensitive.
    • A single custom parameter name cannot exceed 64 bytes.
    commandId String
    Command ID
    contentEncoding String

    The encoding of the script content. Value range:

    • PlainText: no encoding, using PlainText transmission.
    • Base64:Base64 encoding.

    Default value: PlainText. If you fill it randomly or wrongly, the value will be treated as a PlainText.

    description String
    The command description.
    enableParameter Boolean
    Whether custom parameters are included in the command. Default value: false.
    frequency String

    The execution time of the scheduled execution command. Currently, three scheduled execution methods are supported: fixed interval execution (based on Rate expression), only once at a specified time, and timed execution based on clock (based on Cron expression).

    • Fixed time interval execution: Based on the Rate expression, the command is executed at the set time interval. Time intervals can be selected by seconds (s), minutes (m), hours (h), and days (d), which is suitable for scenarios where tasks are executed at fixed time intervals. The format is rate( ). If the execution is performed every 5 minutes, the format is rate(5m). Executing with a fixed time interval has the following limitations:
    • The set time interval is no more than 7 days and no less than 60 seconds, and must be greater than the timeout period of the scheduled task.
    • The execution interval is based only on a fixed frequency, independent of the time the task actually takes to execute. For example, if the command is executed every 5 minutes and the task takes 2 minutes to complete, the next round will be executed 3 minutes after the task is completed.
    • The task is not executed immediately when it is created. For example, if a command is executed every 5 minutes, the command is not executed immediately when a task is created, but is executed 5 minutes after the task is created.
    • Execute only once at the specified time: Execute the command once according to the set time zone and execution time point. The format is at(yyyy-MM-dd HH:mm:ss ), that is, at (year-month-day time: minute: Second ). If you do not specify a time zone, the default is the UTC time zone. Time zones can be in the following three formats: the full name of the time zone, such as Asia/Shanghai (China/Shanghai time), America/los_angles (United States/Los Angeles time), and so on. The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros. Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported. If it is specified to be executed once 13:15:30 June 06, 2022, China/Shanghai time, the format is at (Asia/Shanghai, 2022-06-06 13:15:30); If it is specified to be executed once 13:15:30 June 06, 2022, the format is at(2022-06-06 13:15:30 GMT-7:00).
    • Timing based on clock (based on Cron expression): Based on Cron expression, commands are executed according to the set timing task. The format is , that is, . In the specified time zone, calculate the execution time of the scheduled task based on the Cron expression and execute it. If no time zone is specified, the default time zone is the internal time zone of the scheduled task instance. For more information about Cron expressions, see Cron Expressions. Time zones support the following three forms:
    • Full time zone name: such as Asia/Shanghai (China/Shanghai time), America/los_angles (US/Los Angeles time), etc.
    • The offset of the time zone relative to Greenwich Mean Time: E.G. GMT +8:00 (East Zone 8), GMT-7 (West Zone 7), etc. When using the GMT format, the hour bit does not support adding leading zeros.
    • Time zone abbreviation: Only UTC (Coordinated Universal Time) is supported.

    For example, in China/Shanghai time, the command will be executed once every day at 10:15 am in 2022 in the format 0 15 10? * * 2022 Asia/Shanghai; In the eastern 8th District time, it will be executed every half hour from 10:00 a.m. to 11:30 a.m. every day in 2022, in the format of 0 0/30 10-11 * ? 2022 GMT +8:00; In UTC time, starting from 2022, it will be executed every 5 minutes from 14:00 P.M. to 14:55 p. M. Every two years in October, in the format of 0 0/5 1410? 2022/2 UTC.

    launcher String
    The bootstrapper for script execution. The length cannot exceed 1KB.
    name String
    The command name.
    nodeIdLists List<String>
    A list of nodes.
    parameters Map<String>

    When the command contains custom parameters, the key-value pair of the custom parameters passed in when the command is executed. For example, if the command content is 'echo {{name}}', the key-value pair'{"name":"Jack"}'can be passed through the 'Parameter' parameter'. The custom parameter will automatically replace the variable value 'name' to get a new command that actually executes 'echo Jack '.

    The number of custom parameters ranges from 0 to 10, and you need to pay attention:

    • The key is not allowed to be an empty string and supports a maximum of 64 characters.
    • The value is allowed to be an empty string.
    • After the custom parameters and the original command content are encoded in Base64, if the command is saved, the size of the command content after Base64 encoding cannot exceed 18KB. If the command is not saved, the size of the command content after Base64 encoding cannot exceed 24KB. You can set whether to keep the command through 'KeepCommand.
    • The set of custom parameter names must be a subset of the parameter set defined when the command is created. For parameters that are not passed in, you can use an empty string instead.

    The default value is empty, which means that the parameter is unset and the custom parameter is disabled.

    repeatMode String

    Sets the way the command is executed. Value range:

    • Once: Execute the command immediately.
    • Period: executes the command regularly. When the value of this parameter is 'Period', the 'Frequency' parameter must also be specified.
    • NextRebootOnly: Automatically execute the command when the instance is next started.
    • EveryReboot: The command is automatically executed every time the instance is started.

    Default:

    • When the'frequency' parameter is not specified, the default value is'once '.
    • When the'frequency' parameter is specified, regardless of whether the parameter value has been set or not, it will be processed according to'period.
    terminationMode String
    The mode when the task is stopped (manually stopped or execution time-out interrupted). Possible values: Process: Stops the current script Process. ProcessTree: Stops the current process tree (the script process and the collection of all child processes it created)
    timeout Number
    The timeout period for command execution. Unit: seconds. A timeout occurs when a command cannot be run due to a process, a missing module, or a missing cloud assistant Agent. After the timeout, the command process is forcibly terminated. Default value: 60.
    username String
    The name of the user who executed the command in the instance. The length must not exceed 255 characters. The instance of the Linux system. By default, the root user runs commands.
    workingDir String
    You can customize the command execution path. The default path is as follows: Linux instance: the execution path is in the/home directory of the root user by default.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi