CommandArgs

data class CommandArgs(val commandContent: Output<String>? = null, val description: Output<String>? = null, val enableParameter: Output<Boolean>? = null, val name: Output<String>? = null, val timeout: Output<Int>? = null, val type: Output<String>? = null, val workingDir: Output<String>? = null) : ConvertibleToJava<CommandArgs>

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>

Constructors

Link copied to clipboard
fun CommandArgs(commandContent: Output<String>? = null, description: Output<String>? = null, enableParameter: Output<Boolean>? = null, name: Output<String>? = null, timeout: Output<Int>? = null, type: Output<String>? = null, workingDir: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): CommandArgs

Properties

Link copied to clipboard
val commandContent: Output<String>? = null

The Base64-encoded content of the command.

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

The description of command.

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

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

Link copied to clipboard
val name: Output<String>? = null

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

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

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>? = null

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

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

The execution path of the command in the ECS instance.