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 | 否 | 否 | 是否开启自动诊断功能。 | 取值:
|
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"
]
}
}
}
}
文档内容是否对您有帮助?