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

com.pulumi.gcp.compute.kotlin.RegionInstanceGroupManagerArgs.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.compute.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.RegionInstanceGroupManagerArgs.builder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerAllInstancesConfigArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerAllInstancesConfigArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerAutoHealingPoliciesArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerAutoHealingPoliciesArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerInstanceLifecyclePolicyArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerInstanceLifecyclePolicyArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerNamedPortArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerNamedPortArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerParamsArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerParamsArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerStatefulDiskArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerStatefulDiskArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerStatefulExternalIpArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerStatefulExternalIpArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerStatefulInternalIpArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerStatefulInternalIpArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerUpdatePolicyArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerUpdatePolicyArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerVersionArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerVersionArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The Google Compute Engine Regional Instance Group Manager API creates and manages pools
 * of homogeneous Compute Engine virtual machine instances from a common instance
 * template.
 * To get more information about regionInstanceGroupManagers, see:
 * * [API documentation](https://cloud.google.com/compute/docs/reference/latest/regionInstanceGroupManagers)
 * * How-to Guides
 *     * [Regional Instance Groups Guide](https://cloud.google.com/compute/docs/instance-groups/distributing-instances-with-regional-instance-groups)
 * > **Note:** Use [gcp.compute.InstanceGroupManager](https://www.terraform.io/docs/providers/google/r/compute_instance_group_manager.html) to create a zonal instance group manager.
 * ## Example Usage
 * ### With Top Level Instance Template (`Google` Provider)
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const autohealing = new gcp.compute.HealthCheck("autohealing", {
 *     name: "autohealing-health-check",
 *     checkIntervalSec: 5,
 *     timeoutSec: 5,
 *     healthyThreshold: 2,
 *     unhealthyThreshold: 10,
 *     httpHealthCheck: {
 *         requestPath: "/healthz",
 *         port: 8080,
 *     },
 * });
 * const appserver = new gcp.compute.RegionInstanceGroupManager("appserver", {
 *     name: "appserver-igm",
 *     baseInstanceName: "app",
 *     region: "us-central1",
 *     distributionPolicyZones: [
 *         "us-central1-a",
 *         "us-central1-f",
 *     ],
 *     versions: [{
 *         instanceTemplate: appserverGoogleComputeInstanceTemplate.selfLinkUnique,
 *     }],
 *     allInstancesConfig: {
 *         metadata: {
 *             metadata_key: "metadata_value",
 *         },
 *         labels: {
 *             label_key: "label_value",
 *         },
 *     },
 *     targetPools: [appserverGoogleComputeTargetPool.id],
 *     targetSize: 2,
 *     namedPorts: [{
 *         name: "custom",
 *         port: 8888,
 *     }],
 *     autoHealingPolicies: {
 *         healthCheck: autohealing.id,
 *         initialDelaySec: 300,
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * autohealing = gcp.compute.HealthCheck("autohealing",
 *     name="autohealing-health-check",
 *     check_interval_sec=5,
 *     timeout_sec=5,
 *     healthy_threshold=2,
 *     unhealthy_threshold=10,
 *     http_health_check=gcp.compute.HealthCheckHttpHealthCheckArgs(
 *         request_path="/healthz",
 *         port=8080,
 *     ))
 * appserver = gcp.compute.RegionInstanceGroupManager("appserver",
 *     name="appserver-igm",
 *     base_instance_name="app",
 *     region="us-central1",
 *     distribution_policy_zones=[
 *         "us-central1-a",
 *         "us-central1-f",
 *     ],
 *     versions=[gcp.compute.RegionInstanceGroupManagerVersionArgs(
 *         instance_template=appserver_google_compute_instance_template["selfLinkUnique"],
 *     )],
 *     all_instances_config=gcp.compute.RegionInstanceGroupManagerAllInstancesConfigArgs(
 *         metadata={
 *             "metadata_key": "metadata_value",
 *         },
 *         labels={
 *             "label_key": "label_value",
 *         },
 *     ),
 *     target_pools=[appserver_google_compute_target_pool["id"]],
 *     target_size=2,
 *     named_ports=[gcp.compute.RegionInstanceGroupManagerNamedPortArgs(
 *         name="custom",
 *         port=8888,
 *     )],
 *     auto_healing_policies=gcp.compute.RegionInstanceGroupManagerAutoHealingPoliciesArgs(
 *         health_check=autohealing.id,
 *         initial_delay_sec=300,
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var autohealing = new Gcp.Compute.HealthCheck("autohealing", new()
 *     {
 *         Name = "autohealing-health-check",
 *         CheckIntervalSec = 5,
 *         TimeoutSec = 5,
 *         HealthyThreshold = 2,
 *         UnhealthyThreshold = 10,
 *         HttpHealthCheck = new Gcp.Compute.Inputs.HealthCheckHttpHealthCheckArgs
 *         {
 *             RequestPath = "/healthz",
 *             Port = 8080,
 *         },
 *     });
 *     var appserver = new Gcp.Compute.RegionInstanceGroupManager("appserver", new()
 *     {
 *         Name = "appserver-igm",
 *         BaseInstanceName = "app",
 *         Region = "us-central1",
 *         DistributionPolicyZones = new[]
 *         {
 *             "us-central1-a",
 *             "us-central1-f",
 *         },
 *         Versions = new[]
 *         {
 *             new Gcp.Compute.Inputs.RegionInstanceGroupManagerVersionArgs
 *             {
 *                 InstanceTemplate = appserverGoogleComputeInstanceTemplate.SelfLinkUnique,
 *             },
 *         },
 *         AllInstancesConfig = new Gcp.Compute.Inputs.RegionInstanceGroupManagerAllInstancesConfigArgs
 *         {
 *             Metadata =
 *             {
 *                 { "metadata_key", "metadata_value" },
 *             },
 *             Labels =
 *             {
 *                 { "label_key", "label_value" },
 *             },
 *         },
 *         TargetPools = new[]
 *         {
 *             appserverGoogleComputeTargetPool.Id,
 *         },
 *         TargetSize = 2,
 *         NamedPorts = new[]
 *         {
 *             new Gcp.Compute.Inputs.RegionInstanceGroupManagerNamedPortArgs
 *             {
 *                 Name = "custom",
 *                 Port = 8888,
 *             },
 *         },
 *         AutoHealingPolicies = new Gcp.Compute.Inputs.RegionInstanceGroupManagerAutoHealingPoliciesArgs
 *         {
 *             HealthCheck = autohealing.Id,
 *             InitialDelaySec = 300,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		autohealing, err := compute.NewHealthCheck(ctx, "autohealing", &compute.HealthCheckArgs{
 * 			Name:               pulumi.String("autohealing-health-check"),
 * 			CheckIntervalSec:   pulumi.Int(5),
 * 			TimeoutSec:         pulumi.Int(5),
 * 			HealthyThreshold:   pulumi.Int(2),
 * 			UnhealthyThreshold: pulumi.Int(10),
 * 			HttpHealthCheck: &compute.HealthCheckHttpHealthCheckArgs{
 * 				RequestPath: pulumi.String("/healthz"),
 * 				Port:        pulumi.Int(8080),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewRegionInstanceGroupManager(ctx, "appserver", &compute.RegionInstanceGroupManagerArgs{
 * 			Name:             pulumi.String("appserver-igm"),
 * 			BaseInstanceName: pulumi.String("app"),
 * 			Region:           pulumi.String("us-central1"),
 * 			DistributionPolicyZones: pulumi.StringArray{
 * 				pulumi.String("us-central1-a"),
 * 				pulumi.String("us-central1-f"),
 * 			},
 * 			Versions: compute.RegionInstanceGroupManagerVersionArray{
 * 				&compute.RegionInstanceGroupManagerVersionArgs{
 * 					InstanceTemplate: pulumi.Any(appserverGoogleComputeInstanceTemplate.SelfLinkUnique),
 * 				},
 * 			},
 * 			AllInstancesConfig: &compute.RegionInstanceGroupManagerAllInstancesConfigArgs{
 * 				Metadata: pulumi.StringMap{
 * 					"metadata_key": pulumi.String("metadata_value"),
 * 				},
 * 				Labels: pulumi.StringMap{
 * 					"label_key": pulumi.String("label_value"),
 * 				},
 * 			},
 * 			TargetPools: pulumi.StringArray{
 * 				appserverGoogleComputeTargetPool.Id,
 * 			},
 * 			TargetSize: pulumi.Int(2),
 * 			NamedPorts: compute.RegionInstanceGroupManagerNamedPortArray{
 * 				&compute.RegionInstanceGroupManagerNamedPortArgs{
 * 					Name: pulumi.String("custom"),
 * 					Port: pulumi.Int(8888),
 * 				},
 * 			},
 * 			AutoHealingPolicies: &compute.RegionInstanceGroupManagerAutoHealingPoliciesArgs{
 * 				HealthCheck:     autohealing.ID(),
 * 				InitialDelaySec: pulumi.Int(300),
 * 			},
 * 		})
 * 		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.HealthCheck;
 * import com.pulumi.gcp.compute.HealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.HealthCheckHttpHealthCheckArgs;
 * import com.pulumi.gcp.compute.RegionInstanceGroupManager;
 * import com.pulumi.gcp.compute.RegionInstanceGroupManagerArgs;
 * import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerVersionArgs;
 * import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerAllInstancesConfigArgs;
 * import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerNamedPortArgs;
 * import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerAutoHealingPoliciesArgs;
 * 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 autohealing = new HealthCheck("autohealing", HealthCheckArgs.builder()
 *             .name("autohealing-health-check")
 *             .checkIntervalSec(5)
 *             .timeoutSec(5)
 *             .healthyThreshold(2)
 *             .unhealthyThreshold(10)
 *             .httpHealthCheck(HealthCheckHttpHealthCheckArgs.builder()
 *                 .requestPath("/healthz")
 *                 .port("8080")
 *                 .build())
 *             .build());
 *         var appserver = new RegionInstanceGroupManager("appserver", RegionInstanceGroupManagerArgs.builder()
 *             .name("appserver-igm")
 *             .baseInstanceName("app")
 *             .region("us-central1")
 *             .distributionPolicyZones(
 *                 "us-central1-a",
 *                 "us-central1-f")
 *             .versions(RegionInstanceGroupManagerVersionArgs.builder()
 *                 .instanceTemplate(appserverGoogleComputeInstanceTemplate.selfLinkUnique())
 *                 .build())
 *             .allInstancesConfig(RegionInstanceGroupManagerAllInstancesConfigArgs.builder()
 *                 .metadata(Map.of("metadata_key", "metadata_value"))
 *                 .labels(Map.of("label_key", "label_value"))
 *                 .build())
 *             .targetPools(appserverGoogleComputeTargetPool.id())
 *             .targetSize(2)
 *             .namedPorts(RegionInstanceGroupManagerNamedPortArgs.builder()
 *                 .name("custom")
 *                 .port(8888)
 *                 .build())
 *             .autoHealingPolicies(RegionInstanceGroupManagerAutoHealingPoliciesArgs.builder()
 *                 .healthCheck(autohealing.id())
 *                 .initialDelaySec(300)
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   autohealing:
 *     type: gcp:compute:HealthCheck
 *     properties:
 *       name: autohealing-health-check
 *       checkIntervalSec: 5
 *       timeoutSec: 5
 *       healthyThreshold: 2
 *       unhealthyThreshold: 10 # 50 seconds
 *       httpHealthCheck:
 *         requestPath: /healthz
 *         port: '8080'
 *   appserver:
 *     type: gcp:compute:RegionInstanceGroupManager
 *     properties:
 *       name: appserver-igm
 *       baseInstanceName: app
 *       region: us-central1
 *       distributionPolicyZones:
 *         - us-central1-a
 *         - us-central1-f
 *       versions:
 *         - instanceTemplate: ${appserverGoogleComputeInstanceTemplate.selfLinkUnique}
 *       allInstancesConfig:
 *         metadata:
 *           metadata_key: metadata_value
 *         labels:
 *           label_key: label_value
 *       targetPools:
 *         - ${appserverGoogleComputeTargetPool.id}
 *       targetSize: 2
 *       namedPorts:
 *         - name: custom
 *           port: 8888
 *       autoHealingPolicies:
 *         healthCheck: ${autohealing.id}
 *         initialDelaySec: 300
 * ```
 * 
 * ### With Multiple Versions
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const appserver = new gcp.compute.RegionInstanceGroupManager("appserver", {
 *     name: "appserver-igm",
 *     baseInstanceName: "app",
 *     region: "us-central1",
 *     targetSize: 5,
 *     versions: [
 *         {
 *             instanceTemplate: appserverGoogleComputeInstanceTemplate.selfLinkUnique,
 *         },
 *         {
 *             instanceTemplate: appserver_canary.selfLinkUnique,
 *             targetSize: {
 *                 fixed: 1,
 *             },
 *         },
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * appserver = gcp.compute.RegionInstanceGroupManager("appserver",
 *     name="appserver-igm",
 *     base_instance_name="app",
 *     region="us-central1",
 *     target_size=5,
 *     versions=[
 *         gcp.compute.RegionInstanceGroupManagerVersionArgs(
 *             instance_template=appserver_google_compute_instance_template["selfLinkUnique"],
 *         ),
 *         gcp.compute.RegionInstanceGroupManagerVersionArgs(
 *             instance_template=appserver_canary["selfLinkUnique"],
 *             target_size=gcp.compute.RegionInstanceGroupManagerVersionTargetSizeArgs(
 *                 fixed=1,
 *             ),
 *         ),
 *     ])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var appserver = new Gcp.Compute.RegionInstanceGroupManager("appserver", new()
 *     {
 *         Name = "appserver-igm",
 *         BaseInstanceName = "app",
 *         Region = "us-central1",
 *         TargetSize = 5,
 *         Versions = new[]
 *         {
 *             new Gcp.Compute.Inputs.RegionInstanceGroupManagerVersionArgs
 *             {
 *                 InstanceTemplate = appserverGoogleComputeInstanceTemplate.SelfLinkUnique,
 *             },
 *             new Gcp.Compute.Inputs.RegionInstanceGroupManagerVersionArgs
 *             {
 *                 InstanceTemplate = appserver_canary.SelfLinkUnique,
 *                 TargetSize = new Gcp.Compute.Inputs.RegionInstanceGroupManagerVersionTargetSizeArgs
 *                 {
 *                     Fixed = 1,
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := compute.NewRegionInstanceGroupManager(ctx, "appserver", &compute.RegionInstanceGroupManagerArgs{
 * 			Name:             pulumi.String("appserver-igm"),
 * 			BaseInstanceName: pulumi.String("app"),
 * 			Region:           pulumi.String("us-central1"),
 * 			TargetSize:       pulumi.Int(5),
 * 			Versions: compute.RegionInstanceGroupManagerVersionArray{
 * 				&compute.RegionInstanceGroupManagerVersionArgs{
 * 					InstanceTemplate: pulumi.Any(appserverGoogleComputeInstanceTemplate.SelfLinkUnique),
 * 				},
 * 				&compute.RegionInstanceGroupManagerVersionArgs{
 * 					InstanceTemplate: pulumi.Any(appserver_canary.SelfLinkUnique),
 * 					TargetSize: &compute.RegionInstanceGroupManagerVersionTargetSizeArgs{
 * 						Fixed: pulumi.Int(1),
 * 					},
 * 				},
 * 			},
 * 		})
 * 		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.RegionInstanceGroupManager;
 * import com.pulumi.gcp.compute.RegionInstanceGroupManagerArgs;
 * import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerVersionArgs;
 * import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerVersionTargetSizeArgs;
 * 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 appserver = new RegionInstanceGroupManager("appserver", RegionInstanceGroupManagerArgs.builder()
 *             .name("appserver-igm")
 *             .baseInstanceName("app")
 *             .region("us-central1")
 *             .targetSize(5)
 *             .versions(
 *                 RegionInstanceGroupManagerVersionArgs.builder()
 *                     .instanceTemplate(appserverGoogleComputeInstanceTemplate.selfLinkUnique())
 *                     .build(),
 *                 RegionInstanceGroupManagerVersionArgs.builder()
 *                     .instanceTemplate(appserver_canary.selfLinkUnique())
 *                     .targetSize(RegionInstanceGroupManagerVersionTargetSizeArgs.builder()
 *                         .fixed(1)
 *                         .build())
 *                     .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   appserver:
 *     type: gcp:compute:RegionInstanceGroupManager
 *     properties:
 *       name: appserver-igm
 *       baseInstanceName: app
 *       region: us-central1
 *       targetSize: 5
 *       versions:
 *         - instanceTemplate: ${appserverGoogleComputeInstanceTemplate.selfLinkUnique}
 *         - instanceTemplate: ${["appserver-canary"].selfLinkUnique}
 *           targetSize:
 *             fixed: 1
 * ```
 * 
 * ## Import
 * Instance group managers can be imported using any of these accepted formats:
 * * `{{name}}`
 * When using the `pulumi import` command, instance group managers can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:compute/regionInstanceGroupManager:RegionInstanceGroupManager default {{name}}
 * ```
 * @property allInstancesConfig Properties to set on all instances in the group. After setting
 * allInstancesConfig on the group, you must update the group's instances to
 * apply the configuration.
 * @property autoHealingPolicies The autohealing policies for this managed instance
 * group. You can specify only one value. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances#monitoring_groups).
 * @property baseInstanceName The base instance name to use for
 * instances in this group. The value must be a valid
 * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt) name. Supported characters
 * are lowercase letters, numbers, and hyphens (-). Instances are named by
 * appending a hyphen and a random four-character string to the base instance
 * name.
 * @property description An optional textual description of the instance
 * group manager.
 * @property distributionPolicyTargetShape The shape to which the group converges either proactively or on resize events (depending on the value set in update_policy.0.instance_redistribution_type). For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/regional-mig-distribution-shape).
 * @property distributionPolicyZones The distribution policy for this managed instance
 * group. You can specify one or more values. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/distributing-instances-with-regional-instance-groups#selectingzones).
 * @property instanceLifecyclePolicy The instance lifecycle policy for this managed instance group.
 * @property listManagedInstancesResults Pagination behavior of the `listManagedInstances` API
 * method for this managed instance group. Valid values are: `PAGELESS`, `PAGINATED`.
 * If `PAGELESS` (default), Pagination is disabled for the group's `listManagedInstances` API method.
 * `maxResults` and `pageToken` query parameters are ignored and all instances are returned in a single
 * response. If `PAGINATED`, pagination is enabled, `maxResults` and `pageToken` query parameters are
 * respected.
 * @property name The name of the instance group manager. Must be 1-63
 * characters long and comply with
 * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Supported characters
 * include lowercase letters, numbers, and hyphens.
 * @property namedPorts The named port configuration. See the section below
 * for details on configuration.
 * @property params Input only additional params for instance group manager creation. Structure is documented below. For more information, see [API](https://cloud.google.com/compute/docs/reference/rest/beta/instanceGroupManagers/insert).
 * - - -
 * @property project The ID of the project in which the resource belongs. If it
 * is not provided, the provider project is used.
 * @property region The region where the managed instance group resides. If not provided, the provider region is used.
 * - - -
 * @property statefulDisks Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs). Proactive cross zone instance redistribution must be disabled before you can update stateful disks on existing instance group managers. This can be controlled via the `update_policy`.
 * @property statefulExternalIps External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
 * @property statefulInternalIps Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
 * @property targetPools The full URL of all target pools to which new
 * instances in the group are added. Updating the target pools attribute does
 * not affect existing instances.
 * @property targetSize The target number of running instances for this managed instance group. This value should always be explicitly set
 * unless this resource is attached to an autoscaler, in which case it should never be set. Defaults to 0.
 * @property updatePolicy The update policy for this managed instance group. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/updating-managed-instance-groups) and [API](https://cloud.google.com/compute/docs/reference/rest/beta/regionInstanceGroupManagers/patch)
 * @property versions Application versions managed by this instance group. Each
 * version deals with a specific instance template, allowing canary release scenarios.
 * Structure is documented below.
 * @property waitForInstances Whether to wait for all instances to be created/updated before
 * returning. Note that if this is set to true and the operation does not succeed, the provider will
 * continue trying until it times out.
 * @property waitForInstancesStatus When used with `wait_for_instances` it specifies the status to wait for.
 * When `STABLE` is specified this resource will wait until the instances are stable before returning. When `UPDATED` is
 * set, it will wait for the version target to be reached and any per instance configs to be effective as well as all
 * instances to be stable before returning. The possible values are `STABLE` and `UPDATED`
 */
public data class RegionInstanceGroupManagerArgs(
    public val allInstancesConfig: Output? = null,
    public val autoHealingPolicies: Output? = null,
    public val baseInstanceName: Output? = null,
    public val description: Output? = null,
    public val distributionPolicyTargetShape: Output? = null,
    public val distributionPolicyZones: Output>? = null,
    public val instanceLifecyclePolicy: Output? =
        null,
    public val listManagedInstancesResults: Output? = null,
    public val name: Output? = null,
    public val namedPorts: Output>? = null,
    public val params: Output? = null,
    public val project: Output? = null,
    public val region: Output? = null,
    public val statefulDisks: Output>? = null,
    public val statefulExternalIps: Output>? =
        null,
    public val statefulInternalIps: Output>? =
        null,
    public val targetPools: Output>? = null,
    public val targetSize: Output? = null,
    public val updatePolicy: Output? = null,
    public val versions: Output>? = null,
    public val waitForInstances: Output? = null,
    public val waitForInstancesStatus: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.RegionInstanceGroupManagerArgs =
        com.pulumi.gcp.compute.RegionInstanceGroupManagerArgs.builder()
            .allInstancesConfig(
                allInstancesConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .autoHealingPolicies(
                autoHealingPolicies?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .baseInstanceName(baseInstanceName?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .distributionPolicyTargetShape(distributionPolicyTargetShape?.applyValue({ args0 -> args0 }))
            .distributionPolicyZones(
                distributionPolicyZones?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .instanceLifecyclePolicy(
                instanceLifecyclePolicy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .listManagedInstancesResults(listManagedInstancesResults?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .namedPorts(
                namedPorts?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .params(params?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .project(project?.applyValue({ args0 -> args0 }))
            .region(region?.applyValue({ args0 -> args0 }))
            .statefulDisks(
                statefulDisks?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .statefulExternalIps(
                statefulExternalIps?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .statefulInternalIps(
                statefulInternalIps?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .targetPools(targetPools?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .targetSize(targetSize?.applyValue({ args0 -> args0 }))
            .updatePolicy(updatePolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .versions(
                versions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .waitForInstances(waitForInstances?.applyValue({ args0 -> args0 }))
            .waitForInstancesStatus(waitForInstancesStatus?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [RegionInstanceGroupManagerArgs].
 */
@PulumiTagMarker
public class RegionInstanceGroupManagerArgsBuilder internal constructor() {
    private var allInstancesConfig: Output? = null

    private var autoHealingPolicies: Output? = null

    private var baseInstanceName: Output? = null

    private var description: Output? = null

    private var distributionPolicyTargetShape: Output? = null

    private var distributionPolicyZones: Output>? = null

    private var instanceLifecyclePolicy:
        Output? = null

    private var listManagedInstancesResults: Output? = null

    private var name: Output? = null

    private var namedPorts: Output>? = null

    private var params: Output? = null

    private var project: Output? = null

    private var region: Output? = null

    private var statefulDisks: Output>? = null

    private var statefulExternalIps: Output>? =
        null

    private var statefulInternalIps: Output>? =
        null

    private var targetPools: Output>? = null

    private var targetSize: Output? = null

    private var updatePolicy: Output? = null

    private var versions: Output>? = null

    private var waitForInstances: Output? = null

    private var waitForInstancesStatus: Output? = null

    /**
     * @param value Properties to set on all instances in the group. After setting
     * allInstancesConfig on the group, you must update the group's instances to
     * apply the configuration.
     */
    @JvmName("vtiagifhmuavlerb")
    public suspend fun allInstancesConfig(`value`: Output) {
        this.allInstancesConfig = value
    }

    /**
     * @param value The autohealing policies for this managed instance
     * group. You can specify only one value. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances#monitoring_groups).
     */
    @JvmName("ibydurnoflnavnfm")
    public suspend fun autoHealingPolicies(`value`: Output) {
        this.autoHealingPolicies = value
    }

    /**
     * @param value The base instance name to use for
     * instances in this group. The value must be a valid
     * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt) name. Supported characters
     * are lowercase letters, numbers, and hyphens (-). Instances are named by
     * appending a hyphen and a random four-character string to the base instance
     * name.
     */
    @JvmName("kivjnscvxuuncpwd")
    public suspend fun baseInstanceName(`value`: Output) {
        this.baseInstanceName = value
    }

    /**
     * @param value An optional textual description of the instance
     * group manager.
     */
    @JvmName("miermfmxucrdkoti")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The shape to which the group converges either proactively or on resize events (depending on the value set in update_policy.0.instance_redistribution_type). For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/regional-mig-distribution-shape).
     */
    @JvmName("fudxpjtfexyveugs")
    public suspend fun distributionPolicyTargetShape(`value`: Output) {
        this.distributionPolicyTargetShape = value
    }

    /**
     * @param value The distribution policy for this managed instance
     * group. You can specify one or more values. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/distributing-instances-with-regional-instance-groups#selectingzones).
     */
    @JvmName("plifpdruhdfgkwsn")
    public suspend fun distributionPolicyZones(`value`: Output>) {
        this.distributionPolicyZones = value
    }

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

    /**
     * @param values The distribution policy for this managed instance
     * group. You can specify one or more values. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/distributing-instances-with-regional-instance-groups#selectingzones).
     */
    @JvmName("suklxwrjlaotrjvu")
    public suspend fun distributionPolicyZones(values: List>) {
        this.distributionPolicyZones = Output.all(values)
    }

    /**
     * @param value The instance lifecycle policy for this managed instance group.
     */
    @JvmName("qqphxvectviphtmp")
    public suspend fun instanceLifecyclePolicy(`value`: Output) {
        this.instanceLifecyclePolicy = value
    }

    /**
     * @param value Pagination behavior of the `listManagedInstances` API
     * method for this managed instance group. Valid values are: `PAGELESS`, `PAGINATED`.
     * If `PAGELESS` (default), Pagination is disabled for the group's `listManagedInstances` API method.
     * `maxResults` and `pageToken` query parameters are ignored and all instances are returned in a single
     * response. If `PAGINATED`, pagination is enabled, `maxResults` and `pageToken` query parameters are
     * respected.
     */
    @JvmName("hgkeoxltkvxdaupy")
    public suspend fun listManagedInstancesResults(`value`: Output) {
        this.listManagedInstancesResults = value
    }

    /**
     * @param value The name of the instance group manager. Must be 1-63
     * characters long and comply with
     * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Supported characters
     * include lowercase letters, numbers, and hyphens.
     */
    @JvmName("cioovlmrlreqgevv")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The named port configuration. See the section below
     * for details on configuration.
     */
    @JvmName("nnjuvdhwhuqkirtj")
    public suspend fun namedPorts(`value`: Output>) {
        this.namedPorts = value
    }

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

    /**
     * @param values The named port configuration. See the section below
     * for details on configuration.
     */
    @JvmName("lbuuudenruqsslhw")
    public suspend fun namedPorts(values: List>) {
        this.namedPorts = Output.all(values)
    }

    /**
     * @param value Input only additional params for instance group manager creation. Structure is documented below. For more information, see [API](https://cloud.google.com/compute/docs/reference/rest/beta/instanceGroupManagers/insert).
     * - - -
     */
    @JvmName("nklqtxijpwvordsp")
    public suspend fun params(`value`: Output) {
        this.params = value
    }

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

    /**
     * @param value The region where the managed instance group resides. If not provided, the provider region is used.
     * - - -
     */
    @JvmName("bqrxjtxchxcrokjx")
    public suspend fun region(`value`: Output) {
        this.region = value
    }

    /**
     * @param value Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs). Proactive cross zone instance redistribution must be disabled before you can update stateful disks on existing instance group managers. This can be controlled via the `update_policy`.
     */
    @JvmName("mdvqdngagosmkhly")
    public suspend fun statefulDisks(`value`: Output>) {
        this.statefulDisks = value
    }

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

    /**
     * @param values Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs). Proactive cross zone instance redistribution must be disabled before you can update stateful disks on existing instance group managers. This can be controlled via the `update_policy`.
     */
    @JvmName("rpkymuisrtocemky")
    public suspend fun statefulDisks(values: List>) {
        this.statefulDisks = Output.all(values)
    }

    /**
     * @param value External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
     */
    @JvmName("hltaoxyipivvxuqj")
    public suspend fun statefulExternalIps(`value`: Output>) {
        this.statefulExternalIps = value
    }

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

    /**
     * @param values External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
     */
    @JvmName("durssohufdcmlkac")
    public suspend fun statefulExternalIps(values: List>) {
        this.statefulExternalIps = Output.all(values)
    }

    /**
     * @param value Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
     */
    @JvmName("yychnkookypfmsrw")
    public suspend fun statefulInternalIps(`value`: Output>) {
        this.statefulInternalIps = value
    }

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

    /**
     * @param values Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
     */
    @JvmName("odfvxxopoqikwymn")
    public suspend fun statefulInternalIps(values: List>) {
        this.statefulInternalIps = Output.all(values)
    }

    /**
     * @param value The full URL of all target pools to which new
     * instances in the group are added. Updating the target pools attribute does
     * not affect existing instances.
     */
    @JvmName("nbtfccykkrxvuovs")
    public suspend fun targetPools(`value`: Output>) {
        this.targetPools = value
    }

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

    /**
     * @param values The full URL of all target pools to which new
     * instances in the group are added. Updating the target pools attribute does
     * not affect existing instances.
     */
    @JvmName("rxgulrsetpvtnjfo")
    public suspend fun targetPools(values: List>) {
        this.targetPools = Output.all(values)
    }

    /**
     * @param value The target number of running instances for this managed instance group. This value should always be explicitly set
     * unless this resource is attached to an autoscaler, in which case it should never be set. Defaults to 0.
     */
    @JvmName("cbgfkpvwsjkxcphn")
    public suspend fun targetSize(`value`: Output) {
        this.targetSize = value
    }

    /**
     * @param value The update policy for this managed instance group. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/updating-managed-instance-groups) and [API](https://cloud.google.com/compute/docs/reference/rest/beta/regionInstanceGroupManagers/patch)
     */
    @JvmName("bvxblcilltywaiob")
    public suspend fun updatePolicy(`value`: Output) {
        this.updatePolicy = value
    }

    /**
     * @param value Application versions managed by this instance group. Each
     * version deals with a specific instance template, allowing canary release scenarios.
     * Structure is documented below.
     */
    @JvmName("ecfkuawdbalcmfry")
    public suspend fun versions(`value`: Output>) {
        this.versions = value
    }

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

    /**
     * @param values Application versions managed by this instance group. Each
     * version deals with a specific instance template, allowing canary release scenarios.
     * Structure is documented below.
     */
    @JvmName("gabrkbpicrxcvprs")
    public suspend fun versions(values: List>) {
        this.versions = Output.all(values)
    }

    /**
     * @param value Whether to wait for all instances to be created/updated before
     * returning. Note that if this is set to true and the operation does not succeed, the provider will
     * continue trying until it times out.
     */
    @JvmName("bflwbenobjftdsjs")
    public suspend fun waitForInstances(`value`: Output) {
        this.waitForInstances = value
    }

    /**
     * @param value When used with `wait_for_instances` it specifies the status to wait for.
     * When `STABLE` is specified this resource will wait until the instances are stable before returning. When `UPDATED` is
     * set, it will wait for the version target to be reached and any per instance configs to be effective as well as all
     * instances to be stable before returning. The possible values are `STABLE` and `UPDATED`
     */
    @JvmName("fsyfaesnugnjsdrf")
    public suspend fun waitForInstancesStatus(`value`: Output) {
        this.waitForInstancesStatus = value
    }

    /**
     * @param value Properties to set on all instances in the group. After setting
     * allInstancesConfig on the group, you must update the group's instances to
     * apply the configuration.
     */
    @JvmName("ubmhagwuqdvkqavu")
    public suspend fun allInstancesConfig(`value`: RegionInstanceGroupManagerAllInstancesConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allInstancesConfig = mapped
    }

    /**
     * @param argument Properties to set on all instances in the group. After setting
     * allInstancesConfig on the group, you must update the group's instances to
     * apply the configuration.
     */
    @JvmName("wvqafbmbtimrhsmv")
    public suspend fun allInstancesConfig(argument: suspend RegionInstanceGroupManagerAllInstancesConfigArgsBuilder.() -> Unit) {
        val toBeMapped = RegionInstanceGroupManagerAllInstancesConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.allInstancesConfig = mapped
    }

    /**
     * @param value The autohealing policies for this managed instance
     * group. You can specify only one value. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances#monitoring_groups).
     */
    @JvmName("oxvqnngkwduivbml")
    public suspend fun autoHealingPolicies(`value`: RegionInstanceGroupManagerAutoHealingPoliciesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoHealingPolicies = mapped
    }

    /**
     * @param argument The autohealing policies for this managed instance
     * group. You can specify only one value. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances#monitoring_groups).
     */
    @JvmName("xefijfxuljciwhbc")
    public suspend fun autoHealingPolicies(argument: suspend RegionInstanceGroupManagerAutoHealingPoliciesArgsBuilder.() -> Unit) {
        val toBeMapped = RegionInstanceGroupManagerAutoHealingPoliciesArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.autoHealingPolicies = mapped
    }

    /**
     * @param value The base instance name to use for
     * instances in this group. The value must be a valid
     * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt) name. Supported characters
     * are lowercase letters, numbers, and hyphens (-). Instances are named by
     * appending a hyphen and a random four-character string to the base instance
     * name.
     */
    @JvmName("qsesknwqpvgopyow")
    public suspend fun baseInstanceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.baseInstanceName = mapped
    }

    /**
     * @param value An optional textual description of the instance
     * group manager.
     */
    @JvmName("wqksiajmimlqgmxy")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The shape to which the group converges either proactively or on resize events (depending on the value set in update_policy.0.instance_redistribution_type). For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/regional-mig-distribution-shape).
     */
    @JvmName("ntegfpbaihyttvke")
    public suspend fun distributionPolicyTargetShape(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.distributionPolicyTargetShape = mapped
    }

    /**
     * @param value The distribution policy for this managed instance
     * group. You can specify one or more values. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/distributing-instances-with-regional-instance-groups#selectingzones).
     */
    @JvmName("gyktefakbtordgxu")
    public suspend fun distributionPolicyZones(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.distributionPolicyZones = mapped
    }

    /**
     * @param values The distribution policy for this managed instance
     * group. You can specify one or more values. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/distributing-instances-with-regional-instance-groups#selectingzones).
     */
    @JvmName("xuysnyomdqycdxiw")
    public suspend fun distributionPolicyZones(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.distributionPolicyZones = mapped
    }

    /**
     * @param value The instance lifecycle policy for this managed instance group.
     */
    @JvmName("vmwbegojbrmamrlj")
    public suspend fun instanceLifecyclePolicy(`value`: RegionInstanceGroupManagerInstanceLifecyclePolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceLifecyclePolicy = mapped
    }

    /**
     * @param argument The instance lifecycle policy for this managed instance group.
     */
    @JvmName("alirjsbylpujdvfd")
    public suspend fun instanceLifecyclePolicy(argument: suspend RegionInstanceGroupManagerInstanceLifecyclePolicyArgsBuilder.() -> Unit) {
        val toBeMapped = RegionInstanceGroupManagerInstanceLifecyclePolicyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.instanceLifecyclePolicy = mapped
    }

    /**
     * @param value Pagination behavior of the `listManagedInstances` API
     * method for this managed instance group. Valid values are: `PAGELESS`, `PAGINATED`.
     * If `PAGELESS` (default), Pagination is disabled for the group's `listManagedInstances` API method.
     * `maxResults` and `pageToken` query parameters are ignored and all instances are returned in a single
     * response. If `PAGINATED`, pagination is enabled, `maxResults` and `pageToken` query parameters are
     * respected.
     */
    @JvmName("ntfybcjwsrcqwhgt")
    public suspend fun listManagedInstancesResults(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.listManagedInstancesResults = mapped
    }

    /**
     * @param value The name of the instance group manager. Must be 1-63
     * characters long and comply with
     * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Supported characters
     * include lowercase letters, numbers, and hyphens.
     */
    @JvmName("wkuwcrfgnwsmahhk")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The named port configuration. See the section below
     * for details on configuration.
     */
    @JvmName("hpcbmflriopcsjyg")
    public suspend fun namedPorts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namedPorts = mapped
    }

    /**
     * @param argument The named port configuration. See the section below
     * for details on configuration.
     */
    @JvmName("efoowkaiqqjeovlj")
    public suspend fun namedPorts(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RegionInstanceGroupManagerNamedPortArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.namedPorts = mapped
    }

    /**
     * @param argument The named port configuration. See the section below
     * for details on configuration.
     */
    @JvmName("umtldniadghcenmg")
    public suspend fun namedPorts(vararg argument: suspend RegionInstanceGroupManagerNamedPortArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RegionInstanceGroupManagerNamedPortArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.namedPorts = mapped
    }

    /**
     * @param argument The named port configuration. See the section below
     * for details on configuration.
     */
    @JvmName("savguqlispedklys")
    public suspend fun namedPorts(argument: suspend RegionInstanceGroupManagerNamedPortArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RegionInstanceGroupManagerNamedPortArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.namedPorts = mapped
    }

    /**
     * @param values The named port configuration. See the section below
     * for details on configuration.
     */
    @JvmName("iqlpdqdptfmqtysj")
    public suspend fun namedPorts(vararg values: RegionInstanceGroupManagerNamedPortArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.namedPorts = mapped
    }

    /**
     * @param value Input only additional params for instance group manager creation. Structure is documented below. For more information, see [API](https://cloud.google.com/compute/docs/reference/rest/beta/instanceGroupManagers/insert).
     * - - -
     */
    @JvmName("ujtudlwmnkihjrbm")
    public suspend fun params(`value`: RegionInstanceGroupManagerParamsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.params = mapped
    }

    /**
     * @param argument Input only additional params for instance group manager creation. Structure is documented below. For more information, see [API](https://cloud.google.com/compute/docs/reference/rest/beta/instanceGroupManagers/insert).
     * - - -
     */
    @JvmName("xuvqdtlkhhfbjnfd")
    public suspend fun params(argument: suspend RegionInstanceGroupManagerParamsArgsBuilder.() -> Unit) {
        val toBeMapped = RegionInstanceGroupManagerParamsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.params = mapped
    }

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

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

    /**
     * @param value Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs). Proactive cross zone instance redistribution must be disabled before you can update stateful disks on existing instance group managers. This can be controlled via the `update_policy`.
     */
    @JvmName("ayebrvynrnguurhk")
    public suspend fun statefulDisks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.statefulDisks = mapped
    }

    /**
     * @param argument Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs). Proactive cross zone instance redistribution must be disabled before you can update stateful disks on existing instance group managers. This can be controlled via the `update_policy`.
     */
    @JvmName("bojikkhgrxnlpsuc")
    public suspend fun statefulDisks(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RegionInstanceGroupManagerStatefulDiskArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.statefulDisks = mapped
    }

    /**
     * @param argument Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs). Proactive cross zone instance redistribution must be disabled before you can update stateful disks on existing instance group managers. This can be controlled via the `update_policy`.
     */
    @JvmName("efcefqjhlptxpcnl")
    public suspend fun statefulDisks(vararg argument: suspend RegionInstanceGroupManagerStatefulDiskArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RegionInstanceGroupManagerStatefulDiskArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.statefulDisks = mapped
    }

    /**
     * @param argument Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs). Proactive cross zone instance redistribution must be disabled before you can update stateful disks on existing instance group managers. This can be controlled via the `update_policy`.
     */
    @JvmName("hlypjmhnyetvbyuh")
    public suspend fun statefulDisks(argument: suspend RegionInstanceGroupManagerStatefulDiskArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RegionInstanceGroupManagerStatefulDiskArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.statefulDisks = mapped
    }

    /**
     * @param values Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs). Proactive cross zone instance redistribution must be disabled before you can update stateful disks on existing instance group managers. This can be controlled via the `update_policy`.
     */
    @JvmName("livomdqcxgaamdac")
    public suspend fun statefulDisks(vararg values: RegionInstanceGroupManagerStatefulDiskArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.statefulDisks = mapped
    }

    /**
     * @param value External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
     */
    @JvmName("lqbmynqsfcyvjyxj")
    public suspend fun statefulExternalIps(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.statefulExternalIps = mapped
    }

    /**
     * @param argument External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
     */
    @JvmName("vpemtdbwqnktndgw")
    public suspend fun statefulExternalIps(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RegionInstanceGroupManagerStatefulExternalIpArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.statefulExternalIps = mapped
    }

    /**
     * @param argument External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
     */
    @JvmName("mrwmwymkyejfgkad")
    public suspend fun statefulExternalIps(vararg argument: suspend RegionInstanceGroupManagerStatefulExternalIpArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RegionInstanceGroupManagerStatefulExternalIpArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.statefulExternalIps = mapped
    }

    /**
     * @param argument External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
     */
    @JvmName("agtfsrduvugbafay")
    public suspend fun statefulExternalIps(argument: suspend RegionInstanceGroupManagerStatefulExternalIpArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RegionInstanceGroupManagerStatefulExternalIpArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.statefulExternalIps = mapped
    }

    /**
     * @param values External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
     */
    @JvmName("qlvmnyxbvmdoerua")
    public suspend fun statefulExternalIps(vararg values: RegionInstanceGroupManagerStatefulExternalIpArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.statefulExternalIps = mapped
    }

    /**
     * @param value Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
     */
    @JvmName("kjpuloqcpgwjtmfe")
    public suspend fun statefulInternalIps(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.statefulInternalIps = mapped
    }

    /**
     * @param argument Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
     */
    @JvmName("wukqmewfcjsqomoj")
    public suspend fun statefulInternalIps(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RegionInstanceGroupManagerStatefulInternalIpArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.statefulInternalIps = mapped
    }

    /**
     * @param argument Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
     */
    @JvmName("seecqgxymjkdxnta")
    public suspend fun statefulInternalIps(vararg argument: suspend RegionInstanceGroupManagerStatefulInternalIpArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RegionInstanceGroupManagerStatefulInternalIpArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.statefulInternalIps = mapped
    }

    /**
     * @param argument Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
     */
    @JvmName("rncgheuwfvrvcvkx")
    public suspend fun statefulInternalIps(argument: suspend RegionInstanceGroupManagerStatefulInternalIpArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RegionInstanceGroupManagerStatefulInternalIpArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.statefulInternalIps = mapped
    }

    /**
     * @param values Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
     */
    @JvmName("bkgfewlygmckguht")
    public suspend fun statefulInternalIps(vararg values: RegionInstanceGroupManagerStatefulInternalIpArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.statefulInternalIps = mapped
    }

    /**
     * @param value The full URL of all target pools to which new
     * instances in the group are added. Updating the target pools attribute does
     * not affect existing instances.
     */
    @JvmName("jnvajuqvycmdgvso")
    public suspend fun targetPools(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetPools = mapped
    }

    /**
     * @param values The full URL of all target pools to which new
     * instances in the group are added. Updating the target pools attribute does
     * not affect existing instances.
     */
    @JvmName("bhhddyofvbjhlulg")
    public suspend fun targetPools(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetPools = mapped
    }

    /**
     * @param value The target number of running instances for this managed instance group. This value should always be explicitly set
     * unless this resource is attached to an autoscaler, in which case it should never be set. Defaults to 0.
     */
    @JvmName("bqrbdykwivtabvjk")
    public suspend fun targetSize(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetSize = mapped
    }

    /**
     * @param value The update policy for this managed instance group. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/updating-managed-instance-groups) and [API](https://cloud.google.com/compute/docs/reference/rest/beta/regionInstanceGroupManagers/patch)
     */
    @JvmName("mleccmlpjdatvqhe")
    public suspend fun updatePolicy(`value`: RegionInstanceGroupManagerUpdatePolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.updatePolicy = mapped
    }

    /**
     * @param argument The update policy for this managed instance group. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/updating-managed-instance-groups) and [API](https://cloud.google.com/compute/docs/reference/rest/beta/regionInstanceGroupManagers/patch)
     */
    @JvmName("jtddrugaxevslhpu")
    public suspend fun updatePolicy(argument: suspend RegionInstanceGroupManagerUpdatePolicyArgsBuilder.() -> Unit) {
        val toBeMapped = RegionInstanceGroupManagerUpdatePolicyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.updatePolicy = mapped
    }

    /**
     * @param value Application versions managed by this instance group. Each
     * version deals with a specific instance template, allowing canary release scenarios.
     * Structure is documented below.
     */
    @JvmName("dkhjbgkoqyotwrkd")
    public suspend fun versions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.versions = mapped
    }

    /**
     * @param argument Application versions managed by this instance group. Each
     * version deals with a specific instance template, allowing canary release scenarios.
     * Structure is documented below.
     */
    @JvmName("sdjchdfomhchqbhj")
    public suspend fun versions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RegionInstanceGroupManagerVersionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.versions = mapped
    }

    /**
     * @param argument Application versions managed by this instance group. Each
     * version deals with a specific instance template, allowing canary release scenarios.
     * Structure is documented below.
     */
    @JvmName("gdvegbcmxijeppld")
    public suspend fun versions(vararg argument: suspend RegionInstanceGroupManagerVersionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RegionInstanceGroupManagerVersionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.versions = mapped
    }

    /**
     * @param argument Application versions managed by this instance group. Each
     * version deals with a specific instance template, allowing canary release scenarios.
     * Structure is documented below.
     */
    @JvmName("gfuagfrdhvwjvyck")
    public suspend fun versions(argument: suspend RegionInstanceGroupManagerVersionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RegionInstanceGroupManagerVersionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.versions = mapped
    }

    /**
     * @param values Application versions managed by this instance group. Each
     * version deals with a specific instance template, allowing canary release scenarios.
     * Structure is documented below.
     */
    @JvmName("ngedeumkdvllrqjm")
    public suspend fun versions(vararg values: RegionInstanceGroupManagerVersionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.versions = mapped
    }

    /**
     * @param value Whether to wait for all instances to be created/updated before
     * returning. Note that if this is set to true and the operation does not succeed, the provider will
     * continue trying until it times out.
     */
    @JvmName("myjafuveuuaiywmu")
    public suspend fun waitForInstances(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.waitForInstances = mapped
    }

    /**
     * @param value When used with `wait_for_instances` it specifies the status to wait for.
     * When `STABLE` is specified this resource will wait until the instances are stable before returning. When `UPDATED` is
     * set, it will wait for the version target to be reached and any per instance configs to be effective as well as all
     * instances to be stable before returning. The possible values are `STABLE` and `UPDATED`
     */
    @JvmName("aqukfjkmulqarxop")
    public suspend fun waitForInstancesStatus(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.waitForInstancesStatus = mapped
    }

    internal fun build(): RegionInstanceGroupManagerArgs = RegionInstanceGroupManagerArgs(
        allInstancesConfig = allInstancesConfig,
        autoHealingPolicies = autoHealingPolicies,
        baseInstanceName = baseInstanceName,
        description = description,
        distributionPolicyTargetShape = distributionPolicyTargetShape,
        distributionPolicyZones = distributionPolicyZones,
        instanceLifecyclePolicy = instanceLifecyclePolicy,
        listManagedInstancesResults = listManagedInstancesResults,
        name = name,
        namedPorts = namedPorts,
        params = params,
        project = project,
        region = region,
        statefulDisks = statefulDisks,
        statefulExternalIps = statefulExternalIps,
        statefulInternalIps = statefulInternalIps,
        targetPools = targetPools,
        targetSize = targetSize,
        updatePolicy = updatePolicy,
        versions = versions,
        waitForInstances = waitForInstances,
        waitForInstancesStatus = waitForInstancesStatus,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy