CreatePrometheusInstance
Creates a Prometheus monitoring instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:CreatePrometheusInstance |
create |
*PrometheusInstance
|
None | None |
Request syntax
POST /prometheus-instances HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request structure. |
|
| archiveDuration |
integer |
No |
The number of days to automatically archive data after the storage period expires. A value of 0 indicates that data is not archived. Valid values for the archive duration:
|
60 |
| authFreeReadPolicy |
string |
No |
The authentication-free read policy. IP address ranges and VPC IDs are supported. |
{ "SourceIp": [ "192.168.1.0/24", "172.168.2.22" ], "SourceVpc": [ "vpc-xx1", "vpc-xx2" ] } |
| authFreeWritePolicy |
string |
No |
The authentication-free write policy. |
{ "SourceIp": [ "192.168.1.0/24", "172.168.2.22" ], "SourceVpc": [ "vpc-xx1", "vpc-xx2" ] } |
| enableAuthFreeRead |
boolean |
No |
Specifies whether to enable authentication-free read access. This feature is supported only in V2. |
true |
| enableAuthFreeWrite |
boolean |
No |
Specifies whether to enable authentication-free write access. This feature is supported only in V2. |
true |
| enableAuthToken |
boolean |
No |
Specifies whether to enable the authorization token. This feature is supported only in V1. |
true |
| prometheusInstanceName |
string |
Yes |
The name of the instance. |
name1 |
| resourceGroupId |
string |
No |
The ID of the resource group. |
rg-aekz5qqvjyatgoy |
| status |
string |
No |
The instance status. Valid values:
|
Running |
| storageDuration |
integer |
No |
The storage duration in days.
Valid values:
|
90 |
| tags |
array<object> |
No |
The tags. |
|
|
object |
No |
The tags. |
||
| key |
string |
No |
The tag key. |
key1 |
| value |
string |
No |
The tag value. |
110109200001214284 |
| workspace |
string |
No |
The workspace to which the instance belongs. Default value: default-cms-{userId}-{regionId}. |
wokspace1 |
| paymentType |
string |
No |
Billable methods. Valid values:
Valid values:
|
POSTPAY |
| dryrun |
boolean |
No |
Specifies whether to perform a dry run only. Valid values:
|
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| prometheusInstanceId |
string |
The ID of the instance. |
rw-abc123 |
| requestId |
string |
Id of the request |
264C3E89-BE6E-5F82-A484-CE9C2196C7DC |
Examples
Success response
JSON format
{
"prometheusInstanceId": "rw-abc123",
"requestId": "264C3E89-BE6E-5F82-A484-CE9C2196C7DC"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.