Show / Hide Table of Contents

Class TargetPool

Manages a Target Pool within GCE. This is a collection of instances used as target of a network load balancer (Forwarding Rule). For more information see the official documentation and API.

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var defaultHttpHealthCheck = new Gcp.Compute.HttpHealthCheck("defaultHttpHealthCheck", new Gcp.Compute.HttpHealthCheckArgs
    {
        RequestPath = "/",
        CheckIntervalSec = 1,
        TimeoutSec = 1,
    });
    var defaultTargetPool = new Gcp.Compute.TargetPool("defaultTargetPool", new Gcp.Compute.TargetPoolArgs
    {
        Instances = 
        {
            "us-central1-a/myinstance1",
            "us-central1-b/myinstance2",
        },
        HealthChecks = 
        {
            defaultHttpHealthCheck.Name,
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
TargetPool
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.Compute
Assembly: Pulumi.Gcp.dll
Syntax
public class TargetPool : CustomResource

Constructors

View Source

TargetPool(String, TargetPoolArgs, CustomResourceOptions)

Create a TargetPool resource with the given unique name, arguments, and options.

Declaration
public TargetPool(string name, TargetPoolArgs args = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

TargetPoolArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

BackupPool

URL to the backup target pool. Must also set failover_ratio.

Declaration
public Output<string> BackupPool { get; }
Property Value
Type Description
Output<System.String>
View Source

Description

Textual description field.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

FailoverRatio

Ratio (0 to 1) of failed nodes before using the backup pool (which must also be set).

Declaration
public Output<double?> FailoverRatio { get; }
Property Value
Type Description
Output<System.Nullable<System.Double>>
View Source

HealthChecks

List of zero or one health check name or self_link. Only legacy gcp.compute.HttpHealthCheck is supported.

Declaration
public Output<string> HealthChecks { get; }
Property Value
Type Description
Output<System.String>
View Source

Instances

List of instances in the pool. They can be given as URLs, or in the form of "zone/name". Note that the instances need not exist at the time of target pool creation, so there is no need to use the interpolation to create a dependency on the instances from the target pool.

Declaration
public Output<ImmutableArray<string>> Instances { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Name

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Project

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

Declaration
public Output<string> Project { get; }
Property Value
Type Description
Output<System.String>
View Source

Region

Where the target pool resides. Defaults to project region.

Declaration
public Output<string> Region { get; }
Property Value
Type Description
Output<System.String>
View Source

SelfLink

The URI of the created resource.

Declaration
public Output<string> SelfLink { get; }
Property Value
Type Description
Output<System.String>
View Source

SessionAffinity

How to distribute load. Options are "NONE" (no affinity). "CLIENT_IP" (hash of the source/dest addresses / ports), and "CLIENT_IP_PROTO" also includes the protocol (default "NONE").

Declaration
public Output<string> SessionAffinity { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, TargetPoolState, CustomResourceOptions)

Get an existing TargetPool resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static TargetPool Get(string name, Input<string> id, TargetPoolState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

TargetPoolState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
TargetPool
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.