All Products
Search
Document Center

Enterprise Distributed Application Service:SwitchAdvancedMonitoring

Last Updated:Mar 01, 2024

Queries the status of the advanced application monitoring feature or configures this feature for an application that is deployed in an Elastic Compute Service (ECS) or Kubernetes cluster.

Operation description

To call the SwitchAdvancedMonitoring operation, you must make sure that the version of Enterprise Distributed Application Service (EDAS) SDK for Java or Python is 3.15.2 or later.

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
edas:ManageApplicationWrite
  • Application
    acs:edas:{#regionId}:{#accountId}:namespace/{#NameSpaceId}/application/{#AppId}
    none
none

Request syntax

POST /pop/v5/monitor/advancedMonitorInfo

GET /pop/v5/monitor/advancedMonitorInfo

Request parameters

ParameterTypeRequiredDescriptionExample
AppIdstringYes

The ID of the application for which you want to query or configure the advanced application monitoring feature.

9e224bc6-a646-4484-****-e617b7e7****
EnableAdvancedMonitoringbooleanNo

Specifies whether to enable the advanced application monitoring feature. Valid values:

  • true: enables the advanced application monitoring feature.
  • false: disables the advanced application monitoring feature.

If you call this operation to query the status of the advanced application monitoring feature, you do not need to specify this parameter.

true

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The HTTP status code that is returned.

200
Messagestring

The additional information that is returned.

The advanced monitoring status is disabled already for application which app_id is 9e224bc6-a646-4484-ae31-e617b7e7****
RequestIdstring

The ID of the request.

577AED12-32D8-40B6-991F-17D7A601****
AdvancedMonitoringEnabledboolean

Indicates whether the advanced application monitoring feature is enabled. Valid values:

  • true: The advanced application monitoring feature is enabled.
  • false: The advanced application monitoring feature is disabled.
false

Examples

Sample success responses

JSONformat

{
  "Code": 200,
  "Message": "The advanced monitoring status is disabled already for application which app_id is 9e224bc6-a646-4484-ae31-e617b7e7****",
  "RequestId": "577AED12-32D8-40B6-991F-17D7A601****",
  "AdvancedMonitoringEnabled": false
}

Error codes

HTTP status codeError codeError message
600Edas.Errorcode.OperationFailed.CloseAdvancedMonitor.MessageFailed to disable advanced monitoring.
600Edas.Errorcode.OperationFailed.OpenAdvancedMonitor.MessageFailed to enable advanced monitoring.

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