DATASOURCE::ECS::Command is used to query an available command that is manually created.
Syntax
{
"Type": "DATASOURCE::ECS::Command",
"Properties": {
"CommandId": String,
"RefreshOptions": String
}
}Properties
Property | Type | Required | Editable | Description | Constraint |
CommandId | String | Yes | Yes | The command ID. | None. |
RefreshOptions | String | No | Yes | The refresh policy for data source resources when the stack is updated. | Valid values:
|
Return values
Fn::GetAtt
WorkingDir: the execution path.
CommandContent: the command content.
Type: the command type.
Description: the description of the command.
ParameterNames: the custom parameter names that are parsed from the command content that you specified by using CommandContent when you created the command.
Timeout: the timeout period.
CreateTime: the time when the command was created.
EnableParameter: indicates whether the custom parameter feature is enabled.
CommandName: the command name.
CommandId: the command ID.
Tags: the information about tags of the command.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
CommandId:
Type: String
Description:
en: Command ID.
Required: true
AssociationProperty: ALIYUN::ECS::Command::CommandId
Resources:
ExtensionDataSource:
Type: DATASOURCE::ECS::Command
Properties:
CommandId:
Ref: CommandId
Outputs:
WorkingDir:
Description: Execution path.
Value:
Fn::GetAtt:
- ExtensionDataSource
- WorkingDir
CommandContent:
Description: Command content, encoded in Base64 and transmitted.
Value:
Fn::GetAtt:
- ExtensionDataSource
- CommandContent
Type:
Description: Command type.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Type
Description:
Description: Command description.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Description
ParameterNames:
Description: Parameter name.
Value:
Fn::GetAtt:
- ExtensionDataSource
- ParameterNames
Timeout:
Description: Timeout.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Timeout
CreateTime:
Description: Command creation time.
Value:
Fn::GetAtt:
- ExtensionDataSource
- CreateTime
EnableParameter:
Description: Whether to use parameters.
Value:
Fn::GetAtt:
- ExtensionDataSource
- EnableParameter
CommandName:
Description: Command name.
Value:
Fn::GetAtt:
- ExtensionDataSource
- CommandName
CommandId:
Description: Command ID.
Value:
Fn::GetAtt:
- ExtensionDataSource
- CommandId
Tags:
Description: The label information of the command.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Tags
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"CommandId": {
"Type": "String",
"Description": {
"en": "Command ID."
},
"Required": true,
"AssociationProperty": "ALIYUN::ECS::Command::CommandId"
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::ECS::Command",
"Properties": {
"CommandId": {
"Ref": "CommandId"
}
}
}
},
"Outputs": {
"WorkingDir": {
"Description": "Execution path.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"WorkingDir"
]
}
},
"CommandContent": {
"Description": "Command content, encoded in Base64 and transmitted.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"CommandContent"
]
}
},
"Type": {
"Description": "Command type.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Type"
]
}
},
"Description": {
"Description": "Command description.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Description"
]
}
},
"ParameterNames": {
"Description": "Parameter name.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"ParameterNames"
]
}
},
"Timeout": {
"Description": "Timeout.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Timeout"
]
}
},
"CreateTime": {
"Description": "Command creation time.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"CreateTime"
]
}
},
"EnableParameter": {
"Description": "Whether to use parameters.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"EnableParameter"
]
}
},
"CommandName": {
"Description": "Command name.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"CommandName"
]
}
},
"CommandId": {
"Description": "Command ID.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"CommandId"
]
}
},
"Tags": {
"Description": "The label information of the command.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Tags"
]
}
}
}
}