Sha256: fdce766db7c8607173c08f7de21888748a739a94141e794daf756c1fe6f55f4e
Contents?: true
Size: 1.71 KB
Versions: 17
Compression:
Stored size: 1.71 KB
Contents
module Fog module AWS class ELB class Real require 'fog/aws/parsers/elb/empty' # Create an app cookie stickiness policy # # ==== Parameters # * lb_name<~String> - Name of the ELB # * policy_name<~String> - The name of the policy being created. # The name must be unique within the set of policies for this Load Balancer. # * cookie_name<~String> - Name of the application cookie used for stickiness. # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: # * 'ResponseMetadata'<~Hash>: # * 'RequestId'<~String> - Id of request def create_app_cookie_stickiness_policy(lb_name, policy_name, cookie_name) params = {'CookieName' => cookie_name, 'PolicyName' => policy_name} request({ 'Action' => 'CreateAppCookieStickinessPolicy', 'LoadBalancerName' => lb_name, :parser => Fog::Parsers::AWS::ELB::Empty.new }.merge!(params)) end end class Mock def create_app_cookie_stickiness_policy(lb_name, policy_name, cookie_name) if load_balancer = self.data[:load_balancers][lb_name] response = Excon::Response.new response.status = 200 load_balancer['Policies']['AppCookieStickinessPolicies'] << { 'CookieName' => cookie_name, 'PolicyName' => policy_name } response.body = { 'ResponseMetadata' => { 'RequestId' => Fog::AWS::Mock.request_id } } response else raise Fog::AWS::ELB::NotFound end end end end end end
Version data entries
17 entries across 17 versions & 4 rubygems