Show / Hide Table of Contents

Class TargetGroup

Provides a Target Group resource for use with Load Balancer resources.

Note: aws.alb.TargetGroup is known as aws.lb.TargetGroup. The functionality is identical.

Example Usage

Instance Target Group

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var main = new Aws.Ec2.Vpc("main", new Aws.Ec2.VpcArgs
    {
        CidrBlock = "10.0.0.0/16",
    });
    var test = new Aws.LB.TargetGroup("test", new Aws.LB.TargetGroupArgs
    {
        Port = 80,
        Protocol = "HTTP",
        VpcId = main.Id,
    });
}

}

IP Target Group

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var main = new Aws.Ec2.Vpc("main", new Aws.Ec2.VpcArgs
    {
        CidrBlock = "10.0.0.0/16",
    });
    var ip_example = new Aws.LB.TargetGroup("ip-example", new Aws.LB.TargetGroupArgs
    {
        Port = 80,
        Protocol = "HTTP",
        TargetType = "ip",
        VpcId = main.Id,
    });
}

}

Lambda Target Group

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var lambda_example = new Aws.LB.TargetGroup("lambda-example", new Aws.LB.TargetGroupArgs
    {
        TargetType = "lambda",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
TargetGroup
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.Aws.ApplicationLoadBalancing
Assembly: Pulumi.Aws.dll
Syntax
[Obsolete("aws.applicationloadbalancing.TargetGroup has been deprecated in favor of aws.alb.TargetGroup")]
public class TargetGroup : CustomResource

Constructors

View Source

TargetGroup(String, TargetGroupArgs, CustomResourceOptions)

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

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

The unique name of the resource

TargetGroupArgs 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

Arn

The ARN of the Target Group (matches id)

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

ArnSuffix

The ARN suffix for use with CloudWatch Metrics.

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

DeregistrationDelay

The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.

Declaration
public Output<int?> DeregistrationDelay { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

HealthCheck

A Health Check block. Health Check blocks are documented below.

Declaration
public Output<TargetGroupHealthCheck> HealthCheck { get; }
Property Value
Type Description
Output<TargetGroupHealthCheck>
View Source

LambdaMultiValueHeadersEnabled

Boolean whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when target_type is lambda.

Declaration
public Output<bool?> LambdaMultiValueHeadersEnabled { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

LoadBalancingAlgorithmType

Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is round_robin or least_outstanding_requests. The default is round_robin.

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

Name

The name of the target group. If omitted, this provider will assign a random, unique name.

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

NamePrefix

Creates a unique name beginning with the specified prefix. Conflicts with name. Cannot be longer than 6 characters.

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

Port

The port on which targets receive traffic, unless overridden when registering a specific target. Required when target_type is instance or ip. Does not apply when target_type is lambda.

Declaration
public Output<int?> Port { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

Protocol

The protocol to use for routing traffic to the targets. Should be one of "TCP", "TLS", "UDP", "TCP_UDP", "HTTP" or "HTTPS". Required when target_type is instance or ip. Does not apply when target_type is lambda.

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

ProxyProtocolV2

Boolean to enable / disable support for proxy protocol v2 on Network Load Balancers. See doc for more information.

Declaration
public Output<bool?> ProxyProtocolV2 { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

SlowStart

The amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds.

Declaration
public Output<int?> SlowStart { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

Stickiness

A Stickiness block. Stickiness blocks are documented below. stickiness is only valid if used with Load Balancers of type Application

Declaration
public Output<TargetGroupStickiness> Stickiness { get; }
Property Value
Type Description
Output<TargetGroupStickiness>
View Source

Tags

A map of tags to assign to the resource.

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

TargetType

The type of target that you must specify when registering targets with this target group. The possible values are instance (targets are specified by instance ID) or ip (targets are specified by IP address) or lambda (targets are specified by lambda arn). The default is instance. Note that you can't specify targets for a target group using both instance IDs and IP addresses. If the target type is ip, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses.

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

VpcId

The identifier of the VPC in which to create the target group. Required when target_type is instance or ip. Does not apply when target_type is lambda.

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

Methods

View Source

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

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

Declaration
public static TargetGroup Get(string name, Input<string> id, TargetGroupState 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.

TargetGroupState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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