Environment
- Implements: IEnvironment
This class encapsulates and extends the ROS resource type ALIYUN::ARMS::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
- Type: java.util.List<TagsProperty>
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. |
fetchCondition | No description. |
fetchDependency | No description. |
fetchResourceDesc | 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.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
fetchCondition
public RosCondition fetchCondition()
fetchDependency
public java.util.List<java.lang.String> fetchDependency()
fetchResourceDesc
public java.lang.String fetchResourceDesc()
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- 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.
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node | com.aliyun.ros.cdk.core.ConstructNode | The construct tree node associated with this construct. |
env | com.aliyun.ros.cdk.core.IResourceEnvironment | The environment this resource belongs to. |
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 | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute EnvironmentId: The id of the environment. |
attrEnvironmentName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute EnvironmentName: The name of the environment. |
attrEnvironmentSubType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute EnvironmentSubType: The subtype of the environment. |
attrEnvironmentType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute EnvironmentType: The type of the environment. |
attrFeePackage | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute FeePackage: The payable resource plan. |
attrGrafanaWorkspaceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute GrafanaWorkspaceId: The ID of the grafana workspace bound to the environment. |
attrManagedType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ManagedType: Specifies whether agents or exporters are managed. |
attrPrometheusInstanceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute PrometheusInstanceId: The ID of the Prometheus instance. |
attrResourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ResourceGroupId: The ID of the resource group. |
props | EnvironmentProps | No description. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
envRequired
public IResourceEnvironment getEnv();
- Type: com.aliyun.ros.cdk.core.IResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
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 java.lang.Object getAttrEnvironmentId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute EnvironmentId: The id of the environment.
attrEnvironmentNameRequired
public java.lang.Object getAttrEnvironmentName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute EnvironmentName: The name of the environment.
attrEnvironmentSubTypeRequired
public java.lang.Object getAttrEnvironmentSubType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute EnvironmentSubType: The subtype of the environment.
attrEnvironmentTypeRequired
public java.lang.Object getAttrEnvironmentType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute EnvironmentType: The type of the environment.
attrFeePackageRequired
public java.lang.Object getAttrFeePackage();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute FeePackage: The payable resource plan.
attrGrafanaWorkspaceIdRequired
public java.lang.Object getAttrGrafanaWorkspaceId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute GrafanaWorkspaceId: The ID of the grafana workspace bound to the environment.
attrManagedTypeRequired
public java.lang.Object getAttrManagedType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ManagedType: Specifies whether agents or exporters are managed.
attrPrometheusInstanceIdRequired
public java.lang.Object getAttrPrometheusInstanceId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute PrometheusInstanceId: The ID of the Prometheus instance.
attrResourceGroupIdRequired
public java.lang.Object getAttrResourceGroupId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ResourceGroupId: The ID of the resource group.
propsRequired
public EnvironmentProps getProps();
- Type: EnvironmentProps