All Products
Search
Document Center

Application Real-Time Monitoring Service:CreateEnvironment

Last Updated:Oct 10, 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.

zh

EnvironmentName

string

Yes

The name of the environment.

env1

EnvironmentType

string

Yes

The type of the environment. Valid values:

  • CS: Container Service.

  • ECS: ECS.

  • Cloud: Cloud service.

CS

EnvironmentSubType

string

Yes

The subtype of the environment:

  • CS environments: ACK and One are supported.

  • ECS environments: ECS is supported.

  • Cloud environments: Cloud is supported.

Valid values:

  • ECS :

    ECS

  • Cloud :

    Cloud

  • One :

    One

  • ACK :

    ACK

ECS, ACK

BindResourceId

string

Yes

The ID of the resource instance bound to the environment, such as a container instance ID or a VPC ID. For Cloud environments, set this parameter to the region ID.

c6e9dec475dca4a50a188411d8cbxxx

ManagedType

string

No

The managed type. Valid values:

  • none: Unmanaged. This is the default value for ACK clusters.

  • agent: Managed agent, including ksm. This is the default value for ASK, ACS, and AckOne clusters.

  • agent-exporter: Managed agent and exporter. This is the default value for cloud service environments.

none

FeePackage

string

No

The billing plan.

  • If EnvironmentType is set to CS, you can set this parameter to CS_Basic (default) or CS_Pro.

  • If EnvironmentType is set to other values, leave this parameter empty.

CS_Basic

PrometheusInstanceId

string

No

The ID of the Prometheus instance bound to the environment. This parameter can be left empty. If it is not provided, call the InitEnvironment operation to initialize the storage instance.

c6e9dec475dca4a50a188411d8cbxxx

GrafanaWorkspaceId

string

No

The ID of the Grafana workspace bound to 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 that you want to add to the instance for management.

object

No

The tag.

Key

string

No

The key of the tag.

TestKey

Value

string

No

The value of the tag.

TestValue

InitEnvironment

boolean

No

Specifies whether to initialize the environment.

false

Response elements

Element

Type

Description

Example

object

Schema of Response

Code

integer

The HTTP status code. A status code of 200 indicates success.

200

Data

string

The ID of the created environment.

env-xxxxx

Message

string

The message returned in the response.

message

RequestId

string

Id of the request

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

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.