All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.alicloud.graphdatabase.kotlin.DbInstanceArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 3.62.0.0
Show newest version
@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>) {
        this.dbInstanceIpArrays = Output.all(values)
    }

    /**
     * @param value The network type of the db instance. Valid values: `vpc`.
     */
    @JvmName("ylejqjmooewrkoau")
    public suspend fun dbInstanceNetworkType(`value`: Output) {
        this.dbInstanceNetworkType = value
    }

    /**
     * @param value Disk storage type. Valid values: `cloud_essd`, `cloud_ssd`. Modification is not supported.
     */
    @JvmName("vqvnooyesglmsncq")
    public suspend fun dbInstanceStorageType(`value`: Output) {
        this.dbInstanceStorageType = value
    }

    /**
     * @param value 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`.
     */
    @JvmName("xwguphwoojuvyxyq")
    public suspend fun dbNodeClass(`value`: Output) {
        this.dbNodeClass = value
    }

    /**
     * @param value Instance storage space, which is measured in GB.
     */
    @JvmName("ggnlocbtggfibitd")
    public suspend fun dbNodeStorage(`value`: Output) {
        this.dbNodeStorage = value
    }

    /**
     * @param value Kernel Version. Valid values: `1.0` or `1.0-OpenCypher`. `1.0`: represented as gremlin, `1.0-OpenCypher`: said opencypher.
     */
    @JvmName("mqilovqpwocpjqma")
    public suspend fun dbVersion(`value`: Output) {
        this.dbVersion = value
    }

    /**
     * @param value The paymen type of the resource. Valid values: `PayAsYouGo`.
     */
    @JvmName("cyvqohusgosfufqk")
    public suspend fun paymentType(`value`: Output) {
        this.paymentType = value
    }

    /**
     * @param value ID of the VPC.
     */
    @JvmName("jxfuxlktelutcgcg")
    public suspend fun vpcId(`value`: Output) {
        this.vpcId = value
    }

    /**
     * @param value The ID of attaching vswitch to instance.
     */
    @JvmName("jdbngesraaxreyni")
    public suspend fun vswitchId(`value`: Output) {
        this.vswitchId = value
    }

    /**
     * @param value The zone ID of the resource.
     */
    @JvmName("fqysndyjjrekovao")
    public suspend fun zoneId(`value`: Output) {
        this.zoneId = value
    }

    /**
     * @param value The category of the db instance. Valid values: `HA`, `SINGLE`(Available in 1.173.0+).
     */
    @JvmName("qclugjryocingamo")
    public suspend fun dbInstanceCategory(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dbInstanceCategory = mapped
    }

    /**
     * @param value According to the practical example or notes.
     */
    @JvmName("mvwxhtrvrwlekepg")
    public suspend fun dbInstanceDescription(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dbInstanceDescription = mapped
    }

    /**
     * @param value IP ADDRESS whitelist for the instance group list. See `db_instance_ip_array` below.
     */
    @JvmName("gvruqrhfatygsjru")
    public suspend fun dbInstanceIpArrays(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dbInstanceIpArrays = mapped
    }

    /**
     * @param argument IP ADDRESS whitelist for the instance group list. See `db_instance_ip_array` below.
     */
    @JvmName("wuqhhuorxrueoxmt")
    public suspend fun dbInstanceIpArrays(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DbInstanceDbInstanceIpArrayArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.dbInstanceIpArrays = mapped
    }

    /**
     * @param argument IP ADDRESS whitelist for the instance group list. See `db_instance_ip_array` below.
     */
    @JvmName("eajyanxremuyakop")
    public suspend fun dbInstanceIpArrays(vararg argument: suspend DbInstanceDbInstanceIpArrayArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DbInstanceDbInstanceIpArrayArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.dbInstanceIpArrays = mapped
    }

    /**
     * @param argument IP ADDRESS whitelist for the instance group list. See `db_instance_ip_array` below.
     */
    @JvmName("acdxrdbgwbhkigel")
    public suspend fun dbInstanceIpArrays(argument: suspend DbInstanceDbInstanceIpArrayArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            DbInstanceDbInstanceIpArrayArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.dbInstanceIpArrays = mapped
    }

    /**
     * @param values IP ADDRESS whitelist for the instance group list. See `db_instance_ip_array` below.
     */
    @JvmName("muxxkspatnagrpmh")
    public suspend fun dbInstanceIpArrays(vararg values: DbInstanceDbInstanceIpArrayArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.dbInstanceIpArrays = mapped
    }

    /**
     * @param value The network type of the db instance. Valid values: `vpc`.
     */
    @JvmName("iojxkfhvyvclqhbm")
    public suspend fun dbInstanceNetworkType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dbInstanceNetworkType = mapped
    }

    /**
     * @param value Disk storage type. Valid values: `cloud_essd`, `cloud_ssd`. Modification is not supported.
     */
    @JvmName("leeyfwfueqfrvdsa")
    public suspend fun dbInstanceStorageType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dbInstanceStorageType = mapped
    }

    /**
     * @param value 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`.
     */
    @JvmName("wkcuqvdufcxkebrn")
    public suspend fun dbNodeClass(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dbNodeClass = mapped
    }

    /**
     * @param value Instance storage space, which is measured in GB.
     */
    @JvmName("mykoklbxqhmgmewy")
    public suspend fun dbNodeStorage(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dbNodeStorage = mapped
    }

    /**
     * @param value Kernel Version. Valid values: `1.0` or `1.0-OpenCypher`. `1.0`: represented as gremlin, `1.0-OpenCypher`: said opencypher.
     */
    @JvmName("oknimissyisjdwef")
    public suspend fun dbVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dbVersion = mapped
    }

    /**
     * @param value The paymen type of the resource. Valid values: `PayAsYouGo`.
     */
    @JvmName("dhuqiiocwlxbscxb")
    public suspend fun paymentType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.paymentType = mapped
    }

    /**
     * @param value ID of the VPC.
     */
    @JvmName("beydojlhcmckxhlg")
    public suspend fun vpcId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpcId = mapped
    }

    /**
     * @param value The ID of attaching vswitch to instance.
     */
    @JvmName("orytpgeqvpbjdhjb")
    public suspend fun vswitchId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vswitchId = mapped
    }

    /**
     * @param value The zone ID of the resource.
     */
    @JvmName("msjoswbfljunqsmm")
    public suspend fun zoneId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zoneId = mapped
    }

    internal fun build(): DbInstanceArgs = DbInstanceArgs(
        dbInstanceCategory = dbInstanceCategory,
        dbInstanceDescription = dbInstanceDescription,
        dbInstanceIpArrays = dbInstanceIpArrays,
        dbInstanceNetworkType = dbInstanceNetworkType,
        dbInstanceStorageType = dbInstanceStorageType,
        dbNodeClass = dbNodeClass,
        dbNodeStorage = dbNodeStorage,
        dbVersion = dbVersion,
        paymentType = paymentType,
        vpcId = vpcId,
        vswitchId = vswitchId,
        zoneId = zoneId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy