CreateAddonRelease
Installs an integration component to perform an integration.
Operation description
Creates a site monitoring task.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:CreateAddonRelease |
create |
*AddonRelease
|
None | None |
Request syntax
POST /integration-policies/{policyId}/addon-releases HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| policyId |
string |
Yes |
The environment policy ID. |
policy-yyyyyyyyyy |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body parameters. |
|
| addonName |
string |
Yes |
The name of the add-on to be integrated for monitoring. |
cs-gpu |
| aliyunLang |
string |
No |
The language type of the component. Valid values:
|
zh |
| apiVersion |
string |
No |
The add-on catalog version. Valid values: v1 and v2. |
v2 |
dryRun
deprecated
|
boolean |
No |
Specifies whether to perform a dry run. Default value: false. Valid values:
|
false |
| entityRules | EntityDiscoverRule |
No |
The field rules. |
|
| envType |
string |
No |
The environment type. If the policy type is CS or ECS, the corresponding environment type is used. For other types, the environment type is uniformly set to Cloud. Valid values:
|
CS |
| parentAddonReleaseId |
string |
No |
The parent AddonReleaseId. |
policy-xxxxxxxxxxx |
| releaseName |
string |
No |
The name of the plug-in after integration. If you do not specify this parameter, a default rule name is generated. |
test-gpu-integration-name |
| values |
string |
No |
The input metadata. |
{"install":{"mode":"auto-install","listenPort":"9400"},"discoverMode":"instances","discover":{"instances":"worker-k8s-for-cs-c126d87c76218487e83ab322017f11b44"},"scrapeInterval":"15","enableSecuritecs-nodeyGroupInjection":"true","metricTags":""} |
| version |
string |
Yes |
The version of the add-on to be integrated for monitoring. |
0.0.2 |
| workspace |
string |
No |
The name of the workspace where the component resources are installed. |
default |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| release |
object |
The integrated component information. |
|
| addonName |
string |
The name of the add-on integrated for monitoring. |
cs-gpu |
| alertRuleCount |
integer |
The number of alert groups. |
6 |
| conditions |
array<object> |
The component installation phase information. |
|
|
object |
The operator. Supports exact match, prefix match, and regular expressions. |
||
| firstTransitionTime |
string |
The first transition time in ISO 8601 format, including the UTC designator or time zone offset. |
2024-11-04T16:10:22+08:00 |
| lastTransitionTime |
string |
The last transition time in ISO 8601 format, including the UTC designator or time zone offset. |
2024-11-04T16:10:22+08:00 |
| message |
string |
The detailed information. |
The addon loaded successfully |
| status |
string |
The phase status. |
{'phase': 'Created', 'executionDetails': [], 'invocations': [], 'latestExecError': {'message': '', 'code': '', 'requestId': '', 'extraInfo': '', 'title': ''}} |
| type |
string |
The phase type. |
Loaded |
| config |
string |
The component configuration. |
{"install":{"mode":"auto-install","listenPort":"9400"},"discoverMode":"instances","discover":{"instances":"worker-k8s-for-cs-c126d87c76218487e83ab322017f11b44"},"scrapeInterval":"15","enableSecuritecs-nodeyGroupInjection":"true","metricTags":""} |
| createTime |
string |
The integration time in ISO 8601 format, including the UTC designator or time zone offset. |
2024-11-05T15:21:30+08:00 |
| dashboardCount |
integer |
The number of dashboards. |
3 |
| entityRules | EntityGroupBase |
The entity details. |
|
| envType |
string |
The environment type. |
CS |
| environmentId |
string |
The environment ID. |
policy-xxxxxxxxxxx |
| exporterCount |
integer |
The number of exporters. |
2 |
| haveConfig |
boolean |
Indicates whether a configuration is available. |
true |
| installUserId |
string |
The ID of the user who installed the component. |
1654218965xxxxxx |
| language |
string |
The language. |
zh |
| managed |
boolean |
Indicates whether the component is a managed component. |
true |
| parentAddonReleaseId |
string |
The parent AddonReleaseId. |
policy-xxxxxxxxxxx |
| policyId |
string |
The policy environment ID. |
policy-xxxxxxxxxx |
| regionId |
string |
The region ID. |
cn-hangzhou |
| releaseId |
string |
The release ID after installation. |
2e898e60-5e6a-46d1-a994-xxxxxxxxxx |
| releaseName |
string |
The release name. |
test-gpu-integration-name |
| scene |
string |
The component scenario. |
1 |
| status |
string |
The component status. |
200 |
| updateTime |
string |
The update time in ISO 8601 format, including the UTC designator or time zone offset. |
2024-09-13T02:21:02Z |
| userId |
string |
The ID of the owner user. |
165421896xxxxxx |
| version |
string |
The component version. |
1.0.0 |
| workspace |
string |
The workspace. |
default |
| requestId |
string |
The request ID. |
0CEC5375-C554-562B-A65F-9A629907C1F0 |
Examples
Success response
JSON format
{
"release": {
"addonName": "cs-gpu",
"alertRuleCount": 6,
"conditions": [
{
"firstTransitionTime": "2024-11-04T16:10:22+08:00",
"lastTransitionTime": "2024-11-04T16:10:22+08:00",
"message": "The addon loaded successfully",
"status": "{'phase': 'Created', 'executionDetails': [], 'invocations': [], 'latestExecError': {'message': '', 'code': '', 'requestId': '', 'extraInfo': '', 'title': ''}}",
"type": "Loaded"
}
],
"config": "{\"install\":{\"mode\":\"auto-install\",\"listenPort\":\"9400\"},\"discoverMode\":\"instances\",\"discover\":{\"instances\":\"worker-k8s-for-cs-c126d87c76218487e83ab322017f11b44\"},\"scrapeInterval\":\"15\",\"enableSecuritecs-nodeyGroupInjection\":\"true\",\"metricTags\":\"\"}",
"createTime": "2024-11-05T15:21:30+08:00",
"dashboardCount": 3,
"entityRules": {
"description": "ECS instance",
"entityGroupId": "eg-1234567890",
"entityGroupName": "All ECS entities",
"entityQueries": [
{
"entityType": "acs.ecs.instance",
"spl": ".entity with(type='acs.ecs.instance') | where region_id in ('cn-beijing')"
}
],
"entityRules": {
"annotations": [
{
"op": "in",
"tagKey": "instanceId",
"tagValues": [
"i-bp1gj8wyq4fxk28k6iy2\n"
]
}
],
"entityTypes": [
"acs.ecs.instance"
],
"fieldRules": [
{
"fieldKey": "instanceId",
"fieldValues": [
"i-bp1gj8wyq4fxk28k6iy2"
],
"op": "in"
}
],
"instanceIds": [
"i-bp1gj8wyq4fxk28k6iy2"
],
"ipMatchRule": {
"ipCIDR": "192.168.0.0/16",
"ipFieldKey": "ecs_ip"
},
"labels": [
{
"op": "in",
"tagKey": "project",
"tagValues": [
"demo"
]
}
],
"regionIds": [
"cn-shanghai"
],
"resourceGroupId": "rg-acfm2m7atreujs1",
"tags": [
{
"op": "in",
"tagKey": "project",
"tagValues": [
"demo"
]
}
]
},
"regionId": "cn-heyuan",
"userId": "1654218***343050",
"workspace": "default-cms-1654218***343050-cn-hangzhou"
},
"envType": "CS",
"environmentId": "policy-xxxxxxxxxxx",
"exporterCount": 2,
"haveConfig": true,
"installUserId": "1654218965xxxxxx",
"language": "zh",
"managed": true,
"parentAddonReleaseId": "policy-xxxxxxxxxxx",
"policyId": "policy-xxxxxxxxxx",
"regionId": "cn-hangzhou",
"releaseId": "2e898e60-5e6a-46d1-a994-xxxxxxxxxx",
"releaseName": "test-gpu-integration-name",
"scene": "1",
"status": "200",
"updateTime": "2024-09-13T02:21:02Z",
"userId": "165421896xxxxxx",
"version": "1.0.0",
"workspace": "default"
},
"requestId": "0CEC5375-C554-562B-A65F-9A629907C1F0"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.