AppCookieStickinessPolicy
Provides an application cookie stickiness policy, which allows an ELB to wed its sticky cookie’s expiration to a cookie generated by your application.
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.AppCookieStickinessPolicy("foo", new Aws.Elb.AppCookieStickinessPolicyArgs
{
CookieName = "MyAppCookie",
LbPort = 80,
LoadBalancer = lb.Name,
});
}
}
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.NewAppCookieStickinessPolicy(ctx, "foo", &elb.AppCookieStickinessPolicyArgs{
CookieName: pulumi.String("MyAppCookie"),
LbPort: pulumi.Int(80),
LoadBalancer: lb.Name,
})
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.AppCookieStickinessPolicy("foo",
cookie_name="MyAppCookie",
lb_port=80,
load_balancer=lb.name)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.AppCookieStickinessPolicy("foo", {
cookieName: "MyAppCookie",
lbPort: 80,
loadBalancer: lb.name,
});Deprecated: aws.elasticloadbalancing.AppCookieStickinessPolicy has been deprecated in favor of aws.elb.AppCookieStickinessPolicy
Create a AppCookieStickinessPolicy Resource
new AppCookieStickinessPolicy(name: string, args: AppCookieStickinessPolicyArgs, opts?: CustomResourceOptions);def AppCookieStickinessPolicy(resource_name, opts=None, cookie_name=None, lb_port=None, load_balancer=None, name=None, __props__=None);func NewAppCookieStickinessPolicy(ctx *Context, name string, args AppCookieStickinessPolicyArgs, opts ...ResourceOption) (*AppCookieStickinessPolicy, error)public AppCookieStickinessPolicy(string name, AppCookieStickinessPolicyArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args AppCookieStickinessPolicyArgs
- 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 AppCookieStickinessPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AppCookieStickinessPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
AppCookieStickinessPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The AppCookieStickinessPolicy resource accepts the following input properties:
- string
The application cookie whose lifetime the ELB’s cookie should follow.
- 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 name of load balancer to which the policy should be attached.
- Name string
The name of the stickiness policy.
- string
The application cookie whose lifetime the ELB’s cookie should follow.
- 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 name of load balancer to which the policy should be attached.
- Name string
The name of the stickiness policy.
- string
The application cookie whose lifetime the ELB’s cookie should follow.
- 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 name of load balancer to which the policy should be attached.
- name string
The name of the stickiness policy.
- str
The application cookie whose lifetime the ELB’s cookie should follow.
- 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 name of load balancer to which the policy should be attached.
- name str
The name of the stickiness policy.
Outputs
All input properties are implicitly available as output properties. Additionally, the AppCookieStickinessPolicy resource produces the following output properties:
Look up an Existing AppCookieStickinessPolicy Resource
Get an existing AppCookieStickinessPolicy 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?: AppCookieStickinessPolicyState, opts?: CustomResourceOptions): AppCookieStickinessPolicystatic get(resource_name, id, opts=None, cookie_name=None, lb_port=None, load_balancer=None, name=None, __props__=None);func GetAppCookieStickinessPolicy(ctx *Context, name string, id IDInput, state *AppCookieStickinessPolicyState, opts ...ResourceOption) (*AppCookieStickinessPolicy, error)public static AppCookieStickinessPolicy Get(string name, Input<string> id, AppCookieStickinessPolicyState? 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:
- string
The application cookie whose lifetime the ELB’s cookie should follow.
- 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 name of load balancer to which the policy should be attached.
- Name string
The name of the stickiness policy.
- string
The application cookie whose lifetime the ELB’s cookie should follow.
- 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 name of load balancer to which the policy should be attached.
- Name string
The name of the stickiness policy.
- string
The application cookie whose lifetime the ELB’s cookie should follow.
- 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 name of load balancer to which the policy should be attached.
- name string
The name of the stickiness policy.
- str
The application cookie whose lifetime the ELB’s cookie should follow.
- 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 name of 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.