LoadBalancerCookieStickinessPolicy

Provides a load balancer cookie stickiness policy, which allows an ELB to control the sticky session lifetime of the browser.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var lb = new Aws.Elb.LoadBalancer("lb", new Aws.Elb.LoadBalancerArgs
        {
            AvailabilityZones = 
            {
                "us-east-1a",
            },
            Listeners = 
            {
                new Aws.Elb.Inputs.LoadBalancerListenerArgs
                {
                    InstancePort = 8000,
                    InstanceProtocol = "http",
                    LbPort = 80,
                    LbProtocol = "http",
                },
            },
        });
        var foo = new Aws.Elb.LoadBalancerCookieStickinessPolicy("foo", new Aws.Elb.LoadBalancerCookieStickinessPolicyArgs
        {
            CookieExpirationPeriod = 600,
            LbPort = 80,
            LoadBalancer = lb.Id,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/elb"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        lb, err := elb.NewLoadBalancer(ctx, "lb", &elb.LoadBalancerArgs{
            AvailabilityZones: pulumi.StringArray{
                pulumi.String("us-east-1a"),
            },
            Listeners: elb.LoadBalancerListenerArray{
                &elb.LoadBalancerListenerArgs{
                    InstancePort:     pulumi.Int(8000),
                    InstanceProtocol: pulumi.String("http"),
                    LbPort:           pulumi.Int(80),
                    LbProtocol:       pulumi.String("http"),
                },
            },
        })
        if err != nil {
            return err
        }
        _, err = elb.NewLoadBalancerCookieStickinessPolicy(ctx, "foo", &elb.LoadBalancerCookieStickinessPolicyArgs{
            CookieExpirationPeriod: pulumi.Int(600),
            LbPort:                 pulumi.Int(80),
            LoadBalancer:           lb.ID(),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

lb = aws.elb.LoadBalancer("lb",
    availability_zones=["us-east-1a"],
    listeners=[{
        "instance_port": 8000,
        "instanceProtocol": "http",
        "lb_port": 80,
        "lbProtocol": "http",
    }])
foo = aws.elb.LoadBalancerCookieStickinessPolicy("foo",
    cookie_expiration_period=600,
    lb_port=80,
    load_balancer=lb.id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const lb = new aws.elb.LoadBalancer("lb", {
    availabilityZones: ["us-east-1a"],
    listeners: [{
        instancePort: 8000,
        instanceProtocol: "http",
        lbPort: 80,
        lbProtocol: "http",
    }],
});
const foo = new aws.elb.LoadBalancerCookieStickinessPolicy("foo", {
    cookieExpirationPeriod: 600,
    lbPort: 80,
    loadBalancer: lb.id,
});

Deprecated: aws.elasticloadbalancing.LoadBalancerCookieStickinessPolicy has been deprecated in favor of aws.elb.LoadBalancerCookieStickinessPolicy

Create a LoadBalancerCookieStickinessPolicy Resource

def LoadBalancerCookieStickinessPolicy(resource_name, opts=None, cookie_expiration_period=None, lb_port=None, load_balancer=None, name=None, __props__=None);
name string
The unique name of the resource.
args LoadBalancerCookieStickinessPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args LoadBalancerCookieStickinessPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args LoadBalancerCookieStickinessPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

LoadBalancerCookieStickinessPolicy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The LoadBalancerCookieStickinessPolicy resource accepts the following input properties:

LbPort int

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

LoadBalancer string

The load balancer to which the policy should be attached.

CookieExpirationPeriod int

The time period after which the session cookie should be considered stale, expressed in seconds.

Name string

The name of the stickiness policy.

LbPort int

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

LoadBalancer string

The load balancer to which the policy should be attached.

CookieExpirationPeriod int

The time period after which the session cookie should be considered stale, expressed in seconds.

Name string

The name of the stickiness policy.

lbPort number

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

loadBalancer string

The load balancer to which the policy should be attached.

cookieExpirationPeriod number

The time period after which the session cookie should be considered stale, expressed in seconds.

name string

The name of the stickiness policy.

lb_port float

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

load_balancer str

The load balancer to which the policy should be attached.

cookie_expiration_period float

The time period after which the session cookie should be considered stale, expressed in seconds.

name str

The name of the stickiness policy.

Outputs

All input properties are implicitly available as output properties. Additionally, the LoadBalancerCookieStickinessPolicy resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing LoadBalancerCookieStickinessPolicy Resource

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

static get(resource_name, id, opts=None, cookie_expiration_period=None, lb_port=None, load_balancer=None, name=None, __props__=None);
func GetLoadBalancerCookieStickinessPolicy(ctx *Context, name string, id IDInput, state *LoadBalancerCookieStickinessPolicyState, opts ...ResourceOption) (*LoadBalancerCookieStickinessPolicy, error)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

CookieExpirationPeriod int

The time period after which the session cookie should be considered stale, expressed in seconds.

LbPort int

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

LoadBalancer string

The load balancer to which the policy should be attached.

Name string

The name of the stickiness policy.

CookieExpirationPeriod int

The time period after which the session cookie should be considered stale, expressed in seconds.

LbPort int

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

LoadBalancer string

The load balancer to which the policy should be attached.

Name string

The name of the stickiness policy.

cookieExpirationPeriod number

The time period after which the session cookie should be considered stale, expressed in seconds.

lbPort number

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

loadBalancer string

The load balancer to which the policy should be attached.

name string

The name of the stickiness policy.

cookie_expiration_period float

The time period after which the session cookie should be considered stale, expressed in seconds.

lb_port float

The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.

load_balancer str

The load balancer to which the policy should be attached.

name str

The name of the stickiness policy.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.