Instance
- Implements: IInstance
This class encapsulates and extends the ROS resource type ALIYUN::Hologram::Instance, which is used to create a Hologres instance.
Initializers
import com.aliyun.ros.cdk.hologram.Instance;
Instance.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.endpoints(IResolvable)
.endpoints(java.util.List<IResolvable)
.endpoints(EndpointsProperty>)
.instanceName(java.lang.String)
.instanceName(IResolvable)
.instanceType(java.lang.String)
.instanceType(IResolvable)
.paymentType(java.lang.String)
.paymentType(IResolvable)
.zoneId(java.lang.String)
.zoneId(IResolvable)
// .autoPay(java.lang.Boolean)
// .autoPay(IResolvable)
// .coldStorageSize(java.lang.Number)
// .coldStorageSize(IResolvable)
// .cpu(java.lang.Number)
// .cpu(IResolvable)
// .duration(java.lang.Number)
// .duration(IResolvable)
// .gatewayCount(java.lang.Number)
// .gatewayCount(IResolvable)
// .initialDatabases(java.lang.String)
// .initialDatabases(IResolvable)
// .leaderInstanceId(java.lang.String)
// .leaderInstanceId(IResolvable)
// .pricingCycle(java.lang.String)
// .pricingCycle(IResolvable)
// .productCode(java.lang.String)
// .productCode(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .scaleType(java.lang.String)
// .scaleType(IResolvable)
// .storageSize(java.lang.Number)
// .storageSize(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. |
endpoints | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property endpoints: List of domain names. |
instanceName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property instanceName: The name of the resource. |
instanceType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property instanceType: The instance type. |
paymentType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property paymentType: The payment type of the resource. |
zoneId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property zoneId: The zone Id. |
autoPay | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property autoPay: Whether to pay automatically. |
coldStorageSize | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property coldStorageSize: Instance low-frequency storage space. |
cpu | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property cpu: Instance specifications. |
duration | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property duration: The buying cycle. |
gatewayCount | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property gatewayCount: Number of gateway nodes. |
initialDatabases | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property initialDatabases: Initialize the database and split multiple database names ",". |
leaderInstanceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property leaderInstanceId: The id of leader instance. |
pricingCycle | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property pricingCycle: Billing cycle. |
productCode | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property productCode: product code. |
resourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property resourceGroupId: The ID of the resource group. |
scaleType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property scaleType: Change matching type. |
storageSize | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property storageSize: The standard storage space of the instance. |
tags | java.util.List<TagsProperty> | Property tags: Tags of instance. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
endpointsRequired
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
EndpointsProperty>
Property endpoints: List of domain names.
instanceNameRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceName: The name of the resource.
instanceTypeRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceType: The instance type.
Value:
- Standard: Universal.
- Follower: Read-only slave instance.
- Warehouse: calculation group type.
- Shared: Shared.
paymentTypeRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property paymentType: The payment type of the resource.
zoneIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property zoneId: The zone Id.
autoPayOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property autoPay: Whether to pay automatically.
The default value is true. Value:
- true: automatic payment
- false: only generate orders, not pay
The default value is true. If the balance of your payment method is insufficient, you can set the parameter AutoPay to false, and an unpaid order will be generated. You can log in to the user Center to pay by yourself.
coldStorageSizeOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property coldStorageSize: Instance low-frequency storage space.
Unit: GB.
Pay-As-You-Go (PostPaid) instances ignore this parameter.
cpuOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property cpu: Instance specifications.
Value:
- 8 cores 32 GB (number of compute nodes: 1)
- 16 cores 64 GB (number of compute nodes: 1)
- 32 core 128 GB (number of compute nodes: 2)
- 64 core 256 GB (number of compute nodes: 4)
- 96 core 384 GB (number of computing nodes: 6)
- 128 core 512 GB (number of compute nodes: 8)
- Wait
- just fill in the audit number.
- Please submit a work order application for purchasing 1024 or above specifications.
- Shared instance types do not need to specify specifications. The specification of -8 core 32GB (number of computing nodes: 1) is only for experience use and cannot be used for production.
durationOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property duration: The buying cycle.
Buy for 2 months.
If the Payment type is PostPaid, you do not need to specify it.
gatewayCountOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property gatewayCount: Number of gateway nodes.
initialDatabasesOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property initialDatabases: Initialize the database and split multiple database names ",".
leaderInstanceIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property leaderInstanceId: The id of leader instance.
pricingCycleOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property pricingCycle: Billing cycle.
Value:
- Month: monthly billing
- Hour: hourly billing
- PrePaid only supports Month
- PostPaid only supports Hour
- The Shared type is automatically set to Hour without specifying it.
productCodeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property productCode: product code.
resourceGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: The ID of the resource group.
scaleTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property scaleType: Change matching type.
Value:
- UPGRADE: UPGRADE
- DOWNGRADE: Downgrading
- The upgrade specification cannot be less than the original specification. A blank field indicates that the original specification remains unchanged. On this basis, at least one specification is larger than the original specification.
- The downgrading specification cannot be greater than the original specification. A blank field indicates that the original specification remains unchanged. On this basis, at least one specification is smaller than the original specification.
storageSizeOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property storageSize: The standard storage space of the instance.
Unit: GB.
Pay-As-You-Go instances (PostPaid) ignore this parameter.
tagsOptional
- Type: java.util.List<TagsProperty>
Property tags: Tags of instance.
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.hologram.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. |
attrAutoRenewal | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute AutoRenewal: Whether automatic renewal is enabled. |
attrColdStorageSize | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ColdStorageSize: Instance low-frequency storage space. |
attrCommodityCode | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CommodityCode: The commodity code. |
attrComputeNodeCount | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ComputeNodeCount: Number of compute nodes. |
attrCpu | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Cpu: Instance specifications. |
attrCreateTime | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CreateTime: The creation time of the resource. |
attrEnableHiveAccess | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute EnableHiveAccess: Whether data Lake acceleration is enabled. |
attrEndpoints | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Endpoints: List of domain names. |
attrExpirationTime | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ExpirationTime: Expiration time. |
attrGatewayCount | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute GatewayCount: Number of gateway nodes. |
attrGatewayCpu | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute GatewayCpu: Cpu resources of the Gateway. |
attrGatewayMemory | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute GatewayMemory: Gateway memory resources. |
attrInstanceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceId: Resource attribute fields that represent the resource's primary key. |
attrInstanceName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceName: The name of the resource. |
attrInstanceOwner | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceOwner: The instance owner. |
attrInstanceType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceType: The instance type. |
attrMemory | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Memory: Memory. |
attrPaymentType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute PaymentType: The payment type of the resource. |
attrResourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ResourceGroupId: The ID of the resource group. |
attrStorageSize | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute StorageSize: The standard storage space of the instance. |
attrSuspendReason | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute SuspendReason: Reason for suspension. |
attrTags | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Tags: Instance tag. |
attrVersion | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Version: The instance version. |
attrZoneId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ZoneId: The zone Id. |
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
attrAutoRenewalRequired
public java.lang.Object getAttrAutoRenewal();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute AutoRenewal: Whether automatic renewal is enabled.
attrColdStorageSizeRequired
public java.lang.Object getAttrColdStorageSize();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ColdStorageSize: Instance low-frequency storage space.
Unit: GB.
attrCommodityCodeRequired
public java.lang.Object getAttrCommodityCode();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CommodityCode: The commodity code.
attrComputeNodeCountRequired
public java.lang.Object getAttrComputeNodeCount();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ComputeNodeCount: Number of compute nodes.
attrCpuRequired
public java.lang.Object getAttrCpu();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Cpu: Instance specifications.
attrCreateTimeRequired
public java.lang.Object getAttrCreateTime();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CreateTime: The creation time of the resource.
attrEnableHiveAccessRequired
public java.lang.Object getAttrEnableHiveAccess();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute EnableHiveAccess: Whether data Lake acceleration is enabled.
attrEndpointsRequired
public java.lang.Object getAttrEndpoints();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Endpoints: List of domain names.
attrExpirationTimeRequired
public java.lang.Object getAttrExpirationTime();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ExpirationTime: Expiration time.
attrGatewayCountRequired
public java.lang.Object getAttrGatewayCount();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute GatewayCount: Number of gateway nodes.
attrGatewayCpuRequired
public java.lang.Object getAttrGatewayCpu();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute GatewayCpu: Cpu resources of the Gateway.
attrGatewayMemoryRequired
public java.lang.Object getAttrGatewayMemory();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute GatewayMemory: Gateway memory resources.
attrInstanceIdRequired
public java.lang.Object getAttrInstanceId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceId: Resource attribute fields that represent the resource's primary key.
attrInstanceNameRequired
public java.lang.Object getAttrInstanceName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceName: The name of the resource.
attrInstanceOwnerRequired
public java.lang.Object getAttrInstanceOwner();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceOwner: The instance owner.
attrInstanceTypeRequired
public java.lang.Object getAttrInstanceType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceType: The instance type.
attrMemoryRequired
public java.lang.Object getAttrMemory();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Memory: Memory.
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.
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.
attrStorageSizeRequired
public java.lang.Object getAttrStorageSize();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute StorageSize: The standard storage space of the instance.
Unit: GB.
attrSuspendReasonRequired
public java.lang.Object getAttrSuspendReason();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute SuspendReason: Reason for suspension.
attrTagsRequired
public java.lang.Object getAttrTags();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Tags: Instance tag.
attrVersionRequired
public java.lang.Object getAttrVersion();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Version: The instance version.
attrZoneIdRequired
public java.lang.Object getAttrZoneId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ZoneId: The zone Id.
propsRequired
public InstanceProps getProps();
- Type: InstanceProps