Command Args
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
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.ecs.Command("example", {
name: "tf-testAcc",
commandContent: "bHMK",
description: "For Terraform Test",
type: "RunShellScript",
workingDir: "/root",
});
Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.ecs.Command("example",
name="tf-testAcc",
command_content="bHMK",
description="For Terraform Test",
type="RunShellScript",
working_dir="/root")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = new AliCloud.Ecs.Command("example", new()
{
Name = "tf-testAcc",
CommandContent = "bHMK",
Description = "For Terraform Test",
Type = "RunShellScript",
WorkingDir = "/root",
});
});
Content copied to clipboard
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 {
_, err := ecs.NewCommand(ctx, "example", &ecs.CommandArgs{
Name: pulumi.String("tf-testAcc"),
CommandContent: pulumi.String("bHMK"),
Description: pulumi.String("For Terraform Test"),
Type: pulumi.String("RunShellScript"),
WorkingDir: pulumi.String("/root"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
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()
.name("tf-testAcc")
.commandContent("bHMK")
.description("For Terraform Test")
.type("RunShellScript")
.workingDir("/root")
.build());
}
}
Content copied to clipboard
resources:
example:
type: alicloud:ecs:Command
properties:
name: tf-testAcc
commandContent: bHMK
description: For Terraform Test
type: RunShellScript
workingDir: /root
Content copied to clipboard
Import
ECS Command can be imported using the id, e.g.
$ pulumi import alicloud:ecs/command:Command example <id>
Content copied to clipboard
Constructors
Properties
Link copied to clipboard
The Base64-encoded content of the command.
Link copied to clipboard
The description of command.
Link copied to clipboard
Specifies whether to use custom parameters in the command to be created. Default to: false.
Link copied to clipboard
The execution path of the command in the ECS instance.