Class: AWS::ELB::Client

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

Overview

Client class for Elastic Load Balancing (ELB).

Instance Attribute Summary

Attributes inherited from Core::Client

#config, #http_read_timeout

Instance Method Summary collapse

Methods inherited from Core::Client

#initialize, #log_warning, #operations, operations, #with_http_handler, #with_options

Constructor Details

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

Instance Method Details

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

Calls the ApplySecurityGroupsToLoadBalancer 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.

    • :security_groups - required - (Array<String>) A list of security group IDs to associate with your LoadBalancer in VPC. The security group IDs must be provided as the ID and not the security group name (For example, sg-1234).

Returns:

  • (Core::Response)

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

    • :security_groups - (Array<String>)



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

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

Calls the AttachLoadBalancerToSubnets 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.

    • :subnets - required - (Array<String>) A list of subnet IDs to add for the LoadBalancer.

Returns:

  • (Core::Response)

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

    • :subnets - (Array<String>)



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

#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, HTTP, HTTPS, or SSL. 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. SSL is also specified as SSL: port pair, for example, SSL:5000. For HTTP or HTTPS protocol, the situation is different. You have to include a ping path in the string. 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)



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

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 LoadBalancer.

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

Returns:



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

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 LoadBalancer.

    • :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:



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

#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 - HTTP, HTTPS, TCP or SSL. 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) Specifies the protocol to use for routing traffic to back-end instances - HTTP, HTTPS, TCP, or SSL. This property cannot be modified for the life of the LoadBalancer. If the front-end protocol is HTTP or HTTPS, InstanceProtocol has to be at the same protocol layer, i.e., HTTP or HTTPS. Likewise, if the front-end protocol is TCP or SSL, InstanceProtocol has to be TCP or SSL. If there is another listener with the same InstancePort whose InstanceProtocol is secure, i.e., HTTPS or SSL, the listener’s InstanceProtocol has to be secure, i.e., HTTPS or SSL. If there is another listener with the same InstancePort whose InstanceProtocol is HTTP or TCP, the listener’s InstanceProtocol must be either HTTP or TCP.

      • :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 ARN string of the server certificate. To get the ARN of the server certificate, call the AWS Identity and Access Management UploadServerCertificate API.

    • :availability_zones - (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.

    • :subnets - (Array<String>) A list of subnet IDs in your VPC to attach to your LoadBalancer.

    • :security_groups - (Array<String>) The security groups assigned to your LoadBalancer within your VPC.

    • :scheme - (String) The type of a LoadBalancer. This option is only available for LoadBalancers attached to a Amazon VPC. By default, Elastic Load Balancer creates an internet-facing load balancer with publicly resolvable DNS name that resolves to public IP addresses. Specify the value internal for this option to create an internal load balancer with a DNS name that resolves to private IP addresses.

Returns:

  • (Core::Response)

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

    • :dns_name - (String)



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

#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 - HTTP, HTTPS, TCP or SSL. 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) Specifies the protocol to use for routing traffic to back-end instances - HTTP, HTTPS, TCP, or SSL. This property cannot be modified for the life of the LoadBalancer. If the front-end protocol is HTTP or HTTPS, InstanceProtocol has to be at the same protocol layer, i.e., HTTP or HTTPS. Likewise, if the front-end protocol is TCP or SSL, InstanceProtocol has to be TCP or SSL. If there is another listener with the same InstancePort whose InstanceProtocol is secure, i.e., HTTPS or SSL, the listener’s InstanceProtocol has to be secure, i.e., HTTPS or SSL. If there is another listener with the same InstancePort whose InstanceProtocol is HTTP or TCP, the listener’s InstanceProtocol must be either HTTP or TCP.

      • :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 ARN string of the server certificate. To get the ARN of the server certificate, call the AWS Identity and Access Management UploadServerCertificate API.

Returns:



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

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

Calls the CreateLoadBalancerPolicy API operation.

Parameters:

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

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

    • :policy_type_name - required - (String) The name of the base policy type being used to create this policy. To get the list of policy types, use the DescribeLoadBalancerPolicyTypes action.

    • :policy_attributes - (Array<Hash>) A list of attributes associated with the policy being created.

      • :attribute_name - (String) The name of the attribute associated with the policy.

      • :attribute_value - (String) The value of the attribute associated with the policy.

Returns:



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

#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:



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

#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:



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

#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:



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

#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)



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

#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)



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

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

Calls the DescribeLoadBalancerPolicies API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :load_balancer_name - (String) The mnemonic name associated with the LoadBalancer. If no name is specified, the operation returns the attributes of either all the sample policies pre-defined by Elastic Load Balancing or the specified sample polices.

    • :policy_names - (Array<String>) The names of LoadBalancer policies you’ve created or Elastic Load Balancing sample policy names.

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)



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

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

Calls the DescribeLoadBalancerPolicyTypes API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :policy_type_names - (Array<String>) Specifies the name of the policy types. If no names are specified, returns the description of all the policy types defined by Elastic Load Balancing service.

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)



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

#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.

    • :marker - (String) An optional parameter reserved for future use.

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>)

      • :subnets - (Array<String>)

      • :vpc_id - (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)

      • :security_groups - (Array<String>)

      • :created_time - (Time)

      • :scheme - (String)

    • :next_marker - (String)



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

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

Calls the DetachLoadBalancerFromSubnets API operation.

Parameters:

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

    • :subnets - required - (Array<String>) A list of subnet IDs to remove from the set of configured subnets for the LoadBalancer.

Returns:

  • (Core::Response)

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

    • :subnets - (Array<String>)



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

#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>)



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

#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>)



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

#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 instance IDs that should be registered with the LoadBalancer. When the instance is stopped and then restarted, the IP addresses associated with your instance changes. Elastic Load Balancing cannot recognize the new IP address, which prevents it from routing traffic to your instances. We recommend that you de-register your Amazon EC2 instances from your load balancer after you stop your instance, and then register the load balancer with your instance after you’ve restarted. To de-register your instances from load balancer, use DeregisterInstancesFromLoadBalancer action.

      • :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)



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

#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:



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

#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) The mnemonic name associated with the LoadBalancer. This name must be unique within the client AWS account.

    • :instance_port - required - (Integer) The port number associated with the back-end server.

    • :policy_names - required - (Array<String>) List of policy names to be set. If the list is empty, then all current polices are removed from the back-end server.

Returns:



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

#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 applies to.

    • :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:



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