1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ecs
  5. EcsInvocation
Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi

alicloud.ecs.EcsInvocation

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi

    Provides a ECS Invocation resource.

    For information about ECS Invocation and how to use it, see What is Invocation.

    NOTE: Available in v1.168.0+.

    Example Usage

    Basic Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultCommand = new AliCloud.Ecs.Command("defaultCommand", new()
        {
            CommandContent = "bHMK",
            Description = "terraform-example",
            Type = "RunShellScript",
            WorkingDir = "/root",
        });
    
        var defaultInstances = AliCloud.Ecs.GetInstances.Invoke(new()
        {
            Status = "Running",
        });
    
        var defaultEcsInvocation = new AliCloud.Ecs.EcsInvocation("defaultEcsInvocation", new()
        {
            CommandId = defaultCommand.Id,
            InstanceIds = new[]
            {
                defaultInstances.Apply(getInstancesResult => getInstancesResult.Ids[0]),
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		defaultCommand, err := ecs.NewCommand(ctx, "defaultCommand", &ecs.CommandArgs{
    			CommandContent: pulumi.String("bHMK"),
    			Description:    pulumi.String("terraform-example"),
    			Type:           pulumi.String("RunShellScript"),
    			WorkingDir:     pulumi.String("/root"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstances, err := ecs.GetInstances(ctx, &ecs.GetInstancesArgs{
    			Status: pulumi.StringRef("Running"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = ecs.NewEcsInvocation(ctx, "defaultEcsInvocation", &ecs.EcsInvocationArgs{
    			CommandId: defaultCommand.ID(),
    			InstanceIds: pulumi.StringArray{
    				*pulumi.String(defaultInstances.Ids[0]),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ecs.Command;
    import com.pulumi.alicloud.ecs.CommandArgs;
    import com.pulumi.alicloud.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetInstancesArgs;
    import com.pulumi.alicloud.ecs.EcsInvocation;
    import com.pulumi.alicloud.ecs.EcsInvocationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var defaultCommand = new Command("defaultCommand", CommandArgs.builder()        
                .commandContent("bHMK")
                .description("terraform-example")
                .type("RunShellScript")
                .workingDir("/root")
                .build());
    
            final var defaultInstances = EcsFunctions.getInstances(GetInstancesArgs.builder()
                .status("Running")
                .build());
    
            var defaultEcsInvocation = new EcsInvocation("defaultEcsInvocation", EcsInvocationArgs.builder()        
                .commandId(defaultCommand.id())
                .instanceIds(defaultInstances.applyValue(getInstancesResult -> getInstancesResult.ids()[0]))
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default_command = alicloud.ecs.Command("defaultCommand",
        command_content="bHMK",
        description="terraform-example",
        type="RunShellScript",
        working_dir="/root")
    default_instances = alicloud.ecs.get_instances(status="Running")
    default_ecs_invocation = alicloud.ecs.EcsInvocation("defaultEcsInvocation",
        command_id=default_command.id,
        instance_ids=[default_instances.ids[0]])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const defaultCommand = new alicloud.ecs.Command("defaultCommand", {
        commandContent: "bHMK",
        description: "terraform-example",
        type: "RunShellScript",
        workingDir: "/root",
    });
    const defaultInstances = alicloud.ecs.getInstances({
        status: "Running",
    });
    const defaultEcsInvocation = new alicloud.ecs.EcsInvocation("defaultEcsInvocation", {
        commandId: defaultCommand.id,
        instanceIds: [defaultInstances.then(defaultInstances => defaultInstances.ids?.[0])],
    });
    
    resources:
      defaultCommand:
        type: alicloud:ecs:Command
        properties:
          commandContent: bHMK
          description: terraform-example
          type: RunShellScript
          workingDir: /root
      defaultEcsInvocation:
        type: alicloud:ecs:EcsInvocation
        properties:
          commandId: ${defaultCommand.id}
          instanceIds:
            - ${defaultInstances.ids[0]}
    variables:
      defaultInstances:
        fn::invoke:
          Function: alicloud:ecs:getInstances
          Arguments:
            status: Running
    

    Create EcsInvocation Resource

    new EcsInvocation(name: string, args: EcsInvocationArgs, opts?: CustomResourceOptions);
    @overload
    def EcsInvocation(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      command_id: Optional[str] = None,
                      frequency: Optional[str] = None,
                      instance_ids: Optional[Sequence[str]] = None,
                      parameters: Optional[Mapping[str, Any]] = None,
                      repeat_mode: Optional[str] = None,
                      timed: Optional[bool] = None,
                      username: Optional[str] = None,
                      windows_password_name: Optional[str] = None)
    @overload
    def EcsInvocation(resource_name: str,
                      args: EcsInvocationArgs,
                      opts: Optional[ResourceOptions] = None)
    func NewEcsInvocation(ctx *Context, name string, args EcsInvocationArgs, opts ...ResourceOption) (*EcsInvocation, error)
    public EcsInvocation(string name, EcsInvocationArgs args, CustomResourceOptions? opts = null)
    public EcsInvocation(String name, EcsInvocationArgs args)
    public EcsInvocation(String name, EcsInvocationArgs args, CustomResourceOptions options)
    
    type: alicloud:ecs:EcsInvocation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args EcsInvocationArgs
    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 EcsInvocationArgs
    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 EcsInvocationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EcsInvocationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EcsInvocationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    EcsInvocation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The EcsInvocation resource accepts the following input properties:

    CommandId string

    The ID of the command.

    InstanceIds List<string>

    The list of instances to execute the command. You can specify up to 50 instance IDs.

    Frequency string

    The schedule on which the recurring execution of the command takes place. Take note of the following items:

    • The interval between two consecutive executions must be 10 seconds or longer. The minimum interval cannot be less than the timeout period of the execution.
    • When you set Timed to true, you must specify Frequency.
    • The value of the Frequency parameter is a cron expression. For more information, see Cron expression.
    Parameters Dictionary<string, object>

    The key-value pairs of custom parameters to be passed in when the custom parameter feature is enabled. Number of custom parameters: 0 to 10.

    RepeatMode string

    Specifies how to run the command. Valid values: Once, Period, NextRebootOnly, EveryReboot. Default value: When timed is set to false and Frequency is not specified, the default value of repeat_mode is Once. When Timed is set to true and Frequency is specified, period is used as the value of RepeatMode regardless of whether repeat_mode is specified.

    Timed bool

    Specifies whether to periodically run the command. Default value: false.

    Username string

    The username that is used to run the command on the ECS instance.

    • For Linux instances, the root username is used.
    • For Windows instances, the System username is used.
    • You can also specify other usernames that already exist in the ECS instance to run the command. It is more secure to run Cloud Assistant commands as a regular user. For more information, see Configure a regular user to run Cloud Assistant commands.
    WindowsPasswordName string

    The name of the password used to run the command on a Windows instance.

    CommandId string

    The ID of the command.

    InstanceIds []string

    The list of instances to execute the command. You can specify up to 50 instance IDs.

    Frequency string

    The schedule on which the recurring execution of the command takes place. Take note of the following items:

    • The interval between two consecutive executions must be 10 seconds or longer. The minimum interval cannot be less than the timeout period of the execution.
    • When you set Timed to true, you must specify Frequency.
    • The value of the Frequency parameter is a cron expression. For more information, see Cron expression.
    Parameters map[string]interface{}

    The key-value pairs of custom parameters to be passed in when the custom parameter feature is enabled. Number of custom parameters: 0 to 10.

    RepeatMode string

    Specifies how to run the command. Valid values: Once, Period, NextRebootOnly, EveryReboot. Default value: When timed is set to false and Frequency is not specified, the default value of repeat_mode is Once. When Timed is set to true and Frequency is specified, period is used as the value of RepeatMode regardless of whether repeat_mode is specified.

    Timed bool

    Specifies whether to periodically run the command. Default value: false.

    Username string

    The username that is used to run the command on the ECS instance.

    • For Linux instances, the root username is used.
    • For Windows instances, the System username is used.
    • You can also specify other usernames that already exist in the ECS instance to run the command. It is more secure to run Cloud Assistant commands as a regular user. For more information, see Configure a regular user to run Cloud Assistant commands.
    WindowsPasswordName string

    The name of the password used to run the command on a Windows instance.

    commandId String

    The ID of the command.

    instanceIds List<String>

    The list of instances to execute the command. You can specify up to 50 instance IDs.

    frequency String

    The schedule on which the recurring execution of the command takes place. Take note of the following items:

    • The interval between two consecutive executions must be 10 seconds or longer. The minimum interval cannot be less than the timeout period of the execution.
    • When you set Timed to true, you must specify Frequency.
    • The value of the Frequency parameter is a cron expression. For more information, see Cron expression.
    parameters Map<String,Object>

    The key-value pairs of custom parameters to be passed in when the custom parameter feature is enabled. Number of custom parameters: 0 to 10.

    repeatMode String

    Specifies how to run the command. Valid values: Once, Period, NextRebootOnly, EveryReboot. Default value: When timed is set to false and Frequency is not specified, the default value of repeat_mode is Once. When Timed is set to true and Frequency is specified, period is used as the value of RepeatMode regardless of whether repeat_mode is specified.

    timed Boolean

    Specifies whether to periodically run the command. Default value: false.

    username String

    The username that is used to run the command on the ECS instance.

    • For Linux instances, the root username is used.
    • For Windows instances, the System username is used.
    • You can also specify other usernames that already exist in the ECS instance to run the command. It is more secure to run Cloud Assistant commands as a regular user. For more information, see Configure a regular user to run Cloud Assistant commands.
    windowsPasswordName String

    The name of the password used to run the command on a Windows instance.

    commandId string

    The ID of the command.

    instanceIds string[]

    The list of instances to execute the command. You can specify up to 50 instance IDs.

    frequency string

    The schedule on which the recurring execution of the command takes place. Take note of the following items:

    • The interval between two consecutive executions must be 10 seconds or longer. The minimum interval cannot be less than the timeout period of the execution.
    • When you set Timed to true, you must specify Frequency.
    • The value of the Frequency parameter is a cron expression. For more information, see Cron expression.
    parameters {[key: string]: any}

    The key-value pairs of custom parameters to be passed in when the custom parameter feature is enabled. Number of custom parameters: 0 to 10.

    repeatMode string

    Specifies how to run the command. Valid values: Once, Period, NextRebootOnly, EveryReboot. Default value: When timed is set to false and Frequency is not specified, the default value of repeat_mode is Once. When Timed is set to true and Frequency is specified, period is used as the value of RepeatMode regardless of whether repeat_mode is specified.

    timed boolean

    Specifies whether to periodically run the command. Default value: false.

    username string

    The username that is used to run the command on the ECS instance.

    • For Linux instances, the root username is used.
    • For Windows instances, the System username is used.
    • You can also specify other usernames that already exist in the ECS instance to run the command. It is more secure to run Cloud Assistant commands as a regular user. For more information, see Configure a regular user to run Cloud Assistant commands.
    windowsPasswordName string

    The name of the password used to run the command on a Windows instance.

    command_id str

    The ID of the command.

    instance_ids Sequence[str]

    The list of instances to execute the command. You can specify up to 50 instance IDs.

    frequency str

    The schedule on which the recurring execution of the command takes place. Take note of the following items:

    • The interval between two consecutive executions must be 10 seconds or longer. The minimum interval cannot be less than the timeout period of the execution.
    • When you set Timed to true, you must specify Frequency.
    • The value of the Frequency parameter is a cron expression. For more information, see Cron expression.
    parameters Mapping[str, Any]

    The key-value pairs of custom parameters to be passed in when the custom parameter feature is enabled. Number of custom parameters: 0 to 10.

    repeat_mode str

    Specifies how to run the command. Valid values: Once, Period, NextRebootOnly, EveryReboot. Default value: When timed is set to false and Frequency is not specified, the default value of repeat_mode is Once. When Timed is set to true and Frequency is specified, period is used as the value of RepeatMode regardless of whether repeat_mode is specified.

    timed bool

    Specifies whether to periodically run the command. Default value: false.

    username str

    The username that is used to run the command on the ECS instance.

    • For Linux instances, the root username is used.
    • For Windows instances, the System username is used.
    • You can also specify other usernames that already exist in the ECS instance to run the command. It is more secure to run Cloud Assistant commands as a regular user. For more information, see Configure a regular user to run Cloud Assistant commands.
    windows_password_name str

    The name of the password used to run the command on a Windows instance.

    commandId String

    The ID of the command.

    instanceIds List<String>

    The list of instances to execute the command. You can specify up to 50 instance IDs.

    frequency String

    The schedule on which the recurring execution of the command takes place. Take note of the following items:

    • The interval between two consecutive executions must be 10 seconds or longer. The minimum interval cannot be less than the timeout period of the execution.
    • When you set Timed to true, you must specify Frequency.
    • The value of the Frequency parameter is a cron expression. For more information, see Cron expression.
    parameters Map<Any>

    The key-value pairs of custom parameters to be passed in when the custom parameter feature is enabled. Number of custom parameters: 0 to 10.

    repeatMode String

    Specifies how to run the command. Valid values: Once, Period, NextRebootOnly, EveryReboot. Default value: When timed is set to false and Frequency is not specified, the default value of repeat_mode is Once. When Timed is set to true and Frequency is specified, period is used as the value of RepeatMode regardless of whether repeat_mode is specified.

    timed Boolean

    Specifies whether to periodically run the command. Default value: false.

    username String

    The username that is used to run the command on the ECS instance.

    • For Linux instances, the root username is used.
    • For Windows instances, the System username is used.
    • You can also specify other usernames that already exist in the ECS instance to run the command. It is more secure to run Cloud Assistant commands as a regular user. For more information, see Configure a regular user to run Cloud Assistant commands.
    windowsPasswordName String

    The name of the password used to run the command on a Windows instance.

    Outputs

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

    Id string

    The provider-assigned unique ID for this managed resource.

    Status string

    The status of the resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    Status string

    The status of the resource.

    id String

    The provider-assigned unique ID for this managed resource.

    status String

    The status of the resource.

    id string

    The provider-assigned unique ID for this managed resource.

    status string

    The status of the resource.

    id str

    The provider-assigned unique ID for this managed resource.

    status str

    The status of the resource.

    id String

    The provider-assigned unique ID for this managed resource.

    status String

    The status of the resource.

    Look up Existing EcsInvocation Resource

    Get an existing EcsInvocation 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?: EcsInvocationState, opts?: CustomResourceOptions): EcsInvocation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            command_id: Optional[str] = None,
            frequency: Optional[str] = None,
            instance_ids: Optional[Sequence[str]] = None,
            parameters: Optional[Mapping[str, Any]] = None,
            repeat_mode: Optional[str] = None,
            status: Optional[str] = None,
            timed: Optional[bool] = None,
            username: Optional[str] = None,
            windows_password_name: Optional[str] = None) -> EcsInvocation
    func GetEcsInvocation(ctx *Context, name string, id IDInput, state *EcsInvocationState, opts ...ResourceOption) (*EcsInvocation, error)
    public static EcsInvocation Get(string name, Input<string> id, EcsInvocationState? state, CustomResourceOptions? opts = null)
    public static EcsInvocation get(String name, Output<String> id, EcsInvocationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    CommandId string

    The ID of the command.

    Frequency string

    The schedule on which the recurring execution of the command takes place. Take note of the following items:

    • The interval between two consecutive executions must be 10 seconds or longer. The minimum interval cannot be less than the timeout period of the execution.
    • When you set Timed to true, you must specify Frequency.
    • The value of the Frequency parameter is a cron expression. For more information, see Cron expression.
    InstanceIds List<string>

    The list of instances to execute the command. You can specify up to 50 instance IDs.

    Parameters Dictionary<string, object>

    The key-value pairs of custom parameters to be passed in when the custom parameter feature is enabled. Number of custom parameters: 0 to 10.

    RepeatMode string

    Specifies how to run the command. Valid values: Once, Period, NextRebootOnly, EveryReboot. Default value: When timed is set to false and Frequency is not specified, the default value of repeat_mode is Once. When Timed is set to true and Frequency is specified, period is used as the value of RepeatMode regardless of whether repeat_mode is specified.

    Status string

    The status of the resource.

    Timed bool

    Specifies whether to periodically run the command. Default value: false.

    Username string

    The username that is used to run the command on the ECS instance.

    • For Linux instances, the root username is used.
    • For Windows instances, the System username is used.
    • You can also specify other usernames that already exist in the ECS instance to run the command. It is more secure to run Cloud Assistant commands as a regular user. For more information, see Configure a regular user to run Cloud Assistant commands.
    WindowsPasswordName string

    The name of the password used to run the command on a Windows instance.

    CommandId string

    The ID of the command.

    Frequency string

    The schedule on which the recurring execution of the command takes place. Take note of the following items:

    • The interval between two consecutive executions must be 10 seconds or longer. The minimum interval cannot be less than the timeout period of the execution.
    • When you set Timed to true, you must specify Frequency.
    • The value of the Frequency parameter is a cron expression. For more information, see Cron expression.
    InstanceIds []string

    The list of instances to execute the command. You can specify up to 50 instance IDs.

    Parameters map[string]interface{}

    The key-value pairs of custom parameters to be passed in when the custom parameter feature is enabled. Number of custom parameters: 0 to 10.

    RepeatMode string

    Specifies how to run the command. Valid values: Once, Period, NextRebootOnly, EveryReboot. Default value: When timed is set to false and Frequency is not specified, the default value of repeat_mode is Once. When Timed is set to true and Frequency is specified, period is used as the value of RepeatMode regardless of whether repeat_mode is specified.

    Status string

    The status of the resource.

    Timed bool

    Specifies whether to periodically run the command. Default value: false.

    Username string

    The username that is used to run the command on the ECS instance.

    • For Linux instances, the root username is used.
    • For Windows instances, the System username is used.
    • You can also specify other usernames that already exist in the ECS instance to run the command. It is more secure to run Cloud Assistant commands as a regular user. For more information, see Configure a regular user to run Cloud Assistant commands.
    WindowsPasswordName string

    The name of the password used to run the command on a Windows instance.

    commandId String

    The ID of the command.

    frequency String

    The schedule on which the recurring execution of the command takes place. Take note of the following items:

    • The interval between two consecutive executions must be 10 seconds or longer. The minimum interval cannot be less than the timeout period of the execution.
    • When you set Timed to true, you must specify Frequency.
    • The value of the Frequency parameter is a cron expression. For more information, see Cron expression.
    instanceIds List<String>

    The list of instances to execute the command. You can specify up to 50 instance IDs.

    parameters Map<String,Object>

    The key-value pairs of custom parameters to be passed in when the custom parameter feature is enabled. Number of custom parameters: 0 to 10.

    repeatMode String

    Specifies how to run the command. Valid values: Once, Period, NextRebootOnly, EveryReboot. Default value: When timed is set to false and Frequency is not specified, the default value of repeat_mode is Once. When Timed is set to true and Frequency is specified, period is used as the value of RepeatMode regardless of whether repeat_mode is specified.

    status String

    The status of the resource.

    timed Boolean

    Specifies whether to periodically run the command. Default value: false.

    username String

    The username that is used to run the command on the ECS instance.

    • For Linux instances, the root username is used.
    • For Windows instances, the System username is used.
    • You can also specify other usernames that already exist in the ECS instance to run the command. It is more secure to run Cloud Assistant commands as a regular user. For more information, see Configure a regular user to run Cloud Assistant commands.
    windowsPasswordName String

    The name of the password used to run the command on a Windows instance.

    commandId string

    The ID of the command.

    frequency string

    The schedule on which the recurring execution of the command takes place. Take note of the following items:

    • The interval between two consecutive executions must be 10 seconds or longer. The minimum interval cannot be less than the timeout period of the execution.
    • When you set Timed to true, you must specify Frequency.
    • The value of the Frequency parameter is a cron expression. For more information, see Cron expression.
    instanceIds string[]

    The list of instances to execute the command. You can specify up to 50 instance IDs.

    parameters {[key: string]: any}

    The key-value pairs of custom parameters to be passed in when the custom parameter feature is enabled. Number of custom parameters: 0 to 10.

    repeatMode string

    Specifies how to run the command. Valid values: Once, Period, NextRebootOnly, EveryReboot. Default value: When timed is set to false and Frequency is not specified, the default value of repeat_mode is Once. When Timed is set to true and Frequency is specified, period is used as the value of RepeatMode regardless of whether repeat_mode is specified.

    status string

    The status of the resource.

    timed boolean

    Specifies whether to periodically run the command. Default value: false.

    username string

    The username that is used to run the command on the ECS instance.

    • For Linux instances, the root username is used.
    • For Windows instances, the System username is used.
    • You can also specify other usernames that already exist in the ECS instance to run the command. It is more secure to run Cloud Assistant commands as a regular user. For more information, see Configure a regular user to run Cloud Assistant commands.
    windowsPasswordName string

    The name of the password used to run the command on a Windows instance.

    command_id str

    The ID of the command.

    frequency str

    The schedule on which the recurring execution of the command takes place. Take note of the following items:

    • The interval between two consecutive executions must be 10 seconds or longer. The minimum interval cannot be less than the timeout period of the execution.
    • When you set Timed to true, you must specify Frequency.
    • The value of the Frequency parameter is a cron expression. For more information, see Cron expression.
    instance_ids Sequence[str]

    The list of instances to execute the command. You can specify up to 50 instance IDs.

    parameters Mapping[str, Any]

    The key-value pairs of custom parameters to be passed in when the custom parameter feature is enabled. Number of custom parameters: 0 to 10.

    repeat_mode str

    Specifies how to run the command. Valid values: Once, Period, NextRebootOnly, EveryReboot. Default value: When timed is set to false and Frequency is not specified, the default value of repeat_mode is Once. When Timed is set to true and Frequency is specified, period is used as the value of RepeatMode regardless of whether repeat_mode is specified.

    status str

    The status of the resource.

    timed bool

    Specifies whether to periodically run the command. Default value: false.

    username str

    The username that is used to run the command on the ECS instance.

    • For Linux instances, the root username is used.
    • For Windows instances, the System username is used.
    • You can also specify other usernames that already exist in the ECS instance to run the command. It is more secure to run Cloud Assistant commands as a regular user. For more information, see Configure a regular user to run Cloud Assistant commands.
    windows_password_name str

    The name of the password used to run the command on a Windows instance.

    commandId String

    The ID of the command.

    frequency String

    The schedule on which the recurring execution of the command takes place. Take note of the following items:

    • The interval between two consecutive executions must be 10 seconds or longer. The minimum interval cannot be less than the timeout period of the execution.
    • When you set Timed to true, you must specify Frequency.
    • The value of the Frequency parameter is a cron expression. For more information, see Cron expression.
    instanceIds List<String>

    The list of instances to execute the command. You can specify up to 50 instance IDs.

    parameters Map<Any>

    The key-value pairs of custom parameters to be passed in when the custom parameter feature is enabled. Number of custom parameters: 0 to 10.

    repeatMode String

    Specifies how to run the command. Valid values: Once, Period, NextRebootOnly, EveryReboot. Default value: When timed is set to false and Frequency is not specified, the default value of repeat_mode is Once. When Timed is set to true and Frequency is specified, period is used as the value of RepeatMode regardless of whether repeat_mode is specified.

    status String

    The status of the resource.

    timed Boolean

    Specifies whether to periodically run the command. Default value: false.

    username String

    The username that is used to run the command on the ECS instance.

    • For Linux instances, the root username is used.
    • For Windows instances, the System username is used.
    • You can also specify other usernames that already exist in the ECS instance to run the command. It is more secure to run Cloud Assistant commands as a regular user. For more information, see Configure a regular user to run Cloud Assistant commands.
    windowsPasswordName String

    The name of the password used to run the command on a Windows instance.

    Import

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

     $ pulumi import alicloud:ecs/ecsInvocation:EcsInvocation example <id>
    

    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.43.1 published on Monday, Sep 11, 2023 by Pulumi