Creates a Prometheus instance.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
arms:CreatePrometheusInstance | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The ID of the region. If you use a Prometheus instance to monitor an Alibaba Cloud service in China, this parameter must be set to cn-shanghai. | cn-shanghai |
ClusterType | string | Yes | The type of the Prometheus instance. Valid values:
| remote-write |
VpcId | string | No | The ID of virtual private cloud (VPC). This parameter is required if you set the ClusterType parameter to ecs. | vpc-rpn********** |
VSwitchId | string | No | The ID of the vSwitch. This parameter is required if you set the ClusterType parameter to ecs. | vsw-bp1********* |
SecurityGroupId | string | No | The ID of the security group. This parameter is required if you set the ClusterType parameter to ecs. | sg-bp1******** |
ClusterId | string | No | The ID of the ACK cluster. This parameter is required if you set the ClusterType parameter to aliyun-cs. | cc7a37ee31aea4ed1a059eff8034b**** |
ClusterName | string | No | The name of the created cluster. This parameter is required if you set the ClusterType parameter to remote-write or ecs. | clusterNameOfTest |
SubClustersJson | string | No | JSON string for child instances of the globalView instance. | When the clusterType is global view, this parameter needs to be passed: a list of information about the clusters that need to be aggregated. Example: [ { "Headers":{ }, "RegionId": "cn hangzhou", "SourceType": "Alibaba Prometheus", "Extras":{ }, "ClusterId": "c39a1048921e04f ****************", "SourceName": "test1", "DataSource": "", "UserId": "1672753 ******************" }, { "Headers":{ }, "RegionId": "cn beijing", "SourceType": "Alibaba Prometheus", "Extras":{ }, "ClusterId": "c6b6485496d5b40 ****************", "SourceName": "test2", "DataSource": "", "UserId": "1672753 ******************" }, { "Headers":{ }, "RegionId": "cn zhangjiakou", "SourceType": "Alibaba Prometheus", "Extras":{ }, "ClusterId": "c261a4f3200c446 ****************", "SourceName": "test3", "DataSource": "", "UserId": "1672753 ******************" } ] |
AllSubClustersSuccess | boolean | No | Does it require all child instances to be verified successfully before creating a GlobalView instance. The default is false, which means partial success is possible. | true |
GrafanaInstanceId | string | Yes | The ID of the Grafana dedicated instance. This parameter is available if you set the ClusterType parameter to ecs. | grafana-bp1***** |
ResourceGroupId | string | No | The ID of the custom resource group. You can configure this parameter to bind the instance to the resource group. | rg-acfmxyexli2**** |
Tags | string | No | The tags of the instance. You can configure this parameter to manage tags for the instance. | [ { "labelName":"labelValue" }, { "testName":"clusterA" } ] |
Duration | integer | No | The data storage duration. Unit: days. | 90 |
ArchiveDuration | integer | No | The number of days for which data is automatically archived after the storage expires. Valid values: 60, 90, 180, and 365. 0 indicates that the data is not archived. | 90 |
Response parameters
Examples
Sample success responses
JSON
format
{
"Data": "qduukd****",
"RequestId": "70675725-8F11-4817-8106-CFE0AD71****",
"Message": "message",
"Code": 200
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-04-12 | The request parameters of the API has changed | View Change Details |
2024-02-28 | The request parameters of the API has changed | View Change Details |
2023-08-17 | The request parameters of the API has changed | View Change Details |
2023-08-11 | The request parameters of the API has changed | View Change Details |
2023-03-29 | The request parameters of the API has changed | View Change Details |