Command

Provides a ECS Command resource. For information about ECS Command and how to use it, see What is Command.

NOTE: Available in v1.116.0+.

Example Usage

Basic Usage

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 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 example = new Command("example", CommandArgs.builder()
.commandContent("bHMK")
.description("For Terraform Test")
.type("RunShellScript")
.workingDir("/root")
.build());
}
}

Import

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

$ pulumi import alicloud:ecs/command:Command example <id>

Properties

Link copied to clipboard
val commandContent: Output<String>

The Base64-encoded content of the command.

Link copied to clipboard
val description: Output<String>?

The description of command.

Link copied to clipboard
val enableParameter: Output<Boolean>?

Specifies whether to use custom parameters in the command to be created. Default to: false.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the command, which supports all character sets. It can be up to 128 characters in length.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val timeout: Output<Int>?

The timeout period that is specified for the command to be run on ECS instances. Unit: seconds. Default to: 60.

Link copied to clipboard
val type: Output<String>

The command type. Valid Values: RunBatScript, RunPowerShellScript and RunShellScript.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val workingDir: Output<String>?

The execution path of the command in the ECS instance.