1. Packages
  2. Volcengine
  3. API Docs
  4. ecs
  5. Command
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine

volcengine.ecs.Command

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine

    Provides a resource to manage ecs command

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.ecs.Command("foo", {
        commandContent: "IyEvYmluL2Jhc2gKCgplY2hvICJvcGVyYXRpb24gc3VjY2VzcyEi",
        description: "tf",
        timeout: 100,
        username: "root",
        workingDir: "/home",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.ecs.Command("foo",
        command_content="IyEvYmluL2Jhc2gKCgplY2hvICJvcGVyYXRpb24gc3VjY2VzcyEi",
        description="tf",
        timeout=100,
        username="root",
        working_dir="/home")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ecs.NewCommand(ctx, "foo", &ecs.CommandArgs{
    			CommandContent: pulumi.String("IyEvYmluL2Jhc2gKCgplY2hvICJvcGVyYXRpb24gc3VjY2VzcyEi"),
    			Description:    pulumi.String("tf"),
    			Timeout:        pulumi.Int(100),
    			Username:       pulumi.String("root"),
    			WorkingDir:     pulumi.String("/home"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Volcengine.Ecs.Command("foo", new()
        {
            CommandContent = "IyEvYmluL2Jhc2gKCgplY2hvICJvcGVyYXRpb24gc3VjY2VzcyEi",
            Description = "tf",
            Timeout = 100,
            Username = "root",
            WorkingDir = "/home",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.ecs.Command;
    import com.pulumi.volcengine.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 foo = new Command("foo", CommandArgs.builder()        
                .commandContent("IyEvYmluL2Jhc2gKCgplY2hvICJvcGVyYXRpb24gc3VjY2VzcyEi")
                .description("tf")
                .timeout(100)
                .username("root")
                .workingDir("/home")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: volcengine:ecs:Command
        properties:
          commandContent: IyEvYmluL2Jhc2gKCgplY2hvICJvcGVyYXRpb24gc3VjY2VzcyEi
          description: tf
          timeout: 100
          username: root
          workingDir: /home
    

    Create Command Resource

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

    Constructor syntax

    new Command(name: string, args: CommandArgs, opts?: CustomResourceOptions);
    @overload
    def Command(resource_name: str,
                args: CommandArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Command(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                command_content: Optional[str] = None,
                description: Optional[str] = None,
                name: Optional[str] = None,
                timeout: Optional[int] = None,
                username: Optional[str] = None,
                working_dir: Optional[str] = None)
    func NewCommand(ctx *Context, name string, args CommandArgs, opts ...ResourceOption) (*Command, error)
    public Command(string name, CommandArgs args, CustomResourceOptions? opts = null)
    public Command(String name, CommandArgs args)
    public Command(String name, CommandArgs args, CustomResourceOptions options)
    
    type: volcengine:ecs:Command
    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 CommandArgs
    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 CommandArgs
    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 CommandArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CommandArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CommandArgs
    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 commandResource = new Volcengine.Ecs.Command("commandResource", new()
    {
        CommandContent = "string",
        Description = "string",
        Name = "string",
        Timeout = 0,
        Username = "string",
        WorkingDir = "string",
    });
    
    example, err := ecs.NewCommand(ctx, "commandResource", &ecs.CommandArgs{
    	CommandContent: pulumi.String("string"),
    	Description:    pulumi.String("string"),
    	Name:           pulumi.String("string"),
    	Timeout:        pulumi.Int(0),
    	Username:       pulumi.String("string"),
    	WorkingDir:     pulumi.String("string"),
    })
    
    var commandResource = new Command("commandResource", CommandArgs.builder()
        .commandContent("string")
        .description("string")
        .name("string")
        .timeout(0)
        .username("string")
        .workingDir("string")
        .build());
    
    command_resource = volcengine.ecs.Command("commandResource",
        command_content="string",
        description="string",
        name="string",
        timeout=0,
        username="string",
        working_dir="string")
    
    const commandResource = new volcengine.ecs.Command("commandResource", {
        commandContent: "string",
        description: "string",
        name: "string",
        timeout: 0,
        username: "string",
        workingDir: "string",
    });
    
    type: volcengine:ecs:Command
    properties:
        commandContent: string
        description: string
        name: string
        timeout: 0
        username: string
        workingDir: string
    

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

    CommandContent string
    The base64 encoded content of the ecs command.
    Description string
    The description of the ecs command.
    Name string
    The name of the ecs command.
    Timeout int
    The timeout of the ecs command. Valid value range: 10-600.
    Username string
    The username of the ecs command.
    WorkingDir string
    The working directory of the ecs command.
    CommandContent string
    The base64 encoded content of the ecs command.
    Description string
    The description of the ecs command.
    Name string
    The name of the ecs command.
    Timeout int
    The timeout of the ecs command. Valid value range: 10-600.
    Username string
    The username of the ecs command.
    WorkingDir string
    The working directory of the ecs command.
    commandContent String
    The base64 encoded content of the ecs command.
    description String
    The description of the ecs command.
    name String
    The name of the ecs command.
    timeout Integer
    The timeout of the ecs command. Valid value range: 10-600.
    username String
    The username of the ecs command.
    workingDir String
    The working directory of the ecs command.
    commandContent string
    The base64 encoded content of the ecs command.
    description string
    The description of the ecs command.
    name string
    The name of the ecs command.
    timeout number
    The timeout of the ecs command. Valid value range: 10-600.
    username string
    The username of the ecs command.
    workingDir string
    The working directory of the ecs command.
    command_content str
    The base64 encoded content of the ecs command.
    description str
    The description of the ecs command.
    name str
    The name of the ecs command.
    timeout int
    The timeout of the ecs command. Valid value range: 10-600.
    username str
    The username of the ecs command.
    working_dir str
    The working directory of the ecs command.
    commandContent String
    The base64 encoded content of the ecs command.
    description String
    The description of the ecs command.
    name String
    The name of the ecs command.
    timeout Number
    The timeout of the ecs command. Valid value range: 10-600.
    username String
    The username of the ecs command.
    workingDir String
    The working directory of the ecs command.

    Outputs

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

    CreatedAt string
    The create time of the ecs command.
    Id string
    The provider-assigned unique ID for this managed resource.
    InvocationTimes int
    The invocation times of the ecs command. Public commands do not display the invocation times.
    UpdatedAt string
    The update time of the ecs command.
    CreatedAt string
    The create time of the ecs command.
    Id string
    The provider-assigned unique ID for this managed resource.
    InvocationTimes int
    The invocation times of the ecs command. Public commands do not display the invocation times.
    UpdatedAt string
    The update time of the ecs command.
    createdAt String
    The create time of the ecs command.
    id String
    The provider-assigned unique ID for this managed resource.
    invocationTimes Integer
    The invocation times of the ecs command. Public commands do not display the invocation times.
    updatedAt String
    The update time of the ecs command.
    createdAt string
    The create time of the ecs command.
    id string
    The provider-assigned unique ID for this managed resource.
    invocationTimes number
    The invocation times of the ecs command. Public commands do not display the invocation times.
    updatedAt string
    The update time of the ecs command.
    created_at str
    The create time of the ecs command.
    id str
    The provider-assigned unique ID for this managed resource.
    invocation_times int
    The invocation times of the ecs command. Public commands do not display the invocation times.
    updated_at str
    The update time of the ecs command.
    createdAt String
    The create time of the ecs command.
    id String
    The provider-assigned unique ID for this managed resource.
    invocationTimes Number
    The invocation times of the ecs command. Public commands do not display the invocation times.
    updatedAt String
    The update time of the ecs command.

    Look up Existing Command Resource

    Get an existing Command 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?: CommandState, opts?: CustomResourceOptions): Command
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            command_content: Optional[str] = None,
            created_at: Optional[str] = None,
            description: Optional[str] = None,
            invocation_times: Optional[int] = None,
            name: Optional[str] = None,
            timeout: Optional[int] = None,
            updated_at: Optional[str] = None,
            username: Optional[str] = None,
            working_dir: Optional[str] = None) -> Command
    func GetCommand(ctx *Context, name string, id IDInput, state *CommandState, opts ...ResourceOption) (*Command, error)
    public static Command Get(string name, Input<string> id, CommandState? state, CustomResourceOptions? opts = null)
    public static Command get(String name, Output<String> id, CommandState 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:
    CommandContent string
    The base64 encoded content of the ecs command.
    CreatedAt string
    The create time of the ecs command.
    Description string
    The description of the ecs command.
    InvocationTimes int
    The invocation times of the ecs command. Public commands do not display the invocation times.
    Name string
    The name of the ecs command.
    Timeout int
    The timeout of the ecs command. Valid value range: 10-600.
    UpdatedAt string
    The update time of the ecs command.
    Username string
    The username of the ecs command.
    WorkingDir string
    The working directory of the ecs command.
    CommandContent string
    The base64 encoded content of the ecs command.
    CreatedAt string
    The create time of the ecs command.
    Description string
    The description of the ecs command.
    InvocationTimes int
    The invocation times of the ecs command. Public commands do not display the invocation times.
    Name string
    The name of the ecs command.
    Timeout int
    The timeout of the ecs command. Valid value range: 10-600.
    UpdatedAt string
    The update time of the ecs command.
    Username string
    The username of the ecs command.
    WorkingDir string
    The working directory of the ecs command.
    commandContent String
    The base64 encoded content of the ecs command.
    createdAt String
    The create time of the ecs command.
    description String
    The description of the ecs command.
    invocationTimes Integer
    The invocation times of the ecs command. Public commands do not display the invocation times.
    name String
    The name of the ecs command.
    timeout Integer
    The timeout of the ecs command. Valid value range: 10-600.
    updatedAt String
    The update time of the ecs command.
    username String
    The username of the ecs command.
    workingDir String
    The working directory of the ecs command.
    commandContent string
    The base64 encoded content of the ecs command.
    createdAt string
    The create time of the ecs command.
    description string
    The description of the ecs command.
    invocationTimes number
    The invocation times of the ecs command. Public commands do not display the invocation times.
    name string
    The name of the ecs command.
    timeout number
    The timeout of the ecs command. Valid value range: 10-600.
    updatedAt string
    The update time of the ecs command.
    username string
    The username of the ecs command.
    workingDir string
    The working directory of the ecs command.
    command_content str
    The base64 encoded content of the ecs command.
    created_at str
    The create time of the ecs command.
    description str
    The description of the ecs command.
    invocation_times int
    The invocation times of the ecs command. Public commands do not display the invocation times.
    name str
    The name of the ecs command.
    timeout int
    The timeout of the ecs command. Valid value range: 10-600.
    updated_at str
    The update time of the ecs command.
    username str
    The username of the ecs command.
    working_dir str
    The working directory of the ecs command.
    commandContent String
    The base64 encoded content of the ecs command.
    createdAt String
    The create time of the ecs command.
    description String
    The description of the ecs command.
    invocationTimes Number
    The invocation times of the ecs command. Public commands do not display the invocation times.
    name String
    The name of the ecs command.
    timeout Number
    The timeout of the ecs command. Valid value range: 10-600.
    updatedAt String
    The update time of the ecs command.
    username String
    The username of the ecs command.
    workingDir String
    The working directory of the ecs command.

    Import

    EcsCommand can be imported using the id, e.g.

    $ pulumi import volcengine:ecs/command:Command default cmd-ychkepkhtim0tr3bcsw1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine