All Products
Search
Document Center

Application Real-Time Monitoring Service:UpdatePrometheusGlobalView

Last Updated:Nov 05, 2024

Updates the data sources of Prometheus instance for GlobalView.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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
arms:UpdatePrometheusGlobalViewupdate
  • Prometheus
    acs:arms:{#regionId}:{#accountId}:prometheus/{#ClusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region in which the Prometheus instance resides.

cn-shenzhen
GroupNamestringYes

The name of the global aggregation instance.

zyGlobalView
MostRegionIdstringYes

The region ID of the global aggregation instance.

cn-hangzhou
ClusterIdstringYes

The ID of the Prometheus instance.

global****
ResourceGroupIdstringNo

The ID of the resource group to which the Prometheus instance belongs.

rg-acfmxyexli2****
SubClustersJsonstringYes

The data sources of the Prometheus instance for GlobalView.

[ { "headers":{ }, "regionId":"cn-hangzhou", "sourceType":"AlibabaPrometheus", "extras":{ }, "clusterId":"c39a1048921e04f***********", "sourceName":"arms-luyao-test", "dataSource":"", "userId":"1672753***********" }, { "headers":{ }, "regionId":"cn-beijing", "sourceType":"AlibabaPrometheus", "extras":{ }, "clusterId":"c6b6485496d5b40***********", "sourceName":"agent-321-test", "dataSource":"", "userId":"1672753***********" }, { "headers":{ }, "regionId":"cn-zhangjiakou", "sourceType":"AlibabaPrometheus", "extras":{ }, "clusterId":"c261a4f3200c446***********", "sourceName":"zaifeng-cardinality-01", "dataSource":"", "userId":"1672753***********" } ]
AllSubClustersSuccessbooleanYes

To edit a GlobalView aggregated instance, do you require all passed child instances to be verified successfully before creating a GlobalView instance (optional, default to false):

  • true
  • false
true

Response parameters

ParameterTypeDescriptionExample
object
Dataobject

The returned struct.

Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
FailedInstancesarray<object>

The data sources that failed to be updated.

FailedInstanceobject
SourceNamestring

The name of the data source.

sourcename-test
SourceTypestring

The type of the data source. AlibabaPrometheus MetricStore CustomPrometheus

AlibabaPrometheus
UserIdstring

The user ID.

23784673825*******
ClusterIdstring

The ID of the Prometheus instance.

cdb65ed2d527345*********
RequestIdstring

The ID of the request. You can use the ID to query logs and troubleshoot issues.

E9C9DA3D-10FE-472E-9EEF-2D0A3E41****
Messagestring

The error message that is returned if the request failed.

message
Codeinteger

The response code. The status code 200 indicates that the request was successful.

200

Examples

Sample success responses

JSONformat

{
  "Data": {
    "Success": true,
    "FailedInstances": [
      {
        "SourceName": "sourcename-test",
        "SourceType": "AlibabaPrometheus",
        "UserId": "23784673825*******",
        "ClusterId": "cdb65ed2d527345*********"
      }
    ]
  },
  "RequestId": "E9C9DA3D-10FE-472E-9EEF-2D0A3E41****",
  "Message": "message",
  "Code": 200
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-08-17The request parameters of the API has changedView Change Details
2023-08-11The request parameters of the API has changedView Change Details
2023-08-04The request parameters of the API has changedView Change Details
2023-03-29The request parameters of the API has changedView Change Details
2023-03-20The internal configuration of the API is changed, but the call is not affectedView Change Details