All Products
Search
Document Center

Application Real-Time Monitoring Service:CreateEnvironment

Last Updated:May 29, 2026

Creates an environment 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

arms:CreateEnvironment

create

*Environment

acs:arms:{#regionId}:{#accountId}:environment/*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID.

cn-hangzhou

AliyunLang

string

No

The language. Default value: zh.

Valid values:

  • en: English

  • zh: Chinese

Valid values:

  • en :

    en

  • zh :

    zh

zh

EnvironmentName

string

Yes

The name of the environment.

env1

EnvironmentType

string

Yes

The type of the environment. Valid values:

  • CS: Container Service

  • ECS: Elastic Compute Service

  • Cloud: cloud service

CS

EnvironmentSubType

string

Yes

The subtype of the environment. Valid values:

  • CS: Container Service for Kubernetes (ACK) or Distributed Cloud Container Platform for Kubernetes (ACK One)

  • ECS: ECS

  • Cloud: cloud service

Valid values:

  • ECS :

    ECS

  • Cloud :

    Cloud

  • One :

    One

  • ACK :

    ACK

ECS、ACK等。

BindResourceId

string

Yes

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

ManagedType

string

No

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-exporter: Agents and exporters are managed. By default, managed agents and exporters are provided for cloud services.

none

FeePackage

string

No

The payable resource plan.

  • 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

PrometheusInstanceId

string

No

The ID of the Prometheus instance. If no Prometheus instance is created, call the InitEnvironment operation.

c6e9dec475dca4a50a188411d8cbxxx

GrafanaWorkspaceId

string

No

The ID of the Grafana workspace associated with the environment. If this parameter is left empty, the default shared Grafana workspace is used.

grafana-rnglkcdrntlhk0****

ResourceGroupId

string

No

The ID of the resource group.

rg-acfmxyexli2****

Tags

array<object>

No

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

object

No

The list of tags.

Key

string

No

The tag key.

TestKey

Value

string

No

The tag value.

TestValue

InitEnvironment

boolean

No

Specifies whether to initialize the environment.

false

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

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

Code

integer

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

200

Data

string

The ID of the created environment.

env-xxxxx

Message

string

The returned message.

message

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.