All Products
Search
Document Center

Smart Access Gateway:CreateProbeTask

Last Updated:Jun 17, 2026

Creates a probe task for a specified Smart Access Gateway device.

Operation description

  • Currently, only SAG-1000 devices with software version 2.7.0 or later support the probe monitoring feature.

  • Before creating a probe task, enable the advanced monitoring feature for the Smart Access Gateway instance. You can call the SetAdvancedMonitorState operation to set the advanced monitoring status.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

smartag:CreateProbeTask

*ProbeTask

acs:smartag:{#regionId}:{#accountId}:probetask/*

*SmartAccessGateway

acs:smartag:{#regionId}:{#accountId}:smartag/{#SmartAgId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the Smart Access Gateway instance.

You can call the DescribeRegions operation to query the region ID.

cn-shanghai

SagId

string

Yes

The instance ID of the Smart Access Gateway.

sag-asdfz6ac74oj5v****

Sn

string

Yes

The serial number of the Smart Access Gateway device.

sag****

TaskName

string

No

The name of the probe task.

test-ping

Type

string

Yes

The type of the probe task. Valid values:

  • Internet: public network probe.

  • Intranet: private network probe.

Internet

Protocol

string

Yes

The protocol of the probe task. Valid values:

  • ICMP.

  • TCP.

  • HTTP.

Note

Private network probes support only the ICMP and TCP protocols.

ICMP

Domain

string

Yes

The destination domain name of the probe node. For ICMP and TCP Protocol Type probes, set this parameter to the IP address or domain name of the destination service. For HTTP Protocol Type probes, set this parameter to the URL of the destination service.

www.example.com

Port

integer

Yes

The port number of the probe protocol.

Note

This parameter is required for TCP Protocol Type probe tasks. Do not specify this parameter for other protocols.

80

PacketNumber

integer

Yes

The number of packets sent per minute for the probe protocol.

Valid values: 1 to 60.

Note

This parameter is required for ICMP Protocol Type probe tasks. Do not specify this parameter for other protocols.

10

ProbeTaskSourceAddress

string

No

The source address for the private network probe.

Note

This parameter is required for private network probe tasks.

192.168.1.1

Enable

boolean

Yes

Specifies whether to enable the probe task. Valid values:

  • true: Enabled.

  • false: Disabled.

true

Response elements

Element

Type

Description

Example

object

The response.

RequestId

string

The request ID.

324223F3-93D3-4CE4-B26F-66C0C3809922

Code

string

The response code.

200

Message

string

The response message.

successful

Data

string

The ID of the probe task that was created.

probe-****

Examples

Success response

JSON format

{
  "RequestId": "324223F3-93D3-4CE4-B26F-66C0C3809922",
  "Code": "200",
  "Message": "successful",
  "Data": "probe-****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidProbeDomain The specified probe task domain is invalid. The domain name of the probing task is invalid.
400 InvalidName The specified name is not valid. The specified name is invalid.
400 InvalidProbeType The specified probe task type is invalid. The type of the probing task is invalid.
400 InvalidProbeProtocol The specified probe task protocol is invalid. The protocol of the probing task is invalid.
400 InvalidProbePort The specified probe task port is invalid. The port of the probing task is invalid.
400 InvalidPacketNumber The specified probe task packet number is invalid. The number of probe packets specified for the probing task is invalid.
400 InvalidProbeSourceIP The specified probe task source ip is invalid. The source IP address of the probing task is invalid.
400 ExistSameParamTask Exist task with same params. The parameters of the probing task are the same as another probing task.
400 SagConfiguring Sag is configuring.
403 FeatureNotSupport The current edition of the smart access gateway does not support this feature. The current version of Smart Access Gateway does not support this feature.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.