Client — AWS SDK for Ruby V3 (original) (raw)

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

473 474 475 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 473 def initialize(*args) super end

Instance Method Details

#add_listener_certificates(params = {}) ⇒ Types::AddListenerCertificatesOutput

Adds the specified SSL server certificate to the certificate list for the specified HTTPS or TLS listener.

If the certificate in already in the certificate list, the call is successful but the certificate is not added again.

For more information, see SSL certificates in the Application Load Balancers Guide or Server certificates in the Network Load Balancers Guide.

527 528 529 530 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 527 def add_listener_certificates(params = {}, options = {}) req = build_request(:add_listener_certificates, params) req.send_request(options) end

#add_tags(params = {}) ⇒ Struct

Adds the specified tags to the specified Elastic Load Balancing resource. You can tag your Application Load Balancers, Network Load Balancers, Gateway Load Balancers, target groups, trust stores, listeners, and rules.

Each tag consists of a key and an optional value. If a resource already has a tag with the same key, AddTags updates its value.

585 586 587 588 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 585 def add_tags(params = {}, options = {}) req = build_request(:add_tags, params) req.send_request(options) end

#add_trust_store_revocations(params = {}) ⇒ Types::AddTrustStoreRevocationsOutput

Adds the specified revocation file to the specified trust store.

628 629 630 631 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 628 def add_trust_store_revocations(params = {}, options = {}) req = build_request(:add_trust_store_revocations, params) req.send_request(options) end

#create_listener(params = {}) ⇒ Types::CreateListenerOutput

978 979 980 981 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 978 def create_listener(params = {}, options = {}) req = build_request(:create_listener, params) req.send_request(options) end

#create_load_balancer(params = {}) ⇒ Types::CreateLoadBalancerOutput

Creates an Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.

For more information, see the following:

This operation is idempotent, which means that it completes at most one time. If you attempt to create multiple load balancers with the same settings, each call succeeds.

1272 1273 1274 1275 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 1272 def create_load_balancer(params = {}, options = {}) req = build_request(:create_load_balancer, params) req.send_request(options) end

#create_rule(params = {}) ⇒ Types::CreateRuleOutput

Creates a rule for the specified listener. The listener must be associated with an Application Load Balancer.

Each rule consists of a priority, one or more actions, one or more conditions, and up to two optional transforms. Rules are evaluated in priority order, from the lowest value to the highest value. When the conditions for a rule are met, its actions are performed. If the conditions for no rules are met, the actions for the default rule are performed. For more information, see Listener rules in the_Application Load Balancers Guide_.

1597 1598 1599 1600 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 1597 def create_rule(params = {}, options = {}) req = build_request(:create_rule, params) req.send_request(options) end

#create_target_group(params = {}) ⇒ Types::CreateTargetGroupOutput

1853 1854 1855 1856 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 1853 def create_target_group(params = {}, options = {}) req = build_request(:create_target_group, params) req.send_request(options) end

#create_trust_store(params = {}) ⇒ Types::CreateTrustStoreOutput

1918 1919 1920 1921 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 1918 def create_trust_store(params = {}, options = {}) req = build_request(:create_trust_store, params) req.send_request(options) end

#delete_listener(params = {}) ⇒ Struct

Deletes the specified listener.

Alternatively, your listener is deleted when you delete the load balancer to which it is attached.

1952 1953 1954 1955 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 1952 def delete_listener(params = {}, options = {}) req = build_request(:delete_listener, params) req.send_request(options) end

#delete_load_balancer(params = {}) ⇒ Struct

Deletes the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer. Deleting a load balancer also deletes its listeners.

You can't delete a load balancer if deletion protection is enabled. If the load balancer does not exist or has already been deleted, the call succeeds.

Deleting a load balancer does not affect its registered targets. For example, your EC2 instances continue to run and are still registered to their target groups. If you no longer need these EC2 instances, you can stop or terminate them.

1994 1995 1996 1997 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 1994 def delete_load_balancer(params = {}, options = {}) req = build_request(:delete_load_balancer, params) req.send_request(options) end

#delete_rule(params = {}) ⇒ Struct

Deletes the specified rule.

You can't delete the default rule.

2027 2028 2029 2030 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 2027 def delete_rule(params = {}, options = {}) req = build_request(:delete_rule, params) req.send_request(options) end

#delete_shared_trust_store_association(params = {}) ⇒ Struct

Deletes a shared trust store association.

2063 2064 2065 2066 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 2063 def delete_shared_trust_store_association(params = {}, options = {}) req = build_request(:delete_shared_trust_store_association, params) req.send_request(options) end

#delete_target_group(params = {}) ⇒ Struct

Deletes the specified target group.

You can delete a target group if it is not referenced by any actions. Deleting a target group also deletes any associated health checks. Deleting a target group does not affect its registered targets. For example, any EC2 instances continue to run until you stop or terminate them.

2100 2101 2102 2103 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 2100 def delete_target_group(params = {}, options = {}) req = build_request(:delete_target_group, params) req.send_request(options) end

#delete_trust_store(params = {}) ⇒ Struct

2122 2123 2124 2125 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 2122 def delete_trust_store(params = {}, options = {}) req = build_request(:delete_trust_store, params) req.send_request(options) end

#deregister_targets(params = {}) ⇒ Struct

Deregisters the specified targets from the specified target group. After the targets are deregistered, they no longer receive traffic from the load balancer.

The load balancer stops sending requests to targets that are deregistering, but uses connection draining to ensure that in-flight traffic completes on the existing connections. This deregistration delay is configured by default but can be updated for each target group.

For more information, see the following:

Note: If the specified target does not exist, the action returns successfully.

2199 2200 2201 2202 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 2199 def deregister_targets(params = {}, options = {}) req = build_request(:deregister_targets, params) req.send_request(options) end

#describe_account_limits(params = {}) ⇒ Types::DescribeAccountLimitsOutput

2253 2254 2255 2256 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 2253 def describe_account_limits(params = {}, options = {}) req = build_request(:describe_account_limits, params) req.send_request(options) end

#describe_capacity_reservation(params = {}) ⇒ Types::DescribeCapacityReservationOutput

Describes the capacity reservation status for the specified load balancer.

2292 2293 2294 2295 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 2292 def describe_capacity_reservation(params = {}, options = {}) req = build_request(:describe_capacity_reservation, params) req.send_request(options) end

#describe_listener_attributes(params = {}) ⇒ Types::DescribeListenerAttributesOutput

Describes the attributes for the specified listener.

2335 2336 2337 2338 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 2335 def describe_listener_attributes(params = {}, options = {}) req = build_request(:describe_listener_attributes, params) req.send_request(options) end

#describe_listener_certificates(params = {}) ⇒ Types::DescribeListenerCertificatesOutput

Describes the default certificate and the certificate list for the specified HTTPS or TLS listener.

If the default certificate is also in the certificate list, it appears twice in the results (once with IsDefault set to true and once withIsDefault set to false).

For more information, see SSL certificates in the Application Load Balancers Guide or Server certificates in the Network Load Balancers Guide.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

2392 2393 2394 2395 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 2392 def describe_listener_certificates(params = {}, options = {}) req = build_request(:describe_listener_certificates, params) req.send_request(options) end

#describe_listeners(params = {}) ⇒ Types::DescribeListenersOutput

Describes the specified listeners or the listeners for the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer. You must specify either a load balancer or one or more listeners.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

2531 2532 2533 2534 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 2531 def describe_listeners(params = {}, options = {}) req = build_request(:describe_listeners, params) req.send_request(options) end

#describe_load_balancer_attributes(params = {}) ⇒ Types::DescribeLoadBalancerAttributesOutput

2612 2613 2614 2615 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 2612 def describe_load_balancer_attributes(params = {}, options = {}) req = build_request(:describe_load_balancer_attributes, params) req.send_request(options) end

#describe_load_balancers(params = {}) ⇒ Types::DescribeLoadBalancersOutput

Describes the specified load balancers or all of your load balancers.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

The following waiters are defined for this operation (see #wait_until for detailed usage):

2736 2737 2738 2739 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 2736 def describe_load_balancers(params = {}, options = {}) req = build_request(:describe_load_balancers, params) req.send_request(options) end

#describe_rules(params = {}) ⇒ Types::DescribeRulesOutput

Describes the specified rules or the rules for the specified listener. You must specify either a listener or rules.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

2902 2903 2904 2905 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 2902 def describe_rules(params = {}, options = {}) req = build_request(:describe_rules, params) req.send_request(options) end

#describe_ssl_policies(params = {}) ⇒ Types::DescribeSSLPoliciesOutput

Describes the specified policies or all policies used for SSL negotiation.

For more information, see Security policies in the Application Load Balancers Guide and Security policies in the Network Load Balancers Guide.

3067 3068 3069 3070 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 3067 def describe_ssl_policies(params = {}, options = {}) req = build_request(:describe_ssl_policies, params) req.send_request(options) end

#describe_tags(params = {}) ⇒ Types::DescribeTagsOutput

Describes the tags for the specified Elastic Load Balancing resources. You can describe the tags for one or more Application Load Balancers, Network Load Balancers, Gateway Load Balancers, target groups, listeners, or rules.

3133 3134 3135 3136 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 3133 def describe_tags(params = {}, options = {}) req = build_request(:describe_tags, params) req.send_request(options) end

#describe_target_group_attributes(params = {}) ⇒ Types::DescribeTargetGroupAttributesOutput

3209 3210 3211 3212 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 3209 def describe_target_group_attributes(params = {}, options = {}) req = build_request(:describe_target_group_attributes, params) req.send_request(options) end

#describe_target_groups(params = {}) ⇒ Types::DescribeTargetGroupsOutput

Describes the specified target groups or all of your target groups. By default, all target groups are described. Alternatively, you can specify one of the following to filter the results: the ARN of the load balancer, the names of one or more target groups, or the ARNs of one or more target groups.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

3320 3321 3322 3323 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 3320 def describe_target_groups(params = {}, options = {}) req = build_request(:describe_target_groups, params) req.send_request(options) end

#describe_target_health(params = {}) ⇒ Types::DescribeTargetHealthOutput

Describes the health of the specified targets or all of your targets.

The following waiters are defined for this operation (see #wait_until for detailed usage):

3449 3450 3451 3452 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 3449 def describe_target_health(params = {}, options = {}) req = build_request(:describe_target_health, params) req.send_request(options) end

#describe_trust_store_associations(params = {}) ⇒ Types::DescribeTrustStoreAssociationsOutput

Describes all resources associated with the specified trust store.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

3491 3492 3493 3494 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 3491 def describe_trust_store_associations(params = {}, options = {}) req = build_request(:describe_trust_store_associations, params) req.send_request(options) end

#describe_trust_store_revocations(params = {}) ⇒ Types::DescribeTrustStoreRevocationsOutput

Describes the revocation files in use by the specified trust store or revocation files.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

3541 3542 3543 3544 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 3541 def describe_trust_store_revocations(params = {}, options = {}) req = build_request(:describe_trust_store_revocations, params) req.send_request(options) end

#describe_trust_stores(params = {}) ⇒ Types::DescribeTrustStoresOutput

Describes all trust stores for the specified account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

3591 3592 3593 3594 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 3591 def describe_trust_stores(params = {}, options = {}) req = build_request(:describe_trust_stores, params) req.send_request(options) end

#get_resource_policy(params = {}) ⇒ Types::GetResourcePolicyOutput

Retrieves the resource policy for a specified resource.

3628 3629 3630 3631 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 3628 def get_resource_policy(params = {}, options = {}) req = build_request(:get_resource_policy, params) req.send_request(options) end

#get_trust_store_ca_certificates_bundle(params = {}) ⇒ Types::GetTrustStoreCaCertificatesBundleOutput

Retrieves the ca certificate bundle.

This action returns a pre-signed S3 URI which is active for ten minutes.

3659 3660 3661 3662 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 3659 def get_trust_store_ca_certificates_bundle(params = {}, options = {}) req = build_request(:get_trust_store_ca_certificates_bundle, params) req.send_request(options) end

#get_trust_store_revocation_content(params = {}) ⇒ Types::GetTrustStoreRevocationContentOutput

Retrieves the specified revocation file.

This action returns a pre-signed S3 URI which is active for ten minutes.

3694 3695 3696 3697 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 3694 def get_trust_store_revocation_content(params = {}, options = {}) req = build_request(:get_trust_store_revocation_content, params) req.send_request(options) end

#modify_capacity_reservation(params = {}) ⇒ Types::ModifyCapacityReservationOutput

Modifies the capacity reservation of the specified load balancer.

When modifying capacity reservation, you must include at least oneMinimumLoadBalancerCapacity or ResetCapacityReservation.

3745 3746 3747 3748 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 3745 def modify_capacity_reservation(params = {}, options = {}) req = build_request(:modify_capacity_reservation, params) req.send_request(options) end

#modify_ip_pools(params = {}) ⇒ Types::ModifyIpPoolsOutput

[Application Load Balancers] Modify the IP pool associated to a load balancer.

3784 3785 3786 3787 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 3784 def modify_ip_pools(params = {}, options = {}) req = build_request(:modify_ip_pools, params) req.send_request(options) end

#modify_listener(params = {}) ⇒ Types::ModifyListenerOutput

Replaces the specified properties of the specified listener. Any properties that you do not specify remain unchanged.

Changing the protocol from HTTPS to HTTP, or from TLS to TCP, removes the security policy and default certificate properties. If you change the protocol from HTTP to HTTPS, or from TCP to TLS, you must add the security policy and default certificate properties.

To add an item to a list, remove an item from a list, or update an item in a list, you must provide the entire list. For example, to add an action, specify a list with the current actions plus the new action.

4102 4103 4104 4105 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 4102 def modify_listener(params = {}, options = {}) req = build_request(:modify_listener, params) req.send_request(options) end

#modify_listener_attributes(params = {}) ⇒ Types::ModifyListenerAttributesOutput

Modifies the specified attributes of the specified listener.

4141 4142 4143 4144 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 4141 def modify_listener_attributes(params = {}, options = {}) req = build_request(:modify_listener_attributes, params) req.send_request(options) end

#modify_load_balancer_attributes(params = {}) ⇒ Types::ModifyLoadBalancerAttributesOutput

Modifies the specified attributes of the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.

If any of the specified attributes can't be modified as requested, the call fails. Any existing attributes that you do not modify retain their current values.

4315 4316 4317 4318 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 4315 def modify_load_balancer_attributes(params = {}, options = {}) req = build_request(:modify_load_balancer_attributes, params) req.send_request(options) end

#modify_rule(params = {}) ⇒ Types::ModifyRuleOutput

Replaces the specified properties of the specified rule. Any properties that you do not specify are unchanged.

To add an item to a list, remove an item from a list, or update an item in a list, you must provide the entire list. For example, to add an action, specify a list with the current actions plus the new action.

4617 4618 4619 4620 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 4617 def modify_rule(params = {}, options = {}) req = build_request(:modify_rule, params) req.send_request(options) end

#modify_target_group(params = {}) ⇒ Types::ModifyTargetGroupOutput

Modifies the health checks used when evaluating the health state of the targets in the specified target group.

4769 4770 4771 4772 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 4769 def modify_target_group(params = {}, options = {}) req = build_request(:modify_target_group, params) req.send_request(options) end

#modify_target_group_attributes(params = {}) ⇒ Types::ModifyTargetGroupAttributesOutput

Modifies the specified attributes of the specified target group.

4845 4846 4847 4848 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 4845 def modify_target_group_attributes(params = {}, options = {}) req = build_request(:modify_target_group_attributes, params) req.send_request(options) end

#modify_trust_store(params = {}) ⇒ Types::ModifyTrustStoreOutput

Update the ca certificate bundle for the specified trust store.

4891 4892 4893 4894 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 4891 def modify_trust_store(params = {}, options = {}) req = build_request(:modify_trust_store, params) req.send_request(options) end

#register_targets(params = {}) ⇒ Struct

4983 4984 4985 4986 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 4983 def register_targets(params = {}, options = {}) req = build_request(:register_targets, params) req.send_request(options) end

#remove_listener_certificates(params = {}) ⇒ Struct

Removes the specified certificate from the certificate list for the specified HTTPS or TLS listener.

5017 5018 5019 5020 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 5017 def remove_listener_certificates(params = {}, options = {}) req = build_request(:remove_listener_certificates, params) req.send_request(options) end

#remove_tags(params = {}) ⇒ Struct

Removes the specified tags from the specified Elastic Load Balancing resources. You can remove the tags for one or more Application Load Balancers, Network Load Balancers, Gateway Load Balancers, target groups, listeners, or rules.

5061 5062 5063 5064 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 5061 def remove_tags(params = {}, options = {}) req = build_request(:remove_tags, params) req.send_request(options) end

#remove_trust_store_revocations(params = {}) ⇒ Struct

Removes the specified revocation file from the specified trust store.

5087 5088 5089 5090 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 5087 def remove_trust_store_revocations(params = {}, options = {}) req = build_request(:remove_trust_store_revocations, params) req.send_request(options) end

#set_ip_address_type(params = {}) ⇒ Types::SetIpAddressTypeOutput

Sets the type of IP addresses used by the subnets of the specified load balancer.

5134 5135 5136 5137 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 5134 def set_ip_address_type(params = {}, options = {}) req = build_request(:set_ip_address_type, params) req.send_request(options) end

#set_rule_priorities(params = {}) ⇒ Types::SetRulePrioritiesOutput

Sets the priorities of the specified rules.

You can reorder the rules as long as there are no priority conflicts in the new order. Any existing rules that you do not specify retain their current priority.

5294 5295 5296 5297 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 5294 def set_rule_priorities(params = {}, options = {}) req = build_request(:set_rule_priorities, params) req.send_request(options) end

#set_security_groups(params = {}) ⇒ Types::SetSecurityGroupsOutput

Associates the specified security groups with the specified Application Load Balancer or Network Load Balancer. The specified security groups override the previously associated security groups.

You can't perform this operation on a Network Load Balancer unless you specified a security group for the load balancer when you created it.

You can't associate a security group with a Gateway Load Balancer.

5363 5364 5365 5366 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 5363 def set_security_groups(params = {}, options = {}) req = build_request(:set_security_groups, params) req.send_request(options) end

#set_subnets(params = {}) ⇒ Types::SetSubnetsOutput

Enables the Availability Zones for the specified public subnets for the specified Application Load Balancer, Network Load Balancer or Gateway Load Balancer. The specified subnets replace the previously enabled subnets.

5510 5511 5512 5513 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 5510 def set_subnets(params = {}, options = {}) req = build_request(:set_subnets, params) req.send_request(options) end

#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean

Polls an API operation until a resource enters a desired state.

Basic Usage

A waiter will call an API operation until:

In between attempts, the waiter will sleep.

# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.

# poll for ~25 seconds
client.wait_until(waiter_name, params, {
  max_attempts: 5,
  delay: 5,
})

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(waiter_name, params, {

  # disable max attempts
  max_attempts: nil,

  # poll for 1 hour, instead of a number of attempts
  before_wait: -> (attempts, response) do
    throw :failure if Time.now - started_at > 3600
  end
})

Handling Errors

When a waiter is unsuccessful, it will raise an error. All of the failure errors extend fromWaiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Valid Waiters

The following table lists the valid waiter names, the operations they call, and the default :delay and :max_attempts values.

waiter_name params :delay :max_attempts
load_balancer_available #describe_load_balancers 15 40
load_balancer_exists #describe_load_balancers 15 40
load_balancers_deleted #describe_load_balancers 15 40
target_deregistered #describe_target_health 15 40
target_in_service #describe_target_health 15 40
5629 5630 5631 5632 5633 # File 'gems/aws-sdk-elasticloadbalancingv2/lib/aws-sdk-elasticloadbalancingv2/client.rb', line 5629 def wait_until(waiter_name, params = {}, options = {}) w = waiter(waiter_name, options) yield(w.waiter) if block_given? w.wait(params) end