Skip to content

Environment

This class encapsulates and extends the ROS resource type ALIYUN::ARMS::Environment, which is used to create an environment.

Initializers

import com.aliyun.ros.cdk.arms.Environment;
Environment.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .bindResourceId(java.lang.String)
    .bindResourceId(IResolvable)
    .environmentName(java.lang.String)
    .environmentName(IResolvable)
    .environmentSubType(java.lang.String)
    .environmentSubType(IResolvable)
    .environmentType(java.lang.String)
    .environmentType(IResolvable)
//  .deletePromInstance(java.lang.Boolean)
//  .deletePromInstance(IResolvable)
//  .feePackage(java.lang.String)
//  .feePackage(IResolvable)
//  .grafanaWorkspaceId(java.lang.String)
//  .grafanaWorkspaceId(IResolvable)
//  .managedType(java.lang.String)
//  .managedType(IResolvable)
//  .prometheusInstanceId(java.lang.String)
//  .prometheusInstanceId(IResolvable)
//  .resourceGroupId(java.lang.String)
//  .resourceGroupId(IResolvable)
//  .tags(java.util.List<TagsProperty>)
    .build();
Name Type Description
scope com.aliyun.ros.cdk.core.Construct No description.
id java.lang.String No description.
enableResourcePropertyConstraint java.lang.Boolean No description.
bindResourceId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property bindResourceId: The ID of the resource bound to the environment, such as the container ID or VPC ID.
environmentName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property environmentName: The name of the environment.
environmentSubType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property environmentSubType: The subtype of the environment.
environmentType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property environmentType: The type of the environment.
deletePromInstance java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property deletePromInstance: Cascade delete Prometheus instance.
feePackage java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property feePackage: The payable resource plan.
grafanaWorkspaceId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property grafanaWorkspaceId: The ID of the grafana workspace bound to the environment.
managedType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property managedType: Specifies whether agents or exporters are managed.
prometheusInstanceId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property prometheusInstanceId: The ID of the Prometheus instance.
resourceGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property resourceGroupId: The ID of the resource group.
tags java.util.List<TagsProperty> Property tags: Tags of Environment.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

bindResourceIdRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property bindResourceId: 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.


environmentNameRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property environmentName: The name of the environment.


environmentSubTypeRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property environmentSubType: The subtype of the environment.

Valid values: One: CS type environment ACK: CS type environment ECS: ECS type environment Cloud: cloud service


environmentTypeRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property environmentType: The type of the environment.

Valid values: CS: ACK ECS: ECS Cloud: cloud service


deletePromInstanceOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property deletePromInstance: Cascade delete Prometheus instance.

Default value: true.


feePackageOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property feePackage: 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.


grafanaWorkspaceIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property grafanaWorkspaceId: The ID of the grafana workspace bound to the environment.

When passing space, the default share grafana is used.


managedTypeOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property managedType: 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.


prometheusInstanceIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property prometheusInstanceId: The ID of the Prometheus instance.

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


resourceGroupIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property resourceGroupId: The ID of the resource group.


tagsOptional

Property tags: Tags of Environment.


Methods

Name Description
toString Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
addCondition No description.
addCount No description.
addDependency No description.
addResourceDesc No description.
applyRemovalPolicy No description.
getAtt No description.
setMetadata No description.

toString

public java.lang.String toString()

Returns a string representation of this construct.

synthesize

public void synthesize(ISynthesisSession session)

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • Type: java.lang.Object

Static Functions

Name Description
isConstruct Return whether the given object is a Construct.

isConstruct

import com.aliyun.ros.cdk.arms.Environment;
Environment.isConstruct(java.lang.Object x)

Return whether the given object is a Construct.

xRequired

  • Type: java.lang.Object

Properties

Name Type Description
node com.aliyun.ros.cdk.core.ConstructNode The construct tree node associated with this construct.
ref java.lang.String No description.
stack com.aliyun.ros.cdk.core.Stack The stack in which this resource is defined.
resource com.aliyun.ros.cdk.core.RosResource No description.
attrEnvironmentId com.aliyun.ros.cdk.core.IResolvable Attribute EnvironmentId: The id of the environment.
attrEnvironmentName com.aliyun.ros.cdk.core.IResolvable Attribute EnvironmentName: The name of the environment.
attrEnvironmentSubType com.aliyun.ros.cdk.core.IResolvable Attribute EnvironmentSubType: The subtype of the environment.
attrEnvironmentType com.aliyun.ros.cdk.core.IResolvable Attribute EnvironmentType: The type of the environment.
attrFeePackage com.aliyun.ros.cdk.core.IResolvable Attribute FeePackage: The payable resource plan.
attrGrafanaWorkspaceId com.aliyun.ros.cdk.core.IResolvable Attribute GrafanaWorkspaceId: The ID of the grafana workspace bound to the environment.
attrManagedType com.aliyun.ros.cdk.core.IResolvable Attribute ManagedType: Specifies whether agents or exporters are managed.
attrPrometheusInstanceId com.aliyun.ros.cdk.core.IResolvable Attribute PrometheusInstanceId: The ID of the Prometheus instance.
attrResourceGroupId com.aliyun.ros.cdk.core.IResolvable Attribute ResourceGroupId: The ID of the resource group.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


refRequired

public java.lang.String getRef();
  • Type: java.lang.String

stackRequired

public Stack getStack();
  • Type: com.aliyun.ros.cdk.core.Stack

The stack in which this resource is defined.


resourceOptional

public RosResource getResource();
  • Type: com.aliyun.ros.cdk.core.RosResource

attrEnvironmentIdRequired

public IResolvable getAttrEnvironmentId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute EnvironmentId: The id of the environment.


attrEnvironmentNameRequired

public IResolvable getAttrEnvironmentName();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute EnvironmentName: The name of the environment.


attrEnvironmentSubTypeRequired

public IResolvable getAttrEnvironmentSubType();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute EnvironmentSubType: The subtype of the environment.


attrEnvironmentTypeRequired

public IResolvable getAttrEnvironmentType();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute EnvironmentType: The type of the environment.


attrFeePackageRequired

public IResolvable getAttrFeePackage();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute FeePackage: The payable resource plan.


attrGrafanaWorkspaceIdRequired

public IResolvable getAttrGrafanaWorkspaceId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute GrafanaWorkspaceId: The ID of the grafana workspace bound to the environment.


attrManagedTypeRequired

public IResolvable getAttrManagedType();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute ManagedType: Specifies whether agents or exporters are managed.


attrPrometheusInstanceIdRequired

public IResolvable getAttrPrometheusInstanceId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute PrometheusInstanceId: The ID of the Prometheus instance.


attrResourceGroupIdRequired

public IResolvable getAttrResourceGroupId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute ResourceGroupId: The ID of the resource group.