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

com.pulumi.gcp.redis.kotlin.ClusterArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.redis.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.redis.ClusterArgs.builder
import com.pulumi.gcp.redis.kotlin.inputs.ClusterPscConfigArgs
import com.pulumi.gcp.redis.kotlin.inputs.ClusterPscConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * A Google Cloud Redis Cluster instance.
 * To get more information about Cluster, see:
 * * [API documentation](https://cloud.google.com/memorystore/docs/cluster/reference/rest/v1/projects.locations.clusters)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/memorystore/docs/cluster/)
 * ## Example Usage
 * ### Redis Cluster Ha
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const producerNet = new gcp.compute.Network("producer_net", {
 *     name: "mynetwork",
 *     autoCreateSubnetworks: false,
 * });
 * const cluster_ha = new gcp.redis.Cluster("cluster-ha", {
 *     name: "ha-cluster",
 *     shardCount: 3,
 *     pscConfigs: [{
 *         network: producerNet.id,
 *     }],
 *     region: "us-central1",
 *     replicaCount: 1,
 *     nodeType: "REDIS_SHARED_CORE_NANO",
 *     transitEncryptionMode: "TRANSIT_ENCRYPTION_MODE_DISABLED",
 *     authorizationMode: "AUTH_MODE_DISABLED",
 *     redisConfigs: {
 *         "maxmemory-policy": "volatile-ttl",
 *     },
 * });
 * const producerSubnet = new gcp.compute.Subnetwork("producer_subnet", {
 *     name: "mysubnet",
 *     ipCidrRange: "10.0.0.248/29",
 *     region: "us-central1",
 *     network: producerNet.id,
 * });
 * const _default = new gcp.networkconnectivity.ServiceConnectionPolicy("default", {
 *     name: "mypolicy",
 *     location: "us-central1",
 *     serviceClass: "gcp-memorystore-redis",
 *     description: "my basic service connection policy",
 *     network: producerNet.id,
 *     pscConfig: {
 *         subnetworks: [producerSubnet.id],
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * producer_net = gcp.compute.Network("producer_net",
 *     name="mynetwork",
 *     auto_create_subnetworks=False)
 * cluster_ha = gcp.redis.Cluster("cluster-ha",
 *     name="ha-cluster",
 *     shard_count=3,
 *     psc_configs=[gcp.redis.ClusterPscConfigArgs(
 *         network=producer_net.id,
 *     )],
 *     region="us-central1",
 *     replica_count=1,
 *     node_type="REDIS_SHARED_CORE_NANO",
 *     transit_encryption_mode="TRANSIT_ENCRYPTION_MODE_DISABLED",
 *     authorization_mode="AUTH_MODE_DISABLED",
 *     redis_configs={
 *         "maxmemory-policy": "volatile-ttl",
 *     })
 * producer_subnet = gcp.compute.Subnetwork("producer_subnet",
 *     name="mysubnet",
 *     ip_cidr_range="10.0.0.248/29",
 *     region="us-central1",
 *     network=producer_net.id)
 * default = gcp.networkconnectivity.ServiceConnectionPolicy("default",
 *     name="mypolicy",
 *     location="us-central1",
 *     service_class="gcp-memorystore-redis",
 *     description="my basic service connection policy",
 *     network=producer_net.id,
 *     psc_config=gcp.networkconnectivity.ServiceConnectionPolicyPscConfigArgs(
 *         subnetworks=[producer_subnet.id],
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var producerNet = new Gcp.Compute.Network("producer_net", new()
 *     {
 *         Name = "mynetwork",
 *         AutoCreateSubnetworks = false,
 *     });
 *     var cluster_ha = new Gcp.Redis.Cluster("cluster-ha", new()
 *     {
 *         Name = "ha-cluster",
 *         ShardCount = 3,
 *         PscConfigs = new[]
 *         {
 *             new Gcp.Redis.Inputs.ClusterPscConfigArgs
 *             {
 *                 Network = producerNet.Id,
 *             },
 *         },
 *         Region = "us-central1",
 *         ReplicaCount = 1,
 *         NodeType = "REDIS_SHARED_CORE_NANO",
 *         TransitEncryptionMode = "TRANSIT_ENCRYPTION_MODE_DISABLED",
 *         AuthorizationMode = "AUTH_MODE_DISABLED",
 *         RedisConfigs =
 *         {
 *             { "maxmemory-policy", "volatile-ttl" },
 *         },
 *     });
 *     var producerSubnet = new Gcp.Compute.Subnetwork("producer_subnet", new()
 *     {
 *         Name = "mysubnet",
 *         IpCidrRange = "10.0.0.248/29",
 *         Region = "us-central1",
 *         Network = producerNet.Id,
 *     });
 *     var @default = new Gcp.NetworkConnectivity.ServiceConnectionPolicy("default", new()
 *     {
 *         Name = "mypolicy",
 *         Location = "us-central1",
 *         ServiceClass = "gcp-memorystore-redis",
 *         Description = "my basic service connection policy",
 *         Network = producerNet.Id,
 *         PscConfig = new Gcp.NetworkConnectivity.Inputs.ServiceConnectionPolicyPscConfigArgs
 *         {
 *             Subnetworks = new[]
 *             {
 *                 producerSubnet.Id,
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkconnectivity"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/redis"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		producerNet, err := compute.NewNetwork(ctx, "producer_net", &compute.NetworkArgs{
 * 			Name:                  pulumi.String("mynetwork"),
 * 			AutoCreateSubnetworks: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = redis.NewCluster(ctx, "cluster-ha", &redis.ClusterArgs{
 * 			Name:       pulumi.String("ha-cluster"),
 * 			ShardCount: pulumi.Int(3),
 * 			PscConfigs: redis.ClusterPscConfigArray{
 * 				&redis.ClusterPscConfigArgs{
 * 					Network: producerNet.ID(),
 * 				},
 * 			},
 * 			Region:                pulumi.String("us-central1"),
 * 			ReplicaCount:          pulumi.Int(1),
 * 			NodeType:              pulumi.String("REDIS_SHARED_CORE_NANO"),
 * 			TransitEncryptionMode: pulumi.String("TRANSIT_ENCRYPTION_MODE_DISABLED"),
 * 			AuthorizationMode:     pulumi.String("AUTH_MODE_DISABLED"),
 * 			RedisConfigs: pulumi.StringMap{
 * 				"maxmemory-policy": pulumi.String("volatile-ttl"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		producerSubnet, err := compute.NewSubnetwork(ctx, "producer_subnet", &compute.SubnetworkArgs{
 * 			Name:        pulumi.String("mysubnet"),
 * 			IpCidrRange: pulumi.String("10.0.0.248/29"),
 * 			Region:      pulumi.String("us-central1"),
 * 			Network:     producerNet.ID(),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = networkconnectivity.NewServiceConnectionPolicy(ctx, "default", &networkconnectivity.ServiceConnectionPolicyArgs{
 * 			Name:         pulumi.String("mypolicy"),
 * 			Location:     pulumi.String("us-central1"),
 * 			ServiceClass: pulumi.String("gcp-memorystore-redis"),
 * 			Description:  pulumi.String("my basic service connection policy"),
 * 			Network:      producerNet.ID(),
 * 			PscConfig: &networkconnectivity.ServiceConnectionPolicyPscConfigArgs{
 * 				Subnetworks: pulumi.StringArray{
 * 					producerSubnet.ID(),
 * 				},
 * 			},
 * 		})
 * 		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.gcp.compute.Network;
 * import com.pulumi.gcp.compute.NetworkArgs;
 * import com.pulumi.gcp.redis.Cluster;
 * import com.pulumi.gcp.redis.ClusterArgs;
 * import com.pulumi.gcp.redis.inputs.ClusterPscConfigArgs;
 * import com.pulumi.gcp.compute.Subnetwork;
 * import com.pulumi.gcp.compute.SubnetworkArgs;
 * import com.pulumi.gcp.networkconnectivity.ServiceConnectionPolicy;
 * import com.pulumi.gcp.networkconnectivity.ServiceConnectionPolicyArgs;
 * import com.pulumi.gcp.networkconnectivity.inputs.ServiceConnectionPolicyPscConfigArgs;
 * 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) {
 *         var producerNet = new Network("producerNet", NetworkArgs.builder()
 *             .name("mynetwork")
 *             .autoCreateSubnetworks(false)
 *             .build());
 *         var cluster_ha = new Cluster("cluster-ha", ClusterArgs.builder()
 *             .name("ha-cluster")
 *             .shardCount(3)
 *             .pscConfigs(ClusterPscConfigArgs.builder()
 *                 .network(producerNet.id())
 *                 .build())
 *             .region("us-central1")
 *             .replicaCount(1)
 *             .nodeType("REDIS_SHARED_CORE_NANO")
 *             .transitEncryptionMode("TRANSIT_ENCRYPTION_MODE_DISABLED")
 *             .authorizationMode("AUTH_MODE_DISABLED")
 *             .redisConfigs(Map.of("maxmemory-policy", "volatile-ttl"))
 *             .build());
 *         var producerSubnet = new Subnetwork("producerSubnet", SubnetworkArgs.builder()
 *             .name("mysubnet")
 *             .ipCidrRange("10.0.0.248/29")
 *             .region("us-central1")
 *             .network(producerNet.id())
 *             .build());
 *         var default_ = new ServiceConnectionPolicy("default", ServiceConnectionPolicyArgs.builder()
 *             .name("mypolicy")
 *             .location("us-central1")
 *             .serviceClass("gcp-memorystore-redis")
 *             .description("my basic service connection policy")
 *             .network(producerNet.id())
 *             .pscConfig(ServiceConnectionPolicyPscConfigArgs.builder()
 *                 .subnetworks(producerSubnet.id())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   cluster-ha:
 *     type: gcp:redis:Cluster
 *     properties:
 *       name: ha-cluster
 *       shardCount: 3
 *       pscConfigs:
 *         - network: ${producerNet.id}
 *       region: us-central1
 *       replicaCount: 1
 *       nodeType: REDIS_SHARED_CORE_NANO
 *       transitEncryptionMode: TRANSIT_ENCRYPTION_MODE_DISABLED
 *       authorizationMode: AUTH_MODE_DISABLED
 *       redisConfigs:
 *         maxmemory-policy: volatile-ttl
 *   default:
 *     type: gcp:networkconnectivity:ServiceConnectionPolicy
 *     properties:
 *       name: mypolicy
 *       location: us-central1
 *       serviceClass: gcp-memorystore-redis
 *       description: my basic service connection policy
 *       network: ${producerNet.id}
 *       pscConfig:
 *         subnetworks:
 *           - ${producerSubnet.id}
 *   producerSubnet:
 *     type: gcp:compute:Subnetwork
 *     name: producer_subnet
 *     properties:
 *       name: mysubnet
 *       ipCidrRange: 10.0.0.248/29
 *       region: us-central1
 *       network: ${producerNet.id}
 *   producerNet:
 *     type: gcp:compute:Network
 *     name: producer_net
 *     properties:
 *       name: mynetwork
 *       autoCreateSubnetworks: false
 * ```
 * 
 * ## Import
 * Cluster can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{region}}/clusters/{{name}}`
 * * `{{project}}/{{region}}/{{name}}`
 * * `{{region}}/{{name}}`
 * * `{{name}}`
 * When using the `pulumi import` command, Cluster can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:redis/cluster:Cluster default projects/{{project}}/locations/{{region}}/clusters/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:redis/cluster:Cluster default {{project}}/{{region}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:redis/cluster:Cluster default {{region}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:redis/cluster:Cluster default {{name}}
 * ```
 * @property authorizationMode Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster.
 * Default value: "AUTH_MODE_DISABLED" Possible values: ["AUTH_MODE_UNSPECIFIED", "AUTH_MODE_IAM_AUTH",
 * "AUTH_MODE_DISABLED"]
 * @property name Unique name of the resource in this scope including project and location using the form:
 * projects/{projectId}/locations/{locationId}/clusters/{clusterId}
 * @property nodeType The nodeType for the Redis cluster. If not provided, REDIS_HIGHMEM_MEDIUM will be used as default Possible values:
 * ["REDIS_SHARED_CORE_NANO", "REDIS_HIGHMEM_MEDIUM", "REDIS_HIGHMEM_XLARGE", "REDIS_STANDARD_SMALL"]
 * @property project
 * @property pscConfigs Required. Each PscConfig configures the consumer network where two
 * network addresses will be designated to the cluster for client access.
 * Currently, only one PscConfig is supported.
 * Structure is documented below.
 * @property redisConfigs Configure Redis Cluster behavior using a subset of native Redis configuration parameters. Please check Memorystore
 * documentation for the list of supported parameters:
 * https://cloud.google.com/memorystore/docs/cluster/supported-instance-configurations
 * @property region The name of the region of the Redis cluster.
 * @property replicaCount Optional. The number of replica nodes per shard.
 * @property shardCount Required. Number of shards for the Redis cluster.
 * @property transitEncryptionMode Optional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster.
 * Default value: "TRANSIT_ENCRYPTION_MODE_DISABLED" Possible values: ["TRANSIT_ENCRYPTION_MODE_UNSPECIFIED",
 * "TRANSIT_ENCRYPTION_MODE_DISABLED", "TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION"]
 */
public data class ClusterArgs(
    public val authorizationMode: Output? = null,
    public val name: Output? = null,
    public val nodeType: Output? = null,
    public val project: Output? = null,
    public val pscConfigs: Output>? = null,
    public val redisConfigs: Output>? = null,
    public val region: Output? = null,
    public val replicaCount: Output? = null,
    public val shardCount: Output? = null,
    public val transitEncryptionMode: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.redis.ClusterArgs =
        com.pulumi.gcp.redis.ClusterArgs.builder()
            .authorizationMode(authorizationMode?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .nodeType(nodeType?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .pscConfigs(
                pscConfigs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .redisConfigs(
                redisConfigs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .region(region?.applyValue({ args0 -> args0 }))
            .replicaCount(replicaCount?.applyValue({ args0 -> args0 }))
            .shardCount(shardCount?.applyValue({ args0 -> args0 }))
            .transitEncryptionMode(transitEncryptionMode?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ClusterArgs].
 */
@PulumiTagMarker
public class ClusterArgsBuilder internal constructor() {
    private var authorizationMode: Output? = null

    private var name: Output? = null

    private var nodeType: Output? = null

    private var project: Output? = null

    private var pscConfigs: Output>? = null

    private var redisConfigs: Output>? = null

    private var region: Output? = null

    private var replicaCount: Output? = null

    private var shardCount: Output? = null

    private var transitEncryptionMode: Output? = null

    /**
     * @param value Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster.
     * Default value: "AUTH_MODE_DISABLED" Possible values: ["AUTH_MODE_UNSPECIFIED", "AUTH_MODE_IAM_AUTH",
     * "AUTH_MODE_DISABLED"]
     */
    @JvmName("lsaaldajaaunfery")
    public suspend fun authorizationMode(`value`: Output) {
        this.authorizationMode = value
    }

    /**
     * @param value Unique name of the resource in this scope including project and location using the form:
     * projects/{projectId}/locations/{locationId}/clusters/{clusterId}
     */
    @JvmName("gilhysyvmurgtyjd")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The nodeType for the Redis cluster. If not provided, REDIS_HIGHMEM_MEDIUM will be used as default Possible values:
     * ["REDIS_SHARED_CORE_NANO", "REDIS_HIGHMEM_MEDIUM", "REDIS_HIGHMEM_XLARGE", "REDIS_STANDARD_SMALL"]
     */
    @JvmName("eadgkambkacvtley")
    public suspend fun nodeType(`value`: Output) {
        this.nodeType = value
    }

    /**
     * @param value
     */
    @JvmName("sbatphsurrntaayi")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Required. Each PscConfig configures the consumer network where two
     * network addresses will be designated to the cluster for client access.
     * Currently, only one PscConfig is supported.
     * Structure is documented below.
     */
    @JvmName("ujiqaqfulvsreosn")
    public suspend fun pscConfigs(`value`: Output>) {
        this.pscConfigs = value
    }

    @JvmName("allmtgsdpicwendl")
    public suspend fun pscConfigs(vararg values: Output) {
        this.pscConfigs = Output.all(values.asList())
    }

    /**
     * @param values Required. Each PscConfig configures the consumer network where two
     * network addresses will be designated to the cluster for client access.
     * Currently, only one PscConfig is supported.
     * Structure is documented below.
     */
    @JvmName("jatqjdhmfuityosv")
    public suspend fun pscConfigs(values: List>) {
        this.pscConfigs = Output.all(values)
    }

    /**
     * @param value Configure Redis Cluster behavior using a subset of native Redis configuration parameters. Please check Memorystore
     * documentation for the list of supported parameters:
     * https://cloud.google.com/memorystore/docs/cluster/supported-instance-configurations
     */
    @JvmName("pfvsmoljernroagq")
    public suspend fun redisConfigs(`value`: Output>) {
        this.redisConfigs = value
    }

    /**
     * @param value The name of the region of the Redis cluster.
     */
    @JvmName("wjwjgbuqlmumvfjs")
    public suspend fun region(`value`: Output) {
        this.region = value
    }

    /**
     * @param value Optional. The number of replica nodes per shard.
     */
    @JvmName("ekwqxwajapyhsmwx")
    public suspend fun replicaCount(`value`: Output) {
        this.replicaCount = value
    }

    /**
     * @param value Required. Number of shards for the Redis cluster.
     */
    @JvmName("ielidgrxwvwleudq")
    public suspend fun shardCount(`value`: Output) {
        this.shardCount = value
    }

    /**
     * @param value Optional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster.
     * Default value: "TRANSIT_ENCRYPTION_MODE_DISABLED" Possible values: ["TRANSIT_ENCRYPTION_MODE_UNSPECIFIED",
     * "TRANSIT_ENCRYPTION_MODE_DISABLED", "TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION"]
     */
    @JvmName("xoctclklwxvoglix")
    public suspend fun transitEncryptionMode(`value`: Output) {
        this.transitEncryptionMode = value
    }

    /**
     * @param value Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster.
     * Default value: "AUTH_MODE_DISABLED" Possible values: ["AUTH_MODE_UNSPECIFIED", "AUTH_MODE_IAM_AUTH",
     * "AUTH_MODE_DISABLED"]
     */
    @JvmName("vywwqsbjgutaisib")
    public suspend fun authorizationMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authorizationMode = mapped
    }

    /**
     * @param value Unique name of the resource in this scope including project and location using the form:
     * projects/{projectId}/locations/{locationId}/clusters/{clusterId}
     */
    @JvmName("wvanwgpvigfywsyq")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The nodeType for the Redis cluster. If not provided, REDIS_HIGHMEM_MEDIUM will be used as default Possible values:
     * ["REDIS_SHARED_CORE_NANO", "REDIS_HIGHMEM_MEDIUM", "REDIS_HIGHMEM_XLARGE", "REDIS_STANDARD_SMALL"]
     */
    @JvmName("xednsthxcksxejej")
    public suspend fun nodeType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodeType = mapped
    }

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

    /**
     * @param value Required. Each PscConfig configures the consumer network where two
     * network addresses will be designated to the cluster for client access.
     * Currently, only one PscConfig is supported.
     * Structure is documented below.
     */
    @JvmName("urvyluumxisqdgkg")
    public suspend fun pscConfigs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pscConfigs = mapped
    }

    /**
     * @param argument Required. Each PscConfig configures the consumer network where two
     * network addresses will be designated to the cluster for client access.
     * Currently, only one PscConfig is supported.
     * Structure is documented below.
     */
    @JvmName("xhktxvefrtfqvbfj")
    public suspend fun pscConfigs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ClusterPscConfigArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.pscConfigs = mapped
    }

    /**
     * @param argument Required. Each PscConfig configures the consumer network where two
     * network addresses will be designated to the cluster for client access.
     * Currently, only one PscConfig is supported.
     * Structure is documented below.
     */
    @JvmName("kkbaygkpjddshboh")
    public suspend fun pscConfigs(vararg argument: suspend ClusterPscConfigArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ClusterPscConfigArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.pscConfigs = mapped
    }

    /**
     * @param argument Required. Each PscConfig configures the consumer network where two
     * network addresses will be designated to the cluster for client access.
     * Currently, only one PscConfig is supported.
     * Structure is documented below.
     */
    @JvmName("hkclojuefdrtnbwy")
    public suspend fun pscConfigs(argument: suspend ClusterPscConfigArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ClusterPscConfigArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.pscConfigs = mapped
    }

    /**
     * @param values Required. Each PscConfig configures the consumer network where two
     * network addresses will be designated to the cluster for client access.
     * Currently, only one PscConfig is supported.
     * Structure is documented below.
     */
    @JvmName("wdnkswqoubwdddtn")
    public suspend fun pscConfigs(vararg values: ClusterPscConfigArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.pscConfigs = mapped
    }

    /**
     * @param value Configure Redis Cluster behavior using a subset of native Redis configuration parameters. Please check Memorystore
     * documentation for the list of supported parameters:
     * https://cloud.google.com/memorystore/docs/cluster/supported-instance-configurations
     */
    @JvmName("lvtqoovpsxsipkfk")
    public suspend fun redisConfigs(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.redisConfigs = mapped
    }

    /**
     * @param values Configure Redis Cluster behavior using a subset of native Redis configuration parameters. Please check Memorystore
     * documentation for the list of supported parameters:
     * https://cloud.google.com/memorystore/docs/cluster/supported-instance-configurations
     */
    @JvmName("whnhsxujyuvoiirr")
    public fun redisConfigs(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.redisConfigs = mapped
    }

    /**
     * @param value The name of the region of the Redis cluster.
     */
    @JvmName("afewesppaqdtimjn")
    public suspend fun region(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.region = mapped
    }

    /**
     * @param value Optional. The number of replica nodes per shard.
     */
    @JvmName("dknalhcifgawfqhe")
    public suspend fun replicaCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.replicaCount = mapped
    }

    /**
     * @param value Required. Number of shards for the Redis cluster.
     */
    @JvmName("rnphnlbbfkhfshef")
    public suspend fun shardCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.shardCount = mapped
    }

    /**
     * @param value Optional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster.
     * Default value: "TRANSIT_ENCRYPTION_MODE_DISABLED" Possible values: ["TRANSIT_ENCRYPTION_MODE_UNSPECIFIED",
     * "TRANSIT_ENCRYPTION_MODE_DISABLED", "TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION"]
     */
    @JvmName("tekifmiuqxqcavpg")
    public suspend fun transitEncryptionMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.transitEncryptionMode = mapped
    }

    internal fun build(): ClusterArgs = ClusterArgs(
        authorizationMode = authorizationMode,
        name = name,
        nodeType = nodeType,
        project = project,
        pscConfigs = pscConfigs,
        redisConfigs = redisConfigs,
        region = region,
        replicaCount = replicaCount,
        shardCount = shardCount,
        transitEncryptionMode = transitEncryptionMode,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy