Class: AWS::ELB::Client

Inherits:
Core::Client show all
Extended by:
Core::QueryClient
Defined in:
lib/aws/elb/client.rb

Overview

Client class for Elastic Load Balancing (ELB).

Constant Summary collapse

API_VERSION =
'2011-08-15'

Instance Attribute Summary

Attributes inherited from Core::Client

#config, #http_read_timeout

Instance Method Summary collapse

Methods inherited from Core::Client

#initialize, #operations, #with_http_handler, #with_options

Constructor Details

This class inherits a constructor from AWS::Core::Client

Instance Method Details

#configure_health_check(options = {}) ⇒ Core::Response

Calls the ConfigureHealthCheck API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String) The mnemonic name associated with the LoadBalancer. This name must be unique within the client AWS account.

    • :health_check - required - (Hash) A structure containing the configuration information for the new healthcheck.

      • :target - required - (String) Specifies the instance being checked. The protocol is either TCP or HTTP. The range of valid ports is one (1) through 65535. TCP is the default, specified as a TCP: port pair, for example “TCP:5000”. In this case a healthcheck simply attempts to open a TCP connection to the instance on the specified port. Failure to connect within the configured timeout is considered unhealthy. For HTTP, the situation is different. HTTP is specified as a HTTP:port;/;PathToPing; grouping, for example “HTTP:80/weather/us/wa/seattle”. In this case, a HTTP GET request is issued to the instance on the given port and path. Any answer other than “200 OK” within the timeout period is considered unhealthy. The total length of the HTTP ping target needs to be 1024 16-bit Unicode characters or less.

      • :interval - required - (Integer) Specifies the approximate interval, in seconds, between health checks of an individual instance.

      • :timeout - required - (Integer) Specifies the amount of time, in seconds, during which no response means a failed health probe. This value must be less than the Interval value.

      • :unhealthy_threshold - required - (Integer) Specifies the number of consecutive health probe failures required before moving the instance to the Unhealthy state.

      • :healthy_threshold - required - (Integer) Specifies the number of consecutive health probe successes required before moving the instance to the Healthy state.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :health_check - (Hash)

      • :target - (String)

      • :interval - (Integer)

      • :timeout - (Integer)

      • :unhealthy_threshold - (Integer)

      • :healthy_threshold - (Integer)



72
# File 'lib/aws/elb/client.rb', line 72

define_client_method :configure_health_check, 'ConfigureHealthCheck'

Calls the CreateAppCookieStickinessPolicy API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String) The name associated with the LoadBalancer. The name must be unique within the client AWS account.

    • :policy_name - required - (String) The name of the policy being created. The name must be unique within the set of policies for this Load Balancer.

    • :cookie_name - required - (String) Name of the application cookie used for stickiness.

Returns:



86
# File 'lib/aws/elb/client.rb', line 86

define_client_method :create_app_cookie_stickiness_policy, 'CreateAppCookieStickinessPolicy'

Calls the CreateLBCookieStickinessPolicy API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String) The name associated with the LoadBalancer. The name must be unique within the client AWS account.

    • :policy_name - required - (String) The name of the policy being created. The name must be unique within the set of policies for this Load Balancer.

    • :cookie_expiration_period - (Integer) The time period in seconds after which the cookie should be considered stale. Not specifying this parameter indicates that the sticky session will last for the duration of the browser session.

Returns:



102
# File 'lib/aws/elb/client.rb', line 102

define_client_method :create_lb_cookie_stickiness_policy, 'CreateLBCookieStickinessPolicy'

#create_load_balancer(options = {}) ⇒ Core::Response

Calls the CreateLoadBalancer API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String) The name associated with the LoadBalancer. The name must be unique within your set of LoadBalancers.

    • :listeners - required - (Array<Hash>) A list of the following tuples: LoadBalancerPort, InstancePort, and Protocol.

      • :protocol - required - (String) Specifies the LoadBalancer transport protocol to use for routing - TCP or HTTP. This property cannot be modified for the life of the LoadBalancer.

      • :load_balancer_port - required - (Integer) Specifies the external LoadBalancer port number. This property cannot be modified for the life of the LoadBalancer.

      • :instance_protocol - (String)

      • :instance_port - required - (Integer) Specifies the TCP port on which the instance server is listening. This property cannot be modified for the life of the LoadBalancer.

      • :ssl_certificate_id - (String) The ID of the SSL certificate chain to use. For more information on SSL certificates, see Managing Keys and Certificates in the AWS Identity and Access Management documentation.

    • :availability_zones - required - (Array<String>) A list of Availability Zones. At least one Availability Zone must be specified. Specified Availability Zones must be in the same EC2 Region as the LoadBalancer. Traffic will be equally distributed across all zones. This list can be modified after the creation of the LoadBalancer.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :dns_name - (String)



136
# File 'lib/aws/elb/client.rb', line 136

define_client_method :create_load_balancer, 'CreateLoadBalancer'

#create_load_balancer_listeners(options = {}) ⇒ Core::Response

Calls the CreateLoadBalancerListeners API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String) The name of the new LoadBalancer. The name must be unique within your AWS account.

    • :listeners - required - (Array<Hash>) A list of LoadBalancerPort, InstancePort, Protocol, and SSLCertificateId items.

      • :protocol - required - (String) Specifies the LoadBalancer transport protocol to use for routing - TCP or HTTP. This property cannot be modified for the life of the LoadBalancer.

      • :load_balancer_port - required - (Integer) Specifies the external LoadBalancer port number. This property cannot be modified for the life of the LoadBalancer.

      • :instance_protocol - (String)

      • :instance_port - required - (Integer) Specifies the TCP port on which the instance server is listening. This property cannot be modified for the life of the LoadBalancer.

      • :ssl_certificate_id - (String) The ID of the SSL certificate chain to use. For more information on SSL certificates, see Managing Keys and Certificates in the AWS Identity and Access Management documentation.

Returns:



161
# File 'lib/aws/elb/client.rb', line 161

define_client_method :create_load_balancer_listeners, 'CreateLoadBalancerListeners'

#create_load_balancer_policy(options = {}) ⇒ Core::Response

Calls the CreateLoadBalancerPolicy API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String)

    • :policy_name - required - (String)

    • :policy_type_name - required - (String)

    • :policy_attributes - (Array<Hash>)

      • :attribute_name - (String)

      • :attribute_value - (String)

Returns:



173
# File 'lib/aws/elb/client.rb', line 173

define_client_method :create_load_balancer_policy, 'CreateLoadBalancerPolicy'

#delete_load_balancer(options = {}) ⇒ Core::Response

Calls the DeleteLoadBalancer API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String) The name associated with the LoadBalancer. The name must be unique within the client AWS account.

Returns:



182
# File 'lib/aws/elb/client.rb', line 182

define_client_method :delete_load_balancer, 'DeleteLoadBalancer'

#delete_load_balancer_listeners(options = {}) ⇒ Core::Response

Calls the DeleteLoadBalancerListeners API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String) The mnemonic name associated with the LoadBalancer.

    • :load_balancer_ports - required - (Array<Integer>) The client port number(s) of the LoadBalancerListener(s) to be removed.

Returns:



192
# File 'lib/aws/elb/client.rb', line 192

define_client_method :delete_load_balancer_listeners, 'DeleteLoadBalancerListeners'

#delete_load_balancer_policy(options = {}) ⇒ Core::Response

Calls the DeleteLoadBalancerPolicy API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String) The mnemonic name associated with the LoadBalancer. The name must be unique within your AWS account.

    • :policy_name - required - (String) The mnemonic name for the policy being deleted.

Returns:



203
# File 'lib/aws/elb/client.rb', line 203

define_client_method :delete_load_balancer_policy, 'DeleteLoadBalancerPolicy'

#deregister_instances_from_load_balancer(options = {}) ⇒ Core::Response

Calls the DeregisterInstancesFromLoadBalancer API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String) The name associated with the LoadBalancer. The name must be unique within the client AWS account.

    • :instances - required - (Array<Hash>) A list of EC2 instance IDs consisting of all instances to be deregistered.

      • :instance_id - (String) Provides an EC2 instance ID.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :instances - (Array<Hash>)

      • :instance_id - (String)



219
# File 'lib/aws/elb/client.rb', line 219

define_client_method :deregister_instances_from_load_balancer, 'DeregisterInstancesFromLoadBalancer'

#describe_instance_health(options = {}) ⇒ Core::Response

Calls the DescribeInstanceHealth API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String) The name associated with the LoadBalancer. The name must be unique within the client AWS account.

    • :instances - (Array<Hash>) A list of instance IDs whose states are being queried.

      • :instance_id - (String) Provides an EC2 instance ID.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :instance_states - (Array<Hash>)

      • :instance_id - (String)

      • :state - (String)

      • :reason_code - (String)

      • :description - (String)



238
# File 'lib/aws/elb/client.rb', line 238

define_client_method :describe_instance_health, 'DescribeInstanceHealth'

#describe_load_balancer_policies(options = {}) ⇒ Core::Response

Calls the DescribeLoadBalancerPolicies API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - (String)

    • :policy_names - (Array<String>)

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :policy_descriptions - (Array<Hash>)

      • :policy_name - (String)

      • :policy_type_name - (String)

      • :policy_attribute_descriptions - (Array<Hash>)

        • :attribute_name - (String)

        • :attribute_value - (String)



254
# File 'lib/aws/elb/client.rb', line 254

define_client_method :describe_load_balancer_policies, 'DescribeLoadBalancerPolicies'

#describe_load_balancer_policy_types(options = {}) ⇒ Core::Response

Calls the DescribeLoadBalancerPolicyTypes API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :policy_type_names - (Array<String>)

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :policy_type_descriptions - (Array<Hash>)

      • :policy_type_name - (String)

      • :description - (String)

      • :policy_attribute_type_descriptions - (Array<Hash>)

        • :attribute_name - (String)

        • :attribute_type - (String)

        • :description - (String)

        • :default_value - (String)

        • :cardinality - (String)



272
# File 'lib/aws/elb/client.rb', line 272

define_client_method :describe_load_balancer_policy_types, 'DescribeLoadBalancerPolicyTypes'

#describe_load_balancers(options = {}) ⇒ Core::Response

Calls the DescribeLoadBalancers API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_names - (Array<String>) A list of names associated with the LoadBalancers at creation time.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :load_balancer_descriptions - (Array<Hash>)

      • :load_balancer_name - (String)

      • :dns_name - (String)

      • :canonical_hosted_zone_name - (String)

      • :canonical_hosted_zone_name_id - (String)

      • :listener_descriptions - (Array<Hash>)

        • :listener - (Hash)

          • :protocol - (String)

          • :load_balancer_port - (Integer)

          • :instance_protocol - (String)

          • :instance_port - (Integer)

          • :ssl_certificate_id - (String)

        • :policy_names - (Array<String>)

      • :policies - (Hash)

        • :app_cookie_stickiness_policies - (Array<Hash>)

          • :policy_name - (String)

          • :cookie_name - (String)

        • :lb_cookie_stickiness_policies - (Array<Hash>)

          • :policy_name - (String)

          • :cookie_expiration_period - (Integer)

        • :other_policies - (Array<String>)

      • :backend_server_descriptions - (Array<Hash>)

        • :instance_port - (Integer)

        • :policy_names - (Array<String>)

      • :availability_zones - (Array<String>)

      • :instances - (Array<Hash>)

        • :instance_id - (String)

      • :health_check - (Hash)

        • :target - (String)

        • :interval - (Integer)

        • :timeout - (Integer)

        • :unhealthy_threshold - (Integer)

        • :healthy_threshold - (Integer)

      • :source_security_group - (Hash)

        • :owner_alias - (String)

        • :group_name - (String)

      • :created_time - (Time)



319
# File 'lib/aws/elb/client.rb', line 319

define_client_method :describe_load_balancers, 'DescribeLoadBalancers'

#disable_availability_zones_for_load_balancer(options = {}) ⇒ Core::Response

Calls the DisableAvailabilityZonesForLoadBalancer API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String) The name associated with the LoadBalancer. The name must be unique within the client AWS account.

    • :availability_zones - required - (Array<String>) A list of Availability Zones to be removed from the LoadBalancer. There must be at least one Availability Zone registered with a LoadBalancer at all times. The client cannot remove all the Availability Zones from a LoadBalancer. Specified Availability Zones must be in the same Region.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :availability_zones - (Array<String>)



337
# File 'lib/aws/elb/client.rb', line 337

define_client_method :disable_availability_zones_for_load_balancer, 'DisableAvailabilityZonesForLoadBalancer'

#enable_availability_zones_for_load_balancer(options = {}) ⇒ Core::Response

Calls the EnableAvailabilityZonesForLoadBalancer API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String) The name associated with the LoadBalancer. The name must be unique within the client AWS account.

    • :availability_zones - required - (Array<String>) A list of new Availability Zones for the LoadBalancer. Each Availability Zone must be in the same Region as the LoadBalancer.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :availability_zones - (Array<String>)



352
# File 'lib/aws/elb/client.rb', line 352

define_client_method :enable_availability_zones_for_load_balancer, 'EnableAvailabilityZonesForLoadBalancer'

#register_instances_with_load_balancer(options = {}) ⇒ Core::Response

Calls the RegisterInstancesWithLoadBalancer API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String) The name associated with the LoadBalancer. The name must be unique within the client AWS account.

    • :instances - required - (Array<Hash>) A list of instances IDs that should be registered with the LoadBalancer.

      • :instance_id - (String) Provides an EC2 instance ID.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :instances - (Array<Hash>)

      • :instance_id - (String)



368
# File 'lib/aws/elb/client.rb', line 368

define_client_method :register_instances_with_load_balancer, 'RegisterInstancesWithLoadBalancer'

#set_load_balancer_listener_ssl_certificate(options = {}) ⇒ Core::Response

Calls the SetLoadBalancerListenerSSLCertificate API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String) The name of the the LoadBalancer.

    • :load_balancer_port - required - (Integer) The port that uses the specified SSL certificate.

    • :ssl_certificate_id - required - (String) The ID of the SSL certificate chain to use. For more information on SSL certificates, see Managing Server Certificates in the AWS Identity and Access Management documentation.

Returns:



382
# File 'lib/aws/elb/client.rb', line 382

define_client_method :set_load_balancer_listener_ssl_certificate, 'SetLoadBalancerListenerSSLCertificate'

#set_load_balancer_policies_for_backend_server(options = {}) ⇒ Core::Response

Calls the SetLoadBalancerPoliciesForBackendServer API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String)

    • :instance_port - required - (Integer)

    • :policy_names - required - (Array<String>)

Returns:



391
# File 'lib/aws/elb/client.rb', line 391

define_client_method :set_load_balancer_policies_for_backend_server, 'SetLoadBalancerPoliciesForBackendServer'

#set_load_balancer_policies_of_listener(options = {}) ⇒ Core::Response

Calls the SetLoadBalancerPoliciesOfListener API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - required - (String) The name associated with the LoadBalancer. The name must be unique within the client AWS account.

    • :load_balancer_port - required - (Integer) The external port of the LoadBalancer with which this policy has to be associated.

    • :policy_names - required - (Array<String>) List of policies to be associated with the listener. Currently this list can have at most one policy. If the list is empty, the current policy is removed from the listener.

Returns:



406
# File 'lib/aws/elb/client.rb', line 406

define_client_method :set_load_balancer_policies_of_listener, 'SetLoadBalancerPoliciesOfListener'