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

com.pulumi.gcp.compute.kotlin.RegionBackendService.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.gcp.compute.kotlin.outputs.RegionBackendServiceBackend
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceCdnPolicy
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceCircuitBreakers
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceConnectionTrackingPolicy
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceConsistentHash
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceFailoverPolicy
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceIap
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceLogConfig
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceOutlierDetection
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceSubsetting
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceBackend.Companion.toKotlin as regionBackendServiceBackendToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceCdnPolicy.Companion.toKotlin as regionBackendServiceCdnPolicyToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceCircuitBreakers.Companion.toKotlin as regionBackendServiceCircuitBreakersToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceConnectionTrackingPolicy.Companion.toKotlin as regionBackendServiceConnectionTrackingPolicyToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceConsistentHash.Companion.toKotlin as regionBackendServiceConsistentHashToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceFailoverPolicy.Companion.toKotlin as regionBackendServiceFailoverPolicyToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceIap.Companion.toKotlin as regionBackendServiceIapToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceLogConfig.Companion.toKotlin as regionBackendServiceLogConfigToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceOutlierDetection.Companion.toKotlin as regionBackendServiceOutlierDetectionToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceSubsetting.Companion.toKotlin as regionBackendServiceSubsettingToKotlin

/**
 * Builder for [RegionBackendService].
 */
@PulumiTagMarker
public class RegionBackendServiceResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: RegionBackendServiceArgs = RegionBackendServiceArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend RegionBackendServiceArgsBuilder.() -> Unit) {
        val builder = RegionBackendServiceArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): RegionBackendService {
        val builtJavaResource = com.pulumi.gcp.compute.RegionBackendService(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return RegionBackendService(builtJavaResource)
    }
}

/**
 * A Region Backend Service defines a regionally-scoped group of virtual
 * machines that will serve traffic for load balancing.
 * To get more information about RegionBackendService, see:
 * * [API documentation](https://cloud.google.com/compute/docs/reference/latest/regionBackendServices)
 * * How-to Guides
 *     * [Internal TCP/UDP Load Balancing](https://cloud.google.com/compute/docs/load-balancing/internal/)
 * ## Example Usage
 * ### Region Backend Service Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const defaultHealthCheck = new gcp.compute.HealthCheck("default", {
 *     name: "rbs-health-check",
 *     checkIntervalSec: 1,
 *     timeoutSec: 1,
 *     tcpHealthCheck: {
 *         port: 80,
 *     },
 * });
 * const _default = new gcp.compute.RegionBackendService("default", {
 *     name: "region-service",
 *     region: "us-central1",
 *     healthChecks: defaultHealthCheck.id,
 *     connectionDrainingTimeoutSec: 10,
 *     sessionAffinity: "CLIENT_IP",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default_health_check = gcp.compute.HealthCheck("default",
 *     name="rbs-health-check",
 *     check_interval_sec=1,
 *     timeout_sec=1,
 *     tcp_health_check=gcp.compute.HealthCheckTcpHealthCheckArgs(
 *         port=80,
 *     ))
 * default = gcp.compute.RegionBackendService("default",
 *     name="region-service",
 *     region="us-central1",
 *     health_checks=default_health_check.id,
 *     connection_draining_timeout_sec=10,
 *     session_affinity="CLIENT_IP")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var defaultHealthCheck = new Gcp.Compute.HealthCheck("default", new()
 *     {
 *         Name = "rbs-health-check",
 *         CheckIntervalSec = 1,
 *         TimeoutSec = 1,
 *         TcpHealthCheck = new Gcp.Compute.Inputs.HealthCheckTcpHealthCheckArgs
 *         {
 *             Port = 80,
 *         },
 *     });
 *     var @default = new Gcp.Compute.RegionBackendService("default", new()
 *     {
 *         Name = "region-service",
 *         Region = "us-central1",
 *         HealthChecks = defaultHealthCheck.Id,
 *         ConnectionDrainingTimeoutSec = 10,
 *         SessionAffinity = "CLIENT_IP",
 *     });
 * });
 * ```
 * ```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 {
 * 		defaultHealthCheck, err := compute.NewHealthCheck(ctx, "default", &compute.HealthCheckArgs{
 * 			Name:             pulumi.String("rbs-health-check"),
 * 			CheckIntervalSec: pulumi.Int(1),
 * 			TimeoutSec:       pulumi.Int(1),
 * 			TcpHealthCheck: &compute.HealthCheckTcpHealthCheckArgs{
 * 				Port: pulumi.Int(80),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewRegionBackendService(ctx, "default", &compute.RegionBackendServiceArgs{
 * 			Name:                         pulumi.String("region-service"),
 * 			Region:                       pulumi.String("us-central1"),
 * 			HealthChecks:                 defaultHealthCheck.ID(),
 * 			ConnectionDrainingTimeoutSec: pulumi.Int(10),
 * 			SessionAffinity:              pulumi.String("CLIENT_IP"),
 * 		})
 * 		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.HealthCheckTcpHealthCheckArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * 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 defaultHealthCheck = new HealthCheck("defaultHealthCheck", HealthCheckArgs.builder()
 *             .name("rbs-health-check")
 *             .checkIntervalSec(1)
 *             .timeoutSec(1)
 *             .tcpHealthCheck(HealthCheckTcpHealthCheckArgs.builder()
 *                 .port("80")
 *                 .build())
 *             .build());
 *         var default_ = new RegionBackendService("default", RegionBackendServiceArgs.builder()
 *             .name("region-service")
 *             .region("us-central1")
 *             .healthChecks(defaultHealthCheck.id())
 *             .connectionDrainingTimeoutSec(10)
 *             .sessionAffinity("CLIENT_IP")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:compute:RegionBackendService
 *     properties:
 *       name: region-service
 *       region: us-central1
 *       healthChecks: ${defaultHealthCheck.id}
 *       connectionDrainingTimeoutSec: 10
 *       sessionAffinity: CLIENT_IP
 *   defaultHealthCheck:
 *     type: gcp:compute:HealthCheck
 *     name: default
 *     properties:
 *       name: rbs-health-check
 *       checkIntervalSec: 1
 *       timeoutSec: 1
 *       tcpHealthCheck:
 *         port: '80'
 * ```
 * 
 * ### Region Backend Service External Iap
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.compute.RegionBackendService("default", {
 *     name: "tf-test-region-service-external",
 *     region: "us-central1",
 *     protocol: "HTTP",
 *     loadBalancingScheme: "EXTERNAL",
 *     iap: {
 *         oauth2ClientId: "abc",
 *         oauth2ClientSecret: "xyz",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.compute.RegionBackendService("default",
 *     name="tf-test-region-service-external",
 *     region="us-central1",
 *     protocol="HTTP",
 *     load_balancing_scheme="EXTERNAL",
 *     iap=gcp.compute.RegionBackendServiceIapArgs(
 *         oauth2_client_id="abc",
 *         oauth2_client_secret="xyz",
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.Compute.RegionBackendService("default", new()
 *     {
 *         Name = "tf-test-region-service-external",
 *         Region = "us-central1",
 *         Protocol = "HTTP",
 *         LoadBalancingScheme = "EXTERNAL",
 *         Iap = new Gcp.Compute.Inputs.RegionBackendServiceIapArgs
 *         {
 *             Oauth2ClientId = "abc",
 *             Oauth2ClientSecret = "xyz",
 *         },
 *     });
 * });
 * ```
 * ```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.NewRegionBackendService(ctx, "default", &compute.RegionBackendServiceArgs{
 * 			Name:                pulumi.String("tf-test-region-service-external"),
 * 			Region:              pulumi.String("us-central1"),
 * 			Protocol:            pulumi.String("HTTP"),
 * 			LoadBalancingScheme: pulumi.String("EXTERNAL"),
 * 			Iap: &compute.RegionBackendServiceIapArgs{
 * 				Oauth2ClientId:     pulumi.String("abc"),
 * 				Oauth2ClientSecret: pulumi.String("xyz"),
 * 			},
 * 		})
 * 		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.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.inputs.RegionBackendServiceIapArgs;
 * 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 default_ = new RegionBackendService("default", RegionBackendServiceArgs.builder()
 *             .name("tf-test-region-service-external")
 *             .region("us-central1")
 *             .protocol("HTTP")
 *             .loadBalancingScheme("EXTERNAL")
 *             .iap(RegionBackendServiceIapArgs.builder()
 *                 .oauth2ClientId("abc")
 *                 .oauth2ClientSecret("xyz")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:compute:RegionBackendService
 *     properties:
 *       name: tf-test-region-service-external
 *       region: us-central1
 *       protocol: HTTP
 *       loadBalancingScheme: EXTERNAL
 *       iap:
 *         oauth2ClientId: abc
 *         oauth2ClientSecret: xyz
 * ```
 * 
 * ### Region Backend Service Cache
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const defaultRegionHealthCheck = new gcp.compute.RegionHealthCheck("default", {
 *     name: "rbs-health-check",
 *     region: "us-central1",
 *     httpHealthCheck: {
 *         port: 80,
 *     },
 * });
 * const _default = new gcp.compute.RegionBackendService("default", {
 *     name: "region-service",
 *     region: "us-central1",
 *     healthChecks: defaultRegionHealthCheck.id,
 *     enableCdn: true,
 *     cdnPolicy: {
 *         cacheMode: "CACHE_ALL_STATIC",
 *         defaultTtl: 3600,
 *         clientTtl: 7200,
 *         maxTtl: 10800,
 *         negativeCaching: true,
 *         signedUrlCacheMaxAgeSec: 7200,
 *     },
 *     loadBalancingScheme: "EXTERNAL",
 *     protocol: "HTTP",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default_region_health_check = gcp.compute.RegionHealthCheck("default",
 *     name="rbs-health-check",
 *     region="us-central1",
 *     http_health_check=gcp.compute.RegionHealthCheckHttpHealthCheckArgs(
 *         port=80,
 *     ))
 * default = gcp.compute.RegionBackendService("default",
 *     name="region-service",
 *     region="us-central1",
 *     health_checks=default_region_health_check.id,
 *     enable_cdn=True,
 *     cdn_policy=gcp.compute.RegionBackendServiceCdnPolicyArgs(
 *         cache_mode="CACHE_ALL_STATIC",
 *         default_ttl=3600,
 *         client_ttl=7200,
 *         max_ttl=10800,
 *         negative_caching=True,
 *         signed_url_cache_max_age_sec=7200,
 *     ),
 *     load_balancing_scheme="EXTERNAL",
 *     protocol="HTTP")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var defaultRegionHealthCheck = new Gcp.Compute.RegionHealthCheck("default", new()
 *     {
 *         Name = "rbs-health-check",
 *         Region = "us-central1",
 *         HttpHealthCheck = new Gcp.Compute.Inputs.RegionHealthCheckHttpHealthCheckArgs
 *         {
 *             Port = 80,
 *         },
 *     });
 *     var @default = new Gcp.Compute.RegionBackendService("default", new()
 *     {
 *         Name = "region-service",
 *         Region = "us-central1",
 *         HealthChecks = defaultRegionHealthCheck.Id,
 *         EnableCdn = true,
 *         CdnPolicy = new Gcp.Compute.Inputs.RegionBackendServiceCdnPolicyArgs
 *         {
 *             CacheMode = "CACHE_ALL_STATIC",
 *             DefaultTtl = 3600,
 *             ClientTtl = 7200,
 *             MaxTtl = 10800,
 *             NegativeCaching = true,
 *             SignedUrlCacheMaxAgeSec = 7200,
 *         },
 *         LoadBalancingScheme = "EXTERNAL",
 *         Protocol = "HTTP",
 *     });
 * });
 * ```
 * ```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 {
 * 		defaultRegionHealthCheck, err := compute.NewRegionHealthCheck(ctx, "default", &compute.RegionHealthCheckArgs{
 * 			Name:   pulumi.String("rbs-health-check"),
 * 			Region: pulumi.String("us-central1"),
 * 			HttpHealthCheck: &compute.RegionHealthCheckHttpHealthCheckArgs{
 * 				Port: pulumi.Int(80),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewRegionBackendService(ctx, "default", &compute.RegionBackendServiceArgs{
 * 			Name:         pulumi.String("region-service"),
 * 			Region:       pulumi.String("us-central1"),
 * 			HealthChecks: defaultRegionHealthCheck.ID(),
 * 			EnableCdn:    pulumi.Bool(true),
 * 			CdnPolicy: &compute.RegionBackendServiceCdnPolicyArgs{
 * 				CacheMode:               pulumi.String("CACHE_ALL_STATIC"),
 * 				DefaultTtl:              pulumi.Int(3600),
 * 				ClientTtl:               pulumi.Int(7200),
 * 				MaxTtl:                  pulumi.Int(10800),
 * 				NegativeCaching:         pulumi.Bool(true),
 * 				SignedUrlCacheMaxAgeSec: pulumi.Int(7200),
 * 			},
 * 			LoadBalancingScheme: pulumi.String("EXTERNAL"),
 * 			Protocol:            pulumi.String("HTTP"),
 * 		})
 * 		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.RegionHealthCheck;
 * import com.pulumi.gcp.compute.RegionHealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.RegionHealthCheckHttpHealthCheckArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.inputs.RegionBackendServiceCdnPolicyArgs;
 * 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 defaultRegionHealthCheck = new RegionHealthCheck("defaultRegionHealthCheck", RegionHealthCheckArgs.builder()
 *             .name("rbs-health-check")
 *             .region("us-central1")
 *             .httpHealthCheck(RegionHealthCheckHttpHealthCheckArgs.builder()
 *                 .port(80)
 *                 .build())
 *             .build());
 *         var default_ = new RegionBackendService("default", RegionBackendServiceArgs.builder()
 *             .name("region-service")
 *             .region("us-central1")
 *             .healthChecks(defaultRegionHealthCheck.id())
 *             .enableCdn(true)
 *             .cdnPolicy(RegionBackendServiceCdnPolicyArgs.builder()
 *                 .cacheMode("CACHE_ALL_STATIC")
 *                 .defaultTtl(3600)
 *                 .clientTtl(7200)
 *                 .maxTtl(10800)
 *                 .negativeCaching(true)
 *                 .signedUrlCacheMaxAgeSec(7200)
 *                 .build())
 *             .loadBalancingScheme("EXTERNAL")
 *             .protocol("HTTP")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:compute:RegionBackendService
 *     properties:
 *       name: region-service
 *       region: us-central1
 *       healthChecks: ${defaultRegionHealthCheck.id}
 *       enableCdn: true
 *       cdnPolicy:
 *         cacheMode: CACHE_ALL_STATIC
 *         defaultTtl: 3600
 *         clientTtl: 7200
 *         maxTtl: 10800
 *         negativeCaching: true
 *         signedUrlCacheMaxAgeSec: 7200
 *       loadBalancingScheme: EXTERNAL
 *       protocol: HTTP
 *   defaultRegionHealthCheck:
 *     type: gcp:compute:RegionHealthCheck
 *     name: default
 *     properties:
 *       name: rbs-health-check
 *       region: us-central1
 *       httpHealthCheck:
 *         port: 80
 * ```
 * 
 * ### Region Backend Service Ilb Round Robin
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const healthCheck = new gcp.compute.HealthCheck("health_check", {
 *     name: "rbs-health-check",
 *     httpHealthCheck: {
 *         port: 80,
 *     },
 * });
 * const _default = new gcp.compute.RegionBackendService("default", {
 *     region: "us-central1",
 *     name: "region-service",
 *     healthChecks: healthCheck.id,
 *     protocol: "HTTP",
 *     loadBalancingScheme: "INTERNAL_MANAGED",
 *     localityLbPolicy: "ROUND_ROBIN",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * health_check = gcp.compute.HealthCheck("health_check",
 *     name="rbs-health-check",
 *     http_health_check=gcp.compute.HealthCheckHttpHealthCheckArgs(
 *         port=80,
 *     ))
 * default = gcp.compute.RegionBackendService("default",
 *     region="us-central1",
 *     name="region-service",
 *     health_checks=health_check.id,
 *     protocol="HTTP",
 *     load_balancing_scheme="INTERNAL_MANAGED",
 *     locality_lb_policy="ROUND_ROBIN")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var healthCheck = new Gcp.Compute.HealthCheck("health_check", new()
 *     {
 *         Name = "rbs-health-check",
 *         HttpHealthCheck = new Gcp.Compute.Inputs.HealthCheckHttpHealthCheckArgs
 *         {
 *             Port = 80,
 *         },
 *     });
 *     var @default = new Gcp.Compute.RegionBackendService("default", new()
 *     {
 *         Region = "us-central1",
 *         Name = "region-service",
 *         HealthChecks = healthCheck.Id,
 *         Protocol = "HTTP",
 *         LoadBalancingScheme = "INTERNAL_MANAGED",
 *         LocalityLbPolicy = "ROUND_ROBIN",
 *     });
 * });
 * ```
 * ```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 {
 * 		healthCheck, err := compute.NewHealthCheck(ctx, "health_check", &compute.HealthCheckArgs{
 * 			Name: pulumi.String("rbs-health-check"),
 * 			HttpHealthCheck: &compute.HealthCheckHttpHealthCheckArgs{
 * 				Port: pulumi.Int(80),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewRegionBackendService(ctx, "default", &compute.RegionBackendServiceArgs{
 * 			Region:              pulumi.String("us-central1"),
 * 			Name:                pulumi.String("region-service"),
 * 			HealthChecks:        healthCheck.ID(),
 * 			Protocol:            pulumi.String("HTTP"),
 * 			LoadBalancingScheme: pulumi.String("INTERNAL_MANAGED"),
 * 			LocalityLbPolicy:    pulumi.String("ROUND_ROBIN"),
 * 		})
 * 		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.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * 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 healthCheck = new HealthCheck("healthCheck", HealthCheckArgs.builder()
 *             .name("rbs-health-check")
 *             .httpHealthCheck(HealthCheckHttpHealthCheckArgs.builder()
 *                 .port(80)
 *                 .build())
 *             .build());
 *         var default_ = new RegionBackendService("default", RegionBackendServiceArgs.builder()
 *             .region("us-central1")
 *             .name("region-service")
 *             .healthChecks(healthCheck.id())
 *             .protocol("HTTP")
 *             .loadBalancingScheme("INTERNAL_MANAGED")
 *             .localityLbPolicy("ROUND_ROBIN")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:compute:RegionBackendService
 *     properties:
 *       region: us-central1
 *       name: region-service
 *       healthChecks: ${healthCheck.id}
 *       protocol: HTTP
 *       loadBalancingScheme: INTERNAL_MANAGED
 *       localityLbPolicy: ROUND_ROBIN
 *   healthCheck:
 *     type: gcp:compute:HealthCheck
 *     name: health_check
 *     properties:
 *       name: rbs-health-check
 *       httpHealthCheck:
 *         port: 80
 * ```
 * 
 * ### Region Backend Service External
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const healthCheck = new gcp.compute.RegionHealthCheck("health_check", {
 *     name: "rbs-health-check",
 *     region: "us-central1",
 *     tcpHealthCheck: {
 *         port: 80,
 *     },
 * });
 * const _default = new gcp.compute.RegionBackendService("default", {
 *     region: "us-central1",
 *     name: "region-service",
 *     healthChecks: healthCheck.id,
 *     protocol: "TCP",
 *     loadBalancingScheme: "EXTERNAL",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * health_check = gcp.compute.RegionHealthCheck("health_check",
 *     name="rbs-health-check",
 *     region="us-central1",
 *     tcp_health_check=gcp.compute.RegionHealthCheckTcpHealthCheckArgs(
 *         port=80,
 *     ))
 * default = gcp.compute.RegionBackendService("default",
 *     region="us-central1",
 *     name="region-service",
 *     health_checks=health_check.id,
 *     protocol="TCP",
 *     load_balancing_scheme="EXTERNAL")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var healthCheck = new Gcp.Compute.RegionHealthCheck("health_check", new()
 *     {
 *         Name = "rbs-health-check",
 *         Region = "us-central1",
 *         TcpHealthCheck = new Gcp.Compute.Inputs.RegionHealthCheckTcpHealthCheckArgs
 *         {
 *             Port = 80,
 *         },
 *     });
 *     var @default = new Gcp.Compute.RegionBackendService("default", new()
 *     {
 *         Region = "us-central1",
 *         Name = "region-service",
 *         HealthChecks = healthCheck.Id,
 *         Protocol = "TCP",
 *         LoadBalancingScheme = "EXTERNAL",
 *     });
 * });
 * ```
 * ```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 {
 * 		healthCheck, err := compute.NewRegionHealthCheck(ctx, "health_check", &compute.RegionHealthCheckArgs{
 * 			Name:   pulumi.String("rbs-health-check"),
 * 			Region: pulumi.String("us-central1"),
 * 			TcpHealthCheck: &compute.RegionHealthCheckTcpHealthCheckArgs{
 * 				Port: pulumi.Int(80),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewRegionBackendService(ctx, "default", &compute.RegionBackendServiceArgs{
 * 			Region:              pulumi.String("us-central1"),
 * 			Name:                pulumi.String("region-service"),
 * 			HealthChecks:        healthCheck.ID(),
 * 			Protocol:            pulumi.String("TCP"),
 * 			LoadBalancingScheme: pulumi.String("EXTERNAL"),
 * 		})
 * 		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.RegionHealthCheck;
 * import com.pulumi.gcp.compute.RegionHealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.RegionHealthCheckTcpHealthCheckArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * 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 healthCheck = new RegionHealthCheck("healthCheck", RegionHealthCheckArgs.builder()
 *             .name("rbs-health-check")
 *             .region("us-central1")
 *             .tcpHealthCheck(RegionHealthCheckTcpHealthCheckArgs.builder()
 *                 .port(80)
 *                 .build())
 *             .build());
 *         var default_ = new RegionBackendService("default", RegionBackendServiceArgs.builder()
 *             .region("us-central1")
 *             .name("region-service")
 *             .healthChecks(healthCheck.id())
 *             .protocol("TCP")
 *             .loadBalancingScheme("EXTERNAL")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:compute:RegionBackendService
 *     properties:
 *       region: us-central1
 *       name: region-service
 *       healthChecks: ${healthCheck.id}
 *       protocol: TCP
 *       loadBalancingScheme: EXTERNAL
 *   healthCheck:
 *     type: gcp:compute:RegionHealthCheck
 *     name: health_check
 *     properties:
 *       name: rbs-health-check
 *       region: us-central1
 *       tcpHealthCheck:
 *         port: 80
 * ```
 * 
 * ### Region Backend Service External Weighted
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const healthCheck = new gcp.compute.RegionHealthCheck("health_check", {
 *     name: "rbs-health-check",
 *     region: "us-central1",
 *     httpHealthCheck: {
 *         port: 80,
 *     },
 * });
 * const _default = new gcp.compute.RegionBackendService("default", {
 *     region: "us-central1",
 *     name: "region-service",
 *     healthChecks: healthCheck.id,
 *     protocol: "TCP",
 *     loadBalancingScheme: "EXTERNAL",
 *     localityLbPolicy: "WEIGHTED_MAGLEV",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * health_check = gcp.compute.RegionHealthCheck("health_check",
 *     name="rbs-health-check",
 *     region="us-central1",
 *     http_health_check=gcp.compute.RegionHealthCheckHttpHealthCheckArgs(
 *         port=80,
 *     ))
 * default = gcp.compute.RegionBackendService("default",
 *     region="us-central1",
 *     name="region-service",
 *     health_checks=health_check.id,
 *     protocol="TCP",
 *     load_balancing_scheme="EXTERNAL",
 *     locality_lb_policy="WEIGHTED_MAGLEV")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var healthCheck = new Gcp.Compute.RegionHealthCheck("health_check", new()
 *     {
 *         Name = "rbs-health-check",
 *         Region = "us-central1",
 *         HttpHealthCheck = new Gcp.Compute.Inputs.RegionHealthCheckHttpHealthCheckArgs
 *         {
 *             Port = 80,
 *         },
 *     });
 *     var @default = new Gcp.Compute.RegionBackendService("default", new()
 *     {
 *         Region = "us-central1",
 *         Name = "region-service",
 *         HealthChecks = healthCheck.Id,
 *         Protocol = "TCP",
 *         LoadBalancingScheme = "EXTERNAL",
 *         LocalityLbPolicy = "WEIGHTED_MAGLEV",
 *     });
 * });
 * ```
 * ```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 {
 * 		healthCheck, err := compute.NewRegionHealthCheck(ctx, "health_check", &compute.RegionHealthCheckArgs{
 * 			Name:   pulumi.String("rbs-health-check"),
 * 			Region: pulumi.String("us-central1"),
 * 			HttpHealthCheck: &compute.RegionHealthCheckHttpHealthCheckArgs{
 * 				Port: pulumi.Int(80),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewRegionBackendService(ctx, "default", &compute.RegionBackendServiceArgs{
 * 			Region:              pulumi.String("us-central1"),
 * 			Name:                pulumi.String("region-service"),
 * 			HealthChecks:        healthCheck.ID(),
 * 			Protocol:            pulumi.String("TCP"),
 * 			LoadBalancingScheme: pulumi.String("EXTERNAL"),
 * 			LocalityLbPolicy:    pulumi.String("WEIGHTED_MAGLEV"),
 * 		})
 * 		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.RegionHealthCheck;
 * import com.pulumi.gcp.compute.RegionHealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.RegionHealthCheckHttpHealthCheckArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * 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 healthCheck = new RegionHealthCheck("healthCheck", RegionHealthCheckArgs.builder()
 *             .name("rbs-health-check")
 *             .region("us-central1")
 *             .httpHealthCheck(RegionHealthCheckHttpHealthCheckArgs.builder()
 *                 .port(80)
 *                 .build())
 *             .build());
 *         var default_ = new RegionBackendService("default", RegionBackendServiceArgs.builder()
 *             .region("us-central1")
 *             .name("region-service")
 *             .healthChecks(healthCheck.id())
 *             .protocol("TCP")
 *             .loadBalancingScheme("EXTERNAL")
 *             .localityLbPolicy("WEIGHTED_MAGLEV")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:compute:RegionBackendService
 *     properties:
 *       region: us-central1
 *       name: region-service
 *       healthChecks: ${healthCheck.id}
 *       protocol: TCP
 *       loadBalancingScheme: EXTERNAL
 *       localityLbPolicy: WEIGHTED_MAGLEV
 *   healthCheck:
 *     type: gcp:compute:RegionHealthCheck
 *     name: health_check
 *     properties:
 *       name: rbs-health-check
 *       region: us-central1
 *       httpHealthCheck:
 *         port: 80
 * ```
 * 
 * ### Region Backend Service Ilb Ring Hash
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const healthCheck = new gcp.compute.HealthCheck("health_check", {
 *     name: "rbs-health-check",
 *     httpHealthCheck: {
 *         port: 80,
 *     },
 * });
 * const _default = new gcp.compute.RegionBackendService("default", {
 *     region: "us-central1",
 *     name: "region-service",
 *     healthChecks: healthCheck.id,
 *     loadBalancingScheme: "INTERNAL_MANAGED",
 *     localityLbPolicy: "RING_HASH",
 *     sessionAffinity: "HTTP_COOKIE",
 *     protocol: "HTTP",
 *     circuitBreakers: {
 *         maxConnections: 10,
 *     },
 *     consistentHash: {
 *         httpCookie: {
 *             ttl: {
 *                 seconds: 11,
 *                 nanos: 1111,
 *             },
 *             name: "mycookie",
 *         },
 *     },
 *     outlierDetection: {
 *         consecutiveErrors: 2,
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * health_check = gcp.compute.HealthCheck("health_check",
 *     name="rbs-health-check",
 *     http_health_check=gcp.compute.HealthCheckHttpHealthCheckArgs(
 *         port=80,
 *     ))
 * default = gcp.compute.RegionBackendService("default",
 *     region="us-central1",
 *     name="region-service",
 *     health_checks=health_check.id,
 *     load_balancing_scheme="INTERNAL_MANAGED",
 *     locality_lb_policy="RING_HASH",
 *     session_affinity="HTTP_COOKIE",
 *     protocol="HTTP",
 *     circuit_breakers=gcp.compute.RegionBackendServiceCircuitBreakersArgs(
 *         max_connections=10,
 *     ),
 *     consistent_hash=gcp.compute.RegionBackendServiceConsistentHashArgs(
 *         http_cookie=gcp.compute.RegionBackendServiceConsistentHashHttpCookieArgs(
 *             ttl=gcp.compute.RegionBackendServiceConsistentHashHttpCookieTtlArgs(
 *                 seconds=11,
 *                 nanos=1111,
 *             ),
 *             name="mycookie",
 *         ),
 *     ),
 *     outlier_detection=gcp.compute.RegionBackendServiceOutlierDetectionArgs(
 *         consecutive_errors=2,
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var healthCheck = new Gcp.Compute.HealthCheck("health_check", new()
 *     {
 *         Name = "rbs-health-check",
 *         HttpHealthCheck = new Gcp.Compute.Inputs.HealthCheckHttpHealthCheckArgs
 *         {
 *             Port = 80,
 *         },
 *     });
 *     var @default = new Gcp.Compute.RegionBackendService("default", new()
 *     {
 *         Region = "us-central1",
 *         Name = "region-service",
 *         HealthChecks = healthCheck.Id,
 *         LoadBalancingScheme = "INTERNAL_MANAGED",
 *         LocalityLbPolicy = "RING_HASH",
 *         SessionAffinity = "HTTP_COOKIE",
 *         Protocol = "HTTP",
 *         CircuitBreakers = new Gcp.Compute.Inputs.RegionBackendServiceCircuitBreakersArgs
 *         {
 *             MaxConnections = 10,
 *         },
 *         ConsistentHash = new Gcp.Compute.Inputs.RegionBackendServiceConsistentHashArgs
 *         {
 *             HttpCookie = new Gcp.Compute.Inputs.RegionBackendServiceConsistentHashHttpCookieArgs
 *             {
 *                 Ttl = new Gcp.Compute.Inputs.RegionBackendServiceConsistentHashHttpCookieTtlArgs
 *                 {
 *                     Seconds = 11,
 *                     Nanos = 1111,
 *                 },
 *                 Name = "mycookie",
 *             },
 *         },
 *         OutlierDetection = new Gcp.Compute.Inputs.RegionBackendServiceOutlierDetectionArgs
 *         {
 *             ConsecutiveErrors = 2,
 *         },
 *     });
 * });
 * ```
 * ```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 {
 * 		healthCheck, err := compute.NewHealthCheck(ctx, "health_check", &compute.HealthCheckArgs{
 * 			Name: pulumi.String("rbs-health-check"),
 * 			HttpHealthCheck: &compute.HealthCheckHttpHealthCheckArgs{
 * 				Port: pulumi.Int(80),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewRegionBackendService(ctx, "default", &compute.RegionBackendServiceArgs{
 * 			Region:              pulumi.String("us-central1"),
 * 			Name:                pulumi.String("region-service"),
 * 			HealthChecks:        healthCheck.ID(),
 * 			LoadBalancingScheme: pulumi.String("INTERNAL_MANAGED"),
 * 			LocalityLbPolicy:    pulumi.String("RING_HASH"),
 * 			SessionAffinity:     pulumi.String("HTTP_COOKIE"),
 * 			Protocol:            pulumi.String("HTTP"),
 * 			CircuitBreakers: &compute.RegionBackendServiceCircuitBreakersArgs{
 * 				MaxConnections: pulumi.Int(10),
 * 			},
 * 			ConsistentHash: &compute.RegionBackendServiceConsistentHashArgs{
 * 				HttpCookie: &compute.RegionBackendServiceConsistentHashHttpCookieArgs{
 * 					Ttl: &compute.RegionBackendServiceConsistentHashHttpCookieTtlArgs{
 * 						Seconds: pulumi.Int(11),
 * 						Nanos:   pulumi.Int(1111),
 * 					},
 * 					Name: pulumi.String("mycookie"),
 * 				},
 * 			},
 * 			OutlierDetection: &compute.RegionBackendServiceOutlierDetectionArgs{
 * 				ConsecutiveErrors: pulumi.Int(2),
 * 			},
 * 		})
 * 		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.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.inputs.RegionBackendServiceCircuitBreakersArgs;
 * import com.pulumi.gcp.compute.inputs.RegionBackendServiceConsistentHashArgs;
 * import com.pulumi.gcp.compute.inputs.RegionBackendServiceConsistentHashHttpCookieArgs;
 * import com.pulumi.gcp.compute.inputs.RegionBackendServiceConsistentHashHttpCookieTtlArgs;
 * import com.pulumi.gcp.compute.inputs.RegionBackendServiceOutlierDetectionArgs;
 * 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 healthCheck = new HealthCheck("healthCheck", HealthCheckArgs.builder()
 *             .name("rbs-health-check")
 *             .httpHealthCheck(HealthCheckHttpHealthCheckArgs.builder()
 *                 .port(80)
 *                 .build())
 *             .build());
 *         var default_ = new RegionBackendService("default", RegionBackendServiceArgs.builder()
 *             .region("us-central1")
 *             .name("region-service")
 *             .healthChecks(healthCheck.id())
 *             .loadBalancingScheme("INTERNAL_MANAGED")
 *             .localityLbPolicy("RING_HASH")
 *             .sessionAffinity("HTTP_COOKIE")
 *             .protocol("HTTP")
 *             .circuitBreakers(RegionBackendServiceCircuitBreakersArgs.builder()
 *                 .maxConnections(10)
 *                 .build())
 *             .consistentHash(RegionBackendServiceConsistentHashArgs.builder()
 *                 .httpCookie(RegionBackendServiceConsistentHashHttpCookieArgs.builder()
 *                     .ttl(RegionBackendServiceConsistentHashHttpCookieTtlArgs.builder()
 *                         .seconds(11)
 *                         .nanos(1111)
 *                         .build())
 *                     .name("mycookie")
 *                     .build())
 *                 .build())
 *             .outlierDetection(RegionBackendServiceOutlierDetectionArgs.builder()
 *                 .consecutiveErrors(2)
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:compute:RegionBackendService
 *     properties:
 *       region: us-central1
 *       name: region-service
 *       healthChecks: ${healthCheck.id}
 *       loadBalancingScheme: INTERNAL_MANAGED
 *       localityLbPolicy: RING_HASH
 *       sessionAffinity: HTTP_COOKIE
 *       protocol: HTTP
 *       circuitBreakers:
 *         maxConnections: 10
 *       consistentHash:
 *         httpCookie:
 *           ttl:
 *             seconds: 11
 *             nanos: 1111
 *           name: mycookie
 *       outlierDetection:
 *         consecutiveErrors: 2
 *   healthCheck:
 *     type: gcp:compute:HealthCheck
 *     name: health_check
 *     properties:
 *       name: rbs-health-check
 *       httpHealthCheck:
 *         port: 80
 * ```
 * 
 * ### Region Backend Service Balancing Mode
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const debianImage = gcp.compute.getImage({
 *     family: "debian-11",
 *     project: "debian-cloud",
 * });
 * const defaultNetwork = new gcp.compute.Network("default", {
 *     name: "rbs-net",
 *     autoCreateSubnetworks: false,
 *     routingMode: "REGIONAL",
 * });
 * const defaultSubnetwork = new gcp.compute.Subnetwork("default", {
 *     name: "rbs-net-default",
 *     ipCidrRange: "10.1.2.0/24",
 *     region: "us-central1",
 *     network: defaultNetwork.id,
 * });
 * const instanceTemplate = new gcp.compute.InstanceTemplate("instance_template", {
 *     name: "template-region-service",
 *     machineType: "e2-medium",
 *     networkInterfaces: [{
 *         network: defaultNetwork.id,
 *         subnetwork: defaultSubnetwork.id,
 *     }],
 *     disks: [{
 *         sourceImage: debianImage.then(debianImage => debianImage.selfLink),
 *         autoDelete: true,
 *         boot: true,
 *     }],
 *     tags: [
 *         "allow-ssh",
 *         "load-balanced-backend",
 *     ],
 * });
 * const rigm = new gcp.compute.RegionInstanceGroupManager("rigm", {
 *     region: "us-central1",
 *     name: "rbs-rigm",
 *     versions: [{
 *         instanceTemplate: instanceTemplate.id,
 *         name: "primary",
 *     }],
 *     baseInstanceName: "internal-glb",
 *     targetSize: 1,
 * });
 * const defaultRegionHealthCheck = new gcp.compute.RegionHealthCheck("default", {
 *     region: "us-central1",
 *     name: "rbs-health-check",
 *     httpHealthCheck: {
 *         portSpecification: "USE_SERVING_PORT",
 *     },
 * });
 * const _default = new gcp.compute.RegionBackendService("default", {
 *     loadBalancingScheme: "INTERNAL_MANAGED",
 *     backends: [{
 *         group: rigm.instanceGroup,
 *         balancingMode: "UTILIZATION",
 *         capacityScaler: 1,
 *     }],
 *     region: "us-central1",
 *     name: "region-service",
 *     protocol: "HTTP",
 *     timeoutSec: 10,
 *     healthChecks: defaultRegionHealthCheck.id,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * debian_image = gcp.compute.get_image(family="debian-11",
 *     project="debian-cloud")
 * default_network = gcp.compute.Network("default",
 *     name="rbs-net",
 *     auto_create_subnetworks=False,
 *     routing_mode="REGIONAL")
 * default_subnetwork = gcp.compute.Subnetwork("default",
 *     name="rbs-net-default",
 *     ip_cidr_range="10.1.2.0/24",
 *     region="us-central1",
 *     network=default_network.id)
 * instance_template = gcp.compute.InstanceTemplate("instance_template",
 *     name="template-region-service",
 *     machine_type="e2-medium",
 *     network_interfaces=[gcp.compute.InstanceTemplateNetworkInterfaceArgs(
 *         network=default_network.id,
 *         subnetwork=default_subnetwork.id,
 *     )],
 *     disks=[gcp.compute.InstanceTemplateDiskArgs(
 *         source_image=debian_image.self_link,
 *         auto_delete=True,
 *         boot=True,
 *     )],
 *     tags=[
 *         "allow-ssh",
 *         "load-balanced-backend",
 *     ])
 * rigm = gcp.compute.RegionInstanceGroupManager("rigm",
 *     region="us-central1",
 *     name="rbs-rigm",
 *     versions=[gcp.compute.RegionInstanceGroupManagerVersionArgs(
 *         instance_template=instance_template.id,
 *         name="primary",
 *     )],
 *     base_instance_name="internal-glb",
 *     target_size=1)
 * default_region_health_check = gcp.compute.RegionHealthCheck("default",
 *     region="us-central1",
 *     name="rbs-health-check",
 *     http_health_check=gcp.compute.RegionHealthCheckHttpHealthCheckArgs(
 *         port_specification="USE_SERVING_PORT",
 *     ))
 * default = gcp.compute.RegionBackendService("default",
 *     load_balancing_scheme="INTERNAL_MANAGED",
 *     backends=[gcp.compute.RegionBackendServiceBackendArgs(
 *         group=rigm.instance_group,
 *         balancing_mode="UTILIZATION",
 *         capacity_scaler=1,
 *     )],
 *     region="us-central1",
 *     name="region-service",
 *     protocol="HTTP",
 *     timeout_sec=10,
 *     health_checks=default_region_health_check.id)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var debianImage = Gcp.Compute.GetImage.Invoke(new()
 *     {
 *         Family = "debian-11",
 *         Project = "debian-cloud",
 *     });
 *     var defaultNetwork = new Gcp.Compute.Network("default", new()
 *     {
 *         Name = "rbs-net",
 *         AutoCreateSubnetworks = false,
 *         RoutingMode = "REGIONAL",
 *     });
 *     var defaultSubnetwork = new Gcp.Compute.Subnetwork("default", new()
 *     {
 *         Name = "rbs-net-default",
 *         IpCidrRange = "10.1.2.0/24",
 *         Region = "us-central1",
 *         Network = defaultNetwork.Id,
 *     });
 *     var instanceTemplate = new Gcp.Compute.InstanceTemplate("instance_template", new()
 *     {
 *         Name = "template-region-service",
 *         MachineType = "e2-medium",
 *         NetworkInterfaces = new[]
 *         {
 *             new Gcp.Compute.Inputs.InstanceTemplateNetworkInterfaceArgs
 *             {
 *                 Network = defaultNetwork.Id,
 *                 Subnetwork = defaultSubnetwork.Id,
 *             },
 *         },
 *         Disks = new[]
 *         {
 *             new Gcp.Compute.Inputs.InstanceTemplateDiskArgs
 *             {
 *                 SourceImage = debianImage.Apply(getImageResult => getImageResult.SelfLink),
 *                 AutoDelete = true,
 *                 Boot = true,
 *             },
 *         },
 *         Tags = new[]
 *         {
 *             "allow-ssh",
 *             "load-balanced-backend",
 *         },
 *     });
 *     var rigm = new Gcp.Compute.RegionInstanceGroupManager("rigm", new()
 *     {
 *         Region = "us-central1",
 *         Name = "rbs-rigm",
 *         Versions = new[]
 *         {
 *             new Gcp.Compute.Inputs.RegionInstanceGroupManagerVersionArgs
 *             {
 *                 InstanceTemplate = instanceTemplate.Id,
 *                 Name = "primary",
 *             },
 *         },
 *         BaseInstanceName = "internal-glb",
 *         TargetSize = 1,
 *     });
 *     var defaultRegionHealthCheck = new Gcp.Compute.RegionHealthCheck("default", new()
 *     {
 *         Region = "us-central1",
 *         Name = "rbs-health-check",
 *         HttpHealthCheck = new Gcp.Compute.Inputs.RegionHealthCheckHttpHealthCheckArgs
 *         {
 *             PortSpecification = "USE_SERVING_PORT",
 *         },
 *     });
 *     var @default = new Gcp.Compute.RegionBackendService("default", new()
 *     {
 *         LoadBalancingScheme = "INTERNAL_MANAGED",
 *         Backends = new[]
 *         {
 *             new Gcp.Compute.Inputs.RegionBackendServiceBackendArgs
 *             {
 *                 Group = rigm.InstanceGroup,
 *                 BalancingMode = "UTILIZATION",
 *                 CapacityScaler = 1,
 *             },
 *         },
 *         Region = "us-central1",
 *         Name = "region-service",
 *         Protocol = "HTTP",
 *         TimeoutSec = 10,
 *         HealthChecks = defaultRegionHealthCheck.Id,
 *     });
 * });
 * ```
 * ```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 {
 * 		debianImage, err := compute.LookupImage(ctx, &compute.LookupImageArgs{
 * 			Family:  pulumi.StringRef("debian-11"),
 * 			Project: pulumi.StringRef("debian-cloud"),
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		defaultNetwork, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
 * 			Name:                  pulumi.String("rbs-net"),
 * 			AutoCreateSubnetworks: pulumi.Bool(false),
 * 			RoutingMode:           pulumi.String("REGIONAL"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		defaultSubnetwork, err := compute.NewSubnetwork(ctx, "default", &compute.SubnetworkArgs{
 * 			Name:        pulumi.String("rbs-net-default"),
 * 			IpCidrRange: pulumi.String("10.1.2.0/24"),
 * 			Region:      pulumi.String("us-central1"),
 * 			Network:     defaultNetwork.ID(),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		instanceTemplate, err := compute.NewInstanceTemplate(ctx, "instance_template", &compute.InstanceTemplateArgs{
 * 			Name:        pulumi.String("template-region-service"),
 * 			MachineType: pulumi.String("e2-medium"),
 * 			NetworkInterfaces: compute.InstanceTemplateNetworkInterfaceArray{
 * 				&compute.InstanceTemplateNetworkInterfaceArgs{
 * 					Network:    defaultNetwork.ID(),
 * 					Subnetwork: defaultSubnetwork.ID(),
 * 				},
 * 			},
 * 			Disks: compute.InstanceTemplateDiskArray{
 * 				&compute.InstanceTemplateDiskArgs{
 * 					SourceImage: pulumi.String(debianImage.SelfLink),
 * 					AutoDelete:  pulumi.Bool(true),
 * 					Boot:        pulumi.Bool(true),
 * 				},
 * 			},
 * 			Tags: pulumi.StringArray{
 * 				pulumi.String("allow-ssh"),
 * 				pulumi.String("load-balanced-backend"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		rigm, err := compute.NewRegionInstanceGroupManager(ctx, "rigm", &compute.RegionInstanceGroupManagerArgs{
 * 			Region: pulumi.String("us-central1"),
 * 			Name:   pulumi.String("rbs-rigm"),
 * 			Versions: compute.RegionInstanceGroupManagerVersionArray{
 * 				&compute.RegionInstanceGroupManagerVersionArgs{
 * 					InstanceTemplate: instanceTemplate.ID(),
 * 					Name:             pulumi.String("primary"),
 * 				},
 * 			},
 * 			BaseInstanceName: pulumi.String("internal-glb"),
 * 			TargetSize:       pulumi.Int(1),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		defaultRegionHealthCheck, err := compute.NewRegionHealthCheck(ctx, "default", &compute.RegionHealthCheckArgs{
 * 			Region: pulumi.String("us-central1"),
 * 			Name:   pulumi.String("rbs-health-check"),
 * 			HttpHealthCheck: &compute.RegionHealthCheckHttpHealthCheckArgs{
 * 				PortSpecification: pulumi.String("USE_SERVING_PORT"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewRegionBackendService(ctx, "default", &compute.RegionBackendServiceArgs{
 * 			LoadBalancingScheme: pulumi.String("INTERNAL_MANAGED"),
 * 			Backends: compute.RegionBackendServiceBackendArray{
 * 				&compute.RegionBackendServiceBackendArgs{
 * 					Group:          rigm.InstanceGroup,
 * 					BalancingMode:  pulumi.String("UTILIZATION"),
 * 					CapacityScaler: pulumi.Float64(1),
 * 				},
 * 			},
 * 			Region:       pulumi.String("us-central1"),
 * 			Name:         pulumi.String("region-service"),
 * 			Protocol:     pulumi.String("HTTP"),
 * 			TimeoutSec:   pulumi.Int(10),
 * 			HealthChecks: defaultRegionHealthCheck.ID(),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.ComputeFunctions;
 * import com.pulumi.gcp.compute.inputs.GetImageArgs;
 * 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.compute.InstanceTemplate;
 * import com.pulumi.gcp.compute.InstanceTemplateArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceTemplateNetworkInterfaceArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs;
 * import com.pulumi.gcp.compute.RegionInstanceGroupManager;
 * import com.pulumi.gcp.compute.RegionInstanceGroupManagerArgs;
 * import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerVersionArgs;
 * import com.pulumi.gcp.compute.RegionHealthCheck;
 * import com.pulumi.gcp.compute.RegionHealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.RegionHealthCheckHttpHealthCheckArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.inputs.RegionBackendServiceBackendArgs;
 * 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) {
 *         final var debianImage = ComputeFunctions.getImage(GetImageArgs.builder()
 *             .family("debian-11")
 *             .project("debian-cloud")
 *             .build());
 *         var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
 *             .name("rbs-net")
 *             .autoCreateSubnetworks(false)
 *             .routingMode("REGIONAL")
 *             .build());
 *         var defaultSubnetwork = new Subnetwork("defaultSubnetwork", SubnetworkArgs.builder()
 *             .name("rbs-net-default")
 *             .ipCidrRange("10.1.2.0/24")
 *             .region("us-central1")
 *             .network(defaultNetwork.id())
 *             .build());
 *         var instanceTemplate = new InstanceTemplate("instanceTemplate", InstanceTemplateArgs.builder()
 *             .name("template-region-service")
 *             .machineType("e2-medium")
 *             .networkInterfaces(InstanceTemplateNetworkInterfaceArgs.builder()
 *                 .network(defaultNetwork.id())
 *                 .subnetwork(defaultSubnetwork.id())
 *                 .build())
 *             .disks(InstanceTemplateDiskArgs.builder()
 *                 .sourceImage(debianImage.applyValue(getImageResult -> getImageResult.selfLink()))
 *                 .autoDelete(true)
 *                 .boot(true)
 *                 .build())
 *             .tags(
 *                 "allow-ssh",
 *                 "load-balanced-backend")
 *             .build());
 *         var rigm = new RegionInstanceGroupManager("rigm", RegionInstanceGroupManagerArgs.builder()
 *             .region("us-central1")
 *             .name("rbs-rigm")
 *             .versions(RegionInstanceGroupManagerVersionArgs.builder()
 *                 .instanceTemplate(instanceTemplate.id())
 *                 .name("primary")
 *                 .build())
 *             .baseInstanceName("internal-glb")
 *             .targetSize(1)
 *             .build());
 *         var defaultRegionHealthCheck = new RegionHealthCheck("defaultRegionHealthCheck", RegionHealthCheckArgs.builder()
 *             .region("us-central1")
 *             .name("rbs-health-check")
 *             .httpHealthCheck(RegionHealthCheckHttpHealthCheckArgs.builder()
 *                 .portSpecification("USE_SERVING_PORT")
 *                 .build())
 *             .build());
 *         var default_ = new RegionBackendService("default", RegionBackendServiceArgs.builder()
 *             .loadBalancingScheme("INTERNAL_MANAGED")
 *             .backends(RegionBackendServiceBackendArgs.builder()
 *                 .group(rigm.instanceGroup())
 *                 .balancingMode("UTILIZATION")
 *                 .capacityScaler(1)
 *                 .build())
 *             .region("us-central1")
 *             .name("region-service")
 *             .protocol("HTTP")
 *             .timeoutSec(10)
 *             .healthChecks(defaultRegionHealthCheck.id())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:compute:RegionBackendService
 *     properties:
 *       loadBalancingScheme: INTERNAL_MANAGED
 *       backends:
 *         - group: ${rigm.instanceGroup}
 *           balancingMode: UTILIZATION
 *           capacityScaler: 1
 *       region: us-central1
 *       name: region-service
 *       protocol: HTTP
 *       timeoutSec: 10
 *       healthChecks: ${defaultRegionHealthCheck.id}
 *   rigm:
 *     type: gcp:compute:RegionInstanceGroupManager
 *     properties:
 *       region: us-central1
 *       name: rbs-rigm
 *       versions:
 *         - instanceTemplate: ${instanceTemplate.id}
 *           name: primary
 *       baseInstanceName: internal-glb
 *       targetSize: 1
 *   instanceTemplate:
 *     type: gcp:compute:InstanceTemplate
 *     name: instance_template
 *     properties:
 *       name: template-region-service
 *       machineType: e2-medium
 *       networkInterfaces:
 *         - network: ${defaultNetwork.id}
 *           subnetwork: ${defaultSubnetwork.id}
 *       disks:
 *         - sourceImage: ${debianImage.selfLink}
 *           autoDelete: true
 *           boot: true
 *       tags:
 *         - allow-ssh
 *         - load-balanced-backend
 *   defaultRegionHealthCheck:
 *     type: gcp:compute:RegionHealthCheck
 *     name: default
 *     properties:
 *       region: us-central1
 *       name: rbs-health-check
 *       httpHealthCheck:
 *         portSpecification: USE_SERVING_PORT
 *   defaultNetwork:
 *     type: gcp:compute:Network
 *     name: default
 *     properties:
 *       name: rbs-net
 *       autoCreateSubnetworks: false
 *       routingMode: REGIONAL
 *   defaultSubnetwork:
 *     type: gcp:compute:Subnetwork
 *     name: default
 *     properties:
 *       name: rbs-net-default
 *       ipCidrRange: 10.1.2.0/24
 *       region: us-central1
 *       network: ${defaultNetwork.id}
 * variables:
 *   debianImage:
 *     fn::invoke:
 *       Function: gcp:compute:getImage
 *       Arguments:
 *         family: debian-11
 *         project: debian-cloud
 * ```
 * 
 * ### Region Backend Service Connection Tracking
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const healthCheck = new gcp.compute.RegionHealthCheck("health_check", {
 *     name: "rbs-health-check",
 *     region: "us-central1",
 *     tcpHealthCheck: {
 *         port: 22,
 *     },
 * });
 * const _default = new gcp.compute.RegionBackendService("default", {
 *     name: "region-service",
 *     region: "us-central1",
 *     healthChecks: healthCheck.id,
 *     connectionDrainingTimeoutSec: 10,
 *     sessionAffinity: "CLIENT_IP",
 *     protocol: "TCP",
 *     loadBalancingScheme: "EXTERNAL",
 *     connectionTrackingPolicy: {
 *         trackingMode: "PER_SESSION",
 *         connectionPersistenceOnUnhealthyBackends: "NEVER_PERSIST",
 *         idleTimeoutSec: 60,
 *         enableStrongAffinity: true,
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * health_check = gcp.compute.RegionHealthCheck("health_check",
 *     name="rbs-health-check",
 *     region="us-central1",
 *     tcp_health_check=gcp.compute.RegionHealthCheckTcpHealthCheckArgs(
 *         port=22,
 *     ))
 * default = gcp.compute.RegionBackendService("default",
 *     name="region-service",
 *     region="us-central1",
 *     health_checks=health_check.id,
 *     connection_draining_timeout_sec=10,
 *     session_affinity="CLIENT_IP",
 *     protocol="TCP",
 *     load_balancing_scheme="EXTERNAL",
 *     connection_tracking_policy=gcp.compute.RegionBackendServiceConnectionTrackingPolicyArgs(
 *         tracking_mode="PER_SESSION",
 *         connection_persistence_on_unhealthy_backends="NEVER_PERSIST",
 *         idle_timeout_sec=60,
 *         enable_strong_affinity=True,
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var healthCheck = new Gcp.Compute.RegionHealthCheck("health_check", new()
 *     {
 *         Name = "rbs-health-check",
 *         Region = "us-central1",
 *         TcpHealthCheck = new Gcp.Compute.Inputs.RegionHealthCheckTcpHealthCheckArgs
 *         {
 *             Port = 22,
 *         },
 *     });
 *     var @default = new Gcp.Compute.RegionBackendService("default", new()
 *     {
 *         Name = "region-service",
 *         Region = "us-central1",
 *         HealthChecks = healthCheck.Id,
 *         ConnectionDrainingTimeoutSec = 10,
 *         SessionAffinity = "CLIENT_IP",
 *         Protocol = "TCP",
 *         LoadBalancingScheme = "EXTERNAL",
 *         ConnectionTrackingPolicy = new Gcp.Compute.Inputs.RegionBackendServiceConnectionTrackingPolicyArgs
 *         {
 *             TrackingMode = "PER_SESSION",
 *             ConnectionPersistenceOnUnhealthyBackends = "NEVER_PERSIST",
 *             IdleTimeoutSec = 60,
 *             EnableStrongAffinity = true,
 *         },
 *     });
 * });
 * ```
 * ```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 {
 * 		healthCheck, err := compute.NewRegionHealthCheck(ctx, "health_check", &compute.RegionHealthCheckArgs{
 * 			Name:   pulumi.String("rbs-health-check"),
 * 			Region: pulumi.String("us-central1"),
 * 			TcpHealthCheck: &compute.RegionHealthCheckTcpHealthCheckArgs{
 * 				Port: pulumi.Int(22),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewRegionBackendService(ctx, "default", &compute.RegionBackendServiceArgs{
 * 			Name:                         pulumi.String("region-service"),
 * 			Region:                       pulumi.String("us-central1"),
 * 			HealthChecks:                 healthCheck.ID(),
 * 			ConnectionDrainingTimeoutSec: pulumi.Int(10),
 * 			SessionAffinity:              pulumi.String("CLIENT_IP"),
 * 			Protocol:                     pulumi.String("TCP"),
 * 			LoadBalancingScheme:          pulumi.String("EXTERNAL"),
 * 			ConnectionTrackingPolicy: &compute.RegionBackendServiceConnectionTrackingPolicyArgs{
 * 				TrackingMode:                             pulumi.String("PER_SESSION"),
 * 				ConnectionPersistenceOnUnhealthyBackends: pulumi.String("NEVER_PERSIST"),
 * 				IdleTimeoutSec:                           pulumi.Int(60),
 * 				EnableStrongAffinity:                     pulumi.Bool(true),
 * 			},
 * 		})
 * 		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.RegionHealthCheck;
 * import com.pulumi.gcp.compute.RegionHealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.RegionHealthCheckTcpHealthCheckArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.inputs.RegionBackendServiceConnectionTrackingPolicyArgs;
 * 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 healthCheck = new RegionHealthCheck("healthCheck", RegionHealthCheckArgs.builder()
 *             .name("rbs-health-check")
 *             .region("us-central1")
 *             .tcpHealthCheck(RegionHealthCheckTcpHealthCheckArgs.builder()
 *                 .port(22)
 *                 .build())
 *             .build());
 *         var default_ = new RegionBackendService("default", RegionBackendServiceArgs.builder()
 *             .name("region-service")
 *             .region("us-central1")
 *             .healthChecks(healthCheck.id())
 *             .connectionDrainingTimeoutSec(10)
 *             .sessionAffinity("CLIENT_IP")
 *             .protocol("TCP")
 *             .loadBalancingScheme("EXTERNAL")
 *             .connectionTrackingPolicy(RegionBackendServiceConnectionTrackingPolicyArgs.builder()
 *                 .trackingMode("PER_SESSION")
 *                 .connectionPersistenceOnUnhealthyBackends("NEVER_PERSIST")
 *                 .idleTimeoutSec(60)
 *                 .enableStrongAffinity(true)
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:compute:RegionBackendService
 *     properties:
 *       name: region-service
 *       region: us-central1
 *       healthChecks: ${healthCheck.id}
 *       connectionDrainingTimeoutSec: 10
 *       sessionAffinity: CLIENT_IP
 *       protocol: TCP
 *       loadBalancingScheme: EXTERNAL
 *       connectionTrackingPolicy:
 *         trackingMode: PER_SESSION
 *         connectionPersistenceOnUnhealthyBackends: NEVER_PERSIST
 *         idleTimeoutSec: 60
 *         enableStrongAffinity: true
 *   healthCheck:
 *     type: gcp:compute:RegionHealthCheck
 *     name: health_check
 *     properties:
 *       name: rbs-health-check
 *       region: us-central1
 *       tcpHealthCheck:
 *         port: 22
 * ```
 * 
 * ## Import
 * RegionBackendService can be imported using any of these accepted formats:
 * * `projects/{{project}}/regions/{{region}}/backendServices/{{name}}`
 * * `{{project}}/{{region}}/{{name}}`
 * * `{{region}}/{{name}}`
 * * `{{name}}`
 * When using the `pulumi import` command, RegionBackendService can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:compute/regionBackendService:RegionBackendService default projects/{{project}}/regions/{{region}}/backendServices/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/regionBackendService:RegionBackendService default {{project}}/{{region}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/regionBackendService:RegionBackendService default {{region}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/regionBackendService:RegionBackendService default {{name}}
 * ```
 */
public class RegionBackendService internal constructor(
    override val javaResource: com.pulumi.gcp.compute.RegionBackendService,
) : KotlinCustomResource(javaResource, RegionBackendServiceMapper) {
    /**
     * Lifetime of cookies in seconds if session_affinity is
     * GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts
     * only until the end of the browser session (or equivalent). The
     * maximum allowed value for TTL is one day.
     * When the load balancing scheme is INTERNAL, this field is not used.
     */
    public val affinityCookieTtlSec: Output?
        get() = javaResource.affinityCookieTtlSec().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The set of backends that serve this RegionBackendService.
     * Structure is documented below.
     */
    public val backends: Output>?
        get() = javaResource.backends().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> regionBackendServiceBackendToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * Cloud CDN configuration for this BackendService.
     * Structure is documented below.
     */
    public val cdnPolicy: Output
        get() = javaResource.cdnPolicy().applyValue({ args0 ->
            args0.let({ args0 ->
                regionBackendServiceCdnPolicyToKotlin(args0)
            })
        })

    /**
     * Settings controlling the volume of connections to a backend service. This field
     * is applicable only when the `load_balancing_scheme` is set to INTERNAL_MANAGED
     * and the `protocol` is set to HTTP, HTTPS, or HTTP2.
     * Structure is documented below.
     */
    public val circuitBreakers: Output?
        get() = javaResource.circuitBreakers().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> regionBackendServiceCircuitBreakersToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * Time for which instance will be drained (not accept new
     * connections, but still work to finish started).
     */
    public val connectionDrainingTimeoutSec: Output?
        get() = javaResource.connectionDrainingTimeoutSec().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Connection Tracking configuration for this BackendService.
     * This is available only for Layer 4 Internal Load Balancing and
     * Network Load Balancing.
     * Structure is documented below.
     */
    public val connectionTrackingPolicy: Output?
        get() = javaResource.connectionTrackingPolicy().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    regionBackendServiceConnectionTrackingPolicyToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * Consistent Hash-based load balancing can be used to provide soft session
     * affinity based on HTTP headers, cookies or other properties. This load balancing
     * policy is applicable only for HTTP connections. The affinity to a particular
     * destination host will be lost when one or more hosts are added/removed from the
     * destination service. This field specifies parameters that control consistent
     * hashing.
     * This field only applies when all of the following are true -
     */
    public val consistentHash: Output?
        get() = javaResource.consistentHash().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> regionBackendServiceConsistentHashToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * Creation timestamp in RFC3339 text format.
     */
    public val creationTimestamp: Output
        get() = javaResource.creationTimestamp().applyValue({ args0 -> args0 })

    /**
     * An optional description of this resource.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * If true, enable Cloud CDN for this RegionBackendService.
     */
    public val enableCdn: Output?
        get() = javaResource.enableCdn().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Policy for failovers.
     * Structure is documented below.
     */
    public val failoverPolicy: Output?
        get() = javaResource.failoverPolicy().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> regionBackendServiceFailoverPolicyToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * Fingerprint of this resource. A hash of the contents stored in this
     * object. This field is used in optimistic locking.
     */
    public val fingerprint: Output
        get() = javaResource.fingerprint().applyValue({ args0 -> args0 })

    /**
     * The unique identifier for the resource. This identifier is defined by the server.
     */
    public val generatedId: Output
        get() = javaResource.generatedId().applyValue({ args0 -> args0 })

    /**
     * The set of URLs to HealthCheck resources for health checking
     * this RegionBackendService. Currently at most one health
     * check can be specified.
     * A health check must be specified unless the backend service uses an internet
     * or serverless NEG as a backend.
     */
    public val healthChecks: Output?
        get() = javaResource.healthChecks().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Settings for enabling Cloud Identity Aware Proxy
     * Structure is documented below.
     */
    public val iap: Output?
        get() = javaResource.iap().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    regionBackendServiceIapToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * Indicates what kind of load balancing this regional backend service
     * will be used for. A backend service created for one type of load
     * balancing cannot be used with the other(s). For more information, refer to
     * [Choosing a load balancer](https://cloud.google.com/load-balancing/docs/backend-service).
     * Default value is `INTERNAL`.
     * Possible values are: `EXTERNAL`, `EXTERNAL_MANAGED`, `INTERNAL`, `INTERNAL_MANAGED`.
     */
    public val loadBalancingScheme: Output?
        get() = javaResource.loadBalancingScheme().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The load balancing algorithm used within the scope of the locality.
     * The possible values are:
     * * `ROUND_ROBIN`: This is a simple policy in which each healthy backend
     * is selected in round robin order.
     * * `LEAST_REQUEST`: An O(1) algorithm which selects two random healthy
     * hosts and picks the host which has fewer active requests.
     * * `RING_HASH`: The ring/modulo hash load balancer implements consistent
     * hashing to backends. The algorithm has the property that the
     * addition/removal of a host from a set of N hosts only affects
     * 1/N of the requests.
     * * `RANDOM`: The load balancer selects a random healthy host.
     * * `ORIGINAL_DESTINATION`: Backend host is selected based on the client
     * connection metadata, i.e., connections are opened
     * to the same address as the destination address of
     * the incoming connection before the connection
     * was redirected to the load balancer.
     * * `MAGLEV`: used as a drop in replacement for the ring hash load balancer.
     * Maglev is not as stable as ring hash but has faster table lookup
     * build times and host selection times. For more information about
     * Maglev, refer to https://ai.google/research/pubs/pub44824
     * * `WEIGHTED_MAGLEV`: Per-instance weighted Load Balancing via health check
     * reported weights. If set, the Backend Service must
     * configure a non legacy HTTP-based Health Check, and
     * health check replies are expected to contain
     * non-standard HTTP response header field
     * X-Load-Balancing-Endpoint-Weight to specify the
     * per-instance weights. If set, Load Balancing is weight
     * based on the per-instance weights reported in the last
     * processed health check replies, as long as every
     * instance either reported a valid weight or had
     * UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains
     * equal-weight.
     * This field is applicable to either:
     * * A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2,
     * and loadBalancingScheme set to INTERNAL_MANAGED.
     * * A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
     * * A regional backend service with loadBalancingScheme set to EXTERNAL (External Network
     * Load Balancing). Only MAGLEV and WEIGHTED_MAGLEV values are possible for External
     * Network Load Balancing. The default is MAGLEV.
     * If session_affinity is not NONE, and this field is not set to MAGLEV, WEIGHTED_MAGLEV,
     * or RING_HASH, session affinity settings will not take effect.
     * Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced
     * by a URL map that is bound to target gRPC proxy that has validate_for_proxyless
     * field set to true.
     * Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`.
     */
    public val localityLbPolicy: Output?
        get() = javaResource.localityLbPolicy().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * This field denotes the logging options for the load balancer traffic served by this backend service.
     * If logging is enabled, logs will be exported to Stackdriver.
     * Structure is documented below.
     */
    public val logConfig: Output
        get() = javaResource.logConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                regionBackendServiceLogConfigToKotlin(args0)
            })
        })

    /**
     * Name of the resource. Provided by the client when the resource is
     * created. The name must be 1-63 characters long, and comply with
     * RFC1035. Specifically, the name must be 1-63 characters long and match
     * the regular expression `a-z?` which means the
     * first character must be a lowercase letter, and all following
     * characters must be a dash, lowercase letter, or digit, except the last
     * character, which cannot be a dash.
     * - - -
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The URL of the network to which this backend service belongs.
     * This field can only be specified when the load balancing scheme is set to INTERNAL.
     */
    public val network: Output?
        get() = javaResource.network().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Settings controlling eviction of unhealthy hosts from the load balancing pool.
     * This field is applicable only when the `load_balancing_scheme` is set
     * to INTERNAL_MANAGED and the `protocol` is set to HTTP, HTTPS, or HTTP2.
     * Structure is documented below.
     */
    public val outlierDetection: Output?
        get() = javaResource.outlierDetection().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> regionBackendServiceOutlierDetectionToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * A named port on a backend instance group representing the port for
     * communication to the backend VMs in that group. Required when the
     * loadBalancingScheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED
     * and the backends are instance groups. The named port must be defined on each
     * backend instance group. This parameter has no meaning if the backends are NEGs. API sets a
     * default of "http" if not given.
     * Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
     */
    public val portName: Output
        get() = javaResource.portName().applyValue({ args0 -> args0 })

    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    public val project: Output
        get() = javaResource.project().applyValue({ args0 -> args0 })

    /**
     * The protocol this RegionBackendService uses to communicate with backends.
     * The default is HTTP. **NOTE**: HTTP2 is only valid for beta HTTP/2 load balancer
     * types and may result in errors if used with the GA API.
     * Possible values are: `HTTP`, `HTTPS`, `HTTP2`, `SSL`, `TCP`, `UDP`, `GRPC`, `UNSPECIFIED`.
     */
    public val protocol: Output
        get() = javaResource.protocol().applyValue({ args0 -> args0 })

    /**
     * The Region in which the created backend service should reside.
     * If it is not provided, the provider region is used.
     */
    public val region: Output
        get() = javaResource.region().applyValue({ args0 -> args0 })

    /**
     * The security policy associated with this backend service.
     */
    public val securityPolicy: Output?
        get() = javaResource.securityPolicy().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The URI of the created resource.
     */
    public val selfLink: Output
        get() = javaResource.selfLink().applyValue({ args0 -> args0 })

    /**
     * Type of session affinity to use. The default is NONE. Session affinity is
     * not applicable if the protocol is UDP.
     * Possible values are: `NONE`, `CLIENT_IP`, `CLIENT_IP_PORT_PROTO`, `CLIENT_IP_PROTO`, `GENERATED_COOKIE`, `HEADER_FIELD`, `HTTP_COOKIE`, `CLIENT_IP_NO_DESTINATION`.
     */
    public val sessionAffinity: Output
        get() = javaResource.sessionAffinity().applyValue({ args0 -> args0 })

    /**
     * Subsetting configuration for this BackendService. Currently this is applicable only for Internal TCP/UDP load balancing and Internal HTTP(S) load balancing.
     * Structure is documented below.
     */
    public val subsetting: Output?
        get() = javaResource.subsetting().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    regionBackendServiceSubsettingToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * How many seconds to wait for the backend before considering it a
     * failed request. Default is 30 seconds. Valid range is [1, 86400].
     */
    public val timeoutSec: Output
        get() = javaResource.timeoutSec().applyValue({ args0 -> args0 })
}

public object RegionBackendServiceMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.gcp.compute.RegionBackendService::class == javaResource::class

    override fun map(javaResource: Resource): RegionBackendService = RegionBackendService(
        javaResource
            as com.pulumi.gcp.compute.RegionBackendService,
    )
}

/**
 * @see [RegionBackendService].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [RegionBackendService].
 */
public suspend fun regionBackendService(
    name: String,
    block: suspend RegionBackendServiceResourceBuilder.() -> Unit,
): RegionBackendService {
    val builder = RegionBackendServiceResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [RegionBackendService].
 * @param name The _unique_ name of the resulting resource.
 */
public fun regionBackendService(name: String): RegionBackendService {
    val builder = RegionBackendServiceResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy