DATASOURCE::ECS::Commands is used to query all available commands that you created.
Syntax
{
"Type": "DATASOURCE::ECS::Commands",
"Properties": {
"Type": String,
"Description": String,
"CommandId": String,
"CommandName": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Type | String | No | Yes | The type of the command. | Valid values:
|
Description | String | No | Yes | The description of the command. | None. |
CommandId | String | No | Yes | The ID of the command. | None. |
CommandName | String | No | Yes | The name of the command. | None. |
Return values
Fn::GetAtt
- CommandIds: the IDs of the commands.
- Commands: details of the commands.
Property | Type | Description | Constraint |
---|---|---|---|
CommandIds | List | The IDs of the commands. | None. |
Commands | List | Details of the commands. | None. |
ParameterNames | List | The custom parameter names that are parsed from the command content that you specified by using CommandContent when you created the command. | Example:
|
Description | String | The description of the command. | None. |
Tags | List | The tags of the command. | Example:
|
WorkingDir | String | The working directory of the command. | None. |
CommandName | String | The name of the command. | None. |
CreateTime | String | The time when the command was created. | None. |
CommandContent | String | The command content. | The command content is Base64-encoded. |
EnableParameter | Boolean | Indicates whether the custom parameter feature is enabled for the command. | Valid values:
|
Timeout | String | The timeout period. | None. |
Type | String | The type of the command. | None. |
CommandId | String | The ID of the command. | None. |
Examples
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { }, "Resources": { "ExtensionDataSource": { "Type": "DATASOURCE::ECS::Commands", "Properties": { "Type": "RunShellScript" } } }, "Outputs": { "CommandIds": { "Description": "The list of command IDs.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "CommandIds" ] } }, "Commands": { "Description": "The list of commands.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "Commands" ] } } } }