All Products
Search
Document Center

Global Accelerator:CreateApplicationMonitor

Last Updated:Jul 31, 2024

Creates an origin probing task.

Operation description

You can call the CreateApplicationMonitor operation to create an origin probing task. An origin probing task monitors the network quality between a client and an origin server and checks the availability of the origin server.

Before you call this operation, take note of the following items:

  • You can create origin detection tasks only for subscription Standard Global Accelerator (GA) instances whose specification is Medium Ⅰ.

  • You cannot create an origin probe task for a UDP listener.

  • The service port of the URL or IP address that is probed must be within the listening port range.

  • CreateApplicationMonitor is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the DescribeApplicationMonitor or ListApplicationMonitor operation to query the status of the origin probing task.

    • If the origin probing task is in the init state, it indicates that the task is being created. You can perform only query operations.
    • If the origin probing task is in the active state, it indicates that the task is created.
  • The CreateApplicationMonitor operation cannot be called repeatedly for the same GA instance within a specific period of time.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ga:CreateApplicationMonitorcreate
  • ApplicationMonitor
    acs:ga:{#regionId}:{#accountId}:ga/{#gaId}
  • ApplicationMonitor
    acs:ga:{#regionId}:{#accountId}:sitemonitor/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the GA instance. Set the value to cn-hangzhou.

cn-hangzhou
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

Note If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
123e4567-e89b-12d3-a456-426655440000
AcceleratorIdstringYes

The ID of the GA instance on which you want to perform the origin probing task.

ga-bp1odcab8tmno0hdq****
ListenerIdstringYes

The ID of the listener on which you want to perform the origin probing task.

lsr-bp1bpn0kn908w4nbw****
TaskNamestringYes

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.

task1
AddressstringYes

The URL or IP address that you want to probe.

https://www.aliyun.com
OptionsJsonstringNo

The extended options of the listener protocol that is used by the origin probing task. The options vary based on the listener protocol.

{ "http_method": "get","header": "key:asd","acceptable_response_code": "500","cert_verify": true }
DetectEnablebooleanNo

Specifies whether to enable the automatic diagnostics feature. Valid values:

  • true
  • false (default)
false
DetectThresholdintegerNo

The threshold that is used to trigger the automatic diagnostics feature. Unit: percentage.

Valid values: 0 to 100.

The default value is 0, which indicates that the automatic diagnostics feature is not triggered.

0
DetectTimesintegerNo

The number of times that the threshold must be reached before the automatic diagnostics feature is triggered.

Valid values: 1 to 20. Default value: 1.

1
SilenceTimeintegerNo

The silence period of the automatic diagnostics feature. This parameter specifies the interval at which the automatic diagnostics feature is triggered. If the availability rate does not return to normal after GA triggers an automatic diagnostic task, GA must wait until the silence period ends before GA can trigger another automatic diagnostic task.

If the number of consecutive times that the availability rate drops below the threshold of automatic diagnostics reaches the value of DetectTimes, the automatic diagnostics feature is triggered. The automatic diagnostics feature is not triggered again within the silence period even if the availability rate remains below the threshold. If the availability rate does not return to normal after the silence period ends, the automatic diagnostics feature is triggered again.

Unit: seconds. Valid values: 300 to 86400. Default value: 300.

300

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

04F0F334-1335-436C-A1D7-6C044FE73368
TaskIdstring

The ID of the origin probing task.

sm-bp1fpdjfju9k8yr1y****

Examples

Sample success responses

JSONformat

{
  "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
  "TaskId": "sm-bp1fpdjfju9k8yr1y****"
}

Error codes

HTTP status codeError codeError messageDescription
400NotExist.ListenerThe listener does not exist.The listener does not exist.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-04-20The Error code has changedView Change Details