DATASOURCE::ARMS::XTraceApp类型用于获取应用监控任务详情。
语法
{
  "Type": "DATASOURCE::ARMS::XTraceApp",
  "Properties": {
    "Pid": String,
    "RefreshOptions": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| Pid | String | 是 | 是 | 应用 ID。 | 无 | 
| RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 取值: 
 | 
返回值
Fn::GetAtt
- ResourceGroupId:资源组 ID。 
- CreateTime:创建任务的时间戳。 
- Pid:应用 ID。 
- Tags:应用标签列表。 
- XTraceAppName:应用名称。 
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Pid:
    Type: String
    Description:
      en: The process identifier (PID) of the application.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::ARMS::XTraceApp
    Properties:
      Pid:
        Ref: Pid
Outputs:
  ResourceGroupId:
    Description: The ID of the resource group.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ResourceGroupId
  CreateTime:
    Description: The timestamp generated when the task was created.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CreateTime
  Pid:
    Description: The process identifier (PID) of the application.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Pid
  Tags:
    Description: The tags of the application.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Tags
  XTraceAppName:
    Description: The name of the application.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - XTraceAppName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Pid": {
      "Type": "String",
      "Description": {
        "en": "The process identifier (PID) of the application."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ARMS::XTraceApp",
      "Properties": {
        "Pid": {
          "Ref": "Pid"
        }
      }
    }
  },
  "Outputs": {
    "ResourceGroupId": {
      "Description": "The ID of the resource group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ResourceGroupId"
        ]
      }
    },
    "CreateTime": {
      "Description": "The timestamp generated when the task was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "Pid": {
      "Description": "The process identifier (PID) of the application.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Pid"
        ]
      }
    },
    "Tags": {
      "Description": "The tags of the application.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Tags"
        ]
      }
    },
    "XTraceAppName": {
      "Description": "The name of the application.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "XTraceAppName"
        ]
      }
    }
  }
}
                        该文章对您有帮助吗?