Instance
- Implements: IInstance
This class encapsulates and extends the ROS resource type ALIYUN::KAFKA::Instance, which is used to create an ApsaraMQ for Kafka instance.
Initializers
import com.aliyun.ros.cdk.kafka.Instance;
Instance.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.deployType(java.lang.Number)
.deployType(IResolvable)
// .deletionForce(java.lang.Boolean)
// .deletionForce(IResolvable)
// .deployOption(IResolvable)
// .deployOption(DeployOptionProperty)
// .diskSize(java.lang.Number)
// .diskSize(IResolvable)
// .diskType(java.lang.String)
// .diskType(IResolvable)
// .eipMax(java.lang.Number)
// .eipMax(IResolvable)
// .ioMax(java.lang.Number)
// .ioMax(IResolvable)
// .ioMaxSpec(java.lang.String)
// .ioMaxSpec(IResolvable)
// .openConnector(java.lang.Boolean)
// .openConnector(IResolvable)
// .partitionNum(java.lang.Number)
// .partitionNum(IResolvable)
// .payType(java.lang.String)
// .payType(IResolvable)
// .serverlessConfig(IResolvable)
// .serverlessConfig(ServerlessConfigProperty)
// .specType(java.lang.String)
// .specType(IResolvable)
// .tags(java.util.List<TagsProperty>)
// .topicQuota(java.lang.Number)
// .topicQuota(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. |
deployType | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property deployType: The deployment type. |
deletionForce | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property deletionForce: Whether delete all topics, consumer groups of the kafka instance and then delete instance. |
deployOption | com.aliyun.ros.cdk.core.IResolvable OR DeployOptionProperty | Property deployOption: If you want to deploy instance after create at once, the VSwitchId and DeployModule parameters is required. |
diskSize | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property diskSize: The size of the disk to be configured for the Message Queue for Apache Kafka instance. |
diskType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property diskType: The type of the disk to be configured for the Message Queue for Apache Kafka instance. |
eipMax | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property eipMax: The public traffic to be configured for the Message Queue for Apache Kafka instance. |
ioMax | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property ioMax: The traffic peak (not recommended). |
ioMaxSpec | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property ioMaxSpec: Flow specification (recommended) The IoMax and IoMaxSpec must be optional. |
openConnector | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property openConnector: Whether open kafka connector or not. |
partitionNum | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property partitionNum: Number of partitions(recommended). |
payType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property payType: Pay by hour or month. |
serverlessConfig | com.aliyun.ros.cdk.core.IResolvable OR ServerlessConfigProperty | Property serverlessConfig: The settings of the Serverless instance. |
specType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property specType: The edition of the Message Queue for Apache Kafka instance. |
tags | java.util.List<TagsProperty> | Property tags: Tags to attach to instance. |
topicQuota | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property topicQuota: Number of topics (not recommended). |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
deployTypeRequired
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property deployType: The deployment type.
Valid values:
- 4: Internet/VPC instance
- 5: VPC instance
If you are creating a Confluent series instance, you cannot select the deployment type. You can only set the value to 5. After the purchase, you can adjust whether each component is open to the Internet.
deletionForceOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property deletionForce: Whether delete all topics, consumer groups of the kafka instance and then delete instance.
Default is false
deployOptionOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR DeployOptionProperty
Property deployOption: If you want to deploy instance after create at once, the VSwitchId and DeployModule parameters is required.
diskSizeOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property diskSize: The size of the disk to be configured for the Message Queue for Apache Kafka instance.
diskTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property diskType: The type of the disk to be configured for the Message Queue for Apache Kafka instance.
Valid values: 0: Ultra disk 1: SSD
eipMaxOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property eipMax: The public traffic to be configured for the Message Queue for Apache Kafka instance.
This parameter must be specified when the DeployType parameter is set to 4.
ioMaxOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property ioMax: The traffic peak (not recommended).
- You must specify either IoMax or IoMaxSpec. If you specify both parameters, IoMaxSpec takes precedence. We recommend that you specify only IoMaxSpec.
- For the valid values, see Billing.
If you are creating a Confluent series instance, you do not need to pass this parameter.
ioMaxSpecOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ioMaxSpec: Flow specification (recommended) The IoMax and IoMaxSpec must be optional.
When filling in at the same time, subject to IoMaxSpec. It is recommended that you only fill in the flow specification
openConnectorOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property openConnector: Whether open kafka connector or not.
partitionNumOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property partitionNum: Number of partitions(recommended).
The number of partitions to be configured for the Message Queue for Apache Kafka instance. PartitionNum and TopicQuota must be selected. It is recommended that you only fill in the number of partitions.
payTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property payType: Pay by hour or month.
serverlessConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR ServerlessConfigProperty
Property serverlessConfig: The settings of the Serverless instance.
This parameter is required if you create a Serverless instance.
specTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property specType: The edition of the Message Queue for Apache Kafka instance.
Valid values: normal: Normal version professional: Professional Edition (high writing edition) professionalForHighRead: Professional Edition (high reading edition) basic: Basic Edition (only for serverless)
tagsOptional
- Type: java.util.List<TagsProperty>
Property tags: Tags to attach to instance.
Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.
topicQuotaOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property topicQuota: Number of topics (not recommended).
The number of topics to be configured for the Message Queue for Apache Kafka instance. PartitionNum and TopicQuota must be selected. It is recommended that you only fill in the number of partitions. The default value of this parameter varies with different peak traffic values. Additional fees are charged if the default values are exceeded. Different specifications have different default values, and extra fees are charged. For more information, see Billing.
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.kafka.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. |
attrArn | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Arn: The Alibaba Cloud Resource Name (ARN). |
attrDomainEndpoint | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute DomainEndpoint: The default endpoints of the instance in domain name mode. |
attrEndpoint | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Endpoint: The SSL endpoints of the instance in IP address mode. |
attrInstanceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceId: Id of the instance. |
attrName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Name: Name of the instance. |
attrOrderId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute OrderId: Id of the order. |
attrSaslDomainEndpoint | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute SaslDomainEndpoint: The Simple Authentication and Security Layer (SASL) endpoints of the instance in domain name mode. |
attrSslDomainEndpoint | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute SslDomainEndpoint: The SSL endpoints of the instance in domain name mode. |
attrSslEndpoint | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute SslEndpoint: The SSL endpoints of the instance in IP address mode. |
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
attrArnRequired
public java.lang.Object getAttrArn();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Arn: The Alibaba Cloud Resource Name (ARN).
attrDomainEndpointRequired
public java.lang.Object getAttrDomainEndpoint();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute DomainEndpoint: The default endpoints of the instance in domain name mode.
attrEndpointRequired
public java.lang.Object getAttrEndpoint();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Endpoint: The SSL endpoints of the instance in IP address mode.
attrInstanceIdRequired
public java.lang.Object getAttrInstanceId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceId: Id of the instance.
attrNameRequired
public java.lang.Object getAttrName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Name: Name of the instance.
attrOrderIdRequired
public java.lang.Object getAttrOrderId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute OrderId: Id of the order.
attrSaslDomainEndpointRequired
public java.lang.Object getAttrSaslDomainEndpoint();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute SaslDomainEndpoint: The Simple Authentication and Security Layer (SASL) endpoints of the instance in domain name mode.
attrSslDomainEndpointRequired
public java.lang.Object getAttrSslDomainEndpoint();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute SslDomainEndpoint: The SSL endpoints of the instance in domain name mode.
attrSslEndpointRequired
public java.lang.Object getAttrSslEndpoint();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute SslEndpoint: The SSL endpoints of the instance in IP address mode.
propsRequired
public InstanceProps getProps();
- Type: InstanceProps