com.pulumi.alicloud.graphdatabase.kotlin.DbInstanceArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-alicloud-kotlin Show documentation
Show all versions of pulumi-alicloud-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.alicloud.graphdatabase.kotlin
import com.pulumi.alicloud.graphdatabase.DbInstanceArgs.builder
import com.pulumi.alicloud.graphdatabase.kotlin.inputs.DbInstanceDbInstanceIpArrayArgs
import com.pulumi.alicloud.graphdatabase.kotlin.inputs.DbInstanceDbInstanceIpArrayArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Provides a Graph Database Db Instance resource.
* For information about Graph Database Db Instance and how to use it, see [What is Db Instance](https://www.alibabacloud.com/help/en/graph-compute/latest/placeholder).
* > **NOTE:** Available since v1.136.0.
* ## Example Usage
* Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as alicloud from "@pulumi/alicloud";
* const config = new pulumi.Config();
* const name = config.get("name") || "tf-example";
* const example = new alicloud.graphdatabase.DbInstance("example", {
* dbNodeClass: "gdb.r.2xlarge",
* dbInstanceNetworkType: "vpc",
* dbVersion: "1.0",
* dbInstanceCategory: "HA",
* dbInstanceStorageType: "cloud_ssd",
* dbNodeStorage: 50,
* paymentType: "PayAsYouGo",
* dbInstanceDescription: name,
* });
* ```
* ```python
* import pulumi
* import pulumi_alicloud as alicloud
* config = pulumi.Config()
* name = config.get("name")
* if name is None:
* name = "tf-example"
* example = alicloud.graphdatabase.DbInstance("example",
* db_node_class="gdb.r.2xlarge",
* db_instance_network_type="vpc",
* db_version="1.0",
* db_instance_category="HA",
* db_instance_storage_type="cloud_ssd",
* db_node_storage=50,
* payment_type="PayAsYouGo",
* db_instance_description=name)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AliCloud = Pulumi.AliCloud;
* return await Deployment.RunAsync(() =>
* {
* var config = new Config();
* var name = config.Get("name") ?? "tf-example";
* var example = new AliCloud.GraphDatabase.DbInstance("example", new()
* {
* DbNodeClass = "gdb.r.2xlarge",
* DbInstanceNetworkType = "vpc",
* DbVersion = "1.0",
* DbInstanceCategory = "HA",
* DbInstanceStorageType = "cloud_ssd",
* DbNodeStorage = 50,
* PaymentType = "PayAsYouGo",
* DbInstanceDescription = name,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/graphdatabase"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* cfg := config.New(ctx, "")
* name := "tf-example"
* if param := cfg.Get("name"); param != "" {
* name = param
* }
* _, err := graphdatabase.NewDbInstance(ctx, "example", &graphdatabase.DbInstanceArgs{
* DbNodeClass: pulumi.String("gdb.r.2xlarge"),
* DbInstanceNetworkType: pulumi.String("vpc"),
* DbVersion: pulumi.String("1.0"),
* DbInstanceCategory: pulumi.String("HA"),
* DbInstanceStorageType: pulumi.String("cloud_ssd"),
* DbNodeStorage: pulumi.Int(50),
* PaymentType: pulumi.String("PayAsYouGo"),
* DbInstanceDescription: pulumi.String(name),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.alicloud.graphdatabase.DbInstance;
* import com.pulumi.alicloud.graphdatabase.DbInstanceArgs;
* 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("tf-example");
* var example = new DbInstance("example", DbInstanceArgs.builder()
* .dbNodeClass("gdb.r.2xlarge")
* .dbInstanceNetworkType("vpc")
* .dbVersion("1.0")
* .dbInstanceCategory("HA")
* .dbInstanceStorageType("cloud_ssd")
* .dbNodeStorage("50")
* .paymentType("PayAsYouGo")
* .dbInstanceDescription(name)
* .build());
* }
* }
* ```
* ```yaml
* configuration:
* name:
* type: string
* default: tf-example
* resources:
* example:
* type: alicloud:graphdatabase:DbInstance
* properties:
* dbNodeClass: gdb.r.2xlarge
* dbInstanceNetworkType: vpc
* dbVersion: '1.0'
* dbInstanceCategory: HA
* dbInstanceStorageType: cloud_ssd
* dbNodeStorage: '50'
* paymentType: PayAsYouGo
* dbInstanceDescription: ${name}
* ```
*
* ## Import
* Graph Database Db Instance can be imported using the id, e.g.
* ```sh
* $ pulumi import alicloud:graphdatabase/dbInstance:DbInstance example
* ```
* @property dbInstanceCategory The category of the db instance. Valid values: `HA`, `SINGLE`(Available in 1.173.0+).
* @property dbInstanceDescription According to the practical example or notes.
* @property dbInstanceIpArrays IP ADDRESS whitelist for the instance group list. See `db_instance_ip_array` below.
* @property dbInstanceNetworkType The network type of the db instance. Valid values: `vpc`.
* @property dbInstanceStorageType Disk storage type. Valid values: `cloud_essd`, `cloud_ssd`. Modification is not supported.
* @property dbNodeClass The class of the db node. Valid values: `gdb.r.xlarge`, `gdb.r.2xlarge`, `gdb.r.4xlarge`, `gdb.r.8xlarge`, `gdb.r.16xlarge`, `gdb.r.xlarge_basic`, `gdb.r.2xlarge_basic`, `gdb.r.4xlarge_basic`, `gdb.r.8xlarge_basic`, `gdb.r.16xlarge_basic`.
* @property dbNodeStorage Instance storage space, which is measured in GB.
* @property dbVersion Kernel Version. Valid values: `1.0` or `1.0-OpenCypher`. `1.0`: represented as gremlin, `1.0-OpenCypher`: said opencypher.
* @property paymentType The paymen type of the resource. Valid values: `PayAsYouGo`.
* @property vpcId ID of the VPC.
* @property vswitchId The ID of attaching vswitch to instance.
* @property zoneId The zone ID of the resource.
*/
public data class DbInstanceArgs(
public val dbInstanceCategory: Output? = null,
public val dbInstanceDescription: Output? = null,
public val dbInstanceIpArrays: Output>? = null,
public val dbInstanceNetworkType: Output? = null,
public val dbInstanceStorageType: Output? = null,
public val dbNodeClass: Output? = null,
public val dbNodeStorage: Output? = null,
public val dbVersion: Output? = null,
public val paymentType: Output? = null,
public val vpcId: Output? = null,
public val vswitchId: Output? = null,
public val zoneId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.alicloud.graphdatabase.DbInstanceArgs =
com.pulumi.alicloud.graphdatabase.DbInstanceArgs.builder()
.dbInstanceCategory(dbInstanceCategory?.applyValue({ args0 -> args0 }))
.dbInstanceDescription(dbInstanceDescription?.applyValue({ args0 -> args0 }))
.dbInstanceIpArrays(
dbInstanceIpArrays?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.dbInstanceNetworkType(dbInstanceNetworkType?.applyValue({ args0 -> args0 }))
.dbInstanceStorageType(dbInstanceStorageType?.applyValue({ args0 -> args0 }))
.dbNodeClass(dbNodeClass?.applyValue({ args0 -> args0 }))
.dbNodeStorage(dbNodeStorage?.applyValue({ args0 -> args0 }))
.dbVersion(dbVersion?.applyValue({ args0 -> args0 }))
.paymentType(paymentType?.applyValue({ args0 -> args0 }))
.vpcId(vpcId?.applyValue({ args0 -> args0 }))
.vswitchId(vswitchId?.applyValue({ args0 -> args0 }))
.zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [DbInstanceArgs].
*/
@PulumiTagMarker
public class DbInstanceArgsBuilder internal constructor() {
private var dbInstanceCategory: Output? = null
private var dbInstanceDescription: Output? = null
private var dbInstanceIpArrays: Output>? = null
private var dbInstanceNetworkType: Output? = null
private var dbInstanceStorageType: Output? = null
private var dbNodeClass: Output? = null
private var dbNodeStorage: Output? = null
private var dbVersion: Output? = null
private var paymentType: Output? = null
private var vpcId: Output? = null
private var vswitchId: Output? = null
private var zoneId: Output? = null
/**
* @param value The category of the db instance. Valid values: `HA`, `SINGLE`(Available in 1.173.0+).
*/
@JvmName("leaxmpicfrkvyoow")
public suspend fun dbInstanceCategory(`value`: Output) {
this.dbInstanceCategory = value
}
/**
* @param value According to the practical example or notes.
*/
@JvmName("bbaqhofrxanydavw")
public suspend fun dbInstanceDescription(`value`: Output) {
this.dbInstanceDescription = value
}
/**
* @param value IP ADDRESS whitelist for the instance group list. See `db_instance_ip_array` below.
*/
@JvmName("diwuotehngkceqeu")
public suspend fun dbInstanceIpArrays(`value`: Output>) {
this.dbInstanceIpArrays = value
}
@JvmName("ohsffbtqpvepdfjj")
public suspend fun dbInstanceIpArrays(vararg values: Output) {
this.dbInstanceIpArrays = Output.all(values.asList())
}
/**
* @param values IP ADDRESS whitelist for the instance group list. See `db_instance_ip_array` below.
*/
@JvmName("salpqvltrqfegcnq")
public suspend fun dbInstanceIpArrays(values: List