CreateLBCookieStickinessPolicy

Description

Generates a session stickiness policy.

This policy can be associated only with HTTP/HTTPS listeners.

For this policy, it is necessary to configure the listener that will be applied by SetLoadBalancerPoliciesOfListener.

When this policy is specified, the load balancer specifies the cookie information for identifying distribution destination instances in the response packet.

When this cookie information is specified for requests from the client, the load balancer assigns the information to the specified instance.

Information related to the session expiration period specified in the policy is appended to the cookie information for identifying instances.

Request parameters

Refer to "Common Parameters" for details on standard parameter information used by all actions.

  • CookieExpirationPeriod

    Maximum period for holding a session using cookies.

    The time is specified in seconds, from 1 to 2147483647.

    If this parameter is omitted, the expiration period will not be set.

    • Type: Long
    • Default: n/a
    • Required: No
    CAUTION:
    This parameter is an elapsed time from the last access. In order to time out with the setting value of this parameter, the following setting is required.
    • Cookie setting is enabled by definition of load balancer.
    • You are accessing with a browser that supports the CookieMax - Age attribute (IE 9 or later, Chrome, firefox etc) and cookies are valid in the browser.
  • LoadBalancerName

    Name of the load balancer that will use the policies.

    • Type: String
    • Required: Yes
  • PolicyName

    Name of the policy to be created.

    The name must be unique among the policies that can be used by the target load balancer.

    • Type: String
    • Required: Yes

Response

The following status code is returned.

  • Normal response code

    This operation was accepted normally.

    • HTTP Status Code: 200

Response Elements

None.

Errors

Refer to "Common Errors" for details on error information common to all operations.

  • AccessPointNotFound

    The specified load balancer could not be found.

    • HTTP Status Code: 400
  • DuplicatePolicyName

    Policy with the same name exists for this load balancer. Please choose another name.

    • HTTP Status Code: 400
  • TooManyPolicies

    Quota for number of policies for this load balancer has already been reached.

    • HTTP Status Code: 400

Examples

Sample Request

The example below created a session expiration period of 60 seconds for the policy named MyLoadBalancerCookiePolicy, for the load balancer named MyLB01.


       https://loadbalancing.(regionName).cloud.global.fujitsu.com/?CookieExpirationPeriod=60
       &LoadBalancerName=MyLB01&PolicyName=MyLoadBalancerCookiePolicy
       &Version=2014-11-01
       &Action=CreateLBCookieStickinessPolicy  
     

Sample response (XML)


       <CreateLBCookieStickinessPolicyResponse xmlns=" http://docs.cloudcommunity.global.fujitsu.com/loadbalancing/api/v1.0">
<CreateLBCookieStickinessPolicyResult/>
<ResponseMetadata>
  <RequestId>99a693e9-12b8-11e3-9ad6-bf3e4EXAMPLE</RequestId>
</ResponseMetadata>
</CreateLBCookieStickinessPolicyResponse> 
     

Sample Response (JSON)


       {
  "CreateLBCookieStickinessPolicyResponse": {
    "CreateLBCookieStickinessPolicyResult": {
    },
    "ResponseMetadata": {
      "RequestId": "99a693e9-12b8-11e3-9ad6-bf3e4EXAMPLE"
    }
  }
}