volcengine.ecs.Command
Explore with Pulumi AI
Provides a resource to manage ecs command
Import
EcsCommand can be imported using the id, e.g.
$ pulumi import volcengine:ecs/command:Command default cmd-ychkepkhtim0tr3bcsw1
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,
enable_parameter: Optional[bool] = None,
name: Optional[str] = None,
parameter_definitions: Optional[Sequence[CommandParameterDefinitionArgs]] = None,
project_name: Optional[str] = None,
tags: Optional[Sequence[CommandTagArgs]] = None,
timeout: Optional[int] = None,
type: Optional[str] = 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",
EnableParameter = false,
Name = "string",
ParameterDefinitions = new[]
{
new Volcengine.Ecs.Inputs.CommandParameterDefinitionArgs
{
Name = "string",
Type = "string",
DecimalPrecision = 0,
DefaultValue = "string",
MaxLength = 0,
MaxValue = "string",
MinLength = 0,
MinValue = "string",
Required = false,
},
},
ProjectName = "string",
Tags = new[]
{
new Volcengine.Ecs.Inputs.CommandTagArgs
{
Key = "string",
Value = "string",
},
},
Timeout = 0,
Type = "string",
Username = "string",
WorkingDir = "string",
});
example, err := ecs.NewCommand(ctx, "commandResource", &ecs.CommandArgs{
CommandContent: pulumi.String("string"),
Description: pulumi.String("string"),
EnableParameter: pulumi.Bool(false),
Name: pulumi.String("string"),
ParameterDefinitions: ecs.CommandParameterDefinitionArray{
&ecs.CommandParameterDefinitionArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
DecimalPrecision: pulumi.Int(0),
DefaultValue: pulumi.String("string"),
MaxLength: pulumi.Int(0),
MaxValue: pulumi.String("string"),
MinLength: pulumi.Int(0),
MinValue: pulumi.String("string"),
Required: pulumi.Bool(false),
},
},
ProjectName: pulumi.String("string"),
Tags: ecs.CommandTagArray{
&ecs.CommandTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Timeout: pulumi.Int(0),
Type: pulumi.String("string"),
Username: pulumi.String("string"),
WorkingDir: pulumi.String("string"),
})
var commandResource = new Command("commandResource", CommandArgs.builder()
.commandContent("string")
.description("string")
.enableParameter(false)
.name("string")
.parameterDefinitions(CommandParameterDefinitionArgs.builder()
.name("string")
.type("string")
.decimalPrecision(0)
.defaultValue("string")
.maxLength(0)
.maxValue("string")
.minLength(0)
.minValue("string")
.required(false)
.build())
.projectName("string")
.tags(CommandTagArgs.builder()
.key("string")
.value("string")
.build())
.timeout(0)
.type("string")
.username("string")
.workingDir("string")
.build());
command_resource = volcengine.ecs.Command("commandResource",
command_content="string",
description="string",
enable_parameter=False,
name="string",
parameter_definitions=[{
"name": "string",
"type": "string",
"decimal_precision": 0,
"default_value": "string",
"max_length": 0,
"max_value": "string",
"min_length": 0,
"min_value": "string",
"required": False,
}],
project_name="string",
tags=[{
"key": "string",
"value": "string",
}],
timeout=0,
type="string",
username="string",
working_dir="string")
const commandResource = new volcengine.ecs.Command("commandResource", {
commandContent: "string",
description: "string",
enableParameter: false,
name: "string",
parameterDefinitions: [{
name: "string",
type: "string",
decimalPrecision: 0,
defaultValue: "string",
maxLength: 0,
maxValue: "string",
minLength: 0,
minValue: "string",
required: false,
}],
projectName: "string",
tags: [{
key: "string",
value: "string",
}],
timeout: 0,
type: "string",
username: "string",
workingDir: "string",
});
type: volcengine:ecs:Command
properties:
commandContent: string
description: string
enableParameter: false
name: string
parameterDefinitions:
- decimalPrecision: 0
defaultValue: string
maxLength: 0
maxValue: string
minLength: 0
minValue: string
name: string
required: false
type: string
projectName: string
tags:
- key: string
value: string
timeout: 0
type: string
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:
- Command
Content string - The base64 encoded content of the ecs command.
- Description string
- The description of the ecs command.
- Enable
Parameter bool - Whether to enable custom parameter. Default is
false
. - Name string
- The name of the ecs command.
- Parameter
Definitions List<CommandParameter Definition> - The custom parameter definitions of the ecs command.
- Project
Name string - The project name of the ecs command.
- List<Command
Tag> - Tags.
- Timeout int
- The timeout of the ecs command. Unit: seconds. Valid value range: 30~86400. Default is 300.
- Type string
- The type of the ecs command. Valid values:
Shell
,Python
,PowerShell
,Bat
. Default isShell
. - Username string
- The username of the ecs command.
- Working
Dir string - The working directory of the ecs command.
- Command
Content string - The base64 encoded content of the ecs command.
- Description string
- The description of the ecs command.
- Enable
Parameter bool - Whether to enable custom parameter. Default is
false
. - Name string
- The name of the ecs command.
- Parameter
Definitions []CommandParameter Definition Args - The custom parameter definitions of the ecs command.
- Project
Name string - The project name of the ecs command.
- []Command
Tag Args - Tags.
- Timeout int
- The timeout of the ecs command. Unit: seconds. Valid value range: 30~86400. Default is 300.
- Type string
- The type of the ecs command. Valid values:
Shell
,Python
,PowerShell
,Bat
. Default isShell
. - Username string
- The username of the ecs command.
- Working
Dir string - The working directory of the ecs command.
- command
Content String - The base64 encoded content of the ecs command.
- description String
- The description of the ecs command.
- enable
Parameter Boolean - Whether to enable custom parameter. Default is
false
. - name String
- The name of the ecs command.
- parameter
Definitions List<CommandParameter Definition> - The custom parameter definitions of the ecs command.
- project
Name String - The project name of the ecs command.
- List<Command
Tag> - Tags.
- timeout Integer
- The timeout of the ecs command. Unit: seconds. Valid value range: 30~86400. Default is 300.
- type String
- The type of the ecs command. Valid values:
Shell
,Python
,PowerShell
,Bat
. Default isShell
. - username String
- The username of the ecs command.
- working
Dir String - The working directory of the ecs command.
- command
Content string - The base64 encoded content of the ecs command.
- description string
- The description of the ecs command.
- enable
Parameter boolean - Whether to enable custom parameter. Default is
false
. - name string
- The name of the ecs command.
- parameter
Definitions CommandParameter Definition[] - The custom parameter definitions of the ecs command.
- project
Name string - The project name of the ecs command.
- Command
Tag[] - Tags.
- timeout number
- The timeout of the ecs command. Unit: seconds. Valid value range: 30~86400. Default is 300.
- type string
- The type of the ecs command. Valid values:
Shell
,Python
,PowerShell
,Bat
. Default isShell
. - username string
- The username of the ecs command.
- working
Dir 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.
- enable_
parameter bool - Whether to enable custom parameter. Default is
false
. - name str
- The name of the ecs command.
- parameter_
definitions Sequence[CommandParameter Definition Args] - The custom parameter definitions of the ecs command.
- project_
name str - The project name of the ecs command.
- Sequence[Command
Tag Args] - Tags.
- timeout int
- The timeout of the ecs command. Unit: seconds. Valid value range: 30~86400. Default is 300.
- type str
- The type of the ecs command. Valid values:
Shell
,Python
,PowerShell
,Bat
. Default isShell
. - username str
- The username of the ecs command.
- working_
dir str - The working directory of the ecs command.
- command
Content String - The base64 encoded content of the ecs command.
- description String
- The description of the ecs command.
- enable
Parameter Boolean - Whether to enable custom parameter. Default is
false
. - name String
- The name of the ecs command.
- parameter
Definitions List<Property Map> - The custom parameter definitions of the ecs command.
- project
Name String - The project name of the ecs command.
- List<Property Map>
- Tags.
- timeout Number
- The timeout of the ecs command. Unit: seconds. Valid value range: 30~86400. Default is 300.
- type String
- The type of the ecs command. Valid values:
Shell
,Python
,PowerShell
,Bat
. Default isShell
. - username String
- The username of the ecs command.
- working
Dir 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:
- Created
At string - The create time of the ecs command.
- Id string
- 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 string - The update time of the ecs command.
- Created
At string - The create time of the ecs command.
- Id string
- 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 string - The update time of the ecs command.
- created
At String - The create time of the ecs command.
- id String
- The provider-assigned unique ID for this managed resource.
- invocation
Times Integer - The invocation times of the ecs command. Public commands do not display the invocation times.
- updated
At String - The update time of the ecs command.
- created
At string - The create time of the ecs command.
- id string
- The provider-assigned unique ID for this managed resource.
- invocation
Times number - The invocation times of the ecs command. Public commands do not display the invocation times.
- updated
At 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.
- created
At String - The create time of the ecs command.
- id String
- The provider-assigned unique ID for this managed resource.
- invocation
Times Number - The invocation times of the ecs command. Public commands do not display the invocation times.
- updated
At 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,
enable_parameter: Optional[bool] = None,
invocation_times: Optional[int] = None,
name: Optional[str] = None,
parameter_definitions: Optional[Sequence[CommandParameterDefinitionArgs]] = None,
project_name: Optional[str] = None,
tags: Optional[Sequence[CommandTagArgs]] = None,
timeout: Optional[int] = None,
type: Optional[str] = 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)
resources: _: type: volcengine:ecs:Command get: id: ${id}
- 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.
- Command
Content string - The base64 encoded content of the ecs command.
- Created
At string - The create time of the ecs command.
- Description string
- The description of the ecs command.
- Enable
Parameter bool - Whether to enable custom parameter. Default is
false
. - Invocation
Times int - The invocation times of the ecs command. Public commands do not display the invocation times.
- Name string
- The name of the ecs command.
- Parameter
Definitions List<CommandParameter Definition> - The custom parameter definitions of the ecs command.
- Project
Name string - The project name of the ecs command.
- List<Command
Tag> - Tags.
- Timeout int
- The timeout of the ecs command. Unit: seconds. Valid value range: 30~86400. Default is 300.
- Type string
- The type of the ecs command. Valid values:
Shell
,Python
,PowerShell
,Bat
. Default isShell
. - Updated
At string - The update time of the ecs command.
- Username string
- The username of the ecs command.
- Working
Dir string - The working directory of the ecs command.
- Command
Content string - The base64 encoded content of the ecs command.
- Created
At string - The create time of the ecs command.
- Description string
- The description of the ecs command.
- Enable
Parameter bool - Whether to enable custom parameter. Default is
false
. - Invocation
Times int - The invocation times of the ecs command. Public commands do not display the invocation times.
- Name string
- The name of the ecs command.
- Parameter
Definitions []CommandParameter Definition Args - The custom parameter definitions of the ecs command.
- Project
Name string - The project name of the ecs command.
- []Command
Tag Args - Tags.
- Timeout int
- The timeout of the ecs command. Unit: seconds. Valid value range: 30~86400. Default is 300.
- Type string
- The type of the ecs command. Valid values:
Shell
,Python
,PowerShell
,Bat
. Default isShell
. - Updated
At string - The update time of the ecs command.
- Username string
- The username of the ecs command.
- Working
Dir string - The working directory of the ecs command.
- command
Content String - The base64 encoded content of the ecs command.
- created
At String - The create time of the ecs command.
- description String
- The description of the ecs command.
- enable
Parameter Boolean - Whether to enable custom parameter. Default is
false
. - invocation
Times Integer - The invocation times of the ecs command. Public commands do not display the invocation times.
- name String
- The name of the ecs command.
- parameter
Definitions List<CommandParameter Definition> - The custom parameter definitions of the ecs command.
- project
Name String - The project name of the ecs command.
- List<Command
Tag> - Tags.
- timeout Integer
- The timeout of the ecs command. Unit: seconds. Valid value range: 30~86400. Default is 300.
- type String
- The type of the ecs command. Valid values:
Shell
,Python
,PowerShell
,Bat
. Default isShell
. - updated
At String - The update time of the ecs command.
- username String
- The username of the ecs command.
- working
Dir String - The working directory of the ecs command.
- command
Content string - The base64 encoded content of the ecs command.
- created
At string - The create time of the ecs command.
- description string
- The description of the ecs command.
- enable
Parameter boolean - Whether to enable custom parameter. Default is
false
. - invocation
Times number - The invocation times of the ecs command. Public commands do not display the invocation times.
- name string
- The name of the ecs command.
- parameter
Definitions CommandParameter Definition[] - The custom parameter definitions of the ecs command.
- project
Name string - The project name of the ecs command.
- Command
Tag[] - Tags.
- timeout number
- The timeout of the ecs command. Unit: seconds. Valid value range: 30~86400. Default is 300.
- type string
- The type of the ecs command. Valid values:
Shell
,Python
,PowerShell
,Bat
. Default isShell
. - updated
At string - The update time of the ecs command.
- username string
- The username of the ecs command.
- working
Dir 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.
- enable_
parameter bool - Whether to enable custom parameter. Default is
false
. - 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.
- parameter_
definitions Sequence[CommandParameter Definition Args] - The custom parameter definitions of the ecs command.
- project_
name str - The project name of the ecs command.
- Sequence[Command
Tag Args] - Tags.
- timeout int
- The timeout of the ecs command. Unit: seconds. Valid value range: 30~86400. Default is 300.
- type str
- The type of the ecs command. Valid values:
Shell
,Python
,PowerShell
,Bat
. Default isShell
. - 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.
- command
Content String - The base64 encoded content of the ecs command.
- created
At String - The create time of the ecs command.
- description String
- The description of the ecs command.
- enable
Parameter Boolean - Whether to enable custom parameter. Default is
false
. - invocation
Times Number - The invocation times of the ecs command. Public commands do not display the invocation times.
- name String
- The name of the ecs command.
- parameter
Definitions List<Property Map> - The custom parameter definitions of the ecs command.
- project
Name String - The project name of the ecs command.
- List<Property Map>
- Tags.
- timeout Number
- The timeout of the ecs command. Unit: seconds. Valid value range: 30~86400. Default is 300.
- type String
- The type of the ecs command. Valid values:
Shell
,Python
,PowerShell
,Bat
. Default isShell
. - updated
At String - The update time of the ecs command.
- username String
- The username of the ecs command.
- working
Dir String - The working directory of the ecs command.
Supporting Types
CommandParameterDefinition, CommandParameterDefinitionArgs
- Name string
- The name of the custom parameter.
- Type string
- The type of the custom parameter. Valid values:
String
,Digit
. - Decimal
Precision int - The decimal precision of the custom parameter. This field is required when the parameter type is
Digit
. - Default
Value string - The default value of the custom parameter.
- Max
Length int - The maximum length of the custom parameter. This field is required when the parameter type is
String
. - Max
Value string - The maximum value of the custom parameter. This field is required when the parameter type is
Digit
. - Min
Length int - The minimum length of the custom parameter. This field is required when the parameter type is
String
. - Min
Value string - The minimum value of the custom parameter. This field is required when the parameter type is
Digit
. - Required bool
- Whether the custom parameter is required.
- Name string
- The name of the custom parameter.
- Type string
- The type of the custom parameter. Valid values:
String
,Digit
. - Decimal
Precision int - The decimal precision of the custom parameter. This field is required when the parameter type is
Digit
. - Default
Value string - The default value of the custom parameter.
- Max
Length int - The maximum length of the custom parameter. This field is required when the parameter type is
String
. - Max
Value string - The maximum value of the custom parameter. This field is required when the parameter type is
Digit
. - Min
Length int - The minimum length of the custom parameter. This field is required when the parameter type is
String
. - Min
Value string - The minimum value of the custom parameter. This field is required when the parameter type is
Digit
. - Required bool
- Whether the custom parameter is required.
- name String
- The name of the custom parameter.
- type String
- The type of the custom parameter. Valid values:
String
,Digit
. - decimal
Precision Integer - The decimal precision of the custom parameter. This field is required when the parameter type is
Digit
. - default
Value String - The default value of the custom parameter.
- max
Length Integer - The maximum length of the custom parameter. This field is required when the parameter type is
String
. - max
Value String - The maximum value of the custom parameter. This field is required when the parameter type is
Digit
. - min
Length Integer - The minimum length of the custom parameter. This field is required when the parameter type is
String
. - min
Value String - The minimum value of the custom parameter. This field is required when the parameter type is
Digit
. - required Boolean
- Whether the custom parameter is required.
- name string
- The name of the custom parameter.
- type string
- The type of the custom parameter. Valid values:
String
,Digit
. - decimal
Precision number - The decimal precision of the custom parameter. This field is required when the parameter type is
Digit
. - default
Value string - The default value of the custom parameter.
- max
Length number - The maximum length of the custom parameter. This field is required when the parameter type is
String
. - max
Value string - The maximum value of the custom parameter. This field is required when the parameter type is
Digit
. - min
Length number - The minimum length of the custom parameter. This field is required when the parameter type is
String
. - min
Value string - The minimum value of the custom parameter. This field is required when the parameter type is
Digit
. - required boolean
- Whether the custom parameter is required.
- name str
- The name of the custom parameter.
- type str
- The type of the custom parameter. Valid values:
String
,Digit
. - decimal_
precision int - The decimal precision of the custom parameter. This field is required when the parameter type is
Digit
. - default_
value str - The default value of the custom parameter.
- max_
length int - The maximum length of the custom parameter. This field is required when the parameter type is
String
. - max_
value str - The maximum value of the custom parameter. This field is required when the parameter type is
Digit
. - min_
length int - The minimum length of the custom parameter. This field is required when the parameter type is
String
. - min_
value str - The minimum value of the custom parameter. This field is required when the parameter type is
Digit
. - required bool
- Whether the custom parameter is required.
- name String
- The name of the custom parameter.
- type String
- The type of the custom parameter. Valid values:
String
,Digit
. - decimal
Precision Number - The decimal precision of the custom parameter. This field is required when the parameter type is
Digit
. - default
Value String - The default value of the custom parameter.
- max
Length Number - The maximum length of the custom parameter. This field is required when the parameter type is
String
. - max
Value String - The maximum value of the custom parameter. This field is required when the parameter type is
Digit
. - min
Length Number - The minimum length of the custom parameter. This field is required when the parameter type is
String
. - min
Value String - The minimum value of the custom parameter. This field is required when the parameter type is
Digit
. - required Boolean
- Whether the custom parameter is required.
CommandTag, CommandTagArgs
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.