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

com.pulumi.gcp.memcache.kotlin.InstanceArgs.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.memcache.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.memcache.InstanceArgs.builder
import com.pulumi.gcp.memcache.kotlin.inputs.InstanceMaintenancePolicyArgs
import com.pulumi.gcp.memcache.kotlin.inputs.InstanceMaintenancePolicyArgsBuilder
import com.pulumi.gcp.memcache.kotlin.inputs.InstanceMemcacheParametersArgs
import com.pulumi.gcp.memcache.kotlin.inputs.InstanceMemcacheParametersArgsBuilder
import com.pulumi.gcp.memcache.kotlin.inputs.InstanceNodeConfigArgs
import com.pulumi.gcp.memcache.kotlin.inputs.InstanceNodeConfigArgsBuilder
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 Memcache instance.
 * To get more information about Instance, see:
 * * [API documentation](https://cloud.google.com/memorystore/docs/memcached/reference/rest/v1/projects.locations.instances)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/memcache/docs/creating-instances)
 * ## Example Usage
 * ### Memcache Instance Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * // This example assumes this network already exists.
 * // The API creates a tenant network per network authorized for a
 * // Memcache instance and that network is not deleted when the user-created
 * // network (authorized_network) is deleted, so this prevents issues
 * // with tenant network quota.
 * // If this network hasn't been created and you are using this example in your
 * // config, add an additional network resource or change
 * // this from "data"to "resource"
 * const memcacheNetwork = new gcp.compute.Network("memcache_network", {name: "test-network"});
 * const serviceRange = new gcp.compute.GlobalAddress("service_range", {
 *     name: "address",
 *     purpose: "VPC_PEERING",
 *     addressType: "INTERNAL",
 *     prefixLength: 16,
 *     network: memcacheNetwork.id,
 * });
 * const privateServiceConnection = new gcp.servicenetworking.Connection("private_service_connection", {
 *     network: memcacheNetwork.id,
 *     service: "servicenetworking.googleapis.com",
 *     reservedPeeringRanges: [serviceRange.name],
 * });
 * const instance = new gcp.memcache.Instance("instance", {
 *     name: "test-instance",
 *     authorizedNetwork: privateServiceConnection.network,
 *     labels: {
 *         env: "test",
 *     },
 *     nodeConfig: {
 *         cpuCount: 1,
 *         memorySizeMb: 1024,
 *     },
 *     nodeCount: 1,
 *     memcacheVersion: "MEMCACHE_1_5",
 *     maintenancePolicy: {
 *         weeklyMaintenanceWindows: [{
 *             day: "SATURDAY",
 *             duration: "14400s",
 *             startTime: {
 *                 hours: 0,
 *                 minutes: 30,
 *                 seconds: 0,
 *                 nanos: 0,
 *             },
 *         }],
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * # This example assumes this network already exists.
 * # The API creates a tenant network per network authorized for a
 * # Memcache instance and that network is not deleted when the user-created
 * # network (authorized_network) is deleted, so this prevents issues
 * # with tenant network quota.
 * # If this network hasn't been created and you are using this example in your
 * # config, add an additional network resource or change
 * # this from "data"to "resource"
 * memcache_network = gcp.compute.Network("memcache_network", name="test-network")
 * service_range = gcp.compute.GlobalAddress("service_range",
 *     name="address",
 *     purpose="VPC_PEERING",
 *     address_type="INTERNAL",
 *     prefix_length=16,
 *     network=memcache_network.id)
 * private_service_connection = gcp.servicenetworking.Connection("private_service_connection",
 *     network=memcache_network.id,
 *     service="servicenetworking.googleapis.com",
 *     reserved_peering_ranges=[service_range.name])
 * instance = gcp.memcache.Instance("instance",
 *     name="test-instance",
 *     authorized_network=private_service_connection.network,
 *     labels={
 *         "env": "test",
 *     },
 *     node_config=gcp.memcache.InstanceNodeConfigArgs(
 *         cpu_count=1,
 *         memory_size_mb=1024,
 *     ),
 *     node_count=1,
 *     memcache_version="MEMCACHE_1_5",
 *     maintenance_policy=gcp.memcache.InstanceMaintenancePolicyArgs(
 *         weekly_maintenance_windows=[gcp.memcache.InstanceMaintenancePolicyWeeklyMaintenanceWindowArgs(
 *             day="SATURDAY",
 *             duration="14400s",
 *             start_time=gcp.memcache.InstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeArgs(
 *                 hours=0,
 *                 minutes=30,
 *                 seconds=0,
 *                 nanos=0,
 *             ),
 *         )],
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     // This example assumes this network already exists.
 *     // The API creates a tenant network per network authorized for a
 *     // Memcache instance and that network is not deleted when the user-created
 *     // network (authorized_network) is deleted, so this prevents issues
 *     // with tenant network quota.
 *     // If this network hasn't been created and you are using this example in your
 *     // config, add an additional network resource or change
 *     // this from "data"to "resource"
 *     var memcacheNetwork = new Gcp.Compute.Network("memcache_network", new()
 *     {
 *         Name = "test-network",
 *     });
 *     var serviceRange = new Gcp.Compute.GlobalAddress("service_range", new()
 *     {
 *         Name = "address",
 *         Purpose = "VPC_PEERING",
 *         AddressType = "INTERNAL",
 *         PrefixLength = 16,
 *         Network = memcacheNetwork.Id,
 *     });
 *     var privateServiceConnection = new Gcp.ServiceNetworking.Connection("private_service_connection", new()
 *     {
 *         Network = memcacheNetwork.Id,
 *         Service = "servicenetworking.googleapis.com",
 *         ReservedPeeringRanges = new[]
 *         {
 *             serviceRange.Name,
 *         },
 *     });
 *     var instance = new Gcp.Memcache.Instance("instance", new()
 *     {
 *         Name = "test-instance",
 *         AuthorizedNetwork = privateServiceConnection.Network,
 *         Labels =
 *         {
 *             { "env", "test" },
 *         },
 *         NodeConfig = new Gcp.Memcache.Inputs.InstanceNodeConfigArgs
 *         {
 *             CpuCount = 1,
 *             MemorySizeMb = 1024,
 *         },
 *         NodeCount = 1,
 *         MemcacheVersion = "MEMCACHE_1_5",
 *         MaintenancePolicy = new Gcp.Memcache.Inputs.InstanceMaintenancePolicyArgs
 *         {
 *             WeeklyMaintenanceWindows = new[]
 *             {
 *                 new Gcp.Memcache.Inputs.InstanceMaintenancePolicyWeeklyMaintenanceWindowArgs
 *                 {
 *                     Day = "SATURDAY",
 *                     Duration = "14400s",
 *                     StartTime = new Gcp.Memcache.Inputs.InstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeArgs
 *                     {
 *                         Hours = 0,
 *                         Minutes = 30,
 *                         Seconds = 0,
 *                         Nanos = 0,
 *                     },
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/memcache"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/servicenetworking"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		// This example assumes this network already exists.
 * 		// The API creates a tenant network per network authorized for a
 * 		// Memcache instance and that network is not deleted when the user-created
 * 		// network (authorized_network) is deleted, so this prevents issues
 * 		// with tenant network quota.
 * 		// If this network hasn't been created and you are using this example in your
 * 		// config, add an additional network resource or change
 * 		// this from "data"to "resource"
 * 		memcacheNetwork, err := compute.NewNetwork(ctx, "memcache_network", &compute.NetworkArgs{
 * 			Name: pulumi.String("test-network"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		serviceRange, err := compute.NewGlobalAddress(ctx, "service_range", &compute.GlobalAddressArgs{
 * 			Name:         pulumi.String("address"),
 * 			Purpose:      pulumi.String("VPC_PEERING"),
 * 			AddressType:  pulumi.String("INTERNAL"),
 * 			PrefixLength: pulumi.Int(16),
 * 			Network:      memcacheNetwork.ID(),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		privateServiceConnection, err := servicenetworking.NewConnection(ctx, "private_service_connection", &servicenetworking.ConnectionArgs{
 * 			Network: memcacheNetwork.ID(),
 * 			Service: pulumi.String("servicenetworking.googleapis.com"),
 * 			ReservedPeeringRanges: pulumi.StringArray{
 * 				serviceRange.Name,
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = memcache.NewInstance(ctx, "instance", &memcache.InstanceArgs{
 * 			Name:              pulumi.String("test-instance"),
 * 			AuthorizedNetwork: privateServiceConnection.Network,
 * 			Labels: pulumi.StringMap{
 * 				"env": pulumi.String("test"),
 * 			},
 * 			NodeConfig: &memcache.InstanceNodeConfigArgs{
 * 				CpuCount:     pulumi.Int(1),
 * 				MemorySizeMb: pulumi.Int(1024),
 * 			},
 * 			NodeCount:       pulumi.Int(1),
 * 			MemcacheVersion: pulumi.String("MEMCACHE_1_5"),
 * 			MaintenancePolicy: &memcache.InstanceMaintenancePolicyArgs{
 * 				WeeklyMaintenanceWindows: memcache.InstanceMaintenancePolicyWeeklyMaintenanceWindowArray{
 * 					&memcache.InstanceMaintenancePolicyWeeklyMaintenanceWindowArgs{
 * 						Day:      pulumi.String("SATURDAY"),
 * 						Duration: pulumi.String("14400s"),
 * 						StartTime: &memcache.InstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeArgs{
 * 							Hours:   pulumi.Int(0),
 * 							Minutes: pulumi.Int(30),
 * 							Seconds: pulumi.Int(0),
 * 							Nanos:   pulumi.Int(0),
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		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.compute.GlobalAddress;
 * import com.pulumi.gcp.compute.GlobalAddressArgs;
 * import com.pulumi.gcp.servicenetworking.Connection;
 * import com.pulumi.gcp.servicenetworking.ConnectionArgs;
 * import com.pulumi.gcp.memcache.Instance;
 * import com.pulumi.gcp.memcache.InstanceArgs;
 * import com.pulumi.gcp.memcache.inputs.InstanceNodeConfigArgs;
 * import com.pulumi.gcp.memcache.inputs.InstanceMaintenancePolicyArgs;
 * 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) {
 *         // This example assumes this network already exists.
 *         // The API creates a tenant network per network authorized for a
 *         // Memcache instance and that network is not deleted when the user-created
 *         // network (authorized_network) is deleted, so this prevents issues
 *         // with tenant network quota.
 *         // If this network hasn't been created and you are using this example in your
 *         // config, add an additional network resource or change
 *         // this from "data"to "resource"
 *         var memcacheNetwork = new Network("memcacheNetwork", NetworkArgs.builder()
 *             .name("test-network")
 *             .build());
 *         var serviceRange = new GlobalAddress("serviceRange", GlobalAddressArgs.builder()
 *             .name("address")
 *             .purpose("VPC_PEERING")
 *             .addressType("INTERNAL")
 *             .prefixLength(16)
 *             .network(memcacheNetwork.id())
 *             .build());
 *         var privateServiceConnection = new Connection("privateServiceConnection", ConnectionArgs.builder()
 *             .network(memcacheNetwork.id())
 *             .service("servicenetworking.googleapis.com")
 *             .reservedPeeringRanges(serviceRange.name())
 *             .build());
 *         var instance = new Instance("instance", InstanceArgs.builder()
 *             .name("test-instance")
 *             .authorizedNetwork(privateServiceConnection.network())
 *             .labels(Map.of("env", "test"))
 *             .nodeConfig(InstanceNodeConfigArgs.builder()
 *                 .cpuCount(1)
 *                 .memorySizeMb(1024)
 *                 .build())
 *             .nodeCount(1)
 *             .memcacheVersion("MEMCACHE_1_5")
 *             .maintenancePolicy(InstanceMaintenancePolicyArgs.builder()
 *                 .weeklyMaintenanceWindows(InstanceMaintenancePolicyWeeklyMaintenanceWindowArgs.builder()
 *                     .day("SATURDAY")
 *                     .duration("14400s")
 *                     .startTime(InstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeArgs.builder()
 *                         .hours(0)
 *                         .minutes(30)
 *                         .seconds(0)
 *                         .nanos(0)
 *                         .build())
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   # This example assumes this network already exists.
 *   # // The API creates a tenant network per network authorized for a
 *   # // Memcache instance and that network is not deleted when the user-created
 *   # // network (authorized_network) is deleted, so this prevents issues
 *   # // with tenant network quota.
 *   # // If this network hasn't been created and you are using this example in your
 *   # // config, add an additional network resource or change
 *   # // this from "data"to "resource"
 *   memcacheNetwork:
 *     type: gcp:compute:Network
 *     name: memcache_network
 *     properties:
 *       name: test-network
 *   serviceRange:
 *     type: gcp:compute:GlobalAddress
 *     name: service_range
 *     properties:
 *       name: address
 *       purpose: VPC_PEERING
 *       addressType: INTERNAL
 *       prefixLength: 16
 *       network: ${memcacheNetwork.id}
 *   privateServiceConnection:
 *     type: gcp:servicenetworking:Connection
 *     name: private_service_connection
 *     properties:
 *       network: ${memcacheNetwork.id}
 *       service: servicenetworking.googleapis.com
 *       reservedPeeringRanges:
 *         - ${serviceRange.name}
 *   instance:
 *     type: gcp:memcache:Instance
 *     properties:
 *       name: test-instance
 *       authorizedNetwork: ${privateServiceConnection.network}
 *       labels:
 *         env: test
 *       nodeConfig:
 *         cpuCount: 1
 *         memorySizeMb: 1024
 *       nodeCount: 1
 *       memcacheVersion: MEMCACHE_1_5
 *       maintenancePolicy:
 *         weeklyMaintenanceWindows:
 *           - day: SATURDAY
 *             duration: 14400s
 *             startTime:
 *               hours: 0
 *               minutes: 30
 *               seconds: 0
 *               nanos: 0
 * ```
 * 
 * ## Import
 * Instance can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{region}}/instances/{{name}}`
 * * `{{project}}/{{region}}/{{name}}`
 * * `{{region}}/{{name}}`
 * * `{{name}}`
 * When using the `pulumi import` command, Instance can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:memcache/instance:Instance default projects/{{project}}/locations/{{region}}/instances/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:memcache/instance:Instance default {{project}}/{{region}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:memcache/instance:Instance default {{region}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:memcache/instance:Instance default {{name}}
 * ```
 * @property authorizedNetwork The full name of the GCE network to connect the instance to. If not provided, 'default' will be used.
 * @property displayName A user-visible name for the instance.
 * @property labels Resource labels to represent user-provided metadata. **Note**: This field is non-authoritative, and will only manage the
 * labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the
 * resource.
 * @property maintenancePolicy Maintenance policy for an instance.
 * @property memcacheParameters User-specified parameters for this memcache instance.
 * @property memcacheVersion The major version of Memcached software. If not provided, latest supported version will be used. Currently the latest
 * supported major version is MEMCACHE_1_5. The minor version will be automatically determined by our system based on the
 * latest supported minor version. Default value: "MEMCACHE_1_5" Possible values: ["MEMCACHE_1_5", "MEMCACHE_1_6_15"]
 * @property name The resource name of the instance.
 * @property nodeConfig Configuration for memcache nodes.
 * Structure is documented below.
 * @property nodeCount Number of nodes in the memcache instance.
 * @property project
 * @property region The region of the Memcache instance. If it is not provided, the provider region is used.
 * @property reservedIpRangeIds Contains the name of allocated IP address ranges associated with the private service access connection for example,
 * "test-default" associated with IP range 10.0.0.0/29.
 * @property zones Zones where memcache nodes should be provisioned. If not provided, all zones will be used.
 */
public data class InstanceArgs(
    public val authorizedNetwork: Output? = null,
    public val displayName: Output? = null,
    public val labels: Output>? = null,
    public val maintenancePolicy: Output? = null,
    public val memcacheParameters: Output? = null,
    public val memcacheVersion: Output? = null,
    public val name: Output? = null,
    public val nodeConfig: Output? = null,
    public val nodeCount: Output? = null,
    public val project: Output? = null,
    public val region: Output? = null,
    public val reservedIpRangeIds: Output>? = null,
    public val zones: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.memcache.InstanceArgs =
        com.pulumi.gcp.memcache.InstanceArgs.builder()
            .authorizedNetwork(authorizedNetwork?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .maintenancePolicy(maintenancePolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .memcacheParameters(
                memcacheParameters?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .memcacheVersion(memcacheVersion?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .nodeConfig(nodeConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .nodeCount(nodeCount?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .region(region?.applyValue({ args0 -> args0 }))
            .reservedIpRangeIds(reservedIpRangeIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .zones(zones?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [InstanceArgs].
 */
@PulumiTagMarker
public class InstanceArgsBuilder internal constructor() {
    private var authorizedNetwork: Output? = null

    private var displayName: Output? = null

    private var labels: Output>? = null

    private var maintenancePolicy: Output? = null

    private var memcacheParameters: Output? = null

    private var memcacheVersion: Output? = null

    private var name: Output? = null

    private var nodeConfig: Output? = null

    private var nodeCount: Output? = null

    private var project: Output? = null

    private var region: Output? = null

    private var reservedIpRangeIds: Output>? = null

    private var zones: Output>? = null

    /**
     * @param value The full name of the GCE network to connect the instance to. If not provided, 'default' will be used.
     */
    @JvmName("novvrqbdujhljjhr")
    public suspend fun authorizedNetwork(`value`: Output) {
        this.authorizedNetwork = value
    }

    /**
     * @param value A user-visible name for the instance.
     */
    @JvmName("axdryajkrjeallas")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Resource labels to represent user-provided metadata. **Note**: This field is non-authoritative, and will only manage the
     * labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the
     * resource.
     */
    @JvmName("ptaxctqlbyuspcaa")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value Maintenance policy for an instance.
     */
    @JvmName("ixkmvqjlgsmwbbci")
    public suspend fun maintenancePolicy(`value`: Output) {
        this.maintenancePolicy = value
    }

    /**
     * @param value User-specified parameters for this memcache instance.
     */
    @JvmName("mfbpsmttoabfejro")
    public suspend fun memcacheParameters(`value`: Output) {
        this.memcacheParameters = value
    }

    /**
     * @param value The major version of Memcached software. If not provided, latest supported version will be used. Currently the latest
     * supported major version is MEMCACHE_1_5. The minor version will be automatically determined by our system based on the
     * latest supported minor version. Default value: "MEMCACHE_1_5" Possible values: ["MEMCACHE_1_5", "MEMCACHE_1_6_15"]
     */
    @JvmName("tpjryccbliiascfy")
    public suspend fun memcacheVersion(`value`: Output) {
        this.memcacheVersion = value
    }

    /**
     * @param value The resource name of the instance.
     */
    @JvmName("tggmkeokxvrcvhxq")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Configuration for memcache nodes.
     * Structure is documented below.
     */
    @JvmName("qtfcdmtshtvrauny")
    public suspend fun nodeConfig(`value`: Output) {
        this.nodeConfig = value
    }

    /**
     * @param value Number of nodes in the memcache instance.
     */
    @JvmName("rsnxixsbcnneacnj")
    public suspend fun nodeCount(`value`: Output) {
        this.nodeCount = value
    }

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

    /**
     * @param value The region of the Memcache instance. If it is not provided, the provider region is used.
     */
    @JvmName("ypkslpdjyjvwruhj")
    public suspend fun region(`value`: Output) {
        this.region = value
    }

    /**
     * @param value Contains the name of allocated IP address ranges associated with the private service access connection for example,
     * "test-default" associated with IP range 10.0.0.0/29.
     */
    @JvmName("uoxupygodbtulsnk")
    public suspend fun reservedIpRangeIds(`value`: Output>) {
        this.reservedIpRangeIds = value
    }

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

    /**
     * @param values Contains the name of allocated IP address ranges associated with the private service access connection for example,
     * "test-default" associated with IP range 10.0.0.0/29.
     */
    @JvmName("dddfeqcdwokspuwh")
    public suspend fun reservedIpRangeIds(values: List>) {
        this.reservedIpRangeIds = Output.all(values)
    }

    /**
     * @param value Zones where memcache nodes should be provisioned. If not provided, all zones will be used.
     */
    @JvmName("rboltjxymjfgsrrj")
    public suspend fun zones(`value`: Output>) {
        this.zones = value
    }

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

    /**
     * @param values Zones where memcache nodes should be provisioned. If not provided, all zones will be used.
     */
    @JvmName("tkikgmpdhcqakcmt")
    public suspend fun zones(values: List>) {
        this.zones = Output.all(values)
    }

    /**
     * @param value The full name of the GCE network to connect the instance to. If not provided, 'default' will be used.
     */
    @JvmName("ynivxfpkysgiroxi")
    public suspend fun authorizedNetwork(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authorizedNetwork = mapped
    }

    /**
     * @param value A user-visible name for the instance.
     */
    @JvmName("bkpiqkdxkgmuidff")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Resource labels to represent user-provided metadata. **Note**: This field is non-authoritative, and will only manage the
     * labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the
     * resource.
     */
    @JvmName("nniewnbytgiowdrw")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Resource labels to represent user-provided metadata. **Note**: This field is non-authoritative, and will only manage the
     * labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the
     * resource.
     */
    @JvmName("hvkrabruxamwovdl")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value Maintenance policy for an instance.
     */
    @JvmName("moqsibatccybjmbv")
    public suspend fun maintenancePolicy(`value`: InstanceMaintenancePolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maintenancePolicy = mapped
    }

    /**
     * @param argument Maintenance policy for an instance.
     */
    @JvmName("xhkrggnydjhgtist")
    public suspend fun maintenancePolicy(argument: suspend InstanceMaintenancePolicyArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceMaintenancePolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.maintenancePolicy = mapped
    }

    /**
     * @param value User-specified parameters for this memcache instance.
     */
    @JvmName("psfwiyceevcuvmaa")
    public suspend fun memcacheParameters(`value`: InstanceMemcacheParametersArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.memcacheParameters = mapped
    }

    /**
     * @param argument User-specified parameters for this memcache instance.
     */
    @JvmName("bcyiaffsiwstqniq")
    public suspend fun memcacheParameters(argument: suspend InstanceMemcacheParametersArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceMemcacheParametersArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.memcacheParameters = mapped
    }

    /**
     * @param value The major version of Memcached software. If not provided, latest supported version will be used. Currently the latest
     * supported major version is MEMCACHE_1_5. The minor version will be automatically determined by our system based on the
     * latest supported minor version. Default value: "MEMCACHE_1_5" Possible values: ["MEMCACHE_1_5", "MEMCACHE_1_6_15"]
     */
    @JvmName("wtisgfmdjiemnwwk")
    public suspend fun memcacheVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.memcacheVersion = mapped
    }

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

    /**
     * @param value Configuration for memcache nodes.
     * Structure is documented below.
     */
    @JvmName("gqkyeunhlnnpqctf")
    public suspend fun nodeConfig(`value`: InstanceNodeConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodeConfig = mapped
    }

    /**
     * @param argument Configuration for memcache nodes.
     * Structure is documented below.
     */
    @JvmName("cqoajigkwkucpoce")
    public suspend fun nodeConfig(argument: suspend InstanceNodeConfigArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceNodeConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.nodeConfig = mapped
    }

    /**
     * @param value Number of nodes in the memcache instance.
     */
    @JvmName("wrfsietyvlprrpss")
    public suspend fun nodeCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodeCount = mapped
    }

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

    /**
     * @param value The region of the Memcache instance. If it is not provided, the provider region is used.
     */
    @JvmName("eyxudphjrplsblhu")
    public suspend fun region(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.region = mapped
    }

    /**
     * @param value Contains the name of allocated IP address ranges associated with the private service access connection for example,
     * "test-default" associated with IP range 10.0.0.0/29.
     */
    @JvmName("grkstgkgjwsqksbo")
    public suspend fun reservedIpRangeIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reservedIpRangeIds = mapped
    }

    /**
     * @param values Contains the name of allocated IP address ranges associated with the private service access connection for example,
     * "test-default" associated with IP range 10.0.0.0/29.
     */
    @JvmName("ndhafmhvfyejknha")
    public suspend fun reservedIpRangeIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.reservedIpRangeIds = mapped
    }

    /**
     * @param value Zones where memcache nodes should be provisioned. If not provided, all zones will be used.
     */
    @JvmName("odqlnfnbjdnmxkyu")
    public suspend fun zones(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    /**
     * @param values Zones where memcache nodes should be provisioned. If not provided, all zones will be used.
     */
    @JvmName("khkjbpwwqajdjwkg")
    public suspend fun zones(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    internal fun build(): InstanceArgs = InstanceArgs(
        authorizedNetwork = authorizedNetwork,
        displayName = displayName,
        labels = labels,
        maintenancePolicy = maintenancePolicy,
        memcacheParameters = memcacheParameters,
        memcacheVersion = memcacheVersion,
        name = name,
        nodeConfig = nodeConfig,
        nodeCount = nodeCount,
        project = project,
        region = region,
        reservedIpRangeIds = reservedIpRangeIds,
        zones = zones,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy