AWSAutoScaling Class Reference

Inherits from AWSService : NSObject
Declared in AWSAutoScalingService.h
AWSAutoScalingService.m

Overview

Auto Scaling

Auto Scaling is designed to automatically launch or terminate EC2 instances based on user-defined policies, schedules, and health checks. Use this service in conjunction with the Amazon CloudWatch and Elastic Load Balancing services.

  configuration

The service configuration used to instantiate this service client.

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

Discussion

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

Declared In

AWSAutoScalingService.h

+ defaultAutoScaling

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.

+ (instancetype)defaultAutoScaling

Return Value

The default service client.

Discussion

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 AutoScaling = AWSAutoScaling.default()

Objective-C

 AWSAutoScaling *AutoScaling = [AWSAutoScaling defaultAutoScaling];

Declared In

AWSAutoScalingService.h

+ registerAutoScalingWithConfiguration:forKey:

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

+ (void)registerAutoScalingWithConfiguration:(AWSServiceConfiguration *)configuration forKey:(NSString *)key

Parameters

configuration

A service configuration object.

key

A string to identify the service client.

Discussion

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)
    AWSAutoScaling.register(with: configuration!, forKey: "USWest2AutoScaling")

    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];

     [AWSAutoScaling registerAutoScalingWithConfiguration:configuration forKey:@"USWest2AutoScaling"];

     return YES;
 }

Then call the following to get the service client:

Swift

 let AutoScaling = AWSAutoScaling(forKey: "USWest2AutoScaling")

Objective-C

 AWSAutoScaling *AutoScaling = [AWSAutoScaling AutoScalingForKey:@"USWest2AutoScaling"];

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

Declared In

AWSAutoScalingService.h

+ AutoScalingForKey:

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

+ (instancetype)AutoScalingForKey:(NSString *)key

Parameters

key

A string to identify the service client.

Return Value

An instance of the service client.

Discussion

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)
    AWSAutoScaling.register(with: configuration!, forKey: "USWest2AutoScaling")

    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];

     [AWSAutoScaling registerAutoScalingWithConfiguration:configuration forKey:@"USWest2AutoScaling"];

     return YES;
 }

Then call the following to get the service client:

Swift

 let AutoScaling = AWSAutoScaling(forKey: "USWest2AutoScaling")

Objective-C

 AWSAutoScaling *AutoScaling = [AWSAutoScaling AutoScalingForKey:@"USWest2AutoScaling"];

Declared In

AWSAutoScalingService.h

+ removeAutoScalingForKey:

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

+ (void)removeAutoScalingForKey:(NSString *)key

Parameters

key

A string to identify the service client.

Discussion

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

Declared In

AWSAutoScalingService.h

– attachInstances:

Attaches one or more EC2 instances to the specified Auto Scaling group.

When you attach instances, Auto Scaling increases the desired capacity of the group by the number of instances being attached. If the number of instances being attached plus the desired capacity of the group exceeds the maximum size of the group, the operation fails.

If there is a Classic load balancer attached to your Auto Scaling group, the instances are also registered with the load balancer. If there are target groups attached to your Auto Scaling group, the instances are also registered with the target groups.

For more information, see Attach EC2 Instances to Your Auto Scaling Group in the Auto Scaling User Guide.

- (AWSTask *)attachInstances:(AWSAutoScalingAttachInstancesQuery *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– attachInstances:completionHandler:

Attaches one or more EC2 instances to the specified Auto Scaling group.

When you attach instances, Auto Scaling increases the desired capacity of the group by the number of instances being attached. If the number of instances being attached plus the desired capacity of the group exceeds the maximum size of the group, the operation fails.

If there is a Classic load balancer attached to your Auto Scaling group, the instances are also registered with the load balancer. If there are target groups attached to your Auto Scaling group, the instances are also registered with the target groups.

For more information, see Attach EC2 Instances to Your Auto Scaling Group in the Auto Scaling User Guide.

- (void)attachInstances:(AWSAutoScalingAttachInstancesQuery *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– attachLoadBalancerTargetGroups:

Attaches one or more target groups to the specified Auto Scaling group.

To describe the target groups for an Auto Scaling group, use DescribeLoadBalancerTargetGroups. To detach the target group from the Auto Scaling group, use DetachLoadBalancerTargetGroups.

For more information, see Attach a Load Balancer to Your Auto Scaling Group in the Auto Scaling User Guide.

- (AWSTask<AWSAutoScalingAttachLoadBalancerTargetGroupsResultType*> *)attachLoadBalancerTargetGroups:(AWSAutoScalingAttachLoadBalancerTargetGroupsType *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– attachLoadBalancerTargetGroups:completionHandler:

Attaches one or more target groups to the specified Auto Scaling group.

To describe the target groups for an Auto Scaling group, use DescribeLoadBalancerTargetGroups. To detach the target group from the Auto Scaling group, use DetachLoadBalancerTargetGroups.

For more information, see Attach a Load Balancer to Your Auto Scaling Group in the Auto Scaling User Guide.

- (void)attachLoadBalancerTargetGroups:(AWSAutoScalingAttachLoadBalancerTargetGroupsType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingAttachLoadBalancerTargetGroupsResultType *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the AttachLoadBalancerTargetGroups 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– attachLoadBalancers:

Attaches one or more Classic load balancers to the specified Auto Scaling group.

To attach an Application load balancer instead, see AttachLoadBalancerTargetGroups.

To describe the load balancers for an Auto Scaling group, use DescribeLoadBalancers. To detach the load balancer from the Auto Scaling group, use DetachLoadBalancers.

For more information, see Attach a Load Balancer to Your Auto Scaling Group in the Auto Scaling User Guide.

- (AWSTask<AWSAutoScalingAttachLoadBalancersResultType*> *)attachLoadBalancers:(AWSAutoScalingAttachLoadBalancersType *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– attachLoadBalancers:completionHandler:

Attaches one or more Classic load balancers to the specified Auto Scaling group.

To attach an Application load balancer instead, see AttachLoadBalancerTargetGroups.

To describe the load balancers for an Auto Scaling group, use DescribeLoadBalancers. To detach the load balancer from the Auto Scaling group, use DetachLoadBalancers.

For more information, see Attach a Load Balancer to Your Auto Scaling Group in the Auto Scaling User Guide.

- (void)attachLoadBalancers:(AWSAutoScalingAttachLoadBalancersType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingAttachLoadBalancersResultType *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the AttachLoadBalancers 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– completeLifecycleAction:

Completes the lifecycle action for the specified token or instance with the specified result.

This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:

  1. (Optional) Create a Lambda function and a rule that allows CloudWatch Events to invoke your Lambda function when Auto Scaling launches or terminates instances.

  2. (Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue or an Amazon SNS topic. The role allows Auto Scaling to publish lifecycle notifications to the target.

  3. Create the lifecycle hook. Specify whether the hook is used when the instances launch or terminate.

  4. If you need more time, record the lifecycle action heartbeat to keep the instance in a pending state.

  5. If you finish before the timeout period ends, complete the lifecycle action.

For more information, see Auto Scaling Lifecycle in the Auto Scaling User Guide.

- (AWSTask<AWSAutoScalingCompleteLifecycleActionAnswer*> *)completeLifecycleAction:(AWSAutoScalingCompleteLifecycleActionType *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– completeLifecycleAction:completionHandler:

Completes the lifecycle action for the specified token or instance with the specified result.

This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:

  1. (Optional) Create a Lambda function and a rule that allows CloudWatch Events to invoke your Lambda function when Auto Scaling launches or terminates instances.

  2. (Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue or an Amazon SNS topic. The role allows Auto Scaling to publish lifecycle notifications to the target.

  3. Create the lifecycle hook. Specify whether the hook is used when the instances launch or terminate.

  4. If you need more time, record the lifecycle action heartbeat to keep the instance in a pending state.

  5. If you finish before the timeout period ends, complete the lifecycle action.

For more information, see Auto Scaling Lifecycle in the Auto Scaling User Guide.

- (void)completeLifecycleAction:(AWSAutoScalingCompleteLifecycleActionType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingCompleteLifecycleActionAnswer *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the CompleteLifecycleAction 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– createAutoScalingGroup:

Creates an Auto Scaling group with the specified name and attributes.

If you exceed your maximum limit of Auto Scaling groups, which by default is 20 per region, the call fails. For information about viewing and updating this limit, see DescribeAccountLimits.

For more information, see Auto Scaling Groups in the Auto Scaling User Guide.

- (AWSTask *)createAutoScalingGroup:(AWSAutoScalingCreateAutoScalingGroupType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorAlreadyExists, AWSAutoScalingErrorLimitExceeded, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– createAutoScalingGroup:completionHandler:

Creates an Auto Scaling group with the specified name and attributes.

If you exceed your maximum limit of Auto Scaling groups, which by default is 20 per region, the call fails. For information about viewing and updating this limit, see DescribeAccountLimits.

For more information, see Auto Scaling Groups in the Auto Scaling User Guide.

- (void)createAutoScalingGroup:(AWSAutoScalingCreateAutoScalingGroupType *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorAlreadyExists, AWSAutoScalingErrorLimitExceeded, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– createLaunchConfiguration:

Creates a launch configuration.

If you exceed your maximum limit of launch configurations, which by default is 100 per region, the call fails. For information about viewing and updating this limit, see DescribeAccountLimits.

For more information, see Launch Configurations in the Auto Scaling User Guide.

- (AWSTask *)createLaunchConfiguration:(AWSAutoScalingCreateLaunchConfigurationType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorAlreadyExists, AWSAutoScalingErrorLimitExceeded, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– createLaunchConfiguration:completionHandler:

Creates a launch configuration.

If you exceed your maximum limit of launch configurations, which by default is 100 per region, the call fails. For information about viewing and updating this limit, see DescribeAccountLimits.

For more information, see Launch Configurations in the Auto Scaling User Guide.

- (void)createLaunchConfiguration:(AWSAutoScalingCreateLaunchConfigurationType *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorAlreadyExists, AWSAutoScalingErrorLimitExceeded, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– createOrUpdateTags:

Creates or updates tags for the specified Auto Scaling group.

When you specify a tag with a key that already exists, the operation overwrites the previous tag definition, and you do not get an error message.

For more information, see Tagging Auto Scaling Groups and Instances in the Auto Scaling User Guide.

- (AWSTask *)createOrUpdateTags:(AWSAutoScalingCreateOrUpdateTagsType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorLimitExceeded, AWSAutoScalingErrorAlreadyExists, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– createOrUpdateTags:completionHandler:

Creates or updates tags for the specified Auto Scaling group.

When you specify a tag with a key that already exists, the operation overwrites the previous tag definition, and you do not get an error message.

For more information, see Tagging Auto Scaling Groups and Instances in the Auto Scaling User Guide.

- (void)createOrUpdateTags:(AWSAutoScalingCreateOrUpdateTagsType *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorLimitExceeded, AWSAutoScalingErrorAlreadyExists, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– deleteAutoScalingGroup:

Deletes the specified Auto Scaling group.

If the group has instances or scaling activities in progress, you must specify the option to force the deletion in order for it to succeed.

If the group has policies, deleting the group deletes the policies, the underlying alarm actions, and any alarm that no longer has an associated action.

To remove instances from the Auto Scaling group before deleting it, call DetachInstances with the list of instances and the option to decrement the desired capacity so that Auto Scaling does not launch replacement instances.

To terminate all instances before deleting the Auto Scaling group, call UpdateAutoScalingGroup and set the minimum size and desired capacity of the Auto Scaling group to zero.

- (AWSTask *)deleteAutoScalingGroup:(AWSAutoScalingDeleteAutoScalingGroupType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorScalingActivityInProgress, AWSAutoScalingErrorResourceInUse, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– deleteAutoScalingGroup:completionHandler:

Deletes the specified Auto Scaling group.

If the group has instances or scaling activities in progress, you must specify the option to force the deletion in order for it to succeed.

If the group has policies, deleting the group deletes the policies, the underlying alarm actions, and any alarm that no longer has an associated action.

To remove instances from the Auto Scaling group before deleting it, call DetachInstances with the list of instances and the option to decrement the desired capacity so that Auto Scaling does not launch replacement instances.

To terminate all instances before deleting the Auto Scaling group, call UpdateAutoScalingGroup and set the minimum size and desired capacity of the Auto Scaling group to zero.

- (void)deleteAutoScalingGroup:(AWSAutoScalingDeleteAutoScalingGroupType *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorScalingActivityInProgress, AWSAutoScalingErrorResourceInUse, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– deleteLaunchConfiguration:

Deletes the specified launch configuration.

The launch configuration must not be attached to an Auto Scaling group. When this call completes, the launch configuration is no longer available for use.

- (AWSTask *)deleteLaunchConfiguration:(AWSAutoScalingLaunchConfigurationNameType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceInUse, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– deleteLaunchConfiguration:completionHandler:

Deletes the specified launch configuration.

The launch configuration must not be attached to an Auto Scaling group. When this call completes, the launch configuration is no longer available for use.

- (void)deleteLaunchConfiguration:(AWSAutoScalingLaunchConfigurationNameType *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceInUse, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– deleteLifecycleHook:

Deletes the specified lifecycle hook.

If there are any outstanding lifecycle actions, they are completed first (ABANDON for launching instances, CONTINUE for terminating instances).

- (AWSTask<AWSAutoScalingDeleteLifecycleHookAnswer*> *)deleteLifecycleHook:(AWSAutoScalingDeleteLifecycleHookType *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– deleteLifecycleHook:completionHandler:

Deletes the specified lifecycle hook.

If there are any outstanding lifecycle actions, they are completed first (ABANDON for launching instances, CONTINUE for terminating instances).

- (void)deleteLifecycleHook:(AWSAutoScalingDeleteLifecycleHookType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingDeleteLifecycleHookAnswer *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DeleteLifecycleHook 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– deleteNotificationConfiguration:

Deletes the specified notification.

- (AWSTask *)deleteNotificationConfiguration:(AWSAutoScalingDeleteNotificationConfigurationType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– deleteNotificationConfiguration:completionHandler:

Deletes the specified notification.

- (void)deleteNotificationConfiguration:(AWSAutoScalingDeleteNotificationConfigurationType *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– deletePolicy:

Deletes the specified Auto Scaling policy.

Deleting a policy deletes the underlying alarm action, but does not delete the alarm, even if it no longer has an associated action.

- (AWSTask *)deletePolicy:(AWSAutoScalingDeletePolicyType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– deletePolicy:completionHandler:

Deletes the specified Auto Scaling policy.

Deleting a policy deletes the underlying alarm action, but does not delete the alarm, even if it no longer has an associated action.

- (void)deletePolicy:(AWSAutoScalingDeletePolicyType *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– deleteScheduledAction:

Deletes the specified scheduled action.

- (AWSTask *)deleteScheduledAction:(AWSAutoScalingDeleteScheduledActionType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– deleteScheduledAction:completionHandler:

Deletes the specified scheduled action.

- (void)deleteScheduledAction:(AWSAutoScalingDeleteScheduledActionType *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– deleteTags:

Deletes the specified tags.

- (AWSTask *)deleteTags:(AWSAutoScalingDeleteTagsType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– deleteTags:completionHandler:

Deletes the specified tags.

- (void)deleteTags:(AWSAutoScalingDeleteTagsType *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeAccountLimits:

Describes the current Auto Scaling resource limits for your AWS account.

For information about requesting an increase in these limits, see AWS Service Limits in the Amazon Web Services General Reference.

- (AWSTask<AWSAutoScalingDescribeAccountLimitsAnswer*> *)describeAccountLimits:(AWSRequest *)request

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 AWSAutoScalingDescribeAccountLimitsAnswer. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeAccountLimits:completionHandler:

Describes the current Auto Scaling resource limits for your AWS account.

For information about requesting an increase in these limits, see AWS Service Limits in the Amazon Web Services General Reference.

- (void)describeAccountLimits:(AWSRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingDescribeAccountLimitsAnswer *_Nullable response , NSError *_Nullable error ))completionHandler

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. On failed execution, error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeAdjustmentTypes:

Describes the policy adjustment types for use with PutScalingPolicy.

- (AWSTask<AWSAutoScalingDescribeAdjustmentTypesAnswer*> *)describeAdjustmentTypes:(AWSRequest *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– describeAdjustmentTypes:completionHandler:

Describes the policy adjustment types for use with PutScalingPolicy.

- (void)describeAdjustmentTypes:(AWSRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingDescribeAdjustmentTypesAnswer *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeAdjustmentTypes 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeAutoScalingGroups:

Describes one or more Auto Scaling groups.

- (AWSTask<AWSAutoScalingAutoScalingGroupsType*> *)describeAutoScalingGroups:(AWSAutoScalingAutoScalingGroupNamesType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSAutoScalingAutoScalingGroupsType. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorInvalidNextToken, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeAutoScalingGroups:completionHandler:

Describes one or more Auto Scaling groups.

- (void)describeAutoScalingGroups:(AWSAutoScalingAutoScalingGroupNamesType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingAutoScalingGroupsType *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeAutoScalingGroups 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorInvalidNextToken, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeAutoScalingInstances:

Describes one or more Auto Scaling instances.

- (AWSTask<AWSAutoScalingAutoScalingInstancesType*> *)describeAutoScalingInstances:(AWSAutoScalingDescribeAutoScalingInstancesType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSAutoScalingAutoScalingInstancesType. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorInvalidNextToken, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeAutoScalingInstances:completionHandler:

Describes one or more Auto Scaling instances.

- (void)describeAutoScalingInstances:(AWSAutoScalingDescribeAutoScalingInstancesType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingAutoScalingInstancesType *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeAutoScalingInstances 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorInvalidNextToken, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeAutoScalingNotificationTypes:

Describes the notification types that are supported by Auto Scaling.

- (AWSTask<AWSAutoScalingDescribeAutoScalingNotificationTypesAnswer*> *)describeAutoScalingNotificationTypes:(AWSRequest *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– describeAutoScalingNotificationTypes:completionHandler:

Describes the notification types that are supported by Auto Scaling.

- (void)describeAutoScalingNotificationTypes:(AWSRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingDescribeAutoScalingNotificationTypesAnswer *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeAutoScalingNotificationTypes 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeLaunchConfigurations:

Describes one or more launch configurations.

- (AWSTask<AWSAutoScalingLaunchConfigurationsType*> *)describeLaunchConfigurations:(AWSAutoScalingLaunchConfigurationNamesType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSAutoScalingLaunchConfigurationsType. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorInvalidNextToken, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeLaunchConfigurations:completionHandler:

Describes one or more launch configurations.

- (void)describeLaunchConfigurations:(AWSAutoScalingLaunchConfigurationNamesType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingLaunchConfigurationsType *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeLaunchConfigurations 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorInvalidNextToken, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeLifecycleHookTypes:

Describes the available types of lifecycle hooks.

- (AWSTask<AWSAutoScalingDescribeLifecycleHookTypesAnswer*> *)describeLifecycleHookTypes:(AWSRequest *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– describeLifecycleHookTypes:completionHandler:

Describes the available types of lifecycle hooks.

- (void)describeLifecycleHookTypes:(AWSRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingDescribeLifecycleHookTypesAnswer *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeLifecycleHookTypes 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeLifecycleHooks:

Describes the lifecycle hooks for the specified Auto Scaling group.

- (AWSTask<AWSAutoScalingDescribeLifecycleHooksAnswer*> *)describeLifecycleHooks:(AWSAutoScalingDescribeLifecycleHooksType *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– describeLifecycleHooks:completionHandler:

Describes the lifecycle hooks for the specified Auto Scaling group.

- (void)describeLifecycleHooks:(AWSAutoScalingDescribeLifecycleHooksType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingDescribeLifecycleHooksAnswer *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeLifecycleHooks 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeLoadBalancerTargetGroups:

Describes the target groups for the specified Auto Scaling group.

- (AWSTask<AWSAutoScalingDescribeLoadBalancerTargetGroupsResponse*> *)describeLoadBalancerTargetGroups:(AWSAutoScalingDescribeLoadBalancerTargetGroupsRequest *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– describeLoadBalancerTargetGroups:completionHandler:

Describes the target groups for the specified Auto Scaling group.

- (void)describeLoadBalancerTargetGroups:(AWSAutoScalingDescribeLoadBalancerTargetGroupsRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingDescribeLoadBalancerTargetGroupsResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeLoadBalancerTargetGroups 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeLoadBalancers:

Describes the load balancers for the specified Auto Scaling group.

Note that this operation describes only Classic load balancers. If you have Application load balancers, use DescribeLoadBalancerTargetGroups instead.

- (AWSTask<AWSAutoScalingDescribeLoadBalancersResponse*> *)describeLoadBalancers:(AWSAutoScalingDescribeLoadBalancersRequest *)request

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 AWSAutoScalingDescribeLoadBalancersResponse. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeLoadBalancers:completionHandler:

Describes the load balancers for the specified Auto Scaling group.

Note that this operation describes only Classic load balancers. If you have Application load balancers, use DescribeLoadBalancerTargetGroups instead.

- (void)describeLoadBalancers:(AWSAutoScalingDescribeLoadBalancersRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingDescribeLoadBalancersResponse *_Nullable response , NSError *_Nullable error ))completionHandler

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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeMetricCollectionTypes:

Describes the available CloudWatch metrics for Auto Scaling.

Note that the GroupStandbyInstances metric is not returned by default. You must explicitly request this metric when calling EnableMetricsCollection.

- (AWSTask<AWSAutoScalingDescribeMetricCollectionTypesAnswer*> *)describeMetricCollectionTypes:(AWSRequest *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– describeMetricCollectionTypes:completionHandler:

Describes the available CloudWatch metrics for Auto Scaling.

Note that the GroupStandbyInstances metric is not returned by default. You must explicitly request this metric when calling EnableMetricsCollection.

- (void)describeMetricCollectionTypes:(AWSRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingDescribeMetricCollectionTypesAnswer *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeMetricCollectionTypes 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeNotificationConfigurations:

Describes the notification actions associated with the specified Auto Scaling group.

- (AWSTask<AWSAutoScalingDescribeNotificationConfigurationsAnswer*> *)describeNotificationConfigurations:(AWSAutoScalingDescribeNotificationConfigurationsType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSAutoScalingDescribeNotificationConfigurationsAnswer. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorInvalidNextToken, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeNotificationConfigurations:completionHandler:

Describes the notification actions associated with the specified Auto Scaling group.

- (void)describeNotificationConfigurations:(AWSAutoScalingDescribeNotificationConfigurationsType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingDescribeNotificationConfigurationsAnswer *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeNotificationConfigurations 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorInvalidNextToken, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describePolicies:

Describes the policies for the specified Auto Scaling group.

- (AWSTask<AWSAutoScalingPoliciesType*> *)describePolicies:(AWSAutoScalingDescribePoliciesType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSAutoScalingPoliciesType. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorInvalidNextToken, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describePolicies:completionHandler:

Describes the policies for the specified Auto Scaling group.

- (void)describePolicies:(AWSAutoScalingDescribePoliciesType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingPoliciesType *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribePolicies 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorInvalidNextToken, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeScalingActivities:

Describes one or more scaling activities for the specified Auto Scaling group.

- (AWSTask<AWSAutoScalingActivitiesType*> *)describeScalingActivities:(AWSAutoScalingDescribeScalingActivitiesType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSAutoScalingActivitiesType. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorInvalidNextToken, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeScalingActivities:completionHandler:

Describes one or more scaling activities for the specified Auto Scaling group.

- (void)describeScalingActivities:(AWSAutoScalingDescribeScalingActivitiesType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingActivitiesType *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeScalingActivities 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorInvalidNextToken, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeScalingProcessTypes:

Describes the scaling process types for use with ResumeProcesses and SuspendProcesses.

- (AWSTask<AWSAutoScalingProcessesType*> *)describeScalingProcessTypes:(AWSRequest *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– describeScalingProcessTypes:completionHandler:

Describes the scaling process types for use with ResumeProcesses and SuspendProcesses.

- (void)describeScalingProcessTypes:(AWSRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingProcessesType *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeScalingProcessTypes 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeScheduledActions:

Describes the actions scheduled for your Auto Scaling group that haven't run. To describe the actions that have already run, use DescribeScalingActivities.

- (AWSTask<AWSAutoScalingScheduledActionsType*> *)describeScheduledActions:(AWSAutoScalingDescribeScheduledActionsType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSAutoScalingScheduledActionsType. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorInvalidNextToken, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeScheduledActions:completionHandler:

Describes the actions scheduled for your Auto Scaling group that haven't run. To describe the actions that have already run, use DescribeScalingActivities.

- (void)describeScheduledActions:(AWSAutoScalingDescribeScheduledActionsType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingScheduledActionsType *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeScheduledActions 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorInvalidNextToken, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeTags:

Describes the specified tags.

You can use filters to limit the results. For example, you can query for the tags for a specific Auto Scaling group. You can specify multiple values for a filter. A tag must match at least one of the specified values for it to be included in the results.

You can also specify multiple filters. The result includes information for a particular tag only if it matches all the filters. If there's no match, no special message is returned.

- (AWSTask<AWSAutoScalingTagsType*> *)describeTags:(AWSAutoScalingDescribeTagsType *)request

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 AWSAutoScalingTagsType. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorInvalidNextToken, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeTags:completionHandler:

Describes the specified tags.

You can use filters to limit the results. For example, you can query for the tags for a specific Auto Scaling group. You can specify multiple values for a filter. A tag must match at least one of the specified values for it to be included in the results.

You can also specify multiple filters. The result includes information for a particular tag only if it matches all the filters. If there's no match, no special message is returned.

- (void)describeTags:(AWSAutoScalingDescribeTagsType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingTagsType *_Nullable response , NSError *_Nullable error ))completionHandler

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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorInvalidNextToken, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– describeTerminationPolicyTypes:

Describes the termination policies supported by Auto Scaling.

- (AWSTask<AWSAutoScalingDescribeTerminationPolicyTypesAnswer*> *)describeTerminationPolicyTypes:(AWSRequest *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– describeTerminationPolicyTypes:completionHandler:

Describes the termination policies supported by Auto Scaling.

- (void)describeTerminationPolicyTypes:(AWSRequest *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingDescribeTerminationPolicyTypesAnswer *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DescribeTerminationPolicyTypes 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– detachInstances:

Removes one or more instances from the specified Auto Scaling group.

After the instances are detached, you can manage them independently from the rest of the Auto Scaling group.

If you do not specify the option to decrement the desired capacity, Auto Scaling launches instances to replace the ones that are detached.

If there is a Classic load balancer attached to the Auto Scaling group, the instances are deregistered from the load balancer. If there are target groups attached to the Auto Scaling group, the instances are deregistered from the target groups.

For more information, see Detach EC2 Instances from Your Auto Scaling Group in the Auto Scaling User Guide.

- (AWSTask<AWSAutoScalingDetachInstancesAnswer*> *)detachInstances:(AWSAutoScalingDetachInstancesQuery *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– detachInstances:completionHandler:

Removes one or more instances from the specified Auto Scaling group.

After the instances are detached, you can manage them independently from the rest of the Auto Scaling group.

If you do not specify the option to decrement the desired capacity, Auto Scaling launches instances to replace the ones that are detached.

If there is a Classic load balancer attached to the Auto Scaling group, the instances are deregistered from the load balancer. If there are target groups attached to the Auto Scaling group, the instances are deregistered from the target groups.

For more information, see Detach EC2 Instances from Your Auto Scaling Group in the Auto Scaling User Guide.

- (void)detachInstances:(AWSAutoScalingDetachInstancesQuery *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingDetachInstancesAnswer *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DetachInstances 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– detachLoadBalancerTargetGroups:

Detaches one or more target groups from the specified Auto Scaling group.

- (AWSTask<AWSAutoScalingDetachLoadBalancerTargetGroupsResultType*> *)detachLoadBalancerTargetGroups:(AWSAutoScalingDetachLoadBalancerTargetGroupsType *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– detachLoadBalancerTargetGroups:completionHandler:

Detaches one or more target groups from the specified Auto Scaling group.

- (void)detachLoadBalancerTargetGroups:(AWSAutoScalingDetachLoadBalancerTargetGroupsType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingDetachLoadBalancerTargetGroupsResultType *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DetachLoadBalancerTargetGroups 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– detachLoadBalancers:

Detaches one or more Classic load balancers from the specified Auto Scaling group.

Note that this operation detaches only Classic load balancers. If you have Application load balancers, use DetachLoadBalancerTargetGroups instead.

When you detach a load balancer, it enters the Removing state while deregistering the instances in the group. When all instances are deregistered, then you can no longer describe the load balancer using DescribeLoadBalancers. Note that the instances remain running.

- (AWSTask<AWSAutoScalingDetachLoadBalancersResultType*> *)detachLoadBalancers:(AWSAutoScalingDetachLoadBalancersType *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– detachLoadBalancers:completionHandler:

Detaches one or more Classic load balancers from the specified Auto Scaling group.

Note that this operation detaches only Classic load balancers. If you have Application load balancers, use DetachLoadBalancerTargetGroups instead.

When you detach a load balancer, it enters the Removing state while deregistering the instances in the group. When all instances are deregistered, then you can no longer describe the load balancer using DescribeLoadBalancers. Note that the instances remain running.

- (void)detachLoadBalancers:(AWSAutoScalingDetachLoadBalancersType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingDetachLoadBalancersResultType *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DetachLoadBalancers 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– disableMetricsCollection:

Disables monitoring of the specified metrics for the specified Auto Scaling group.

- (AWSTask *)disableMetricsCollection:(AWSAutoScalingDisableMetricsCollectionQuery *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– disableMetricsCollection:completionHandler:

Disables monitoring of the specified metrics for the specified Auto Scaling group.

- (void)disableMetricsCollection:(AWSAutoScalingDisableMetricsCollectionQuery *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– enableMetricsCollection:

Enables monitoring of the specified metrics for the specified Auto Scaling group.

You can only enable metrics collection if InstanceMonitoring in the launch configuration for the group is set to True.

- (AWSTask *)enableMetricsCollection:(AWSAutoScalingEnableMetricsCollectionQuery *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– enableMetricsCollection:completionHandler:

Enables monitoring of the specified metrics for the specified Auto Scaling group.

You can only enable metrics collection if InstanceMonitoring in the launch configuration for the group is set to True.

- (void)enableMetricsCollection:(AWSAutoScalingEnableMetricsCollectionQuery *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– enterStandby:

Moves the specified instances into Standby mode.

For more information, see Auto Scaling Lifecycle in the Auto Scaling User Guide.

- (AWSTask<AWSAutoScalingEnterStandbyAnswer*> *)enterStandby:(AWSAutoScalingEnterStandbyQuery *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– enterStandby:completionHandler:

Moves the specified instances into Standby mode.

For more information, see Auto Scaling Lifecycle in the Auto Scaling User Guide.

- (void)enterStandby:(AWSAutoScalingEnterStandbyQuery *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingEnterStandbyAnswer *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the EnterStandby 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– executePolicy:

Executes the specified policy.

- (AWSTask *)executePolicy:(AWSAutoScalingExecutePolicyType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorScalingActivityInProgress, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– executePolicy:completionHandler:

Executes the specified policy.

- (void)executePolicy:(AWSAutoScalingExecutePolicyType *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorScalingActivityInProgress, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– exitStandby:

Moves the specified instances out of Standby mode.

For more information, see Auto Scaling Lifecycle in the Auto Scaling User Guide.

- (AWSTask<AWSAutoScalingExitStandbyAnswer*> *)exitStandby:(AWSAutoScalingExitStandbyQuery *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– exitStandby:completionHandler:

Moves the specified instances out of Standby mode.

For more information, see Auto Scaling Lifecycle in the Auto Scaling User Guide.

- (void)exitStandby:(AWSAutoScalingExitStandbyQuery *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingExitStandbyAnswer *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the ExitStandby 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– putLifecycleHook:

Creates or updates a lifecycle hook for the specified Auto Scaling Group.

A lifecycle hook tells Auto Scaling that you want to perform an action on an instance that is not actively in service; for example, either when the instance launches or before the instance terminates.

This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:

  1. (Optional) Create a Lambda function and a rule that allows CloudWatch Events to invoke your Lambda function when Auto Scaling launches or terminates instances.

  2. (Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue or an Amazon SNS topic. The role allows Auto Scaling to publish lifecycle notifications to the target.

  3. Create the lifecycle hook. Specify whether the hook is used when the instances launch or terminate.

  4. If you need more time, record the lifecycle action heartbeat to keep the instance in a pending state.

  5. If you finish before the timeout period ends, complete the lifecycle action.

For more information, see Auto Scaling Lifecycle in the Auto Scaling User Guide.

If you exceed your maximum limit of lifecycle hooks, which by default is 50 per Auto Scaling group, the call fails. For information about updating this limit, see AWS Service Limits in the Amazon Web Services General Reference.

- (AWSTask<AWSAutoScalingPutLifecycleHookAnswer*> *)putLifecycleHook:(AWSAutoScalingPutLifecycleHookType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSAutoScalingPutLifecycleHookAnswer. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorLimitExceeded, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– putLifecycleHook:completionHandler:

Creates or updates a lifecycle hook for the specified Auto Scaling Group.

A lifecycle hook tells Auto Scaling that you want to perform an action on an instance that is not actively in service; for example, either when the instance launches or before the instance terminates.

This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:

  1. (Optional) Create a Lambda function and a rule that allows CloudWatch Events to invoke your Lambda function when Auto Scaling launches or terminates instances.

  2. (Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue or an Amazon SNS topic. The role allows Auto Scaling to publish lifecycle notifications to the target.

  3. Create the lifecycle hook. Specify whether the hook is used when the instances launch or terminate.

  4. If you need more time, record the lifecycle action heartbeat to keep the instance in a pending state.

  5. If you finish before the timeout period ends, complete the lifecycle action.

For more information, see Auto Scaling Lifecycle in the Auto Scaling User Guide.

If you exceed your maximum limit of lifecycle hooks, which by default is 50 per Auto Scaling group, the call fails. For information about updating this limit, see AWS Service Limits in the Amazon Web Services General Reference.

- (void)putLifecycleHook:(AWSAutoScalingPutLifecycleHookType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingPutLifecycleHookAnswer *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the PutLifecycleHook 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorLimitExceeded, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– putNotificationConfiguration:

Configures an Auto Scaling group to send notifications when specified events take place. Subscribers to the specified topic can have messages delivered to an endpoint such as a web server or an email address.

This configuration overwrites any existing configuration.

For more information see Getting SNS Notifications When Your Auto Scaling Group Scales in the Auto Scaling User Guide.

- (AWSTask *)putNotificationConfiguration:(AWSAutoScalingPutNotificationConfigurationType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorLimitExceeded, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– putNotificationConfiguration:completionHandler:

Configures an Auto Scaling group to send notifications when specified events take place. Subscribers to the specified topic can have messages delivered to an endpoint such as a web server or an email address.

This configuration overwrites any existing configuration.

For more information see Getting SNS Notifications When Your Auto Scaling Group Scales in the Auto Scaling User Guide.

- (void)putNotificationConfiguration:(AWSAutoScalingPutNotificationConfigurationType *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorLimitExceeded, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– putScalingPolicy:

Creates or updates a policy for an Auto Scaling group. To update an existing policy, use the existing policy name and set the parameters you want to change. Any existing parameter not changed in an update to an existing policy is not changed in this update request.

If you exceed your maximum limit of step adjustments, which by default is 20 per region, the call fails. For information about updating this limit, see AWS Service Limits in the Amazon Web Services General Reference.

- (AWSTask<AWSAutoScalingPolicyARNType*> *)putScalingPolicy:(AWSAutoScalingPutScalingPolicyType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSAutoScalingPolicyARNType. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorLimitExceeded, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– putScalingPolicy:completionHandler:

Creates or updates a policy for an Auto Scaling group. To update an existing policy, use the existing policy name and set the parameters you want to change. Any existing parameter not changed in an update to an existing policy is not changed in this update request.

If you exceed your maximum limit of step adjustments, which by default is 20 per region, the call fails. For information about updating this limit, see AWS Service Limits in the Amazon Web Services General Reference.

- (void)putScalingPolicy:(AWSAutoScalingPutScalingPolicyType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingPolicyARNType *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the PutScalingPolicy 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorLimitExceeded, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– putScheduledUpdateGroupAction:

Creates or updates a scheduled scaling action for an Auto Scaling group. When updating a scheduled scaling action, if you leave a parameter unspecified, the corresponding value remains unchanged in the affected Auto Scaling group.

For more information, see Scheduled Scaling in the Auto Scaling User Guide.

- (AWSTask *)putScheduledUpdateGroupAction:(AWSAutoScalingPutScheduledUpdateGroupActionType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorAlreadyExists, AWSAutoScalingErrorLimitExceeded, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– putScheduledUpdateGroupAction:completionHandler:

Creates or updates a scheduled scaling action for an Auto Scaling group. When updating a scheduled scaling action, if you leave a parameter unspecified, the corresponding value remains unchanged in the affected Auto Scaling group.

For more information, see Scheduled Scaling in the Auto Scaling User Guide.

- (void)putScheduledUpdateGroupAction:(AWSAutoScalingPutScheduledUpdateGroupActionType *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorAlreadyExists, AWSAutoScalingErrorLimitExceeded, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– recordLifecycleActionHeartbeat:

Records a heartbeat for the lifecycle action associated with the specified token or instance. This extends the timeout by the length of time defined using PutLifecycleHook.

This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:

  1. (Optional) Create a Lambda function and a rule that allows CloudWatch Events to invoke your Lambda function when Auto Scaling launches or terminates instances.

  2. (Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue or an Amazon SNS topic. The role allows Auto Scaling to publish lifecycle notifications to the target.

  3. Create the lifecycle hook. Specify whether the hook is used when the instances launch or terminate.

  4. If you need more time, record the lifecycle action heartbeat to keep the instance in a pending state.

  5. If you finish before the timeout period ends, complete the lifecycle action.

For more information, see Auto Scaling Lifecycle in the Auto Scaling User Guide.

- (AWSTask<AWSAutoScalingRecordLifecycleActionHeartbeatAnswer*> *)recordLifecycleActionHeartbeat:(AWSAutoScalingRecordLifecycleActionHeartbeatType *)request

Parameters

request

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

Return Value

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

Declared In

AWSAutoScalingService.h

– recordLifecycleActionHeartbeat:completionHandler:

Records a heartbeat for the lifecycle action associated with the specified token or instance. This extends the timeout by the length of time defined using PutLifecycleHook.

This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:

  1. (Optional) Create a Lambda function and a rule that allows CloudWatch Events to invoke your Lambda function when Auto Scaling launches or terminates instances.

  2. (Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue or an Amazon SNS topic. The role allows Auto Scaling to publish lifecycle notifications to the target.

  3. Create the lifecycle hook. Specify whether the hook is used when the instances launch or terminate.

  4. If you need more time, record the lifecycle action heartbeat to keep the instance in a pending state.

  5. If you finish before the timeout period ends, complete the lifecycle action.

For more information, see Auto Scaling Lifecycle in the Auto Scaling User Guide.

- (void)recordLifecycleActionHeartbeat:(AWSAutoScalingRecordLifecycleActionHeartbeatType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingRecordLifecycleActionHeartbeatAnswer *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the RecordLifecycleActionHeartbeat 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– resumeProcesses:

Resumes the specified suspended Auto Scaling processes, or all suspended process, for the specified Auto Scaling group.

For more information, see Suspending and Resuming Auto Scaling Processes in the Auto Scaling User Guide.

- (AWSTask *)resumeProcesses:(AWSAutoScalingScalingProcessQuery *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceInUse, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– resumeProcesses:completionHandler:

Resumes the specified suspended Auto Scaling processes, or all suspended process, for the specified Auto Scaling group.

For more information, see Suspending and Resuming Auto Scaling Processes in the Auto Scaling User Guide.

- (void)resumeProcesses:(AWSAutoScalingScalingProcessQuery *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceInUse, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– setDesiredCapacity:

Sets the size of the specified Auto Scaling group.

For more information about desired capacity, see What Is Auto Scaling? in the Auto Scaling User Guide.

- (AWSTask *)setDesiredCapacity:(AWSAutoScalingSetDesiredCapacityType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorScalingActivityInProgress, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– setDesiredCapacity:completionHandler:

Sets the size of the specified Auto Scaling group.

For more information about desired capacity, see What Is Auto Scaling? in the Auto Scaling User Guide.

- (void)setDesiredCapacity:(AWSAutoScalingSetDesiredCapacityType *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorScalingActivityInProgress, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– setInstanceHealth:

Sets the health status of the specified instance.

For more information, see Health Checks in the Auto Scaling User Guide.

- (AWSTask *)setInstanceHealth:(AWSAutoScalingSetInstanceHealthQuery *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– setInstanceHealth:completionHandler:

Sets the health status of the specified instance.

For more information, see Health Checks in the Auto Scaling User Guide.

- (void)setInstanceHealth:(AWSAutoScalingSetInstanceHealthQuery *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– setInstanceProtection:

Updates the instance protection settings of the specified instances.

For more information, see Instance Protection in the Auto Scaling User Guide.

- (AWSTask<AWSAutoScalingSetInstanceProtectionAnswer*> *)setInstanceProtection:(AWSAutoScalingSetInstanceProtectionQuery *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSAutoScalingSetInstanceProtectionAnswer. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorLimitExceeded, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– setInstanceProtection:completionHandler:

Updates the instance protection settings of the specified instances.

For more information, see Instance Protection in the Auto Scaling User Guide.

- (void)setInstanceProtection:(AWSAutoScalingSetInstanceProtectionQuery *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingSetInstanceProtectionAnswer *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the SetInstanceProtection 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorLimitExceeded, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– suspendProcesses:

Suspends the specified Auto Scaling processes, or all processes, for the specified Auto Scaling group.

Note that if you suspend either the Launch or Terminate process types, it can prevent other process types from functioning properly.

To resume processes that have been suspended, use ResumeProcesses.

For more information, see Suspending and Resuming Auto Scaling Processes in the Auto Scaling User Guide.

- (AWSTask *)suspendProcesses:(AWSAutoScalingScalingProcessQuery *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceInUse, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– suspendProcesses:completionHandler:

Suspends the specified Auto Scaling processes, or all processes, for the specified Auto Scaling group.

Note that if you suspend either the Launch or Terminate process types, it can prevent other process types from functioning properly.

To resume processes that have been suspended, use ResumeProcesses.

For more information, see Suspending and Resuming Auto Scaling Processes in the Auto Scaling User Guide.

- (void)suspendProcesses:(AWSAutoScalingScalingProcessQuery *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorResourceInUse, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– terminateInstanceInAutoScalingGroup:

Terminates the specified instance and optionally adjusts the desired group size.

This call simply makes a termination request. The instance is not terminated immediately.

- (AWSTask<AWSAutoScalingActivityType*> *)terminateInstanceInAutoScalingGroup:(AWSAutoScalingTerminateInstanceInAutoScalingGroupType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSAutoScalingActivityType. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorScalingActivityInProgress, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– terminateInstanceInAutoScalingGroup:completionHandler:

Terminates the specified instance and optionally adjusts the desired group size.

This call simply makes a termination request. The instance is not terminated immediately.

- (void)terminateInstanceInAutoScalingGroup:(AWSAutoScalingTerminateInstanceInAutoScalingGroupType *)request completionHandler:(void ( ^ _Nullable ) ( AWSAutoScalingActivityType *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the TerminateInstanceInAutoScalingGroup 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorScalingActivityInProgress, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– updateAutoScalingGroup:

Updates the configuration for the specified Auto Scaling group.

To update an Auto Scaling group with a launch configuration with InstanceMonitoring set to False, you must first disable the collection of group metrics. Otherwise, you will get an error. If you have previously enabled the collection of group metrics, you can disable it using DisableMetricsCollection.

The new settings are registered upon the completion of this call. Any launch configuration settings take effect on any triggers after this call returns. Scaling activities that are currently in progress aren't affected.

Note the following:

  • If you specify a new value for MinSize without specifying a value for DesiredCapacity, and the new MinSize is larger than the current size of the group, we implicitly call SetDesiredCapacity to set the size of the group to the new value of MinSize.

  • If you specify a new value for MaxSize without specifying a value for DesiredCapacity, and the new MaxSize is smaller than the current size of the group, we implicitly call SetDesiredCapacity to set the size of the group to the new value of MaxSize.

  • All other optional parameters are left unchanged if not specified.

- (AWSTask *)updateAutoScalingGroup:(AWSAutoScalingUpdateAutoScalingGroupType *)request

Parameters

request

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

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorScalingActivityInProgress, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h

– updateAutoScalingGroup:completionHandler:

Updates the configuration for the specified Auto Scaling group.

To update an Auto Scaling group with a launch configuration with InstanceMonitoring set to False, you must first disable the collection of group metrics. Otherwise, you will get an error. If you have previously enabled the collection of group metrics, you can disable it using DisableMetricsCollection.

The new settings are registered upon the completion of this call. Any launch configuration settings take effect on any triggers after this call returns. Scaling activities that are currently in progress aren't affected.

Note the following:

  • If you specify a new value for MinSize without specifying a value for DesiredCapacity, and the new MinSize is larger than the current size of the group, we implicitly call SetDesiredCapacity to set the size of the group to the new value of MinSize.

  • If you specify a new value for MaxSize without specifying a value for DesiredCapacity, and the new MaxSize is smaller than the current size of the group, we implicitly call SetDesiredCapacity to set the size of the group to the new value of MaxSize.

  • All other optional parameters are left unchanged if not specified.

- (void)updateAutoScalingGroup:(AWSAutoScalingUpdateAutoScalingGroupType *)request completionHandler:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionHandler

Parameters

request

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

completionHandler

The completion handler to call when the load request is complete. 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 AWSAutoScalingErrorDomain domain and the following error code: AWSAutoScalingErrorScalingActivityInProgress, AWSAutoScalingErrorResourceContention.

Declared In

AWSAutoScalingService.h