AWSElasticLoadBalancing

@interface AWSElasticLoadBalancing

Elastic Load Balancing

A load balancer can distribute incoming traffic across your EC2 instances. This enables you to increase the availability of your application. The load balancer also monitors the health of its registered instances and ensures that it routes traffic only to healthy instances. You configure your load balancer to accept incoming traffic by specifying one or more listeners, which are configured with a protocol and port number for connections from clients to the load balancer and a protocol and port number for connections from the load balancer to the instances.

Elastic Load Balancing supports three types of load balancers: Application Load Balancers, Network Load Balancers, and Classic Load Balancers. You can select a load balancer based on your application needs. For more information, see the Elastic Load Balancing User Guide.

This reference covers the 2012-06-01 API, which supports Classic Load Balancers. The 2015-12-01 API supports Application Load Balancers and Network Load Balancers.

To get started, create a load balancer with one or more listeners using CreateLoadBalancer. Register your instances with the load balancer using RegisterInstancesWithLoadBalancer.

All Elastic Load Balancing operations are idempotent, which means that they complete at most one time. If you repeat an operation, it succeeds with a 200 OK response code.

  • The service configuration used to instantiate this service client.

    Warning

    Once the client is instantiated, do not modify the configuration object. It may cause unspecified behaviors.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) AWSServiceConfiguration *configuration

    Swift

    var configuration: UnsafeMutablePointer<Int32> { get }
  • Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with defaultServiceConfiguration from [AWSServiceManager defaultServiceManager]. The reference to this object is maintained by the SDK, and you do not need to retain it manually.

    For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

    Swift

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
       let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
       let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider)
       AWSServiceManager.default().defaultServiceConfiguration = configuration
    
       return true
    

    }

    Objective-C

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
         AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                         identityPoolId:@"YourIdentityPoolId"];
         AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1
                                                                              credentialsProvider:credentialsProvider];
         [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;
    
         return YES;
     }
    

    Then call the following to get the default service client:

    Swift

    let ElasticLoadBalancing = AWSElasticLoadBalancing.default()
    

    Objective-C

    AWSElasticLoadBalancing *ElasticLoadBalancing = [AWSElasticLoadBalancing defaultElasticLoadBalancing];
    

    Declaration

    Objective-C

    + (nonnull instancetype)defaultElasticLoadBalancing;

    Swift

    class func `default`() -> Self

    Return Value

    The default service client.

  • Creates a service client with the given service configuration and registers it for the key.

    For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

    Swift

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
       let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
       let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
       AWSElasticLoadBalancing.register(with: configuration!, forKey: "USWest2ElasticLoadBalancing")
    
       return true
    

    }

    Objective-C

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                        identityPoolId:@"YourIdentityPoolId"];
        AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
                                                                             credentialsProvider:credentialsProvider];
    
        [AWSElasticLoadBalancing registerElasticLoadBalancingWithConfiguration:configuration forKey:@"USWest2ElasticLoadBalancing"];
    
        return YES;
    }
    

    Then call the following to get the service client:

    Swift

    let ElasticLoadBalancing = AWSElasticLoadBalancing(forKey: "USWest2ElasticLoadBalancing")
    

    Objective-C

    AWSElasticLoadBalancing *ElasticLoadBalancing = [AWSElasticLoadBalancing ElasticLoadBalancingForKey:@"USWest2ElasticLoadBalancing"];
    

    Warning

    After calling this method, do not modify the configuration object. It may cause unspecified behaviors.

    Declaration

    Objective-C

    + (void)registerElasticLoadBalancingWithConfiguration:(id)configuration
                                                   forKey:(nonnull NSString *)key;

    Swift

    class func register(withConfiguration configuration: Any!, forKey key: String)

    Parameters

    configuration

    A service configuration object.

    key

    A string to identify the service client.

  • Retrieves the service client associated with the key. You need to call + registerElasticLoadBalancingWithConfiguration:forKey: before invoking this method.

    For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

    Swift

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
       let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
       let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
       AWSElasticLoadBalancing.register(with: configuration!, forKey: "USWest2ElasticLoadBalancing")
    
       return true
    

    }

    Objective-C

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                        identityPoolId:@"YourIdentityPoolId"];
        AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
                                                                             credentialsProvider:credentialsProvider];
    
        [AWSElasticLoadBalancing registerElasticLoadBalancingWithConfiguration:configuration forKey:@"USWest2ElasticLoadBalancing"];
    
        return YES;
    }
    

    Then call the following to get the service client:

    Swift

    let ElasticLoadBalancing = AWSElasticLoadBalancing(forKey: "USWest2ElasticLoadBalancing")
    

    Objective-C

    AWSElasticLoadBalancing *ElasticLoadBalancing = [AWSElasticLoadBalancing ElasticLoadBalancingForKey:@"USWest2ElasticLoadBalancing"];
    

    Declaration

    Objective-C

    + (nonnull instancetype)ElasticLoadBalancingForKey:(nonnull NSString *)key;

    Swift

    convenience init(forKey key: String)

    Parameters

    key

    A string to identify the service client.

    Return Value

    An instance of the service client.

  • Removes the service client associated with the key and release it.

    Warning

    Before calling this method, make sure no method is running on this client.

    Declaration

    Objective-C

    + (void)removeElasticLoadBalancingForKey:(nonnull NSString *)key;

    Swift

    class func remove(forKey key: String)

    Parameters

    key

    A string to identify the service client.

  • Adds the specified tags to the specified load balancer. Each load balancer can have a maximum of 10 tags.

    Each tag consists of a key and an optional value. If a tag with the same key is already associated with the load balancer, AddTags updates its value.

    For more information, see Tag Your Classic Load Balancer in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingAddTagsInput

    See

    AWSElasticLoadBalancingAddTagsOutput

    Declaration

    Objective-C

    - (id)addTags:(nonnull AWSElasticLoadBalancingAddTagsInput *)request;

    Swift

    func addTags(_ request: AWSElasticLoadBalancingAddTagsInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the AddTags service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingAddTagsOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorTooManyTags, AWSElasticLoadBalancingErrorDuplicateTagKeys.

  • Adds the specified tags to the specified load balancer. Each load balancer can have a maximum of 10 tags.

    Each tag consists of a key and an optional value. If a tag with the same key is already associated with the load balancer, AddTags updates its value.

    For more information, see Tag Your Classic Load Balancer in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingAddTagsInput

    See

    AWSElasticLoadBalancingAddTagsOutput

    Declaration

    Objective-C

    - (void)addTags:(nonnull AWSElasticLoadBalancingAddTagsInput *)request
        completionHandler:
            (void (^_Nullable)(AWSElasticLoadBalancingAddTagsOutput *_Nullable,
                               NSError *_Nullable))completionHandler;

    Swift

    func addTags(_ request: AWSElasticLoadBalancingAddTagsInput, completionHandler: ((AWSElasticLoadBalancingAddTagsOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the AddTags service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorTooManyTags, AWSElasticLoadBalancingErrorDuplicateTagKeys.

  • Associates one or more security groups with your load balancer in a virtual private cloud (VPC). The specified security groups override the previously associated security groups.

    For more information, see Security Groups for Load Balancers in a VPC in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingApplySecurityGroupsToLoadBalancerInput

    See

    AWSElasticLoadBalancingApplySecurityGroupsToLoadBalancerOutput

    Declaration

    Objective-C

    - (id)applySecurityGroupsToLoadBalancer:
        (nonnull AWSElasticLoadBalancingApplySecurityGroupsToLoadBalancerInput *)
            request;

    Swift

    func applySecurityGroups(toLoadBalancer request: AWSElasticLoadBalancingApplySecurityGroupsToLoadBalancerInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the ApplySecurityGroupsToLoadBalancer service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingApplySecurityGroupsToLoadBalancerOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest, AWSElasticLoadBalancingErrorInvalidSecurityGroup.

  • Associates one or more security groups with your load balancer in a virtual private cloud (VPC). The specified security groups override the previously associated security groups.

    For more information, see Security Groups for Load Balancers in a VPC in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingApplySecurityGroupsToLoadBalancerInput

    See

    AWSElasticLoadBalancingApplySecurityGroupsToLoadBalancerOutput

    Declaration

    Objective-C

    - (void)
        applySecurityGroupsToLoadBalancer:
            (nonnull AWSElasticLoadBalancingApplySecurityGroupsToLoadBalancerInput
                 *)request
                        completionHandler:
                            (void (^_Nullable)(
                                AWSElasticLoadBalancingApplySecurityGroupsToLoadBalancerOutput
                                    *_Nullable,
                                NSError *_Nullable))completionHandler;

    Swift

    func applySecurityGroups(toLoadBalancer request: AWSElasticLoadBalancingApplySecurityGroupsToLoadBalancerInput, completionHandler: ((AWSElasticLoadBalancingApplySecurityGroupsToLoadBalancerOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the ApplySecurityGroupsToLoadBalancer service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest, AWSElasticLoadBalancingErrorInvalidSecurityGroup.

  • Adds one or more subnets to the set of configured subnets for the specified load balancer.

    The load balancer evenly distributes requests across all registered subnets. For more information, see Add or Remove Subnets for Your Load Balancer in a VPC in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingAttachLoadBalancerToSubnetsInput

    See

    AWSElasticLoadBalancingAttachLoadBalancerToSubnetsOutput

    Declaration

    Objective-C

    - (id)attachLoadBalancerToSubnets:
        (nonnull AWSElasticLoadBalancingAttachLoadBalancerToSubnetsInput *)request;

    Swift

    func attachLoadBalancer(toSubnets request: AWSElasticLoadBalancingAttachLoadBalancerToSubnetsInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the AttachLoadBalancerToSubnets service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingAttachLoadBalancerToSubnetsOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest, AWSElasticLoadBalancingErrorSubnetNotFound, AWSElasticLoadBalancingErrorInvalidSubnet.

  • Adds one or more subnets to the set of configured subnets for the specified load balancer.

    The load balancer evenly distributes requests across all registered subnets. For more information, see Add or Remove Subnets for Your Load Balancer in a VPC in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingAttachLoadBalancerToSubnetsInput

    See

    AWSElasticLoadBalancingAttachLoadBalancerToSubnetsOutput

    Declaration

    Objective-C

    - (void)
        attachLoadBalancerToSubnets:
            (nonnull AWSElasticLoadBalancingAttachLoadBalancerToSubnetsInput *)
                request
                  completionHandler:
                      (void (^_Nullable)(
                          AWSElasticLoadBalancingAttachLoadBalancerToSubnetsOutput
                              *_Nullable,
                          NSError *_Nullable))completionHandler;

    Swift

    func attachLoadBalancer(toSubnets request: AWSElasticLoadBalancingAttachLoadBalancerToSubnetsInput, completionHandler: ((AWSElasticLoadBalancingAttachLoadBalancerToSubnetsOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the AttachLoadBalancerToSubnets service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest, AWSElasticLoadBalancingErrorSubnetNotFound, AWSElasticLoadBalancingErrorInvalidSubnet.

  • Specifies the health check settings to use when evaluating the health state of your EC2 instances.

    For more information, see Configure Health Checks for Your Load Balancer in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingConfigureHealthCheckInput

    See

    AWSElasticLoadBalancingConfigureHealthCheckOutput

    Declaration

    Objective-C

    - (id)configureHealthCheck:
        (nonnull AWSElasticLoadBalancingConfigureHealthCheckInput *)request;

    Swift

    func configureHealthCheck(_ request: AWSElasticLoadBalancingConfigureHealthCheckInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the ConfigureHealthCheck service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingConfigureHealthCheckOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound.

  • Specifies the health check settings to use when evaluating the health state of your EC2 instances.

    For more information, see Configure Health Checks for Your Load Balancer in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingConfigureHealthCheckInput

    See

    AWSElasticLoadBalancingConfigureHealthCheckOutput

    Declaration

    Objective-C

    - (void)configureHealthCheck:
                (nonnull AWSElasticLoadBalancingConfigureHealthCheckInput *)request
               completionHandler:
                   (void (^_Nullable)(
                       AWSElasticLoadBalancingConfigureHealthCheckOutput *_Nullable,
                       NSError *_Nullable))completionHandler;

    Swift

    func configureHealthCheck(_ request: AWSElasticLoadBalancingConfigureHealthCheckInput, completionHandler: ((AWSElasticLoadBalancingConfigureHealthCheckOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the ConfigureHealthCheck service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound.

  • Generates a stickiness policy with sticky session lifetimes that follow that of an application-generated cookie. This policy can be associated only with HTTP/HTTPS listeners.

    This policy is similar to the policy created by CreateLBCookieStickinessPolicy, except that the lifetime of the special Elastic Load Balancing cookie, AWSELB, follows the lifetime of the application-generated cookie specified in the policy configuration. The load balancer only inserts a new stickiness cookie when the application response includes a new application cookie.

    If the application cookie is explicitly removed or expires, the session stops being sticky until a new application cookie is issued.

    For more information, see Application-Controlled Session Stickiness in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingCreateAppCookieStickinessPolicyInput

    See

    AWSElasticLoadBalancingCreateAppCookieStickinessPolicyOutput

    Declaration

    Objective-C

    - (id)createAppCookieStickinessPolicy:
        (nonnull AWSElasticLoadBalancingCreateAppCookieStickinessPolicyInput *)
            request;

    Swift

    func createAppCookieStickinessPolicy(_ request: AWSElasticLoadBalancingCreateAppCookieStickinessPolicyInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the CreateAppCookieStickinessPolicy service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingCreateAppCookieStickinessPolicyOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorDuplicatePolicyName, AWSElasticLoadBalancingErrorTooManyPolicies, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Generates a stickiness policy with sticky session lifetimes that follow that of an application-generated cookie. This policy can be associated only with HTTP/HTTPS listeners.

    This policy is similar to the policy created by CreateLBCookieStickinessPolicy, except that the lifetime of the special Elastic Load Balancing cookie, AWSELB, follows the lifetime of the application-generated cookie specified in the policy configuration. The load balancer only inserts a new stickiness cookie when the application response includes a new application cookie.

    If the application cookie is explicitly removed or expires, the session stops being sticky until a new application cookie is issued.

    For more information, see Application-Controlled Session Stickiness in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingCreateAppCookieStickinessPolicyInput

    See

    AWSElasticLoadBalancingCreateAppCookieStickinessPolicyOutput

    Declaration

    Objective-C

    - (void)
        createAppCookieStickinessPolicy:
            (nonnull AWSElasticLoadBalancingCreateAppCookieStickinessPolicyInput *)
                request
                      completionHandler:
                          (void (^_Nullable)(
                              AWSElasticLoadBalancingCreateAppCookieStickinessPolicyOutput
                                  *_Nullable,
                              NSError *_Nullable))completionHandler;

    Swift

    func createAppCookieStickinessPolicy(_ request: AWSElasticLoadBalancingCreateAppCookieStickinessPolicyInput, completionHandler: ((AWSElasticLoadBalancingCreateAppCookieStickinessPolicyOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the CreateAppCookieStickinessPolicy service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorDuplicatePolicyName, AWSElasticLoadBalancingErrorTooManyPolicies, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Generates a stickiness policy with sticky session lifetimes controlled by the lifetime of the browser (user-agent) or a specified expiration period. This policy can be associated only with HTTP/HTTPS listeners.

    When a load balancer implements this policy, the load balancer uses a special cookie to track the instance for each request. When the load balancer receives a request, it first checks to see if this cookie is present in the request. If so, the load balancer sends the request to the application server specified in the cookie. If not, the load balancer sends the request to a server that is chosen based on the existing load-balancing algorithm.

    A cookie is inserted into the response for binding subsequent requests from the same user to that server. The validity of the cookie is based on the cookie expiration time, which is specified in the policy configuration.

    For more information, see Duration-Based Session Stickiness in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingCreateLBCookieStickinessPolicyInput

    See

    AWSElasticLoadBalancingCreateLBCookieStickinessPolicyOutput

    Declaration

    Objective-C

    - (id)createLBCookieStickinessPolicy:
        (nonnull AWSElasticLoadBalancingCreateLBCookieStickinessPolicyInput *)
            request;

    Swift

    func createLBCookieStickinessPolicy(_ request: AWSElasticLoadBalancingCreateLBCookieStickinessPolicyInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the CreateLBCookieStickinessPolicy service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingCreateLBCookieStickinessPolicyOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorDuplicatePolicyName, AWSElasticLoadBalancingErrorTooManyPolicies, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Generates a stickiness policy with sticky session lifetimes controlled by the lifetime of the browser (user-agent) or a specified expiration period. This policy can be associated only with HTTP/HTTPS listeners.

    When a load balancer implements this policy, the load balancer uses a special cookie to track the instance for each request. When the load balancer receives a request, it first checks to see if this cookie is present in the request. If so, the load balancer sends the request to the application server specified in the cookie. If not, the load balancer sends the request to a server that is chosen based on the existing load-balancing algorithm.

    A cookie is inserted into the response for binding subsequent requests from the same user to that server. The validity of the cookie is based on the cookie expiration time, which is specified in the policy configuration.

    For more information, see Duration-Based Session Stickiness in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingCreateLBCookieStickinessPolicyInput

    See

    AWSElasticLoadBalancingCreateLBCookieStickinessPolicyOutput

    Declaration

    Objective-C

    - (void)
        createLBCookieStickinessPolicy:
            (nonnull AWSElasticLoadBalancingCreateLBCookieStickinessPolicyInput *)
                request
                     completionHandler:
                         (void (^_Nullable)(
                             AWSElasticLoadBalancingCreateLBCookieStickinessPolicyOutput
                                 *_Nullable,
                             NSError *_Nullable))completionHandler;

    Swift

    func createLBCookieStickinessPolicy(_ request: AWSElasticLoadBalancingCreateLBCookieStickinessPolicyInput, completionHandler: ((AWSElasticLoadBalancingCreateLBCookieStickinessPolicyOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the CreateLBCookieStickinessPolicy service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorDuplicatePolicyName, AWSElasticLoadBalancingErrorTooManyPolicies, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Creates a Classic Load Balancer.

    You can add listeners, security groups, subnets, and tags when you create your load balancer, or you can add them later using CreateLoadBalancerListeners, ApplySecurityGroupsToLoadBalancer, AttachLoadBalancerToSubnets, and AddTags.

    To describe your current load balancers, see DescribeLoadBalancers. When you are finished with a load balancer, you can delete it using DeleteLoadBalancer.

    You can create up to 20 load balancers per region per account. You can request an increase for the number of load balancers for your account. For more information, see Limits for Your Classic Load Balancer in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingCreateAccessPointInput

    See

    AWSElasticLoadBalancingCreateAccessPointOutput

    Declaration

    Objective-C

    - (id)createLoadBalancer:
        (nonnull AWSElasticLoadBalancingCreateAccessPointInput *)request;

    Swift

    func createLoadBalancer(_ request: AWSElasticLoadBalancingCreateAccessPointInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the CreateLoadBalancer service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingCreateAccessPointOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorDuplicateAccessPointName, AWSElasticLoadBalancingErrorTooManyAccessPoints, AWSElasticLoadBalancingErrorCertificateNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest, AWSElasticLoadBalancingErrorSubnetNotFound, AWSElasticLoadBalancingErrorInvalidSubnet, AWSElasticLoadBalancingErrorInvalidSecurityGroup, AWSElasticLoadBalancingErrorInvalidScheme, AWSElasticLoadBalancingErrorTooManyTags, AWSElasticLoadBalancingErrorDuplicateTagKeys, AWSElasticLoadBalancingErrorUnsupportedProtocol, AWSElasticLoadBalancingErrorOperationNotPermitted.

  • Creates a Classic Load Balancer.

    You can add listeners, security groups, subnets, and tags when you create your load balancer, or you can add them later using CreateLoadBalancerListeners, ApplySecurityGroupsToLoadBalancer, AttachLoadBalancerToSubnets, and AddTags.

    To describe your current load balancers, see DescribeLoadBalancers. When you are finished with a load balancer, you can delete it using DeleteLoadBalancer.

    You can create up to 20 load balancers per region per account. You can request an increase for the number of load balancers for your account. For more information, see Limits for Your Classic Load Balancer in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingCreateAccessPointInput

    See

    AWSElasticLoadBalancingCreateAccessPointOutput

    Declaration

    Objective-C

    - (void)createLoadBalancer:
                (nonnull AWSElasticLoadBalancingCreateAccessPointInput *)request
             completionHandler:
                 (void (^_Nullable)(
                     AWSElasticLoadBalancingCreateAccessPointOutput *_Nullable,
                     NSError *_Nullable))completionHandler;

    Swift

    func createLoadBalancer(_ request: AWSElasticLoadBalancingCreateAccessPointInput, completionHandler: ((AWSElasticLoadBalancingCreateAccessPointOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the CreateLoadBalancer service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorDuplicateAccessPointName, AWSElasticLoadBalancingErrorTooManyAccessPoints, AWSElasticLoadBalancingErrorCertificateNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest, AWSElasticLoadBalancingErrorSubnetNotFound, AWSElasticLoadBalancingErrorInvalidSubnet, AWSElasticLoadBalancingErrorInvalidSecurityGroup, AWSElasticLoadBalancingErrorInvalidScheme, AWSElasticLoadBalancingErrorTooManyTags, AWSElasticLoadBalancingErrorDuplicateTagKeys, AWSElasticLoadBalancingErrorUnsupportedProtocol, AWSElasticLoadBalancingErrorOperationNotPermitted.

  • Creates one or more listeners for the specified load balancer. If a listener with the specified port does not already exist, it is created; otherwise, the properties of the new listener must match the properties of the existing listener.

    For more information, see Listeners for Your Classic Load Balancer in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingCreateLoadBalancerListenerInput

    See

    AWSElasticLoadBalancingCreateLoadBalancerListenerOutput

    Declaration

    Objective-C

    - (id)createLoadBalancerListeners:
        (nonnull AWSElasticLoadBalancingCreateLoadBalancerListenerInput *)request;

    Swift

    func createLoadBalancerListeners(_ request: AWSElasticLoadBalancingCreateLoadBalancerListenerInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the CreateLoadBalancerListeners service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingCreateLoadBalancerListenerOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorDuplicateListener, AWSElasticLoadBalancingErrorCertificateNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest, AWSElasticLoadBalancingErrorUnsupportedProtocol.

  • Creates one or more listeners for the specified load balancer. If a listener with the specified port does not already exist, it is created; otherwise, the properties of the new listener must match the properties of the existing listener.

    For more information, see Listeners for Your Classic Load Balancer in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingCreateLoadBalancerListenerInput

    See

    AWSElasticLoadBalancingCreateLoadBalancerListenerOutput

    Declaration

    Objective-C

    - (void)
        createLoadBalancerListeners:
            (nonnull AWSElasticLoadBalancingCreateLoadBalancerListenerInput *)
                request
                  completionHandler:
                      (void (^_Nullable)(
                          AWSElasticLoadBalancingCreateLoadBalancerListenerOutput
                              *_Nullable,
                          NSError *_Nullable))completionHandler;

    Swift

    func createLoadBalancerListeners(_ request: AWSElasticLoadBalancingCreateLoadBalancerListenerInput, completionHandler: ((AWSElasticLoadBalancingCreateLoadBalancerListenerOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the CreateLoadBalancerListeners service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorDuplicateListener, AWSElasticLoadBalancingErrorCertificateNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest, AWSElasticLoadBalancingErrorUnsupportedProtocol.

  • Creates a policy with the specified attributes for the specified load balancer.

    Policies are settings that are saved for your load balancer and that can be applied to the listener or the application server, depending on the policy type.

    See

    AWSElasticLoadBalancingCreateLoadBalancerPolicyInput

    See

    AWSElasticLoadBalancingCreateLoadBalancerPolicyOutput

    Declaration

    Objective-C

    - (id)createLoadBalancerPolicy:
        (nonnull AWSElasticLoadBalancingCreateLoadBalancerPolicyInput *)request;

    Swift

    func createLoadBalancerPolicy(_ request: AWSElasticLoadBalancingCreateLoadBalancerPolicyInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the CreateLoadBalancerPolicy service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingCreateLoadBalancerPolicyOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorPolicyTypeNotFound, AWSElasticLoadBalancingErrorDuplicatePolicyName, AWSElasticLoadBalancingErrorTooManyPolicies, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Creates a policy with the specified attributes for the specified load balancer.

    Policies are settings that are saved for your load balancer and that can be applied to the listener or the application server, depending on the policy type.

    See

    AWSElasticLoadBalancingCreateLoadBalancerPolicyInput

    See

    AWSElasticLoadBalancingCreateLoadBalancerPolicyOutput

    Declaration

    Objective-C

    - (void)createLoadBalancerPolicy:
                (nonnull AWSElasticLoadBalancingCreateLoadBalancerPolicyInput *)
                    request
                   completionHandler:
                       (void (^_Nullable)(
                           AWSElasticLoadBalancingCreateLoadBalancerPolicyOutput
                               *_Nullable,
                           NSError *_Nullable))completionHandler;

    Swift

    func createLoadBalancerPolicy(_ request: AWSElasticLoadBalancingCreateLoadBalancerPolicyInput, completionHandler: ((AWSElasticLoadBalancingCreateLoadBalancerPolicyOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the CreateLoadBalancerPolicy service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorPolicyTypeNotFound, AWSElasticLoadBalancingErrorDuplicatePolicyName, AWSElasticLoadBalancingErrorTooManyPolicies, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Deletes the specified load balancer.

    If you are attempting to recreate a load balancer, you must reconfigure all settings. The DNS name associated with a deleted load balancer are no longer usable. The name and associated DNS record of the deleted load balancer no longer exist and traffic sent to any of its IP addresses is no longer delivered to your instances.

    If the load balancer does not exist or has already been deleted, the call to DeleteLoadBalancer still succeeds.

    See

    AWSElasticLoadBalancingDeleteAccessPointInput

    See

    AWSElasticLoadBalancingDeleteAccessPointOutput

    Declaration

    Objective-C

    - (id)deleteLoadBalancer:
        (nonnull AWSElasticLoadBalancingDeleteAccessPointInput *)request;

    Swift

    func deleteLoadBalancer(_ request: AWSElasticLoadBalancingDeleteAccessPointInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DeleteLoadBalancer service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingDeleteAccessPointOutput.

  • Deletes the specified load balancer.

    If you are attempting to recreate a load balancer, you must reconfigure all settings. The DNS name associated with a deleted load balancer are no longer usable. The name and associated DNS record of the deleted load balancer no longer exist and traffic sent to any of its IP addresses is no longer delivered to your instances.

    If the load balancer does not exist or has already been deleted, the call to DeleteLoadBalancer still succeeds.

    See

    AWSElasticLoadBalancingDeleteAccessPointInput

    See

    AWSElasticLoadBalancingDeleteAccessPointOutput

    Declaration

    Objective-C

    - (void)deleteLoadBalancer:
                (nonnull AWSElasticLoadBalancingDeleteAccessPointInput *)request
             completionHandler:
                 (void (^_Nullable)(
                     AWSElasticLoadBalancingDeleteAccessPointOutput *_Nullable,
                     NSError *_Nullable))completionHandler;

    Swift

    func deleteLoadBalancer(_ request: AWSElasticLoadBalancingDeleteAccessPointInput, completionHandler: ((AWSElasticLoadBalancingDeleteAccessPointOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DeleteLoadBalancer service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful.

  • Deletes the specified listeners from the specified load balancer.

    See

    AWSElasticLoadBalancingDeleteLoadBalancerListenerInput

    See

    AWSElasticLoadBalancingDeleteLoadBalancerListenerOutput

    Declaration

    Objective-C

    - (id)deleteLoadBalancerListeners:
        (nonnull AWSElasticLoadBalancingDeleteLoadBalancerListenerInput *)request;

    Swift

    func deleteLoadBalancerListeners(_ request: AWSElasticLoadBalancingDeleteLoadBalancerListenerInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DeleteLoadBalancerListeners service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingDeleteLoadBalancerListenerOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound.

  • Deletes the specified listeners from the specified load balancer.

    See

    AWSElasticLoadBalancingDeleteLoadBalancerListenerInput

    See

    AWSElasticLoadBalancingDeleteLoadBalancerListenerOutput

    Declaration

    Objective-C

    - (void)
        deleteLoadBalancerListeners:
            (nonnull AWSElasticLoadBalancingDeleteLoadBalancerListenerInput *)
                request
                  completionHandler:
                      (void (^_Nullable)(
                          AWSElasticLoadBalancingDeleteLoadBalancerListenerOutput
                              *_Nullable,
                          NSError *_Nullable))completionHandler;

    Swift

    func deleteLoadBalancerListeners(_ request: AWSElasticLoadBalancingDeleteLoadBalancerListenerInput, completionHandler: ((AWSElasticLoadBalancingDeleteLoadBalancerListenerOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DeleteLoadBalancerListeners service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound.

  • Deletes the specified policy from the specified load balancer. This policy must not be enabled for any listeners.

    See

    AWSElasticLoadBalancingDeleteLoadBalancerPolicyInput

    See

    AWSElasticLoadBalancingDeleteLoadBalancerPolicyOutput

    Declaration

    Objective-C

    - (id)deleteLoadBalancerPolicy:
        (nonnull AWSElasticLoadBalancingDeleteLoadBalancerPolicyInput *)request;

    Swift

    func deleteLoadBalancerPolicy(_ request: AWSElasticLoadBalancingDeleteLoadBalancerPolicyInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DeleteLoadBalancerPolicy service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingDeleteLoadBalancerPolicyOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Deletes the specified policy from the specified load balancer. This policy must not be enabled for any listeners.

    See

    AWSElasticLoadBalancingDeleteLoadBalancerPolicyInput

    See

    AWSElasticLoadBalancingDeleteLoadBalancerPolicyOutput

    Declaration

    Objective-C

    - (void)deleteLoadBalancerPolicy:
                (nonnull AWSElasticLoadBalancingDeleteLoadBalancerPolicyInput *)
                    request
                   completionHandler:
                       (void (^_Nullable)(
                           AWSElasticLoadBalancingDeleteLoadBalancerPolicyOutput
                               *_Nullable,
                           NSError *_Nullable))completionHandler;

    Swift

    func deleteLoadBalancerPolicy(_ request: AWSElasticLoadBalancingDeleteLoadBalancerPolicyInput, completionHandler: ((AWSElasticLoadBalancingDeleteLoadBalancerPolicyOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DeleteLoadBalancerPolicy service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Deregisters the specified instances from the specified load balancer. After the instance is deregistered, it no longer receives traffic from the load balancer.

    You can use DescribeLoadBalancers to verify that the instance is deregistered from the load balancer.

    For more information, see Register or De-Register EC2 Instances in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingDeregisterEndPointsInput

    See

    AWSElasticLoadBalancingDeregisterEndPointsOutput

    Declaration

    Objective-C

    - (id)deregisterInstancesFromLoadBalancer:
        (nonnull AWSElasticLoadBalancingDeregisterEndPointsInput *)request;

    Swift

    func deregisterInstances(fromLoadBalancer request: AWSElasticLoadBalancingDeregisterEndPointsInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DeregisterInstancesFromLoadBalancer service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingDeregisterEndPointsOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorInvalidEndPoint.

  • Deregisters the specified instances from the specified load balancer. After the instance is deregistered, it no longer receives traffic from the load balancer.

    You can use DescribeLoadBalancers to verify that the instance is deregistered from the load balancer.

    For more information, see Register or De-Register EC2 Instances in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingDeregisterEndPointsInput

    See

    AWSElasticLoadBalancingDeregisterEndPointsOutput

    Declaration

    Objective-C

    - (void)
        deregisterInstancesFromLoadBalancer:
            (nonnull AWSElasticLoadBalancingDeregisterEndPointsInput *)request
                          completionHandler:
                              (void (^_Nullable)(
                                  AWSElasticLoadBalancingDeregisterEndPointsOutput
                                      *_Nullable,
                                  NSError *_Nullable))completionHandler;

    Swift

    func deregisterInstances(fromLoadBalancer request: AWSElasticLoadBalancingDeregisterEndPointsInput, completionHandler: ((AWSElasticLoadBalancingDeregisterEndPointsOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DeregisterInstancesFromLoadBalancer service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorInvalidEndPoint.

  • Describes the current Elastic Load Balancing resource limits for your AWS account.

    For more information, see Limits for Your Classic Load Balancer in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingDescribeAccountLimitsInput

    See

    AWSElasticLoadBalancingDescribeAccountLimitsOutput

    Declaration

    Objective-C

    - (id)describeAccountLimits:
        (nonnull AWSElasticLoadBalancingDescribeAccountLimitsInput *)request;

    Swift

    func describeAccountLimits(_ request: AWSElasticLoadBalancingDescribeAccountLimitsInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DescribeAccountLimits service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingDescribeAccountLimitsOutput.

  • Describes the current Elastic Load Balancing resource limits for your AWS account.

    For more information, see Limits for Your Classic Load Balancer in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingDescribeAccountLimitsInput

    See

    AWSElasticLoadBalancingDescribeAccountLimitsOutput

    Declaration

    Objective-C

    - (void)
        describeAccountLimits:
            (nonnull AWSElasticLoadBalancingDescribeAccountLimitsInput *)request
            completionHandler:
                (void (^_Nullable)(
                    AWSElasticLoadBalancingDescribeAccountLimitsOutput *_Nullable,
                    NSError *_Nullable))completionHandler;

    Swift

    func describeAccountLimits(_ request: AWSElasticLoadBalancingDescribeAccountLimitsInput, completionHandler: ((AWSElasticLoadBalancingDescribeAccountLimitsOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DescribeAccountLimits service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful.

  • Describes the state of the specified instances with respect to the specified load balancer. If no instances are specified, the call describes the state of all instances that are currently registered with the load balancer. If instances are specified, their state is returned even if they are no longer registered with the load balancer. The state of terminated instances is not returned.

    See

    AWSElasticLoadBalancingDescribeEndPointStateInput

    See

    AWSElasticLoadBalancingDescribeEndPointStateOutput

    Declaration

    Objective-C

    - (id)describeInstanceHealth:
        (nonnull AWSElasticLoadBalancingDescribeEndPointStateInput *)request;

    Swift

    func describeInstanceHealth(_ request: AWSElasticLoadBalancingDescribeEndPointStateInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DescribeInstanceHealth service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingDescribeEndPointStateOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorInvalidEndPoint.

  • Describes the state of the specified instances with respect to the specified load balancer. If no instances are specified, the call describes the state of all instances that are currently registered with the load balancer. If instances are specified, their state is returned even if they are no longer registered with the load balancer. The state of terminated instances is not returned.

    See

    AWSElasticLoadBalancingDescribeEndPointStateInput

    See

    AWSElasticLoadBalancingDescribeEndPointStateOutput

    Declaration

    Objective-C

    - (void)
        describeInstanceHealth:
            (nonnull AWSElasticLoadBalancingDescribeEndPointStateInput *)request
             completionHandler:
                 (void (^_Nullable)(
                     AWSElasticLoadBalancingDescribeEndPointStateOutput *_Nullable,
                     NSError *_Nullable))completionHandler;

    Swift

    func describeInstanceHealth(_ request: AWSElasticLoadBalancingDescribeEndPointStateInput, completionHandler: ((AWSElasticLoadBalancingDescribeEndPointStateOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DescribeInstanceHealth service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorInvalidEndPoint.

  • Describes the attributes for the specified load balancer.

    See

    AWSElasticLoadBalancingDescribeLoadBalancerAttributesInput

    See

    AWSElasticLoadBalancingDescribeLoadBalancerAttributesOutput

    Declaration

    Objective-C

    - (id)describeLoadBalancerAttributes:
        (nonnull AWSElasticLoadBalancingDescribeLoadBalancerAttributesInput *)
            request;

    Swift

    func describeLoadBalancerAttributes(_ request: AWSElasticLoadBalancingDescribeLoadBalancerAttributesInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DescribeLoadBalancerAttributes service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingDescribeLoadBalancerAttributesOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorLoadBalancerAttributeNotFound.

  • Describes the attributes for the specified load balancer.

    See

    AWSElasticLoadBalancingDescribeLoadBalancerAttributesInput

    See

    AWSElasticLoadBalancingDescribeLoadBalancerAttributesOutput

    Declaration

    Objective-C

    - (void)
        describeLoadBalancerAttributes:
            (nonnull AWSElasticLoadBalancingDescribeLoadBalancerAttributesInput *)
                request
                     completionHandler:
                         (void (^_Nullable)(
                             AWSElasticLoadBalancingDescribeLoadBalancerAttributesOutput
                                 *_Nullable,
                             NSError *_Nullable))completionHandler;

    Swift

    func describeLoadBalancerAttributes(_ request: AWSElasticLoadBalancingDescribeLoadBalancerAttributesInput, completionHandler: ((AWSElasticLoadBalancingDescribeLoadBalancerAttributesOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DescribeLoadBalancerAttributes service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorLoadBalancerAttributeNotFound.

  • Describes the specified policies.

    If you specify a load balancer name, the action returns the descriptions of all policies created for the load balancer. If you specify a policy name associated with your load balancer, the action returns the description of that policy. If you don’t specify a load balancer name, the action returns descriptions of the specified sample policies, or descriptions of all sample policies. The names of the sample policies have the ELBSample- prefix.

    See

    AWSElasticLoadBalancingDescribeLoadBalancerPoliciesInput

    See

    AWSElasticLoadBalancingDescribeLoadBalancerPoliciesOutput

    Declaration

    Objective-C

    - (id)describeLoadBalancerPolicies:
        (nonnull AWSElasticLoadBalancingDescribeLoadBalancerPoliciesInput *)request;

    Swift

    func describeLoadBalancerPolicies(_ request: AWSElasticLoadBalancingDescribeLoadBalancerPoliciesInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DescribeLoadBalancerPolicies service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingDescribeLoadBalancerPoliciesOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorPolicyNotFound.

  • Describes the specified policies.

    If you specify a load balancer name, the action returns the descriptions of all policies created for the load balancer. If you specify a policy name associated with your load balancer, the action returns the description of that policy. If you don’t specify a load balancer name, the action returns descriptions of the specified sample policies, or descriptions of all sample policies. The names of the sample policies have the ELBSample- prefix.

    See

    AWSElasticLoadBalancingDescribeLoadBalancerPoliciesInput

    See

    AWSElasticLoadBalancingDescribeLoadBalancerPoliciesOutput

    Declaration

    Objective-C

    - (void)
        describeLoadBalancerPolicies:
            (nonnull AWSElasticLoadBalancingDescribeLoadBalancerPoliciesInput *)
                request
                   completionHandler:
                       (void (^_Nullable)(
                           AWSElasticLoadBalancingDescribeLoadBalancerPoliciesOutput
                               *_Nullable,
                           NSError *_Nullable))completionHandler;

    Swift

    func describeLoadBalancerPolicies(_ request: AWSElasticLoadBalancingDescribeLoadBalancerPoliciesInput, completionHandler: ((AWSElasticLoadBalancingDescribeLoadBalancerPoliciesOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DescribeLoadBalancerPolicies service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorPolicyNotFound.

  • Describes the specified load balancer policy types or all load balancer policy types.

    The description of each type indicates how it can be used. For example, some policies can be used only with layer 7 listeners, some policies can be used only with layer 4 listeners, and some policies can be used only with your EC2 instances.

    You can use CreateLoadBalancerPolicy to create a policy configuration for any of these policy types. Then, depending on the policy type, use either SetLoadBalancerPoliciesOfListener or SetLoadBalancerPoliciesForBackendServer to set the policy.

    See

    AWSElasticLoadBalancingDescribeLoadBalancerPolicyTypesInput

    See

    AWSElasticLoadBalancingDescribeLoadBalancerPolicyTypesOutput

    Declaration

    Objective-C

    - (id)describeLoadBalancerPolicyTypes:
        (nonnull AWSElasticLoadBalancingDescribeLoadBalancerPolicyTypesInput *)
            request;

    Swift

    func describeLoadBalancerPolicyTypes(_ request: AWSElasticLoadBalancingDescribeLoadBalancerPolicyTypesInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DescribeLoadBalancerPolicyTypes service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingDescribeLoadBalancerPolicyTypesOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorPolicyTypeNotFound.

  • Describes the specified load balancer policy types or all load balancer policy types.

    The description of each type indicates how it can be used. For example, some policies can be used only with layer 7 listeners, some policies can be used only with layer 4 listeners, and some policies can be used only with your EC2 instances.

    You can use CreateLoadBalancerPolicy to create a policy configuration for any of these policy types. Then, depending on the policy type, use either SetLoadBalancerPoliciesOfListener or SetLoadBalancerPoliciesForBackendServer to set the policy.

    See

    AWSElasticLoadBalancingDescribeLoadBalancerPolicyTypesInput

    See

    AWSElasticLoadBalancingDescribeLoadBalancerPolicyTypesOutput

    Declaration

    Objective-C

    - (void)
        describeLoadBalancerPolicyTypes:
            (nonnull AWSElasticLoadBalancingDescribeLoadBalancerPolicyTypesInput *)
                request
                      completionHandler:
                          (void (^_Nullable)(
                              AWSElasticLoadBalancingDescribeLoadBalancerPolicyTypesOutput
                                  *_Nullable,
                              NSError *_Nullable))completionHandler;

    Swift

    func describeLoadBalancerPolicyTypes(_ request: AWSElasticLoadBalancingDescribeLoadBalancerPolicyTypesInput, completionHandler: ((AWSElasticLoadBalancingDescribeLoadBalancerPolicyTypesOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DescribeLoadBalancerPolicyTypes service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorPolicyTypeNotFound.

  • Describes the specified the load balancers. If no load balancers are specified, the call describes all of your load balancers.

    See

    AWSElasticLoadBalancingDescribeAccessPointsInput

    See

    AWSElasticLoadBalancingDescribeAccessPointsOutput

    Declaration

    Objective-C

    - (id)describeLoadBalancers:
        (nonnull AWSElasticLoadBalancingDescribeAccessPointsInput *)request;

    Swift

    func describeLoadBalancers(_ request: AWSElasticLoadBalancingDescribeAccessPointsInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DescribeLoadBalancers service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingDescribeAccessPointsOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorDependencyThrottle.

  • Describes the specified the load balancers. If no load balancers are specified, the call describes all of your load balancers.

    See

    AWSElasticLoadBalancingDescribeAccessPointsInput

    See

    AWSElasticLoadBalancingDescribeAccessPointsOutput

    Declaration

    Objective-C

    - (void)
        describeLoadBalancers:
            (nonnull AWSElasticLoadBalancingDescribeAccessPointsInput *)request
            completionHandler:
                (void (^_Nullable)(
                    AWSElasticLoadBalancingDescribeAccessPointsOutput *_Nullable,
                    NSError *_Nullable))completionHandler;

    Swift

    func describeLoadBalancers(_ request: AWSElasticLoadBalancingDescribeAccessPointsInput, completionHandler: ((AWSElasticLoadBalancingDescribeAccessPointsOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DescribeLoadBalancers service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorDependencyThrottle.

  • Describes the tags associated with the specified load balancers.

    See

    AWSElasticLoadBalancingDescribeTagsInput

    See

    AWSElasticLoadBalancingDescribeTagsOutput

    Declaration

    Objective-C

    - (id)describeTags:(nonnull AWSElasticLoadBalancingDescribeTagsInput *)request;

    Swift

    func describeTags(_ request: AWSElasticLoadBalancingDescribeTagsInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DescribeTags service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingDescribeTagsOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound.

  • Describes the tags associated with the specified load balancers.

    See

    AWSElasticLoadBalancingDescribeTagsInput

    See

    AWSElasticLoadBalancingDescribeTagsOutput

    Declaration

    Objective-C

    - (void)describeTags:(nonnull AWSElasticLoadBalancingDescribeTagsInput *)request
        completionHandler:
            (void (^_Nullable)(AWSElasticLoadBalancingDescribeTagsOutput *_Nullable,
                               NSError *_Nullable))completionHandler;

    Swift

    func describeTags(_ request: AWSElasticLoadBalancingDescribeTagsInput, completionHandler: ((AWSElasticLoadBalancingDescribeTagsOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DescribeTags service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound.

  • Removes the specified subnets from the set of configured subnets for the load balancer.

    After a subnet is removed, all EC2 instances registered with the load balancer in the removed subnet go into the OutOfService state. Then, the load balancer balances the traffic among the remaining routable subnets.

    See

    AWSElasticLoadBalancingDetachLoadBalancerFromSubnetsInput

    See

    AWSElasticLoadBalancingDetachLoadBalancerFromSubnetsOutput

    Declaration

    Objective-C

    - (id)detachLoadBalancerFromSubnets:
        (nonnull AWSElasticLoadBalancingDetachLoadBalancerFromSubnetsInput *)
            request;

    Swift

    func detachLoadBalancer(fromSubnets request: AWSElasticLoadBalancingDetachLoadBalancerFromSubnetsInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DetachLoadBalancerFromSubnets service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingDetachLoadBalancerFromSubnetsOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Removes the specified subnets from the set of configured subnets for the load balancer.

    After a subnet is removed, all EC2 instances registered with the load balancer in the removed subnet go into the OutOfService state. Then, the load balancer balances the traffic among the remaining routable subnets.

    See

    AWSElasticLoadBalancingDetachLoadBalancerFromSubnetsInput

    See

    AWSElasticLoadBalancingDetachLoadBalancerFromSubnetsOutput

    Declaration

    Objective-C

    - (void)
        detachLoadBalancerFromSubnets:
            (nonnull AWSElasticLoadBalancingDetachLoadBalancerFromSubnetsInput *)
                request
                    completionHandler:
                        (void (^_Nullable)(
                            AWSElasticLoadBalancingDetachLoadBalancerFromSubnetsOutput
                                *_Nullable,
                            NSError *_Nullable))completionHandler;

    Swift

    func detachLoadBalancer(fromSubnets request: AWSElasticLoadBalancingDetachLoadBalancerFromSubnetsInput, completionHandler: ((AWSElasticLoadBalancingDetachLoadBalancerFromSubnetsOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DetachLoadBalancerFromSubnets service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Removes the specified Availability Zones from the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.

    For load balancers in a non-default VPC, use DetachLoadBalancerFromSubnets.

    There must be at least one Availability Zone registered with a load balancer at all times. After an Availability Zone is removed, all instances registered with the load balancer that are in the removed Availability Zone go into the OutOfService state. Then, the load balancer attempts to equally balance the traffic among its remaining Availability Zones.

    For more information, see Add or Remove Availability Zones in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingRemoveAvailabilityZonesInput

    See

    AWSElasticLoadBalancingRemoveAvailabilityZonesOutput

    Declaration

    Objective-C

    - (id)disableAvailabilityZonesForLoadBalancer:
        (nonnull AWSElasticLoadBalancingRemoveAvailabilityZonesInput *)request;

    Swift

    func disableAvailabilityZones(forLoadBalancer request: AWSElasticLoadBalancingRemoveAvailabilityZonesInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DisableAvailabilityZonesForLoadBalancer service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingRemoveAvailabilityZonesOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Removes the specified Availability Zones from the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.

    For load balancers in a non-default VPC, use DetachLoadBalancerFromSubnets.

    There must be at least one Availability Zone registered with a load balancer at all times. After an Availability Zone is removed, all instances registered with the load balancer that are in the removed Availability Zone go into the OutOfService state. Then, the load balancer attempts to equally balance the traffic among its remaining Availability Zones.

    For more information, see Add or Remove Availability Zones in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingRemoveAvailabilityZonesInput

    See

    AWSElasticLoadBalancingRemoveAvailabilityZonesOutput

    Declaration

    Objective-C

    - (void)
        disableAvailabilityZonesForLoadBalancer:
            (nonnull AWSElasticLoadBalancingRemoveAvailabilityZonesInput *)request
                              completionHandler:
                                  (void (^_Nullable)(
                                      AWSElasticLoadBalancingRemoveAvailabilityZonesOutput
                                          *_Nullable,
                                      NSError *_Nullable))completionHandler;

    Swift

    func disableAvailabilityZones(forLoadBalancer request: AWSElasticLoadBalancingRemoveAvailabilityZonesInput, completionHandler: ((AWSElasticLoadBalancingRemoveAvailabilityZonesOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DisableAvailabilityZonesForLoadBalancer service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Adds the specified Availability Zones to the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.

    For load balancers in a non-default VPC, use AttachLoadBalancerToSubnets.

    The load balancer evenly distributes requests across all its registered Availability Zones that contain instances. For more information, see Add or Remove Availability Zones in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingAddAvailabilityZonesInput

    See

    AWSElasticLoadBalancingAddAvailabilityZonesOutput

    Declaration

    Objective-C

    - (id)enableAvailabilityZonesForLoadBalancer:
        (nonnull AWSElasticLoadBalancingAddAvailabilityZonesInput *)request;

    Swift

    func enableAvailabilityZones(forLoadBalancer request: AWSElasticLoadBalancingAddAvailabilityZonesInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the EnableAvailabilityZonesForLoadBalancer service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingAddAvailabilityZonesOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound.

  • Adds the specified Availability Zones to the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.

    For load balancers in a non-default VPC, use AttachLoadBalancerToSubnets.

    The load balancer evenly distributes requests across all its registered Availability Zones that contain instances. For more information, see Add or Remove Availability Zones in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingAddAvailabilityZonesInput

    See

    AWSElasticLoadBalancingAddAvailabilityZonesOutput

    Declaration

    Objective-C

    - (void)
        enableAvailabilityZonesForLoadBalancer:
            (nonnull AWSElasticLoadBalancingAddAvailabilityZonesInput *)request
                             completionHandler:
                                 (void (^_Nullable)(
                                     AWSElasticLoadBalancingAddAvailabilityZonesOutput
                                         *_Nullable,
                                     NSError *_Nullable))completionHandler;

    Swift

    func enableAvailabilityZones(forLoadBalancer request: AWSElasticLoadBalancingAddAvailabilityZonesInput, completionHandler: ((AWSElasticLoadBalancingAddAvailabilityZonesOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the EnableAvailabilityZonesForLoadBalancer service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound.

  • Modifies the attributes of the specified load balancer.

    You can modify the load balancer attributes, such as AccessLogs, ConnectionDraining, and CrossZoneLoadBalancing by either enabling or disabling them. Or, you can modify the load balancer attribute ConnectionSettings by specifying an idle connection timeout value for your load balancer.

    For more information, see the following in the Classic Load Balancers Guide:

    See

    AWSElasticLoadBalancingModifyLoadBalancerAttributesInput

    See

    AWSElasticLoadBalancingModifyLoadBalancerAttributesOutput

    Declaration

    Objective-C

    - (id)modifyLoadBalancerAttributes:
        (nonnull AWSElasticLoadBalancingModifyLoadBalancerAttributesInput *)request;

    Swift

    func modifyLoadBalancerAttributes(_ request: AWSElasticLoadBalancingModifyLoadBalancerAttributesInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the ModifyLoadBalancerAttributes service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingModifyLoadBalancerAttributesOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorLoadBalancerAttributeNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Modifies the attributes of the specified load balancer.

    You can modify the load balancer attributes, such as AccessLogs, ConnectionDraining, and CrossZoneLoadBalancing by either enabling or disabling them. Or, you can modify the load balancer attribute ConnectionSettings by specifying an idle connection timeout value for your load balancer.

    For more information, see the following in the Classic Load Balancers Guide:

    See

    AWSElasticLoadBalancingModifyLoadBalancerAttributesInput

    See

    AWSElasticLoadBalancingModifyLoadBalancerAttributesOutput

    Declaration

    Objective-C

    - (void)
        modifyLoadBalancerAttributes:
            (nonnull AWSElasticLoadBalancingModifyLoadBalancerAttributesInput *)
                request
                   completionHandler:
                       (void (^_Nullable)(
                           AWSElasticLoadBalancingModifyLoadBalancerAttributesOutput
                               *_Nullable,
                           NSError *_Nullable))completionHandler;

    Swift

    func modifyLoadBalancerAttributes(_ request: AWSElasticLoadBalancingModifyLoadBalancerAttributesInput, completionHandler: ((AWSElasticLoadBalancingModifyLoadBalancerAttributesOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the ModifyLoadBalancerAttributes service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorLoadBalancerAttributeNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Adds the specified instances to the specified load balancer.

    The instance must be a running instance in the same network as the load balancer (EC2-Classic or the same VPC). If you have EC2-Classic instances and a load balancer in a VPC with ClassicLink enabled, you can link the EC2-Classic instances to that VPC and then register the linked EC2-Classic instances with the load balancer in the VPC.

    Note that RegisterInstanceWithLoadBalancer completes when the request has been registered. Instance registration takes a little time to complete. To check the state of the registered instances, use DescribeLoadBalancers or DescribeInstanceHealth.

    After the instance is registered, it starts receiving traffic and requests from the load balancer. Any instance that is not in one of the Availability Zones registered for the load balancer is moved to the OutOfService state. If an Availability Zone is added to the load balancer later, any instances registered with the load balancer move to the InService state.

    To deregister instances from a load balancer, use DeregisterInstancesFromLoadBalancer.

    For more information, see Register or De-Register EC2 Instances in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingRegisterEndPointsInput

    See

    AWSElasticLoadBalancingRegisterEndPointsOutput

    Declaration

    Objective-C

    - (id)registerInstancesWithLoadBalancer:
        (nonnull AWSElasticLoadBalancingRegisterEndPointsInput *)request;

    Swift

    func registerInstances(withLoadBalancer request: AWSElasticLoadBalancingRegisterEndPointsInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the RegisterInstancesWithLoadBalancer service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingRegisterEndPointsOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorInvalidEndPoint.

  • Adds the specified instances to the specified load balancer.

    The instance must be a running instance in the same network as the load balancer (EC2-Classic or the same VPC). If you have EC2-Classic instances and a load balancer in a VPC with ClassicLink enabled, you can link the EC2-Classic instances to that VPC and then register the linked EC2-Classic instances with the load balancer in the VPC.

    Note that RegisterInstanceWithLoadBalancer completes when the request has been registered. Instance registration takes a little time to complete. To check the state of the registered instances, use DescribeLoadBalancers or DescribeInstanceHealth.

    After the instance is registered, it starts receiving traffic and requests from the load balancer. Any instance that is not in one of the Availability Zones registered for the load balancer is moved to the OutOfService state. If an Availability Zone is added to the load balancer later, any instances registered with the load balancer move to the InService state.

    To deregister instances from a load balancer, use DeregisterInstancesFromLoadBalancer.

    For more information, see Register or De-Register EC2 Instances in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingRegisterEndPointsInput

    See

    AWSElasticLoadBalancingRegisterEndPointsOutput

    Declaration

    Objective-C

    - (void)registerInstancesWithLoadBalancer:
                (nonnull AWSElasticLoadBalancingRegisterEndPointsInput *)request
                            completionHandler:
                                (void (^_Nullable)(
                                    AWSElasticLoadBalancingRegisterEndPointsOutput
                                        *_Nullable,
                                    NSError *_Nullable))completionHandler;

    Swift

    func registerInstances(withLoadBalancer request: AWSElasticLoadBalancingRegisterEndPointsInput, completionHandler: ((AWSElasticLoadBalancingRegisterEndPointsOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the RegisterInstancesWithLoadBalancer service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorInvalidEndPoint.

  • Removes one or more tags from the specified load balancer.

    See

    AWSElasticLoadBalancingRemoveTagsInput

    See

    AWSElasticLoadBalancingRemoveTagsOutput

    Declaration

    Objective-C

    - (id)removeTags:(nonnull AWSElasticLoadBalancingRemoveTagsInput *)request;

    Swift

    func removeTags(_ request: AWSElasticLoadBalancingRemoveTagsInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the RemoveTags service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingRemoveTagsOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound.

  • Removes one or more tags from the specified load balancer.

    See

    AWSElasticLoadBalancingRemoveTagsInput

    See

    AWSElasticLoadBalancingRemoveTagsOutput

    Declaration

    Objective-C

    - (void)removeTags:(nonnull AWSElasticLoadBalancingRemoveTagsInput *)request
        completionHandler:
            (void (^_Nullable)(AWSElasticLoadBalancingRemoveTagsOutput *_Nullable,
                               NSError *_Nullable))completionHandler;

    Swift

    func removeTags(_ request: AWSElasticLoadBalancingRemoveTagsInput, completionHandler: ((AWSElasticLoadBalancingRemoveTagsOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the RemoveTags service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound.

  • Sets the certificate that terminates the specified listener’s SSL connections. The specified certificate replaces any prior certificate that was used on the same load balancer and port.

    For more information about updating your SSL certificate, see Replace the SSL Certificate for Your Load Balancer in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingSetLoadBalancerListenerSSLCertificateInput

    See

    AWSElasticLoadBalancingSetLoadBalancerListenerSSLCertificateOutput

    Declaration

    Objective-C

    - (id)setLoadBalancerListenerSSLCertificate:
        (nonnull AWSElasticLoadBalancingSetLoadBalancerListenerSSLCertificateInput
             *)request;

    Swift

    func setLoadBalancerListenerSSLCertificate(_ request: AWSElasticLoadBalancingSetLoadBalancerListenerSSLCertificateInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the SetLoadBalancerListenerSSLCertificate service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingSetLoadBalancerListenerSSLCertificateOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorCertificateNotFound, AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorListenerNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest, AWSElasticLoadBalancingErrorUnsupportedProtocol.

  • Sets the certificate that terminates the specified listener’s SSL connections. The specified certificate replaces any prior certificate that was used on the same load balancer and port.

    For more information about updating your SSL certificate, see Replace the SSL Certificate for Your Load Balancer in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingSetLoadBalancerListenerSSLCertificateInput

    See

    AWSElasticLoadBalancingSetLoadBalancerListenerSSLCertificateOutput

    Declaration

    Objective-C

    - (void)
        setLoadBalancerListenerSSLCertificate:
            (nonnull
                 AWSElasticLoadBalancingSetLoadBalancerListenerSSLCertificateInput
                     *)request
                            completionHandler:
                                (void (^_Nullable)(
                                    AWSElasticLoadBalancingSetLoadBalancerListenerSSLCertificateOutput
                                        *_Nullable,
                                    NSError *_Nullable))completionHandler;

    Swift

    func setLoadBalancerListenerSSLCertificate(_ request: AWSElasticLoadBalancingSetLoadBalancerListenerSSLCertificateInput, completionHandler: ((AWSElasticLoadBalancingSetLoadBalancerListenerSSLCertificateOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the SetLoadBalancerListenerSSLCertificate service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorCertificateNotFound, AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorListenerNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest, AWSElasticLoadBalancingErrorUnsupportedProtocol.

  • Replaces the set of policies associated with the specified port on which the EC2 instance is listening with a new set of policies. At this time, only the back-end server authentication policy type can be applied to the instance ports; this policy type is composed of multiple public key policies.

    Each time you use SetLoadBalancerPoliciesForBackendServer to enable the policies, use the PolicyNames parameter to list the policies that you want to enable.

    You can use DescribeLoadBalancers or DescribeLoadBalancerPolicies to verify that the policy is associated with the EC2 instance.

    For more information about enabling back-end instance authentication, see Configure Back-end Instance Authentication in the Classic Load Balancers Guide. For more information about Proxy Protocol, see Configure Proxy Protocol Support in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingSetLoadBalancerPoliciesForBackendServerInput

    See

    AWSElasticLoadBalancingSetLoadBalancerPoliciesForBackendServerOutput

    Declaration

    Objective-C

    - (id)setLoadBalancerPoliciesForBackendServer:
        (nonnull AWSElasticLoadBalancingSetLoadBalancerPoliciesForBackendServerInput
             *)request;

    Swift

    func setLoadBalancerPoliciesForBackendServer(_ request: AWSElasticLoadBalancingSetLoadBalancerPoliciesForBackendServerInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the SetLoadBalancerPoliciesForBackendServer service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingSetLoadBalancerPoliciesForBackendServerOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorPolicyNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Replaces the set of policies associated with the specified port on which the EC2 instance is listening with a new set of policies. At this time, only the back-end server authentication policy type can be applied to the instance ports; this policy type is composed of multiple public key policies.

    Each time you use SetLoadBalancerPoliciesForBackendServer to enable the policies, use the PolicyNames parameter to list the policies that you want to enable.

    You can use DescribeLoadBalancers or DescribeLoadBalancerPolicies to verify that the policy is associated with the EC2 instance.

    For more information about enabling back-end instance authentication, see Configure Back-end Instance Authentication in the Classic Load Balancers Guide. For more information about Proxy Protocol, see Configure Proxy Protocol Support in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingSetLoadBalancerPoliciesForBackendServerInput

    See

    AWSElasticLoadBalancingSetLoadBalancerPoliciesForBackendServerOutput

    Declaration

    Objective-C

    - (void)
        setLoadBalancerPoliciesForBackendServer:
            (nonnull
                 AWSElasticLoadBalancingSetLoadBalancerPoliciesForBackendServerInput
                     *)request
                              completionHandler:
                                  (void (^_Nullable)(
                                      AWSElasticLoadBalancingSetLoadBalancerPoliciesForBackendServerOutput
                                          *_Nullable,
                                      NSError *_Nullable))completionHandler;

    Swift

    func setLoadBalancerPoliciesForBackendServer(_ request: AWSElasticLoadBalancingSetLoadBalancerPoliciesForBackendServerInput, completionHandler: ((AWSElasticLoadBalancingSetLoadBalancerPoliciesForBackendServerOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the SetLoadBalancerPoliciesForBackendServer service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorPolicyNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Replaces the current set of policies for the specified load balancer port with the specified set of policies.

    To enable back-end server authentication, use SetLoadBalancerPoliciesForBackendServer.

    For more information about setting policies, see Update the SSL Negotiation Configuration, Duration-Based Session Stickiness, and Application-Controlled Session Stickiness in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingSetLoadBalancerPoliciesOfListenerInput

    See

    AWSElasticLoadBalancingSetLoadBalancerPoliciesOfListenerOutput

    Declaration

    Objective-C

    - (id)setLoadBalancerPoliciesOfListener:
        (nonnull AWSElasticLoadBalancingSetLoadBalancerPoliciesOfListenerInput *)
            request;

    Swift

    func setLoadBalancerPoliciesOfListener(_ request: AWSElasticLoadBalancingSetLoadBalancerPoliciesOfListenerInput) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the SetLoadBalancerPoliciesOfListener service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSElasticLoadBalancingSetLoadBalancerPoliciesOfListenerOutput. On failed execution, task.error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorPolicyNotFound, AWSElasticLoadBalancingErrorListenerNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.

  • Replaces the current set of policies for the specified load balancer port with the specified set of policies.

    To enable back-end server authentication, use SetLoadBalancerPoliciesForBackendServer.

    For more information about setting policies, see Update the SSL Negotiation Configuration, Duration-Based Session Stickiness, and Application-Controlled Session Stickiness in the Classic Load Balancers Guide.

    See

    AWSElasticLoadBalancingSetLoadBalancerPoliciesOfListenerInput

    See

    AWSElasticLoadBalancingSetLoadBalancerPoliciesOfListenerOutput

    Declaration

    Objective-C

    - (void)
        setLoadBalancerPoliciesOfListener:
            (nonnull AWSElasticLoadBalancingSetLoadBalancerPoliciesOfListenerInput
                 *)request
                        completionHandler:
                            (void (^_Nullable)(
                                AWSElasticLoadBalancingSetLoadBalancerPoliciesOfListenerOutput
                                    *_Nullable,
                                NSError *_Nullable))completionHandler;

    Swift

    func setLoadBalancerPoliciesOfListener(_ request: AWSElasticLoadBalancingSetLoadBalancerPoliciesOfListenerInput, completionHandler: ((AWSElasticLoadBalancingSetLoadBalancerPoliciesOfListenerOutput?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the SetLoadBalancerPoliciesOfListener service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSElasticLoadBalancingErrorDomain domain and the following error code: AWSElasticLoadBalancingErrorAccessPointNotFound, AWSElasticLoadBalancingErrorPolicyNotFound, AWSElasticLoadBalancingErrorListenerNotFound, AWSElasticLoadBalancingErrorInvalidConfigurationRequest.