Instance
- Implements: IInstance
This class encapsulates and extends the ROS resource type ALIYUN::PaiDswApi::Instance.
Initializers
import com.aliyun.ros.cdk.paidswapi.Instance;
Instance.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.ecsSpec(java.lang.String)
.ecsSpec(IResolvable)
.imageUrl(java.lang.String)
.imageUrl(IResolvable)
.instanceName(java.lang.String)
.instanceName(IResolvable)
// .accessibility(java.lang.String)
// .accessibility(IResolvable)
// .datasets(IResolvable)
// .datasets(java.util.List<IResolvable)
// .datasets(DatasetsProperty>)
// .environmentVariables(IResolvable)
// .environmentVariables(java.util.Map<java.lang.String, java.lang.Object>)
// .labels(IResolvable)
// .labels(java.util.List<IResolvable)
// .labels(LabelsProperty>)
// .saveImage(java.lang.Boolean)
// .saveImage(IResolvable)
// .userVpc(IResolvable)
// .userVpc(UserVpcProperty)
// .workspaceId(java.lang.String)
// .workspaceId(IResolvable)
.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. |
ecsSpec | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property ecsSpec: The ECS specification of the instance. |
imageUrl | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property imageUrl: The mirror address. |
instanceName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property instanceName: The instance name. |
accessibility | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property accessibility: Whether the workspace is visible to others. |
datasets | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property datasets: A collection of datasets. |
environmentVariables | com.aliyun.ros.cdk.core.IResolvable OR java.util.Map | Property environmentVariables: Environment variable. |
labels | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property labels: User-defined labels. |
saveImage | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property saveImage: Whether to close the instance after saving the environment. |
userVpc | com.aliyun.ros.cdk.core.IResolvable OR UserVpcProperty | Property userVpc: User vpc configuration. |
workspaceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property workspaceId: The Id of the workspace. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
ecsSpecRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ecsSpec: The ECS specification of the instance.
imageUrlRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property imageUrl: The mirror address.
instanceNameRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceName: The instance name.
Format requirements:
- Can only contain letters, numbers and underscores (_).
- It cannot exceed 27 characters.
accessibilityOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property accessibility: Whether the workspace is visible to others.
Valid values:
- PUBLIC: Visible to all users of the workspace.
- PRIVATE: Only visible to yourself and the administrator of the workspace.
datasetsOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
DatasetsProperty>
Property datasets: A collection of datasets.
environmentVariablesOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map
Property environmentVariables: Environment variable.
labelsOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
LabelsProperty>
Property labels: User-defined labels.
saveImageOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property saveImage: Whether to close the instance after saving the environment.
userVpcOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR UserVpcProperty
Property userVpc: User vpc configuration.
workspaceIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property workspaceId: The Id of the workspace.
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.paidswapi.Instance;
Instance.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. |
attrAccessibility | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Accessibility: Whether the workspace is visible to others. |
attrDatasets | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Datasets: A collection of datasets. |
attrEcsSpec | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute EcsSpec: The ECS specification of the instance. |
attrEnvironmentVariables | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute EnvironmentVariables: Environment variable. |
attrImageUrl | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ImageUrl: The mirror address. |
attrInstanceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceId: The first ID of the resource. |
attrInstanceName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceName: The instance name. |
attrInstanceUrl | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceUrl: The instance address. |
attrJupyterlabUrl | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute JupyterlabUrl: The jupyterlab address. |
attrLabels | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Labels: User-defined labels. |
attrPaymentType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute PaymentType: The payment type of the resource. |
attrTerminalUrl | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute TerminalUrl: The terminal address. |
attrUserVpc | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute UserVpc: User vpc configuration. |
attrWebIdeUrl | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute WebIDEUrl: The web IDE address. |
attrWorkspaceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute WorkspaceId: The Id of the workspace. |
props | InstanceProps | 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
attrAccessibilityRequired
public java.lang.Object getAttrAccessibility();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Accessibility: Whether the workspace is visible to others.
attrDatasetsRequired
public java.lang.Object getAttrDatasets();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Datasets: A collection of datasets.
attrEcsSpecRequired
public java.lang.Object getAttrEcsSpec();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute EcsSpec: The ECS specification of the instance.
attrEnvironmentVariablesRequired
public java.lang.Object getAttrEnvironmentVariables();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute EnvironmentVariables: Environment variable.
attrImageUrlRequired
public java.lang.Object getAttrImageUrl();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ImageUrl: The mirror address.
attrInstanceIdRequired
public java.lang.Object getAttrInstanceId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceId: The first ID of the resource.
attrInstanceNameRequired
public java.lang.Object getAttrInstanceName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceName: The instance name.
attrInstanceUrlRequired
public java.lang.Object getAttrInstanceUrl();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceUrl: The instance address.
attrJupyterlabUrlRequired
public java.lang.Object getAttrJupyterlabUrl();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute JupyterlabUrl: The jupyterlab address.
attrLabelsRequired
public java.lang.Object getAttrLabels();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Labels: User-defined labels.
attrPaymentTypeRequired
public java.lang.Object getAttrPaymentType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute PaymentType: The payment type of the resource.
attrTerminalUrlRequired
public java.lang.Object getAttrTerminalUrl();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute TerminalUrl: The terminal address.
attrUserVpcRequired
public java.lang.Object getAttrUserVpc();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute UserVpc: User vpc configuration.
attrWebIdeUrlRequired
public java.lang.Object getAttrWebIdeUrl();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute WebIDEUrl: The web IDE address.
attrWorkspaceIdRequired
public java.lang.Object getAttrWorkspaceId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute WorkspaceId: The Id of the workspace.
propsRequired
public InstanceProps getProps();
- Type: InstanceProps