DATASOURCE::ECS::Command

DATASOURCE::ECS::Command类型用于查询您手动创建的单一可用的命令详情。

语法

{
  "Type": "DATASOURCE::ECS::Command",
  "Properties": {
    "CommandId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

CommandId

String

命令 ID。

返回值

Fn::GetAtt

  • WorkingDir:执行路径。

  • CommandContent:命令内容

  • Type:命令类型。

  • Description:命令描述。

  • ParameterNames:通过创建命令时的 commandcontent 解析出的自定义参数名列表

  • Timeout:超时时间。

  • CreateTime:命令创建时间。

  • EnableParameter:该命令是否启用自定义参数。

  • CommandName:命令名称。

  • CommandId:命令 ID。

  • Tags:命令的标签信息。

示例

  • YAML格式

    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
    
  • JSON格式

    {
      "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"
            ]
          }
        }
      }
    }