DATASOURCE::ARMS::SyntheticTask类型用于获取单个定时拨测任务详情。
语法
{
  "Type": "DATASOURCE::ARMS::SyntheticTask",
  "Properties": {
    "TaskId": String,
    "RefreshOptions": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| TaskId | String | 是 | 是 | 云拨测任务 ID。 | 无 | 
| RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值: 
 | 
返回值
Fn::GetAtt
- TaskId:云拨测任务 ID。 
- ResourceGroupId:资源组ID。 
- CustomPeriod:自定义周期。 
- MonitorConf:任务配置。 
- AvailableAssertions:断言列表。 
- TaskType:任务类型。 
- Monitors:监测点列表。 
- Frequency:拨测频率。 
- MonitorCategory:监测点类型。 
- SyntheticTaskName:拨测任务名称。 
- Tags:云拨测任务绑定的标签。 
- CommonSetting:通用设置。 
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  TaskId:
    Type: String
    Description:
      en: The ID of the synthetic monitoring task.
    Required: true
  RefreshOptions:
    Type: String
    Description:
      en: |-
        The refresh strategy for the datasource resource when the stack is updated. Valid values:
        - Never: Never refresh the datasource resource when the stack is updated.
        - Always: Always refresh the datasource resource when the stack is updated.
        Default is Never.
    AllowedValues:
      - Always
      - Never
    Required: false
    Default: Never
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::ARMS::SyntheticTask
    Properties:
      TaskId:
        Ref: TaskId
      RefreshOptions:
        Ref: RefreshOptions
Outputs:
  TaskId:
    Description: The ID of the synthetic monitoring task.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - TaskId
  ResourceGroupId:
    Description: The ID of the resource group.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ResourceGroupId
  CustomPeriod:
    Description: The custom cycle.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CustomPeriod
  MonitorConf:
    Description: The monitoring configurations.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - MonitorConf
  AvailableAssertions:
    Description: The list of assertions.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AvailableAssertions
  TaskType:
    Description: The type of the task.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - TaskType
  Monitors:
    Description: The list of monitoring points.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Monitors
  Frequency:
    Description: 'The detection frequency. '
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Frequency
  MonitorCategory:
    Description: 'The detection point type. 1: PC. 2: mobile device.'
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - MonitorCategory
  SyntheticTaskName:
    Description: The name of synthetic task.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SyntheticTaskName
  Tags:
    Description: The tags of the instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Tags
  CommonSetting:
    Description: The general settings.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CommonSetting
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "TaskId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the synthetic monitoring task."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ARMS::SyntheticTask",
      "Properties": {
        "TaskId": {
          "Ref": "TaskId"
        }
      }
    }
  },
  "Outputs": {
    "TaskId": {
      "Description": "The ID of the synthetic monitoring task.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "TaskId"
        ]
      }
    },
    "ResourceGroupId": {
      "Description": "The ID of the resource group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ResourceGroupId"
        ]
      }
    },
    "CustomPeriod": {
      "Description": "The custom cycle.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CustomPeriod"
        ]
      }
    },
    "MonitorConf": {
      "Description": "The monitoring configurations.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "MonitorConf"
        ]
      }
    },
    "AvailableAssertions": {
      "Description": "The list of assertions.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AvailableAssertions"
        ]
      }
    },
    "TaskType": {
      "Description": "The type of the task.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "TaskType"
        ]
      }
    },
    "Monitors": {
      "Description": "The list of monitoring points.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Monitors"
        ]
      }
    },
    "Frequency": {
      "Description": "The detection frequency. ",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Frequency"
        ]
      }
    },
    "MonitorCategory": {
      "Description": "The detection point type. 1: PC. 2: mobile device.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "MonitorCategory"
        ]
      }
    },
    "SyntheticTaskName": {
      "Description": "The name of synthetic task.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SyntheticTaskName"
        ]
      }
    },
    "Tags": {
      "Description": "The tags of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Tags"
        ]
      }
    },
    "CommonSetting": {
      "Description": "The general settings.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CommonSetting"
        ]
      }
    }
  }
}该文章对您有帮助吗?