Queries all available commands that you manually created.
Syntax
{
"Type": "DATASOURCE::ECS::Commands",
"Properties": {
"Type": String,
"Description": String,
"CommandId": String,
"CommandName": String,
"RefreshOptions": String
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Type |
String |
No |
Yes |
The command type. |
Valid values:
|
|
Description |
String |
No |
Yes |
The description of the command. |
None. |
|
CommandId |
String |
No |
Yes |
The command ID. |
None. |
|
CommandName |
String |
No |
Yes |
The command name. |
None. |
|
RefreshOptions |
String |
No |
Yes |
The refresh policy for data source resources when the stack is updated. |
Valid values:
|
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 parsed from the command content specified in CommandContent when the command was created. |
Example:
|
|
Description |
String |
The description of the command. |
None. |
|
Tags |
List |
The tags of the command. |
Example:
|
|
WorkingDir |
String |
The working directory. |
None. |
|
CommandName |
String |
The command name. |
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 custom parameters are enabled for the command. |
Valid values:
|
|
Timeout |
String |
The timeout period. |
None. |
|
Type |
String |
The command type. |
None. |
|
CommandId |
String |
The command ID. |
None. |
Examples
YAML 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
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"
]
}
}
}
}