InstanceArgs

data class InstanceArgs(val authorizedNetwork: Output<String>? = null, val displayName: Output<String>? = null, val labels: Output<Map<String, String>>? = null, val maintenancePolicy: Output<InstanceMaintenancePolicyArgs>? = null, val memcacheParameters: Output<InstanceMemcacheParametersArgs>? = null, val memcacheVersion: Output<String>? = null, val name: Output<String>? = null, val nodeConfig: Output<InstanceNodeConfigArgs>? = null, val nodeCount: Output<Int>? = null, val project: Output<String>? = null, val region: Output<String>? = null, val zones: Output<List<String>>? = null) : ConvertibleToJava<InstanceArgs>

A Google Cloud Memcache instance. To get more information about Instance, see:

Example Usage

Memcache Instance Basic

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.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) {
var memcacheNetwork = new Network("memcacheNetwork");
var serviceRange = new GlobalAddress("serviceRange", GlobalAddressArgs.builder()
.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()
.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());
}
}

Import

Instance can be imported using any of these accepted formats* projects/{{project}}/locations/{{region}}/instances/{{name}} * {{project}}/{{region}}/{{name}} * {{region}}/{{name}} * {{name}} In Terraform v1.5.0 and later, use an import block to import Instance using one of the formats above. For exampletf import { id = "projects/{{project}}/locations/{{region}}/instances/{{name}}" to = google_memcache_instance.default }

$ pulumi import gcp:memcache/instance:Instance When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Instance can be imported using one of the formats above. For example
$ pulumi import gcp:memcache/instance:Instance default projects/{{project}}/locations/{{region}}/instances/{{name}}
$ pulumi import gcp:memcache/instance:Instance default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:memcache/instance:Instance default {{region}}/{{name}}
$ pulumi import gcp:memcache/instance:Instance default {{name}}

Constructors

Link copied to clipboard
fun InstanceArgs(authorizedNetwork: Output<String>? = null, displayName: Output<String>? = null, labels: Output<Map<String, String>>? = null, maintenancePolicy: Output<InstanceMaintenancePolicyArgs>? = null, memcacheParameters: Output<InstanceMemcacheParametersArgs>? = null, memcacheVersion: Output<String>? = null, name: Output<String>? = null, nodeConfig: Output<InstanceNodeConfigArgs>? = null, nodeCount: Output<Int>? = null, project: Output<String>? = null, region: Output<String>? = null, zones: Output<List<String>>? = null)

Functions

Link copied to clipboard
open override fun toJava(): InstanceArgs

Properties

Link copied to clipboard
val authorizedNetwork: Output<String>? = null

The full name of the GCE network to connect the instance to. If not provided, 'default' will be used.

Link copied to clipboard
val displayName: Output<String>? = null

A user-visible name for the instance.

Link copied to clipboard
val labels: Output<Map<String, String>>? = null

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.

Link copied to clipboard

Maintenance policy for an instance. Structure is documented below.

Link copied to clipboard

User-specified parameters for this memcache instance. Structure is documented below.

Link copied to clipboard
val memcacheVersion: Output<String>? = null

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 is MEMCACHE_1_5. Possible values are: MEMCACHE_1_5, MEMCACHE_1_6_15.

Link copied to clipboard
val name: Output<String>? = null

The resource name of the instance.

Link copied to clipboard
val nodeConfig: Output<InstanceNodeConfigArgs>? = null

Configuration for memcache nodes. Structure is documented below.

Link copied to clipboard
val nodeCount: Output<Int>? = null

Number of nodes in the memcache instance.

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val region: Output<String>? = null

The region of the Memcache instance. If it is not provided, the provider region is used.

Link copied to clipboard
val zones: Output<List<String>>? = null

Zones where memcache nodes should be provisioned. If not provided, all zones will be used.