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
new LoadBalancerCookieStickinessPolicy(name: string, args: LoadBalancerCookieStickinessPolicyArgs, opts?: CustomResourceOptions);def LoadBalancerCookieStickinessPolicy(resource_name, opts=None, cookie_expiration_period=None, lb_port=None, load_balancer=None, name=None, __props__=None);func NewLoadBalancerCookieStickinessPolicy(ctx *Context, name string, args LoadBalancerCookieStickinessPolicyArgs, opts ...ResourceOption) (*LoadBalancerCookieStickinessPolicy, error)public LoadBalancerCookieStickinessPolicy(string name, LoadBalancerCookieStickinessPolicyArgs args, CustomResourceOptions? opts = null)- 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:
- Lb
Port int The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
- Load
Balancer string The load balancer to which the policy should be attached.
- int
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 int The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
- Load
Balancer string The load balancer to which the policy should be attached.
- int
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 number The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
- load
Balancer string The load balancer to which the policy should be attached.
- 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.
- 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:
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.
public static get(name: string, id: Input<ID>, state?: LoadBalancerCookieStickinessPolicyState, opts?: CustomResourceOptions): LoadBalancerCookieStickinessPolicystatic 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)public static LoadBalancerCookieStickinessPolicy Get(string name, Input<string> id, LoadBalancerCookieStickinessPolicyState? state, CustomResourceOptions? opts = null)- 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:
- int
The time period after which the session cookie should be considered stale, expressed in seconds.
- Lb
Port int The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
- Load
Balancer string The load balancer to which the policy should be attached.
- Name string
The name of the stickiness policy.
- int
The time period after which the session cookie should be considered stale, expressed in seconds.
- Lb
Port int The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
- Load
Balancer string The load balancer to which the policy should be attached.
- Name string
The name of the stickiness policy.
- number
The time period after which the session cookie should be considered stale, expressed in seconds.
- lb
Port number The load balancer port to which the policy should be applied. This must be an active listener on the load balancer.
- load
Balancer string The load balancer to which the policy should be attached.
- name string
The name of the stickiness policy.
- 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
awsTerraform Provider.