All Products
Search
Document Center

Managed Service for Prometheus:InstallAddon

Last Updated:May 09, 2024

Installs an add-on.

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
arms:InstallAddonWrite
  • Environment
    acs:arms:{#regionId}:{#accountId}:environment/{#environmentId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
NamestringYes

The name of the add-on.

mysql
AddonVersionstringYes

The version of the add-on.

0.0.1
AliyunLangstringNo

The language. Valid values: zh and en. Default value: zh.

zh
EnvironmentIdstringYes

The environment ID.

env-xxx
ValuesstringNo

The metadata.

{"host":"mysql-service.default","port":3306,"username":"root","password":"roots"}
ReleaseNamestringNo

The name of the add-on after it is installed. If you do not specify this parameter, a default rule name is generated.

mysql-xxxxx
DryRunbooleanNo

Specifies whether to perform only a dry run, without performing the actual request. Default value: false.

false
RegionIdstringNo

The region ID.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

response

RequestIdstring

The ID of the request.

C21AB7CF-B7AF-410F-BD61-82D1567F****
Codeinteger

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

200
Successboolean

Indicates whether the request was successful. Valid values: true and false.

true
Messagestring

The returned message.

success
Dataobject

The returned data.

AddonNamestring

The name of the add-on.

mysql
AlertRuleCountlong

The number of alert rules.

1
Conditionsobject []

The installation phase.

FirstTransitionTimestring

The first transition time.

2018-01-31T14:32:19Z
LastTransitionTimestring

The last transition time.

2018-01-31T14:32:19Z
Messagestring

The detailed information.

xxxx
Reasonstring

The reason for the failure.

xxxx
Statusstring

The status of the phase.

True
Typestring

The type of the phase.

Loaded
CreateTimestring

The time when the add-on was created.

2023-09-22T16:56:29+08:00
DashboardCountlong

The number of dashboards.

1
ExporterCountlong

The number of exporters.

2
HaveConfigboolean

Indicates whether the configuration is available.

true
InstallUserIdstring

The user ID.

123456
Languagestring

The language.

zh
ReleaseIdstring

The release ID after installation.

be29c093-3fd6-4fb6-9430-797030cc183a
ReleaseNamestring

The name of the release.

mysql-1695372983039
Scenestring

The scenario.

database
Statusstring

The status.

0
UpdateTimestring

The time when the add-on was updated.

2023-09-22T16:56:29+08:00
UserIdstring

The user ID.

111
Versionstring

The version of the add-on.

0.0.1
EnvironmentIdstring

The environment ID.

env-xxxx
RegionIdstring

The region ID.

cn-heyuan
Managedboolean

Whether or not it is a managed component.

Examples

Sample success responses

JSONformat

{
  "RequestId": "C21AB7CF-B7AF-410F-BD61-82D1567F****",
  "Code": 200,
  "Success": true,
  "Message": "success",
  "Data": {
    "AddonName": "mysql",
    "AlertRuleCount": 1,
    "Conditions": [
      {
        "FirstTransitionTime": "2018-01-31T14:32:19Z",
        "LastTransitionTime": "2018-01-31T14:32:19Z",
        "Message": "xxxx",
        "Reason": "xxxx",
        "Status": "True",
        "Type": "Loaded"
      }
    ],
    "CreateTime": "2023-09-22T16:56:29+08:00",
    "DashboardCount": 1,
    "ExporterCount": 2,
    "HaveConfig": true,
    "InstallUserId": "123456",
    "Language": "zh",
    "ReleaseId": "be29c093-3fd6-4fb6-9430-797030cc183a",
    "ReleaseName": "mysql-1695372983039",
    "Scene": "database",
    "Status": "0",
    "UpdateTime": "2023-09-22T16:56:29+08:00",
    "UserId": "111",
    "Version": "0.0.1",
    "EnvironmentId": "env-xxxx",
    "RegionId": "cn-heyuan",
    "Managed": true
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-01-23The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.