BaseInstance

class BaseInstance : KotlinCustomResource

Provides a Ocean Base Instance resource. For information about Ocean Base Instance and how to use it, see What is Instance.

NOTE: Available since v1.203.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.alicloud.ocean.BaseInstance;
import com.pulumi.alicloud.ocean.BaseInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
final var defaultZones = AlicloudFunctions.getZones();
final var defaultResourceGroups = ResourcemanagerFunctions.getResourceGroups();
var defaultBaseInstance = new BaseInstance("defaultBaseInstance", BaseInstanceArgs.builder()
.resourceGroupId(defaultResourceGroups.applyValue(getResourceGroupsResult -> getResourceGroupsResult.ids()[0]))
.zones(
defaultZones.applyValue(getZonesResult -> getZonesResult.ids())[defaultZones.applyValue(getZonesResult -> getZonesResult.ids()).length() - 2],
defaultZones.applyValue(getZonesResult -> getZonesResult.ids())[defaultZones.applyValue(getZonesResult -> getZonesResult.ids()).length() - 3],
defaultZones.applyValue(getZonesResult -> getZonesResult.ids())[defaultZones.applyValue(getZonesResult -> getZonesResult.ids()).length() - 4])
.autoRenew("false")
.diskSize("100")
.paymentType("PayAsYouGo")
.instanceClass("8C32GB")
.backupRetainMode("delete_all")
.series("normal")
.instanceName(name)
.build());
}
}

Import

Ocean Base Instance can be imported using the id, e.g.

$ pulumi import alicloud:ocean/baseInstance:BaseInstance example <id>

Properties

Link copied to clipboard
val autoRenew: Output<Boolean>?

Whether to automatically renew. It takes effect when the parameter ChargeType is PrePaid. Value range:

Link copied to clipboard
val autoRenewPeriod: Output<Int>?

The duration of each auto-renewal. When the value of the AutoRenew parameter is True, this parameter is required.

Link copied to clipboard
val backupRetainMode: Output<String>?

The backup retention policy after the cluster is deleted. The values are as follows:

Link copied to clipboard
val commodityCode: Output<String>

The product code of the OceanBase cluster._oceanbasepre_public_cn: Domestic station cloud database package Year-to-month package._oceanbasepost_public_cn: The domestic station cloud database is paid by the hour._obpre_public_intl: International Station Cloud Database Package Monthly Package.

Link copied to clipboard
val cpu: Output<Int>

The number of CPU cores of the cluster.

Link copied to clipboard
val createTime: Output<String>

The creation time of the resource.

Link copied to clipboard
val diskSize: Output<Int>

The size of the storage space, in GB. The limits of storage space vary according to the cluster specifications, as follows:

Link copied to clipboard
val diskType: Output<String>

The storage type of the cluster. Effective only in the standard cluster version (cloud disk). Two types are currently supported:

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val instanceClass: Output<String>

Cluster specification information. Four packages are currently supported:

Link copied to clipboard
val instanceName: Output<String>

OceanBase cluster name.The length is 1 to 20 English or Chinese characters.If this parameter is not specified, the default value is the InstanceId of the cluster.

Link copied to clipboard
val nodeNum: Output<String>

The number of nodes in the cluster. If the deployment mode is n-n-n, the number of nodes is n * 3.

Link copied to clipboard
val obVersion: Output<String>

The OceanBase Server version number.

Link copied to clipboard
val paymentType: Output<String>

The payment method of the instance. Value range:

Link copied to clipboard
val period: Output<Int>?

The duration of the resource purchase. The unit is specified by the PeriodUnit. The parameter InstanceChargeType takes effect only when the value is PrePaid and is required. Once the DedicatedHostId is specified, the value cannot exceed the subscription duration of the dedicated host. When PeriodUnit = Week, Period values: {"1", "2", "3", "4"}. When PeriodUnit = Month, Period values: {"1", "2", "3", "4", "5", "6", "7", "8", "9", "12", "24", "36", "48", "60"}.

Link copied to clipboard
val periodUnit: Output<String>?

The duration of the purchase of resources.Package year and Month value range: Month.Default value: Month of the package, which is billed by volume. The default period is Hour.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val resourceGroupId: Output<String>

The ID of the enterprise resource group to which the instance resides.

Link copied to clipboard
val series: Output<String>

Series of OceanBase cluster instances-normal (default): Standard cluster version (cloud disk)-normal_SSD: Standard cluster version (local disk)-history: history Library cluster version.

Link copied to clipboard
val status: Output<String>

The status of the resource.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val zones: Output<List<String>>

Information about the zone where the cluster is deployed.