ALIYUN::ARMS::XTraceApp类型用于创建应用监控任务。
语法
{
  "Type": "ALIYUN::ARMS::XTraceApp",
  "Properties": {
    "XTraceAppName": String,
    "ResourceGroupId": String,
    "Tags": List
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| XTraceAppName | String | 是 | 否 | 应用名称。 | 无 | 
| ResourceGroupId | String | 否 | 是 | 资源组ID。 | 无 | 
| Tags | List | 否 | 是 | 应用绑定的标签列表。 | 最多支持添加20个标签。 更多信息,请参见Tags属性。 | 
Tags语法
"Tags": [
  {
    "Value": String,
    "Key": String
  }
]Tags属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| Key | String | 是 | 否 | 标签键。 | 无 | 
| Value | String | 否 | 否 | 标签值。 | 无 | 
返回值
Fn::GetAtt
- ResourceGroupId:资源组ID。 
- CreateTime:创建任务的时间戳。 
- Pid:应用的ID标识串。 
- Tags:应用绑定的标签列表。 
- XTraceAppName:应用名称。 
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  XTraceAppName:
    Type: String
    Description:
      en: The name of the resource.
    Required: true
    Default: arms-k8s-demo
Resources:
  ExtensionResource:
    Type: ALIYUN::ARMS::XTraceApp
    Properties:
      XTraceAppName:
        Ref: XTraceAppName
Outputs:
  ResourceGroupId:
    Description: The ID of the resource group.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ResourceGroupId
  CreateTime:
    Description: The creation time of the resource.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
  Pid:
    Description: the identify of application.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Pid
  Tags:
    Description: The tags of the resource.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Tags
  XTraceAppName:
    Description: The name of the resource.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - XTraceAppName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "XTraceAppName": {
      "Type": "String",
      "Description": {
        "en": "The name of the resource."
      },
      "Required": true,
      "Default": "arms-k8s-demo"
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::ARMS::XTraceApp",
      "Properties": {
        "XTraceAppName": {
          "Ref": "XTraceAppName"
        }
      }
    }
  },
  "Outputs": {
    "ResourceGroupId": {
      "Description": "The ID of the resource group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ResourceGroupId"
        ]
      }
    },
    "CreateTime": {
      "Description": "The creation time of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      }
    },
    "Pid": {
      "Description": "the identify of application.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Pid"
        ]
      }
    },
    "Tags": {
      "Description": "The tags of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Tags"
        ]
      }
    },
    "XTraceAppName": {
      "Description": "The name of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "XTraceAppName"
        ]
      }
    }
  }
}
                        该文章对您有帮助吗?