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

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

package com.pulumi.gcp.memorystore.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.memorystore.InstanceArgs.builder
import com.pulumi.gcp.memorystore.kotlin.inputs.InstanceDesiredPscAutoConnectionArgs
import com.pulumi.gcp.memorystore.kotlin.inputs.InstanceDesiredPscAutoConnectionArgsBuilder
import com.pulumi.gcp.memorystore.kotlin.inputs.InstancePersistenceConfigArgs
import com.pulumi.gcp.memorystore.kotlin.inputs.InstancePersistenceConfigArgsBuilder
import com.pulumi.gcp.memorystore.kotlin.inputs.InstanceZoneDistributionConfigArgs
import com.pulumi.gcp.memorystore.kotlin.inputs.InstanceZoneDistributionConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
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 Memorystore instance.
 * ## Example Usage
 * ### Memorystore Instance Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const producerNet = new gcp.compute.Network("producer_net", {
 *     name: "my-network",
 *     autoCreateSubnetworks: false,
 * });
 * const producerSubnet = new gcp.compute.Subnetwork("producer_subnet", {
 *     name: "my-subnet",
 *     ipCidrRange: "10.0.0.248/29",
 *     region: "us-central1",
 *     network: producerNet.id,
 * });
 * const _default = new gcp.networkconnectivity.ServiceConnectionPolicy("default", {
 *     name: "my-policy",
 *     location: "us-central1",
 *     serviceClass: "gcp-memorystore",
 *     description: "my basic service connection policy",
 *     network: producerNet.id,
 *     pscConfig: {
 *         subnetworks: [producerSubnet.id],
 *     },
 * });
 * const project = gcp.organizations.getProject({});
 * const instance_basic = new gcp.memorystore.Instance("instance-basic", {
 *     instanceId: "basic-instance",
 *     shardCount: 3,
 *     desiredPscAutoConnections: [{
 *         network: producerNet.id,
 *         projectId: project.then(project => project.projectId),
 *     }],
 *     location: "us-central1",
 *     deletionProtectionEnabled: false,
 * }, {
 *     dependsOn: [_default],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * producer_net = gcp.compute.Network("producer_net",
 *     name="my-network",
 *     auto_create_subnetworks=False)
 * producer_subnet = gcp.compute.Subnetwork("producer_subnet",
 *     name="my-subnet",
 *     ip_cidr_range="10.0.0.248/29",
 *     region="us-central1",
 *     network=producer_net.id)
 * default = gcp.networkconnectivity.ServiceConnectionPolicy("default",
 *     name="my-policy",
 *     location="us-central1",
 *     service_class="gcp-memorystore",
 *     description="my basic service connection policy",
 *     network=producer_net.id,
 *     psc_config={
 *         "subnetworks": [producer_subnet.id],
 *     })
 * project = gcp.organizations.get_project()
 * instance_basic = gcp.memorystore.Instance("instance-basic",
 *     instance_id="basic-instance",
 *     shard_count=3,
 *     desired_psc_auto_connections=[{
 *         "network": producer_net.id,
 *         "project_id": project.project_id,
 *     }],
 *     location="us-central1",
 *     deletion_protection_enabled=False,
 *     opts = pulumi.ResourceOptions(depends_on=[default]))
 * ```
 * ```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 = "my-network",
 *         AutoCreateSubnetworks = false,
 *     });
 *     var producerSubnet = new Gcp.Compute.Subnetwork("producer_subnet", new()
 *     {
 *         Name = "my-subnet",
 *         IpCidrRange = "10.0.0.248/29",
 *         Region = "us-central1",
 *         Network = producerNet.Id,
 *     });
 *     var @default = new Gcp.NetworkConnectivity.ServiceConnectionPolicy("default", new()
 *     {
 *         Name = "my-policy",
 *         Location = "us-central1",
 *         ServiceClass = "gcp-memorystore",
 *         Description = "my basic service connection policy",
 *         Network = producerNet.Id,
 *         PscConfig = new Gcp.NetworkConnectivity.Inputs.ServiceConnectionPolicyPscConfigArgs
 *         {
 *             Subnetworks = new[]
 *             {
 *                 producerSubnet.Id,
 *             },
 *         },
 *     });
 *     var project = Gcp.Organizations.GetProject.Invoke();
 *     var instance_basic = new Gcp.MemoryStore.Instance("instance-basic", new()
 *     {
 *         InstanceId = "basic-instance",
 *         ShardCount = 3,
 *         DesiredPscAutoConnections = new[]
 *         {
 *             new Gcp.MemoryStore.Inputs.InstanceDesiredPscAutoConnectionArgs
 *             {
 *                 Network = producerNet.Id,
 *                 ProjectId = project.Apply(getProjectResult => getProjectResult.ProjectId),
 *             },
 *         },
 *         Location = "us-central1",
 *         DeletionProtectionEnabled = false,
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             @default,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/memorystore"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networkconnectivity"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
 * 	"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("my-network"),
 * 			AutoCreateSubnetworks: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		producerSubnet, err := compute.NewSubnetwork(ctx, "producer_subnet", &compute.SubnetworkArgs{
 * 			Name:        pulumi.String("my-subnet"),
 * 			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("my-policy"),
 * 			Location:     pulumi.String("us-central1"),
 * 			ServiceClass: pulumi.String("gcp-memorystore"),
 * 			Description:  pulumi.String("my basic service connection policy"),
 * 			Network:      producerNet.ID(),
 * 			PscConfig: &networkconnectivity.ServiceConnectionPolicyPscConfigArgs{
 * 				Subnetworks: pulumi.StringArray{
 * 					producerSubnet.ID(),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = memorystore.NewInstance(ctx, "instance-basic", &memorystore.InstanceArgs{
 * 			InstanceId: pulumi.String("basic-instance"),
 * 			ShardCount: pulumi.Int(3),
 * 			DesiredPscAutoConnections: memorystore.InstanceDesiredPscAutoConnectionArray{
 * 				&memorystore.InstanceDesiredPscAutoConnectionArgs{
 * 					Network:   producerNet.ID(),
 * 					ProjectId: pulumi.String(project.ProjectId),
 * 				},
 * 			},
 * 			Location:                  pulumi.String("us-central1"),
 * 			DeletionProtectionEnabled: pulumi.Bool(false),
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			_default,
 * 		}))
 * 		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.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 com.pulumi.gcp.organizations.OrganizationsFunctions;
 * import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
 * import com.pulumi.gcp.memorystore.Instance;
 * import com.pulumi.gcp.memorystore.InstanceArgs;
 * import com.pulumi.gcp.memorystore.inputs.InstanceDesiredPscAutoConnectionArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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("my-network")
 *             .autoCreateSubnetworks(false)
 *             .build());
 *         var producerSubnet = new Subnetwork("producerSubnet", SubnetworkArgs.builder()
 *             .name("my-subnet")
 *             .ipCidrRange("10.0.0.248/29")
 *             .region("us-central1")
 *             .network(producerNet.id())
 *             .build());
 *         var default_ = new ServiceConnectionPolicy("default", ServiceConnectionPolicyArgs.builder()
 *             .name("my-policy")
 *             .location("us-central1")
 *             .serviceClass("gcp-memorystore")
 *             .description("my basic service connection policy")
 *             .network(producerNet.id())
 *             .pscConfig(ServiceConnectionPolicyPscConfigArgs.builder()
 *                 .subnetworks(producerSubnet.id())
 *                 .build())
 *             .build());
 *         final var project = OrganizationsFunctions.getProject();
 *         var instance_basic = new Instance("instance-basic", InstanceArgs.builder()
 *             .instanceId("basic-instance")
 *             .shardCount(3)
 *             .desiredPscAutoConnections(InstanceDesiredPscAutoConnectionArgs.builder()
 *                 .network(producerNet.id())
 *                 .projectId(project.applyValue(getProjectResult -> getProjectResult.projectId()))
 *                 .build())
 *             .location("us-central1")
 *             .deletionProtectionEnabled(false)
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(default_)
 *                 .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   instance-basic:
 *     type: gcp:memorystore:Instance
 *     properties:
 *       instanceId: basic-instance
 *       shardCount: 3
 *       desiredPscAutoConnections:
 *         - network: ${producerNet.id}
 *           projectId: ${project.projectId}
 *       location: us-central1
 *       deletionProtectionEnabled: false
 *     options:
 *       dependsOn:
 *         - ${default}
 *   default:
 *     type: gcp:networkconnectivity:ServiceConnectionPolicy
 *     properties:
 *       name: my-policy
 *       location: us-central1
 *       serviceClass: gcp-memorystore
 *       description: my basic service connection policy
 *       network: ${producerNet.id}
 *       pscConfig:
 *         subnetworks:
 *           - ${producerSubnet.id}
 *   producerSubnet:
 *     type: gcp:compute:Subnetwork
 *     name: producer_subnet
 *     properties:
 *       name: my-subnet
 *       ipCidrRange: 10.0.0.248/29
 *       region: us-central1
 *       network: ${producerNet.id}
 *   producerNet:
 *     type: gcp:compute:Network
 *     name: producer_net
 *     properties:
 *       name: my-network
 *       autoCreateSubnetworks: false
 * variables:
 *   project:
 *     fn::invoke:
 *       function: gcp:organizations:getProject
 *       arguments: {}
 * ```
 * 
 * ### Memorystore Instance Full
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const producerNet = new gcp.compute.Network("producer_net", {
 *     name: "my-network",
 *     autoCreateSubnetworks: false,
 * });
 * const producerSubnet = new gcp.compute.Subnetwork("producer_subnet", {
 *     name: "my-subnet",
 *     ipCidrRange: "10.0.0.248/29",
 *     region: "us-central1",
 *     network: producerNet.id,
 * });
 * const _default = new gcp.networkconnectivity.ServiceConnectionPolicy("default", {
 *     name: "my-policy",
 *     location: "us-central1",
 *     serviceClass: "gcp-memorystore",
 *     description: "my basic service connection policy",
 *     network: producerNet.id,
 *     pscConfig: {
 *         subnetworks: [producerSubnet.id],
 *     },
 * });
 * const project = gcp.organizations.getProject({});
 * const instance_full = new gcp.memorystore.Instance("instance-full", {
 *     instanceId: "full-instance",
 *     shardCount: 3,
 *     desiredPscAutoConnections: [{
 *         network: producerNet.id,
 *         projectId: project.then(project => project.projectId),
 *     }],
 *     location: "us-central1",
 *     replicaCount: 2,
 *     nodeType: "SHARED_CORE_NANO",
 *     transitEncryptionMode: "TRANSIT_ENCRYPTION_DISABLED",
 *     authorizationMode: "AUTH_DISABLED",
 *     engineConfigs: {
 *         "maxmemory-policy": "volatile-ttl",
 *     },
 *     zoneDistributionConfig: {
 *         mode: "SINGLE_ZONE",
 *         zone: "us-central1-b",
 *     },
 *     engineVersion: "VALKEY_7_2",
 *     deletionProtectionEnabled: false,
 *     mode: "CLUSTER",
 *     persistenceConfig: {
 *         mode: "RDB",
 *         rdbConfig: {
 *             rdbSnapshotPeriod: "ONE_HOUR",
 *             rdbSnapshotStartTime: "2024-10-02T15:01:23Z",
 *         },
 *     },
 *     labels: {
 *         abc: "xyz",
 *     },
 * }, {
 *     dependsOn: [_default],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * producer_net = gcp.compute.Network("producer_net",
 *     name="my-network",
 *     auto_create_subnetworks=False)
 * producer_subnet = gcp.compute.Subnetwork("producer_subnet",
 *     name="my-subnet",
 *     ip_cidr_range="10.0.0.248/29",
 *     region="us-central1",
 *     network=producer_net.id)
 * default = gcp.networkconnectivity.ServiceConnectionPolicy("default",
 *     name="my-policy",
 *     location="us-central1",
 *     service_class="gcp-memorystore",
 *     description="my basic service connection policy",
 *     network=producer_net.id,
 *     psc_config={
 *         "subnetworks": [producer_subnet.id],
 *     })
 * project = gcp.organizations.get_project()
 * instance_full = gcp.memorystore.Instance("instance-full",
 *     instance_id="full-instance",
 *     shard_count=3,
 *     desired_psc_auto_connections=[{
 *         "network": producer_net.id,
 *         "project_id": project.project_id,
 *     }],
 *     location="us-central1",
 *     replica_count=2,
 *     node_type="SHARED_CORE_NANO",
 *     transit_encryption_mode="TRANSIT_ENCRYPTION_DISABLED",
 *     authorization_mode="AUTH_DISABLED",
 *     engine_configs={
 *         "maxmemory-policy": "volatile-ttl",
 *     },
 *     zone_distribution_config={
 *         "mode": "SINGLE_ZONE",
 *         "zone": "us-central1-b",
 *     },
 *     engine_version="VALKEY_7_2",
 *     deletion_protection_enabled=False,
 *     mode="CLUSTER",
 *     persistence_config={
 *         "mode": "RDB",
 *         "rdb_config": {
 *             "rdb_snapshot_period": "ONE_HOUR",
 *             "rdb_snapshot_start_time": "2024-10-02T15:01:23Z",
 *         },
 *     },
 *     labels={
 *         "abc": "xyz",
 *     },
 *     opts = pulumi.ResourceOptions(depends_on=[default]))
 * ```
 * ```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 = "my-network",
 *         AutoCreateSubnetworks = false,
 *     });
 *     var producerSubnet = new Gcp.Compute.Subnetwork("producer_subnet", new()
 *     {
 *         Name = "my-subnet",
 *         IpCidrRange = "10.0.0.248/29",
 *         Region = "us-central1",
 *         Network = producerNet.Id,
 *     });
 *     var @default = new Gcp.NetworkConnectivity.ServiceConnectionPolicy("default", new()
 *     {
 *         Name = "my-policy",
 *         Location = "us-central1",
 *         ServiceClass = "gcp-memorystore",
 *         Description = "my basic service connection policy",
 *         Network = producerNet.Id,
 *         PscConfig = new Gcp.NetworkConnectivity.Inputs.ServiceConnectionPolicyPscConfigArgs
 *         {
 *             Subnetworks = new[]
 *             {
 *                 producerSubnet.Id,
 *             },
 *         },
 *     });
 *     var project = Gcp.Organizations.GetProject.Invoke();
 *     var instance_full = new Gcp.MemoryStore.Instance("instance-full", new()
 *     {
 *         InstanceId = "full-instance",
 *         ShardCount = 3,
 *         DesiredPscAutoConnections = new[]
 *         {
 *             new Gcp.MemoryStore.Inputs.InstanceDesiredPscAutoConnectionArgs
 *             {
 *                 Network = producerNet.Id,
 *                 ProjectId = project.Apply(getProjectResult => getProjectResult.ProjectId),
 *             },
 *         },
 *         Location = "us-central1",
 *         ReplicaCount = 2,
 *         NodeType = "SHARED_CORE_NANO",
 *         TransitEncryptionMode = "TRANSIT_ENCRYPTION_DISABLED",
 *         AuthorizationMode = "AUTH_DISABLED",
 *         EngineConfigs =
 *         {
 *             { "maxmemory-policy", "volatile-ttl" },
 *         },
 *         ZoneDistributionConfig = new Gcp.MemoryStore.Inputs.InstanceZoneDistributionConfigArgs
 *         {
 *             Mode = "SINGLE_ZONE",
 *             Zone = "us-central1-b",
 *         },
 *         EngineVersion = "VALKEY_7_2",
 *         DeletionProtectionEnabled = false,
 *         Mode = "CLUSTER",
 *         PersistenceConfig = new Gcp.MemoryStore.Inputs.InstancePersistenceConfigArgs
 *         {
 *             Mode = "RDB",
 *             RdbConfig = new Gcp.MemoryStore.Inputs.InstancePersistenceConfigRdbConfigArgs
 *             {
 *                 RdbSnapshotPeriod = "ONE_HOUR",
 *                 RdbSnapshotStartTime = "2024-10-02T15:01:23Z",
 *             },
 *         },
 *         Labels =
 *         {
 *             { "abc", "xyz" },
 *         },
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             @default,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/memorystore"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networkconnectivity"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
 * 	"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("my-network"),
 * 			AutoCreateSubnetworks: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		producerSubnet, err := compute.NewSubnetwork(ctx, "producer_subnet", &compute.SubnetworkArgs{
 * 			Name:        pulumi.String("my-subnet"),
 * 			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("my-policy"),
 * 			Location:     pulumi.String("us-central1"),
 * 			ServiceClass: pulumi.String("gcp-memorystore"),
 * 			Description:  pulumi.String("my basic service connection policy"),
 * 			Network:      producerNet.ID(),
 * 			PscConfig: &networkconnectivity.ServiceConnectionPolicyPscConfigArgs{
 * 				Subnetworks: pulumi.StringArray{
 * 					producerSubnet.ID(),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = memorystore.NewInstance(ctx, "instance-full", &memorystore.InstanceArgs{
 * 			InstanceId: pulumi.String("full-instance"),
 * 			ShardCount: pulumi.Int(3),
 * 			DesiredPscAutoConnections: memorystore.InstanceDesiredPscAutoConnectionArray{
 * 				&memorystore.InstanceDesiredPscAutoConnectionArgs{
 * 					Network:   producerNet.ID(),
 * 					ProjectId: pulumi.String(project.ProjectId),
 * 				},
 * 			},
 * 			Location:              pulumi.String("us-central1"),
 * 			ReplicaCount:          pulumi.Int(2),
 * 			NodeType:              pulumi.String("SHARED_CORE_NANO"),
 * 			TransitEncryptionMode: pulumi.String("TRANSIT_ENCRYPTION_DISABLED"),
 * 			AuthorizationMode:     pulumi.String("AUTH_DISABLED"),
 * 			EngineConfigs: pulumi.StringMap{
 * 				"maxmemory-policy": pulumi.String("volatile-ttl"),
 * 			},
 * 			ZoneDistributionConfig: &memorystore.InstanceZoneDistributionConfigArgs{
 * 				Mode: pulumi.String("SINGLE_ZONE"),
 * 				Zone: pulumi.String("us-central1-b"),
 * 			},
 * 			EngineVersion:             pulumi.String("VALKEY_7_2"),
 * 			DeletionProtectionEnabled: pulumi.Bool(false),
 * 			Mode:                      pulumi.String("CLUSTER"),
 * 			PersistenceConfig: &memorystore.InstancePersistenceConfigArgs{
 * 				Mode: pulumi.String("RDB"),
 * 				RdbConfig: &memorystore.InstancePersistenceConfigRdbConfigArgs{
 * 					RdbSnapshotPeriod:    pulumi.String("ONE_HOUR"),
 * 					RdbSnapshotStartTime: pulumi.String("2024-10-02T15:01:23Z"),
 * 				},
 * 			},
 * 			Labels: pulumi.StringMap{
 * 				"abc": pulumi.String("xyz"),
 * 			},
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			_default,
 * 		}))
 * 		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.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 com.pulumi.gcp.organizations.OrganizationsFunctions;
 * import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
 * import com.pulumi.gcp.memorystore.Instance;
 * import com.pulumi.gcp.memorystore.InstanceArgs;
 * import com.pulumi.gcp.memorystore.inputs.InstanceDesiredPscAutoConnectionArgs;
 * import com.pulumi.gcp.memorystore.inputs.InstanceZoneDistributionConfigArgs;
 * import com.pulumi.gcp.memorystore.inputs.InstancePersistenceConfigArgs;
 * import com.pulumi.gcp.memorystore.inputs.InstancePersistenceConfigRdbConfigArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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("my-network")
 *             .autoCreateSubnetworks(false)
 *             .build());
 *         var producerSubnet = new Subnetwork("producerSubnet", SubnetworkArgs.builder()
 *             .name("my-subnet")
 *             .ipCidrRange("10.0.0.248/29")
 *             .region("us-central1")
 *             .network(producerNet.id())
 *             .build());
 *         var default_ = new ServiceConnectionPolicy("default", ServiceConnectionPolicyArgs.builder()
 *             .name("my-policy")
 *             .location("us-central1")
 *             .serviceClass("gcp-memorystore")
 *             .description("my basic service connection policy")
 *             .network(producerNet.id())
 *             .pscConfig(ServiceConnectionPolicyPscConfigArgs.builder()
 *                 .subnetworks(producerSubnet.id())
 *                 .build())
 *             .build());
 *         final var project = OrganizationsFunctions.getProject();
 *         var instance_full = new Instance("instance-full", InstanceArgs.builder()
 *             .instanceId("full-instance")
 *             .shardCount(3)
 *             .desiredPscAutoConnections(InstanceDesiredPscAutoConnectionArgs.builder()
 *                 .network(producerNet.id())
 *                 .projectId(project.applyValue(getProjectResult -> getProjectResult.projectId()))
 *                 .build())
 *             .location("us-central1")
 *             .replicaCount(2)
 *             .nodeType("SHARED_CORE_NANO")
 *             .transitEncryptionMode("TRANSIT_ENCRYPTION_DISABLED")
 *             .authorizationMode("AUTH_DISABLED")
 *             .engineConfigs(Map.of("maxmemory-policy", "volatile-ttl"))
 *             .zoneDistributionConfig(InstanceZoneDistributionConfigArgs.builder()
 *                 .mode("SINGLE_ZONE")
 *                 .zone("us-central1-b")
 *                 .build())
 *             .engineVersion("VALKEY_7_2")
 *             .deletionProtectionEnabled(false)
 *             .mode("CLUSTER")
 *             .persistenceConfig(InstancePersistenceConfigArgs.builder()
 *                 .mode("RDB")
 *                 .rdbConfig(InstancePersistenceConfigRdbConfigArgs.builder()
 *                     .rdbSnapshotPeriod("ONE_HOUR")
 *                     .rdbSnapshotStartTime("2024-10-02T15:01:23Z")
 *                     .build())
 *                 .build())
 *             .labels(Map.of("abc", "xyz"))
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(default_)
 *                 .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   instance-full:
 *     type: gcp:memorystore:Instance
 *     properties:
 *       instanceId: full-instance
 *       shardCount: 3
 *       desiredPscAutoConnections:
 *         - network: ${producerNet.id}
 *           projectId: ${project.projectId}
 *       location: us-central1
 *       replicaCount: 2
 *       nodeType: SHARED_CORE_NANO
 *       transitEncryptionMode: TRANSIT_ENCRYPTION_DISABLED
 *       authorizationMode: AUTH_DISABLED
 *       engineConfigs:
 *         maxmemory-policy: volatile-ttl
 *       zoneDistributionConfig:
 *         mode: SINGLE_ZONE
 *         zone: us-central1-b
 *       engineVersion: VALKEY_7_2
 *       deletionProtectionEnabled: false
 *       mode: CLUSTER
 *       persistenceConfig:
 *         mode: RDB
 *         rdbConfig:
 *           rdbSnapshotPeriod: ONE_HOUR
 *           rdbSnapshotStartTime: 2024-10-02T15:01:23Z
 *       labels:
 *         abc: xyz
 *     options:
 *       dependsOn:
 *         - ${default}
 *   default:
 *     type: gcp:networkconnectivity:ServiceConnectionPolicy
 *     properties:
 *       name: my-policy
 *       location: us-central1
 *       serviceClass: gcp-memorystore
 *       description: my basic service connection policy
 *       network: ${producerNet.id}
 *       pscConfig:
 *         subnetworks:
 *           - ${producerSubnet.id}
 *   producerSubnet:
 *     type: gcp:compute:Subnetwork
 *     name: producer_subnet
 *     properties:
 *       name: my-subnet
 *       ipCidrRange: 10.0.0.248/29
 *       region: us-central1
 *       network: ${producerNet.id}
 *   producerNet:
 *     type: gcp:compute:Network
 *     name: producer_net
 *     properties:
 *       name: my-network
 *       autoCreateSubnetworks: false
 * variables:
 *   project:
 *     fn::invoke:
 *       function: gcp:organizations:getProject
 *       arguments: {}
 * ```
 * 
 * ### Memorystore Instance Persistence Aof
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const producerNet = new gcp.compute.Network("producer_net", {
 *     name: "my-network",
 *     autoCreateSubnetworks: false,
 * });
 * const producerSubnet = new gcp.compute.Subnetwork("producer_subnet", {
 *     name: "my-subnet",
 *     ipCidrRange: "10.0.0.248/29",
 *     region: "us-central1",
 *     network: producerNet.id,
 * });
 * const _default = new gcp.networkconnectivity.ServiceConnectionPolicy("default", {
 *     name: "my-policy",
 *     location: "us-central1",
 *     serviceClass: "gcp-memorystore",
 *     description: "my basic service connection policy",
 *     network: producerNet.id,
 *     pscConfig: {
 *         subnetworks: [producerSubnet.id],
 *     },
 * });
 * const project = gcp.organizations.getProject({});
 * const instance_persistence_aof = new gcp.memorystore.Instance("instance-persistence-aof", {
 *     instanceId: "aof-instance",
 *     shardCount: 3,
 *     desiredPscAutoConnections: [{
 *         network: producerNet.id,
 *         projectId: project.then(project => project.projectId),
 *     }],
 *     location: "us-central1",
 *     persistenceConfig: {
 *         mode: "AOF",
 *         aofConfig: {
 *             appendFsync: "EVERY_SEC",
 *         },
 *     },
 *     deletionProtectionEnabled: false,
 * }, {
 *     dependsOn: [_default],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * producer_net = gcp.compute.Network("producer_net",
 *     name="my-network",
 *     auto_create_subnetworks=False)
 * producer_subnet = gcp.compute.Subnetwork("producer_subnet",
 *     name="my-subnet",
 *     ip_cidr_range="10.0.0.248/29",
 *     region="us-central1",
 *     network=producer_net.id)
 * default = gcp.networkconnectivity.ServiceConnectionPolicy("default",
 *     name="my-policy",
 *     location="us-central1",
 *     service_class="gcp-memorystore",
 *     description="my basic service connection policy",
 *     network=producer_net.id,
 *     psc_config={
 *         "subnetworks": [producer_subnet.id],
 *     })
 * project = gcp.organizations.get_project()
 * instance_persistence_aof = gcp.memorystore.Instance("instance-persistence-aof",
 *     instance_id="aof-instance",
 *     shard_count=3,
 *     desired_psc_auto_connections=[{
 *         "network": producer_net.id,
 *         "project_id": project.project_id,
 *     }],
 *     location="us-central1",
 *     persistence_config={
 *         "mode": "AOF",
 *         "aof_config": {
 *             "append_fsync": "EVERY_SEC",
 *         },
 *     },
 *     deletion_protection_enabled=False,
 *     opts = pulumi.ResourceOptions(depends_on=[default]))
 * ```
 * ```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 = "my-network",
 *         AutoCreateSubnetworks = false,
 *     });
 *     var producerSubnet = new Gcp.Compute.Subnetwork("producer_subnet", new()
 *     {
 *         Name = "my-subnet",
 *         IpCidrRange = "10.0.0.248/29",
 *         Region = "us-central1",
 *         Network = producerNet.Id,
 *     });
 *     var @default = new Gcp.NetworkConnectivity.ServiceConnectionPolicy("default", new()
 *     {
 *         Name = "my-policy",
 *         Location = "us-central1",
 *         ServiceClass = "gcp-memorystore",
 *         Description = "my basic service connection policy",
 *         Network = producerNet.Id,
 *         PscConfig = new Gcp.NetworkConnectivity.Inputs.ServiceConnectionPolicyPscConfigArgs
 *         {
 *             Subnetworks = new[]
 *             {
 *                 producerSubnet.Id,
 *             },
 *         },
 *     });
 *     var project = Gcp.Organizations.GetProject.Invoke();
 *     var instance_persistence_aof = new Gcp.MemoryStore.Instance("instance-persistence-aof", new()
 *     {
 *         InstanceId = "aof-instance",
 *         ShardCount = 3,
 *         DesiredPscAutoConnections = new[]
 *         {
 *             new Gcp.MemoryStore.Inputs.InstanceDesiredPscAutoConnectionArgs
 *             {
 *                 Network = producerNet.Id,
 *                 ProjectId = project.Apply(getProjectResult => getProjectResult.ProjectId),
 *             },
 *         },
 *         Location = "us-central1",
 *         PersistenceConfig = new Gcp.MemoryStore.Inputs.InstancePersistenceConfigArgs
 *         {
 *             Mode = "AOF",
 *             AofConfig = new Gcp.MemoryStore.Inputs.InstancePersistenceConfigAofConfigArgs
 *             {
 *                 AppendFsync = "EVERY_SEC",
 *             },
 *         },
 *         DeletionProtectionEnabled = false,
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             @default,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/memorystore"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networkconnectivity"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
 * 	"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("my-network"),
 * 			AutoCreateSubnetworks: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		producerSubnet, err := compute.NewSubnetwork(ctx, "producer_subnet", &compute.SubnetworkArgs{
 * 			Name:        pulumi.String("my-subnet"),
 * 			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("my-policy"),
 * 			Location:     pulumi.String("us-central1"),
 * 			ServiceClass: pulumi.String("gcp-memorystore"),
 * 			Description:  pulumi.String("my basic service connection policy"),
 * 			Network:      producerNet.ID(),
 * 			PscConfig: &networkconnectivity.ServiceConnectionPolicyPscConfigArgs{
 * 				Subnetworks: pulumi.StringArray{
 * 					producerSubnet.ID(),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = memorystore.NewInstance(ctx, "instance-persistence-aof", &memorystore.InstanceArgs{
 * 			InstanceId: pulumi.String("aof-instance"),
 * 			ShardCount: pulumi.Int(3),
 * 			DesiredPscAutoConnections: memorystore.InstanceDesiredPscAutoConnectionArray{
 * 				&memorystore.InstanceDesiredPscAutoConnectionArgs{
 * 					Network:   producerNet.ID(),
 * 					ProjectId: pulumi.String(project.ProjectId),
 * 				},
 * 			},
 * 			Location: pulumi.String("us-central1"),
 * 			PersistenceConfig: &memorystore.InstancePersistenceConfigArgs{
 * 				Mode: pulumi.String("AOF"),
 * 				AofConfig: &memorystore.InstancePersistenceConfigAofConfigArgs{
 * 					AppendFsync: pulumi.String("EVERY_SEC"),
 * 				},
 * 			},
 * 			DeletionProtectionEnabled: pulumi.Bool(false),
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			_default,
 * 		}))
 * 		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.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 com.pulumi.gcp.organizations.OrganizationsFunctions;
 * import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
 * import com.pulumi.gcp.memorystore.Instance;
 * import com.pulumi.gcp.memorystore.InstanceArgs;
 * import com.pulumi.gcp.memorystore.inputs.InstanceDesiredPscAutoConnectionArgs;
 * import com.pulumi.gcp.memorystore.inputs.InstancePersistenceConfigArgs;
 * import com.pulumi.gcp.memorystore.inputs.InstancePersistenceConfigAofConfigArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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("my-network")
 *             .autoCreateSubnetworks(false)
 *             .build());
 *         var producerSubnet = new Subnetwork("producerSubnet", SubnetworkArgs.builder()
 *             .name("my-subnet")
 *             .ipCidrRange("10.0.0.248/29")
 *             .region("us-central1")
 *             .network(producerNet.id())
 *             .build());
 *         var default_ = new ServiceConnectionPolicy("default", ServiceConnectionPolicyArgs.builder()
 *             .name("my-policy")
 *             .location("us-central1")
 *             .serviceClass("gcp-memorystore")
 *             .description("my basic service connection policy")
 *             .network(producerNet.id())
 *             .pscConfig(ServiceConnectionPolicyPscConfigArgs.builder()
 *                 .subnetworks(producerSubnet.id())
 *                 .build())
 *             .build());
 *         final var project = OrganizationsFunctions.getProject();
 *         var instance_persistence_aof = new Instance("instance-persistence-aof", InstanceArgs.builder()
 *             .instanceId("aof-instance")
 *             .shardCount(3)
 *             .desiredPscAutoConnections(InstanceDesiredPscAutoConnectionArgs.builder()
 *                 .network(producerNet.id())
 *                 .projectId(project.applyValue(getProjectResult -> getProjectResult.projectId()))
 *                 .build())
 *             .location("us-central1")
 *             .persistenceConfig(InstancePersistenceConfigArgs.builder()
 *                 .mode("AOF")
 *                 .aofConfig(InstancePersistenceConfigAofConfigArgs.builder()
 *                     .appendFsync("EVERY_SEC")
 *                     .build())
 *                 .build())
 *             .deletionProtectionEnabled(false)
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(default_)
 *                 .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   instance-persistence-aof:
 *     type: gcp:memorystore:Instance
 *     properties:
 *       instanceId: aof-instance
 *       shardCount: 3
 *       desiredPscAutoConnections:
 *         - network: ${producerNet.id}
 *           projectId: ${project.projectId}
 *       location: us-central1
 *       persistenceConfig:
 *         mode: AOF
 *         aofConfig:
 *           appendFsync: EVERY_SEC
 *       deletionProtectionEnabled: false
 *     options:
 *       dependsOn:
 *         - ${default}
 *   default:
 *     type: gcp:networkconnectivity:ServiceConnectionPolicy
 *     properties:
 *       name: my-policy
 *       location: us-central1
 *       serviceClass: gcp-memorystore
 *       description: my basic service connection policy
 *       network: ${producerNet.id}
 *       pscConfig:
 *         subnetworks:
 *           - ${producerSubnet.id}
 *   producerSubnet:
 *     type: gcp:compute:Subnetwork
 *     name: producer_subnet
 *     properties:
 *       name: my-subnet
 *       ipCidrRange: 10.0.0.248/29
 *       region: us-central1
 *       network: ${producerNet.id}
 *   producerNet:
 *     type: gcp:compute:Network
 *     name: producer_net
 *     properties:
 *       name: my-network
 *       autoCreateSubnetworks: false
 * variables:
 *   project:
 *     fn::invoke:
 *       function: gcp:organizations:getProject
 *       arguments: {}
 * ```
 * 
 * ## Import
 * Instance can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/instances/{{instance_id}}`
 * * `{{project}}/{{location}}/{{instance_id}}`
 * * `{{location}}/{{instance_id}}`
 * When using the `pulumi import` command, Instance can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:memorystore/instance:Instance default projects/{{project}}/locations/{{location}}/instances/{{instance_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:memorystore/instance:Instance default {{project}}/{{location}}/{{instance_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:memorystore/instance:Instance default {{location}}/{{instance_id}}
 * ```
 * @property authorizationMode Optional. Immutable. Authorization mode of the instance. Possible values:
 * AUTH_DISABLED
 * IAM_AUTH
 * @property deletionProtectionEnabled Optional. If set to true deletion of the instance will fail.
 * @property desiredPscAutoConnections Required. Immutable. User inputs for the auto-created PSC connections.
 * @property engineConfigs Optional. User-provided engine configurations for the instance.
 * @property engineVersion Optional. Immutable. Engine version of the instance.
 * @property instanceId Required. The ID to use for the instance, which will become the final component of
 * the instance's resource name.
 * This value is subject to the following restrictions:
 * * Must be 4-63 characters in length
 * * Must begin with a letter or digit
 * * Must contain only lowercase letters, digits, and hyphens
 * * Must not end with a hyphen
 * * Must be unique within a location
 * - - -
 * @property labels Optional. 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 location Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. See documentation for resource type `memorystore.googleapis.com/CertificateAuthority`.
 * @property mode Optional. Standalone or cluster.
 * Possible values:
 * CLUSTER
 * STANDALONE
 * Possible values are: `CLUSTER`, `STANDALONE`.
 * @property nodeType Optional. Immutable. Machine type for individual nodes of the instance.
 * Possible values:
 * SHARED_CORE_NANO
 * HIGHMEM_MEDIUM
 * HIGHMEM_XLARGE
 * STANDARD_SMALL
 * @property persistenceConfig Represents persistence configuration for a instance.
 * Structure is documented below.
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property replicaCount Optional. Number of replica nodes per shard. If omitted the default is 0 replicas.
 * @property shardCount Required. Number of shards for the instance.
 * @property transitEncryptionMode Optional. Immutable. In-transit encryption mode of the instance.
 * Possible values:
 * TRANSIT_ENCRYPTION_DISABLED
 * SERVER_AUTHENTICATION
 * @property zoneDistributionConfig Zone distribution configuration for allocation of instance resources.
 * Structure is documented below.
 */
public data class InstanceArgs(
    public val authorizationMode: Output? = null,
    public val deletionProtectionEnabled: Output? = null,
    public val desiredPscAutoConnections: Output>? = null,
    public val engineConfigs: Output>? = null,
    public val engineVersion: Output? = null,
    public val instanceId: Output? = null,
    public val labels: Output>? = null,
    public val location: Output? = null,
    public val mode: Output? = null,
    public val nodeType: Output? = null,
    public val persistenceConfig: Output? = null,
    public val project: Output? = null,
    public val replicaCount: Output? = null,
    public val shardCount: Output? = null,
    public val transitEncryptionMode: Output? = null,
    public val zoneDistributionConfig: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.memorystore.InstanceArgs =
        com.pulumi.gcp.memorystore.InstanceArgs.builder()
            .authorizationMode(authorizationMode?.applyValue({ args0 -> args0 }))
            .deletionProtectionEnabled(deletionProtectionEnabled?.applyValue({ args0 -> args0 }))
            .desiredPscAutoConnections(
                desiredPscAutoConnections?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .engineConfigs(
                engineConfigs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .engineVersion(engineVersion?.applyValue({ args0 -> args0 }))
            .instanceId(instanceId?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .location(location?.applyValue({ args0 -> args0 }))
            .mode(mode?.applyValue({ args0 -> args0 }))
            .nodeType(nodeType?.applyValue({ args0 -> args0 }))
            .persistenceConfig(persistenceConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .project(project?.applyValue({ args0 -> args0 }))
            .replicaCount(replicaCount?.applyValue({ args0 -> args0 }))
            .shardCount(shardCount?.applyValue({ args0 -> args0 }))
            .transitEncryptionMode(transitEncryptionMode?.applyValue({ args0 -> args0 }))
            .zoneDistributionConfig(
                zoneDistributionConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

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

    private var deletionProtectionEnabled: Output? = null

    private var desiredPscAutoConnections: Output>? = null

    private var engineConfigs: Output>? = null

    private var engineVersion: Output? = null

    private var instanceId: Output? = null

    private var labels: Output>? = null

    private var location: Output? = null

    private var mode: Output? = null

    private var nodeType: Output? = null

    private var persistenceConfig: Output? = null

    private var project: Output? = null

    private var replicaCount: Output? = null

    private var shardCount: Output? = null

    private var transitEncryptionMode: Output? = null

    private var zoneDistributionConfig: Output? = null

    /**
     * @param value Optional. Immutable. Authorization mode of the instance. Possible values:
     * AUTH_DISABLED
     * IAM_AUTH
     */
    @JvmName("fvhlnhbwtheukouy")
    public suspend fun authorizationMode(`value`: Output) {
        this.authorizationMode = value
    }

    /**
     * @param value Optional. If set to true deletion of the instance will fail.
     */
    @JvmName("ciocgucfkomdfmrr")
    public suspend fun deletionProtectionEnabled(`value`: Output) {
        this.deletionProtectionEnabled = value
    }

    /**
     * @param value Required. Immutable. User inputs for the auto-created PSC connections.
     */
    @JvmName("lyprtklhvxqydcmv")
    public suspend fun desiredPscAutoConnections(`value`: Output>) {
        this.desiredPscAutoConnections = value
    }

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

    /**
     * @param values Required. Immutable. User inputs for the auto-created PSC connections.
     */
    @JvmName("qoabrgnlmbksqdri")
    public suspend fun desiredPscAutoConnections(values: List>) {
        this.desiredPscAutoConnections = Output.all(values)
    }

    /**
     * @param value Optional. User-provided engine configurations for the instance.
     */
    @JvmName("ggejuaawabawmyvf")
    public suspend fun engineConfigs(`value`: Output>) {
        this.engineConfigs = value
    }

    /**
     * @param value Optional. Immutable. Engine version of the instance.
     */
    @JvmName("bfdjmgwecimvkydu")
    public suspend fun engineVersion(`value`: Output) {
        this.engineVersion = value
    }

    /**
     * @param value Required. The ID to use for the instance, which will become the final component of
     * the instance's resource name.
     * This value is subject to the following restrictions:
     * * Must be 4-63 characters in length
     * * Must begin with a letter or digit
     * * Must contain only lowercase letters, digits, and hyphens
     * * Must not end with a hyphen
     * * Must be unique within a location
     * - - -
     */
    @JvmName("xihxpilciclfkuei")
    public suspend fun instanceId(`value`: Output) {
        this.instanceId = value
    }

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

    /**
     * @param value Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. See documentation for resource type `memorystore.googleapis.com/CertificateAuthority`.
     */
    @JvmName("vdxrkiwesqvtgppy")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Optional. Standalone or cluster.
     * Possible values:
     * CLUSTER
     * STANDALONE
     * Possible values are: `CLUSTER`, `STANDALONE`.
     */
    @JvmName("drlfjenevsvlqosr")
    public suspend fun mode(`value`: Output) {
        this.mode = value
    }

    /**
     * @param value Optional. Immutable. Machine type for individual nodes of the instance.
     * Possible values:
     * SHARED_CORE_NANO
     * HIGHMEM_MEDIUM
     * HIGHMEM_XLARGE
     * STANDARD_SMALL
     */
    @JvmName("ajiinhvlkcjdojya")
    public suspend fun nodeType(`value`: Output) {
        this.nodeType = value
    }

    /**
     * @param value Represents persistence configuration for a instance.
     * Structure is documented below.
     */
    @JvmName("kyrhqujmdslyrfbe")
    public suspend fun persistenceConfig(`value`: Output) {
        this.persistenceConfig = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("hqnojadklbprqlvq")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Optional. Number of replica nodes per shard. If omitted the default is 0 replicas.
     */
    @JvmName("veoduuilpiwnmxjs")
    public suspend fun replicaCount(`value`: Output) {
        this.replicaCount = value
    }

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

    /**
     * @param value Optional. Immutable. In-transit encryption mode of the instance.
     * Possible values:
     * TRANSIT_ENCRYPTION_DISABLED
     * SERVER_AUTHENTICATION
     */
    @JvmName("pmfmsutqjixymdwr")
    public suspend fun transitEncryptionMode(`value`: Output) {
        this.transitEncryptionMode = value
    }

    /**
     * @param value Zone distribution configuration for allocation of instance resources.
     * Structure is documented below.
     */
    @JvmName("cexbdcuofixsysji")
    public suspend fun zoneDistributionConfig(`value`: Output) {
        this.zoneDistributionConfig = value
    }

    /**
     * @param value Optional. Immutable. Authorization mode of the instance. Possible values:
     * AUTH_DISABLED
     * IAM_AUTH
     */
    @JvmName("glxwcejroqshvdnn")
    public suspend fun authorizationMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authorizationMode = mapped
    }

    /**
     * @param value Optional. If set to true deletion of the instance will fail.
     */
    @JvmName("wxdlyypnrefgpxwv")
    public suspend fun deletionProtectionEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deletionProtectionEnabled = mapped
    }

    /**
     * @param value Required. Immutable. User inputs for the auto-created PSC connections.
     */
    @JvmName("hnpfxogqqbaimlds")
    public suspend fun desiredPscAutoConnections(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.desiredPscAutoConnections = mapped
    }

    /**
     * @param argument Required. Immutable. User inputs for the auto-created PSC connections.
     */
    @JvmName("boucaqekutqhhwwa")
    public suspend fun desiredPscAutoConnections(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            InstanceDesiredPscAutoConnectionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.desiredPscAutoConnections = mapped
    }

    /**
     * @param argument Required. Immutable. User inputs for the auto-created PSC connections.
     */
    @JvmName("koiekwoqfsykgung")
    public suspend fun desiredPscAutoConnections(vararg argument: suspend InstanceDesiredPscAutoConnectionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            InstanceDesiredPscAutoConnectionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.desiredPscAutoConnections = mapped
    }

    /**
     * @param argument Required. Immutable. User inputs for the auto-created PSC connections.
     */
    @JvmName("foimlksxefpvcmpx")
    public suspend fun desiredPscAutoConnections(argument: suspend InstanceDesiredPscAutoConnectionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            InstanceDesiredPscAutoConnectionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.desiredPscAutoConnections = mapped
    }

    /**
     * @param values Required. Immutable. User inputs for the auto-created PSC connections.
     */
    @JvmName("dgiuhityyfjefsdx")
    public suspend fun desiredPscAutoConnections(vararg values: InstanceDesiredPscAutoConnectionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.desiredPscAutoConnections = mapped
    }

    /**
     * @param value Optional. User-provided engine configurations for the instance.
     */
    @JvmName("asnjcxxhrgeubvce")
    public suspend fun engineConfigs(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.engineConfigs = mapped
    }

    /**
     * @param values Optional. User-provided engine configurations for the instance.
     */
    @JvmName("gjpvpdwkcjkutmhx")
    public fun engineConfigs(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.engineConfigs = mapped
    }

    /**
     * @param value Optional. Immutable. Engine version of the instance.
     */
    @JvmName("haovrucxehfmewcx")
    public suspend fun engineVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.engineVersion = mapped
    }

    /**
     * @param value Required. The ID to use for the instance, which will become the final component of
     * the instance's resource name.
     * This value is subject to the following restrictions:
     * * Must be 4-63 characters in length
     * * Must begin with a letter or digit
     * * Must contain only lowercase letters, digits, and hyphens
     * * Must not end with a hyphen
     * * Must be unique within a location
     * - - -
     */
    @JvmName("rniofingiofqeckf")
    public suspend fun instanceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceId = mapped
    }

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

    /**
     * @param values Optional. 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("kknmvgpssexkrmwl")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. See documentation for resource type `memorystore.googleapis.com/CertificateAuthority`.
     */
    @JvmName("tojhajdxvcfjcgig")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Optional. Standalone or cluster.
     * Possible values:
     * CLUSTER
     * STANDALONE
     * Possible values are: `CLUSTER`, `STANDALONE`.
     */
    @JvmName("ipbxyiwsuffbrlfc")
    public suspend fun mode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value Optional. Immutable. Machine type for individual nodes of the instance.
     * Possible values:
     * SHARED_CORE_NANO
     * HIGHMEM_MEDIUM
     * HIGHMEM_XLARGE
     * STANDARD_SMALL
     */
    @JvmName("vbyodfpvsgovbdli")
    public suspend fun nodeType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodeType = mapped
    }

    /**
     * @param value Represents persistence configuration for a instance.
     * Structure is documented below.
     */
    @JvmName("lxklmdbddvkbwjut")
    public suspend fun persistenceConfig(`value`: InstancePersistenceConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.persistenceConfig = mapped
    }

    /**
     * @param argument Represents persistence configuration for a instance.
     * Structure is documented below.
     */
    @JvmName("ekvxkwgyvdeuffnf")
    public suspend fun persistenceConfig(argument: suspend InstancePersistenceConfigArgsBuilder.() -> Unit) {
        val toBeMapped = InstancePersistenceConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.persistenceConfig = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("crkhbmnayglughvl")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Optional. Number of replica nodes per shard. If omitted the default is 0 replicas.
     */
    @JvmName("nfcpfucnfqfamqif")
    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 instance.
     */
    @JvmName("nusgniiewgkdxokg")
    public suspend fun shardCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.shardCount = mapped
    }

    /**
     * @param value Optional. Immutable. In-transit encryption mode of the instance.
     * Possible values:
     * TRANSIT_ENCRYPTION_DISABLED
     * SERVER_AUTHENTICATION
     */
    @JvmName("kpwbmhuykrsacaos")
    public suspend fun transitEncryptionMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.transitEncryptionMode = mapped
    }

    /**
     * @param value Zone distribution configuration for allocation of instance resources.
     * Structure is documented below.
     */
    @JvmName("qxdyopxsnobglxae")
    public suspend fun zoneDistributionConfig(`value`: InstanceZoneDistributionConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zoneDistributionConfig = mapped
    }

    /**
     * @param argument Zone distribution configuration for allocation of instance resources.
     * Structure is documented below.
     */
    @JvmName("phokgvrcilslaovk")
    public suspend fun zoneDistributionConfig(argument: suspend InstanceZoneDistributionConfigArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceZoneDistributionConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.zoneDistributionConfig = mapped
    }

    internal fun build(): InstanceArgs = InstanceArgs(
        authorizationMode = authorizationMode,
        deletionProtectionEnabled = deletionProtectionEnabled,
        desiredPscAutoConnections = desiredPscAutoConnections,
        engineConfigs = engineConfigs,
        engineVersion = engineVersion,
        instanceId = instanceId,
        labels = labels,
        location = location,
        mode = mode,
        nodeType = nodeType,
        persistenceConfig = persistenceConfig,
        project = project,
        replicaCount = replicaCount,
        shardCount = shardCount,
        transitEncryptionMode = transitEncryptionMode,
        zoneDistributionConfig = zoneDistributionConfig,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy