UpdatePrometheusInstance

Updated at:

Updates a Prometheus instance.

Operation description

Updates the information of a Prometheus instance.

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

cms:UpdatePrometheusInstance

update

*PrometheusInstance

acs:cms:{#regionId}:{#accountId}:prometheusinstance/{#prometheusInstanceId}

None None

Request syntax

PUT /prometheus-instances/{prometheusInstanceId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

prometheusInstanceId

string

Yes

The Prometheus instance ID.

rw-xxxxxxx

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

archiveDuration

integer

No

The number of days to automatically archive and retain data after the storage period expires. A value of 0 indicates that data is not archived. Valid values for the archive retention period: V1: 1 to 365 days. Supported only for the pay-by-ingested-data billing method. V2: 1 to 3650 days. A value of 3650 indicates permanent retention.

365

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 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" ] }

enableAuthFreeRead

boolean

No

Specifies whether to enable authentication-free read.

true

enableAuthFreeWrite

boolean

No

Specifies whether to enable authentication-free write.

true

enableAuthToken

boolean

No

Specifies whether to enable access token authentication.

true

prometheusInstanceName

string

No

The name of the instance.

test-prom-name

status

string

No

The status of the instance storage database. Only RUNNING is supported. If this parameter is left empty, the status of the storage database is not changed.

RUNNING

storageDuration

integer

No

The storage duration in days. Valid values: For the pay-by-ingested-data billing method: 90 and 180. For the pay-by-reported-metrics billing method: 15, 30, 60, 90, and 180.

Valid values:

  • 15 :

    15 days.

  • 30 :

    30 days.

  • 60 :

    60 days.

  • 90 :

    90 days.

  • 180 :

    180 days.

  • 365 :

    365 days.

90

paymentType

string

No

The billing method. You can change the billing method only once during the lifecycle of the instance. Valid values: POSTPAY: pay-as-you-go based on the number of reported metrics. POSTPAY_GB: pay-as-you-go based on the volume of ingested data.

Valid values:

  • POSTPAY_GB :

    Ingested data volume.

  • POSTPAY :

    Reported metrics.

POSTPAY_GB

workspace

string

No

The workspace to which the instance belongs.

default-cms-1500199863951574-cn-shanghai

storeConfig PrometheusInstanceStoreConfig

No

The Prometheus storage configuration.

dryrun

boolean

No

Specifies whether to only precheck the request. Valid values:

true: sends a precheck request without updating the instance. The system checks whether required parameters are specified, the request format is valid, and service limits are met. If the request fails the precheck, the corresponding error is returned. If the request passes the precheck, the DryRunOperation error code is returned. false: sends a regular request. If the request passes the precheck, the instance is updated. This is the default value.

Response elements

Element

Type

Description

Example

object

Schema of Response

prometheusInstanceId

string

The ID of the instance.

rw-abc123

requestId

string

Id of the request

1E92F783-E057-58F1-BD5C-92DED088E7A5

Examples

Success response

JSON format

{
  "prometheusInstanceId": "rw-abc123",
  "requestId": "1E92F783-E057-58F1-BD5C-92DED088E7A5"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.