All Products
Search
Document Center

Managed Service for Prometheus:CreateEnvironment

Last Updated:May 09, 2024

Creates an environment instance.

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

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

cn-hangzhou
AliyunLangstringNo

The language. Default value: zh.

Valid values:

  • en

    :

    English

    .

  • zh

    :

    Chinese

    .

zh
EnvironmentNamestringYes

The name of the environment.

env1
EnvironmentTypestringYes

The type of the environment. Valid values:

  • CS: ACK
  • ECS: ECS
  • Cloud: cloud service
CS
EnvironmentSubTypestringYes

The subtype of the environment. Valid values:

  • CS: ACK, One
  • ECS: ECS
  • Cloud: cloud service
ECS, ACK, etc.
BindResourceIdstringYes

The ID of the resource bound to the environment, such as the container ID or VPC ID. For a Cloud environment, specify the region ID.

c6e9dec475dca4a50a188411d8cbxxx
ManagedTypestringNo

Specifies whether agents or exporters are managed. Valid values:

  • none: No. By default, no managed agents or exporters are provided for ACK clusters.
  • agent: Agents are managed. By default, managed agents are provided for ASK clusters, ACS clusters, and ACK One clusters.
  • agent-exproter: Agents and exporters are managed. By default, managed agents and exporters are provided for cloud services.
none
FeePackagestringNo

The payable resource plan. Valid values:

  • If the EnvironmentType parameter is set to CS, set the value to CS_Basic or CS_Pro. Default value: CS_Basic.
  • Otherwise, leave the parameter empty.
CS_Basic
PrometheusInstanceIdstringNo

The ID of the Prometheus instance. If no Prometheus instance is created, call the InitEnvironment operation to initialize a storage instance.

c6e9dec475dca4a50a188411d8cbxxx
ResourceGroupIdstringNo

The ID of the resource group.

rg-acfmxyexli2****
Tagsobject []No

The tags of the instance. You can specify this parameter to manage tags for the instance.

KeystringNo

The tag key.

TestKey
ValuestringNo

The tag value.

TestValue

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

16AF921B-8187-489F-9913-43C808B4****
Codeinteger

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

200
Datastring

The ID of the created environment.

env-xxxxx
Messagestring

The returned message.

message

Examples

Sample success responses

JSONformat

{
  "RequestId": "16AF921B-8187-489F-9913-43C808B4****",
  "Code": 200,
  "Data": "env-xxxxx",
  "Message": "message"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-05-08The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.
2024-03-19The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: FeePackage
2024-02-23The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: PrometheusInstanceId
2024-01-09The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ManagedType
2023-11-03The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.