ALIYUN::GA::ApplicationMonitor

ALIYUN::GA::ApplicationMonitor类型用于创建源站探测任务。

语法

{
  "Type": "ALIYUN::GA::ApplicationMonitor",
  "Properties": {
    "Address": String,
    "AcceleratorId": String,
    "ListenerId": String,
    "TaskName": String,
    "DetectThreshold": Integer,
    "DetectEnable": Boolean,
    "DetectTimes": Integer,
    "OptionsJson": Map,
    "SilenceTime": Integer
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Address

String

需要探测的URL或IP地址。

AcceleratorId

String

需要探测的全球加速实例ID。

ListenerId

String

需要探测的监听实例ID。

TaskName

String

源站探测的任务名称。

名称长度为1~128个字符,以大小写字母或中文开头,可包含数字、半角句号(.)、下划线(_)和短划线(-)。

DetectThreshold

Integer

设置自动诊断触发阈值。

单位:%。

取值范围:0~100

默认值:0,表示不触发自动诊断。

DetectEnable

Boolean

是否开启自动诊断功能。

取值:

  • true:开启自动诊断功能。

  • false(默认值):关闭自动诊断功能。

DetectTimes

Integer

触发自动诊断需要达到触发阈值的次数。

取值范围:1~20。默认值:1

OptionsJson

Map

源站探测任务对应监听协议类型的高级扩展选项。不同源站探测任务的监听协议类型对应不同的扩展选项。

SilenceTime

Integer

自动诊断触发沉默时间。

表示自动诊断触发后,未恢复到正常,间隔多久触发一次自动诊断。

可用率连续多次(即设置的DetectTimes)低于自动诊断触发阈值时,触发自动诊断,如果可用率在自动诊断触发沉默时间内持续低于自动诊断触发阈值,在自动诊断触发沉默时间内不会重复出发自动诊断;如果可用率在自动诊断触发沉默时间后仍未恢复正常,则再次触发自动诊断。

单位:秒。取值范围:300~86400。默认值:300

返回值

Fn::GetAtt

TaskId:源站探测的任务ID。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Address:
    Type: String
    Description:
      en: The URL or IP address that you want to probe.
    Required: true
  TaskName:
    Type: String
    Description:
      en: The name of the origin probing task. The name must be 1 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
    Required: true
    MinLength: 1
    MaxLength: 128
  AcceleratorId:
    Type: String
    Description:
      en: The ID of the GA instance on which you want to perform the origin probing task.
    Required: true
  ListenerId:
    Type: String
    Description:
      en: The ID of the listener on which you want to perform the origin probing task.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::GA::ApplicationMonitor
    Properties:
      Address:
        Ref: Address
      TaskName:
        Ref: TaskName
      AcceleratorId:
        Ref: AcceleratorId
      ListenerId:
        Ref: ListenerId
Outputs:
  TaskId:
    Description: The ID of the origin probing task.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - TaskId

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Address": {
      "Type": "String",
      "Description": {
        "en": "The URL or IP address that you want to probe."
      },
      "Required": true
    },
    "TaskName": {
      "Type": "String",
      "Description": {
        "en": "The name of the origin probing task. The name must be 1 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter."
      },
      "Required": true,
      "MinLength": 1,
      "MaxLength": 128
    },
    "AcceleratorId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the GA instance on which you want to perform the origin probing task."
      },
      "Required": true
    },
    "ListenerId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the listener on which you want to perform the origin probing task."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::GA::ApplicationMonitor",
      "Properties": {
        "Address": {
          "Ref": "Address"
        },
        "TaskName": {
          "Ref": "TaskName"
        },
        "AcceleratorId": {
          "Ref": "AcceleratorId"
        },
        "ListenerId": {
          "Ref": "ListenerId"
        }
      }
    }
  },
  "Outputs": {
    "TaskId": {
      "Description": "The ID of the origin probing task.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "TaskId"
        ]
      }
    }
  }
}