Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::ARMS::Environment

Última atualização: Jun 27, 2026

Cria uma instância de ambiente no Application Real-Time Monitoring Service (ARMS).

Sintaxe

{
  "Type": "ALIYUN::ARMS::Environment",
  "Properties": {
    "BindResourceId": String,
    "DeletePromInstance": Boolean,
    "EnvironmentSubType": String,
    "EnvironmentType": String,
    "EnvironmentName": String,
    "FeePackage": String,
    "GrafanaWorkspaceId": String,
    "ManagedType": String,
    "PrometheusInstanceId": String,
    "ResourceGroupId": String,
    "Tags": List
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

BindResourceId

String

Sim

Não

ID do recurso a associar ao ambiente.

Especifique o ID de uma instância de contêiner ou de uma Virtual Private Cloud (VPC). Para ambientes Cloud, informe o ID da região.

EnvironmentSubType

String

Sim

Não

Subtipo do ambiente.

Valores válidos:

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

  • ECS: Elastic Compute Service (ECS)

  • Cloud: serviço em nuvem

EnvironmentType

String

Sim

Não

Tipo do ambiente.

Valores válidos:

  • CS: ACK

  • ECS: ECS

  • Cloud: serviço em nuvem

EnvironmentName

String

Sim

Sim

Nome do ambiente.

Nenhuma.

DeletePromInstance

Boolean

Não

Sim

Define se a instância do Prometheus associada será excluída.

Nenhuma.

FeePackage

String

Não

Sim

Plano de recursos pago.

Nota
  • Se EnvironmentType for CS, defina FeePackage como CS_Basic ou CS_Pro. O valor padrão é CS_Basic.

  • Para qualquer outro valor de EnvironmentType, deixe FeePackage vazio.

GrafanaWorkspaceId

String

Não

Não

ID do workspace do Grafana a associar ao ambiente.

Se deixado em branco, o sistema usa o workspace compartilhado padrão do Grafana.

ManagedType

String

Não

Não

Tipo de gerenciamento.

Valores válidos:

  • none: não gerenciado. Valor padrão para clusters ACK.

  • agent: gerencia agentes, incluindo ksm. Valor padrão para clusters serverless Kubernetes (ASK), Alibaba Cloud Container Compute Service (ACS) e ACK One.

  • agent-exporter: gerencia agentes e exportadores. Valor padrão para serviços em nuvem.

PrometheusInstanceId

String

Não

Não

ID da instância do Prometheus a associar ao ambiente.

Se nenhuma instância do Prometheus for especificada, chame a operação InitEnvironment para inicializar uma instância de armazenamento.

ResourceGroupId

String

Não

Não

ID do grupo de recursos.

Nenhuma.

Tags

List

Não

Sim

Tags do recurso.

Limite de 20 tags.

Para mais informações, consulte a seção "Propriedades de Tags" deste tópico.

Sintaxe de Tags

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Propriedades de Tags

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

Key

String

Sim

Não

Chave da tag.

Nenhuma.

Value

String

Não

Não

Valor da tag.

Nenhuma.

Valores de retorno

Fn::GetAtt

  • ManagedType: tipo de gerenciamento.

  • EnvironmentId: ID do ambiente.

  • EnvironmentSubType: subtipo do ambiente.

  • EnvironmentType: tipo do ambiente.

  • ResourceGroupId: ID do grupo de recursos.

  • EnvironmentName: nome do ambiente.

  • GrafanaWorkspaceId: ID do workspace do Grafana associado ao ambiente.

  • PrometheusInstanceId: ID da instância do Prometheus associada ao ambiente.

  • FeePackage: plano de recursos pago.

Exemplos

Formato YAML

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  EnvironmentSubType:
    Type: String
    Description:
      en: |-
        The subtype of the environment. Valid values:
        One: CS type environment
        ACK: CS type environment
        ECS: ECS type environment
        Cloud: cloud service
    AllowedValues:
      - ACK
      - ECS
      - One
      - Cloud
    Required: true
  EnvironmentType:
    Type: String
    Description:
      en: |-
        The type of the environment. Valid values:
        CS: ACK
        ECS: ECS
        Cloud: cloud service
    AllowedValues:
      - CS
      - ECS
      - Cloud
    Required: true
  EnvironmentName:
    Type: String
    Description:
      en: The name of the environment.
    Required: true
  BindResourceId:
    Type: String
    Description:
      en: 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.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::ARMS::Environment
    Properties:
      EnvironmentSubType:
        Ref: EnvironmentSubType
      EnvironmentType:
        Ref: EnvironmentType
      EnvironmentName:
        Ref: EnvironmentName
      BindResourceId:
        Ref: BindResourceId
Outputs:
  ManagedType:
    Description: Specifies whether agents or exporters are managed.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ManagedType
  EnvironmentId:
    Description: The id of the environment.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - EnvironmentId
  EnvironmentSubType:
    Description: The subtype of the environment.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - EnvironmentSubType
  EnvironmentType:
    Description: The type of the environment.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - EnvironmentType
  ResourceGroupId:
    Description: The ID of the resource group.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ResourceGroupId
  EnvironmentName:
    Description: The name of the environment.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - EnvironmentName
  GrafanaWorkspaceId:
    Description: The ID of the grafana workspace bound to the environment.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - GrafanaWorkspaceId
  PrometheusInstanceId:
    Description: The ID of the Prometheus instance.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - PrometheusInstanceId
  FeePackage:
    Description: The payable resource plan.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - FeePackage

Formato JSON

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "EnvironmentSubType": {
      "Type": "String",
      "Description": {
        "en": "The subtype of the environment. Valid values:\nOne: CS type environment\nACK: CS type environment\nECS: ECS type environment\nCloud: cloud service"
      },
      "AllowedValues": [
        "ACK",
        "ECS",
        "One",
        "Cloud"
      ],
      "Required": true
    },
    "EnvironmentType": {
      "Type": "String",
      "Description": {
        "en": "The type of the environment. Valid values:\nCS: ACK\nECS: ECS\nCloud: cloud service"
      },
      "AllowedValues": [
        "CS",
        "ECS",
        "Cloud"
      ],
      "Required": true
    },
    "EnvironmentName": {
      "Type": "String",
      "Description": {
        "en": "The name of the environment."
      },
      "Required": true
    },
    "BindResourceId": {
      "Type": "String",
      "Description": {
        "en": "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."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::ARMS::Environment",
      "Properties": {
        "EnvironmentSubType": {
          "Ref": "EnvironmentSubType"
        },
        "EnvironmentType": {
          "Ref": "EnvironmentType"
        },
        "EnvironmentName": {
          "Ref": "EnvironmentName"
        },
        "BindResourceId": {
          "Ref": "BindResourceId"
        }
      }
    }
  },
  "Outputs": {
    "ManagedType": {
      "Description": "Specifies whether agents or exporters are managed.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ManagedType"
        ]
      }
    },
    "EnvironmentId": {
      "Description": "The id of the environment.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "EnvironmentId"
        ]
      }
    },
    "EnvironmentSubType": {
      "Description": "The subtype of the environment.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "EnvironmentSubType"
        ]
      }
    },
    "EnvironmentType": {
      "Description": "The type of the environment.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "EnvironmentType"
        ]
      }
    },
    "ResourceGroupId": {
      "Description": "The ID of the resource group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ResourceGroupId"
        ]
      }
    },
    "EnvironmentName": {
      "Description": "The name of the environment.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "EnvironmentName"
        ]
      }
    },
    "GrafanaWorkspaceId": {
      "Description": "The ID of the grafana workspace bound to the environment.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "GrafanaWorkspaceId"
        ]
      }
    },
    "PrometheusInstanceId": {
      "Description": "The ID of the Prometheus instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "PrometheusInstanceId"
        ]
      }
    },
    "FeePackage": {
      "Description": "The payable resource plan.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "FeePackage"
        ]
      }
    }
  }
}