AutoScalingClient
Index > AutoScaling > AutoScalingClient
Auto-generated documentation for AutoScaling type annotations stubs module mypy-boto3-autoscaling.
AutoScalingClient
Type annotations and code completion for boto3.client("autoscaling")
.
boto3 documentation
from boto3.session import Session
from mypy_boto3_autoscaling.client import AutoScalingClient
def get_autoscaling_client() -> AutoScalingClient:
return Session().client("autoscaling")
Exceptions
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("autoscaling").exceptions
structure.
client = boto3.client("autoscaling")
try:
do_something(client)
except (
client.ActiveInstanceRefreshNotFoundFault,
client.AlreadyExistsFault,
client.ClientError,
client.InstanceRefreshInProgressFault,
client.InvalidNextToken,
client.IrreversibleInstanceRefreshFault,
client.LimitExceededFault,
client.ResourceContentionFault,
client.ResourceInUseFault,
client.ScalingActivityInProgressFault,
client.ServiceLinkedRoleFailure,
) as e:
print(e)
from mypy_boto3_autoscaling.client import Exceptions
def handle_error(exc: Exceptions.ActiveInstanceRefreshNotFoundFault) -> None:
...
Methods
attach_instances
Attaches one or more EC2 instances to the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").attach_instances
method.
boto3 documentation
def attach_instances(
self,
*,
AutoScalingGroupName: str,
InstanceIds: Sequence[str] = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: AttachInstancesQueryRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.attach_instances(**kwargs)
attach_load_balancer_target_groups
Attaches one or more target groups to the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").attach_load_balancer_target_groups
method.
boto3 documentation
def attach_load_balancer_target_groups(
self,
*,
AutoScalingGroupName: str,
TargetGroupARNs: Sequence[str],
) -> Dict[str, Any]:
...
kwargs: AttachLoadBalancerTargetGroupsTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"TargetGroupARNs": ...,
}
parent.attach_load_balancer_target_groups(**kwargs)
attach_load_balancers
.
Type annotations and code completion for boto3.client("autoscaling").attach_load_balancers
method.
boto3 documentation
def attach_load_balancers(
self,
*,
AutoScalingGroupName: str,
LoadBalancerNames: Sequence[str],
) -> Dict[str, Any]:
...
kwargs: AttachLoadBalancersTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"LoadBalancerNames": ...,
}
parent.attach_load_balancers(**kwargs)
attach_traffic_sources
**Reserved for use with Amazon VPC Lattice, which is in preview and subject to change.
Type annotations and code completion for boto3.client("autoscaling").attach_traffic_sources
method.
boto3 documentation
def attach_traffic_sources(
self,
*,
AutoScalingGroupName: str,
TrafficSources: Sequence[TrafficSourceIdentifierTypeDef], # (1)
) -> Dict[str, Any]:
...
kwargs: AttachTrafficSourcesTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"TrafficSources": ...,
}
parent.attach_traffic_sources(**kwargs)
batch_delete_scheduled_action
Deletes one or more scheduled actions for the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").batch_delete_scheduled_action
method.
boto3 documentation
def batch_delete_scheduled_action(
self,
*,
AutoScalingGroupName: str,
ScheduledActionNames: Sequence[str],
) -> BatchDeleteScheduledActionAnswerTypeDef: # (1)
...
kwargs: BatchDeleteScheduledActionTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"ScheduledActionNames": ...,
}
parent.batch_delete_scheduled_action(**kwargs)
batch_put_scheduled_update_group_action
Creates or updates one or more scheduled scaling actions for an Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").batch_put_scheduled_update_group_action
method.
boto3 documentation
def batch_put_scheduled_update_group_action(
self,
*,
AutoScalingGroupName: str,
ScheduledUpdateGroupActions: Sequence[ScheduledUpdateGroupActionRequestTypeDef], # (1)
) -> BatchPutScheduledUpdateGroupActionAnswerTypeDef: # (2)
...
kwargs: BatchPutScheduledUpdateGroupActionTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"ScheduledUpdateGroupActions": ...,
}
parent.batch_put_scheduled_update_group_action(**kwargs)
can_paginate
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("autoscaling").can_paginate
method.
boto3 documentation
cancel_instance_refresh
Cancels an instance refresh or rollback that is in progress.
Type annotations and code completion for boto3.client("autoscaling").cancel_instance_refresh
method.
boto3 documentation
def cancel_instance_refresh(
self,
*,
AutoScalingGroupName: str,
) -> CancelInstanceRefreshAnswerTypeDef: # (1)
...
kwargs: CancelInstanceRefreshTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.cancel_instance_refresh(**kwargs)
close
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("autoscaling").close
method.
boto3 documentation
complete_lifecycle_action
Completes the lifecycle action for the specified token or instance with the specified result.
Type annotations and code completion for boto3.client("autoscaling").complete_lifecycle_action
method.
boto3 documentation
def complete_lifecycle_action(
self,
*,
LifecycleHookName: str,
AutoScalingGroupName: str,
LifecycleActionResult: str,
LifecycleActionToken: str = ...,
InstanceId: str = ...,
) -> Dict[str, Any]:
...
kwargs: CompleteLifecycleActionTypeRequestTypeDef = { # (1)
"LifecycleHookName": ...,
"AutoScalingGroupName": ...,
"LifecycleActionResult": ...,
}
parent.complete_lifecycle_action(**kwargs)
create_auto_scaling_group
We strongly recommend using a launch template when calling this operation to ensure full functionality for Amazon EC2 Auto Scaling and Amazon EC2. Creates an Auto Scaling group with the specified name and attributes.
Type annotations and code completion for boto3.client("autoscaling").create_auto_scaling_group
method.
boto3 documentation
def create_auto_scaling_group(
self,
*,
AutoScalingGroupName: str,
MinSize: int,
MaxSize: int,
LaunchConfigurationName: str = ...,
LaunchTemplate: LaunchTemplateSpecificationTypeDef = ..., # (1)
MixedInstancesPolicy: MixedInstancesPolicyTypeDef = ..., # (2)
InstanceId: str = ...,
DesiredCapacity: int = ...,
DefaultCooldown: int = ...,
AvailabilityZones: Sequence[str] = ...,
LoadBalancerNames: Sequence[str] = ...,
TargetGroupARNs: Sequence[str] = ...,
HealthCheckType: str = ...,
HealthCheckGracePeriod: int = ...,
PlacementGroup: str = ...,
VPCZoneIdentifier: str = ...,
TerminationPolicies: Sequence[str] = ...,
NewInstancesProtectedFromScaleIn: bool = ...,
CapacityRebalance: bool = ...,
LifecycleHookSpecificationList: Sequence[LifecycleHookSpecificationTypeDef] = ..., # (3)
Tags: Sequence[TagTypeDef] = ..., # (4)
ServiceLinkedRoleARN: str = ...,
MaxInstanceLifetime: int = ...,
Context: str = ...,
DesiredCapacityType: str = ...,
DefaultInstanceWarmup: int = ...,
TrafficSources: Sequence[TrafficSourceIdentifierTypeDef] = ..., # (5)
) -> EmptyResponseMetadataTypeDef: # (6)
...
- See LaunchTemplateSpecificationTypeDef
- See MixedInstancesPolicyTypeDef
- See LifecycleHookSpecificationTypeDef
- See TagTypeDef
- See TrafficSourceIdentifierTypeDef
- See EmptyResponseMetadataTypeDef
kwargs: CreateAutoScalingGroupTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"MinSize": ...,
"MaxSize": ...,
}
parent.create_auto_scaling_group(**kwargs)
create_launch_configuration
Creates a launch configuration.
Type annotations and code completion for boto3.client("autoscaling").create_launch_configuration
method.
boto3 documentation
def create_launch_configuration(
self,
*,
LaunchConfigurationName: str,
ImageId: str = ...,
KeyName: str = ...,
SecurityGroups: Sequence[str] = ...,
ClassicLinkVPCId: str = ...,
ClassicLinkVPCSecurityGroups: Sequence[str] = ...,
UserData: str = ...,
InstanceId: str = ...,
InstanceType: str = ...,
KernelId: str = ...,
RamdiskId: str = ...,
BlockDeviceMappings: Sequence[BlockDeviceMappingTypeDef] = ..., # (1)
InstanceMonitoring: InstanceMonitoringTypeDef = ..., # (2)
SpotPrice: str = ...,
IamInstanceProfile: str = ...,
EbsOptimized: bool = ...,
AssociatePublicIpAddress: bool = ...,
PlacementTenancy: str = ...,
MetadataOptions: InstanceMetadataOptionsTypeDef = ..., # (3)
) -> EmptyResponseMetadataTypeDef: # (4)
...
- See BlockDeviceMappingTypeDef
- See InstanceMonitoringTypeDef
- See InstanceMetadataOptionsTypeDef
- See EmptyResponseMetadataTypeDef
kwargs: CreateLaunchConfigurationTypeRequestTypeDef = { # (1)
"LaunchConfigurationName": ...,
}
parent.create_launch_configuration(**kwargs)
create_or_update_tags
Creates or updates tags for the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").create_or_update_tags
method.
boto3 documentation
def create_or_update_tags(
self,
*,
Tags: Sequence[TagTypeDef], # (1)
) -> EmptyResponseMetadataTypeDef: # (2)
...
kwargs: CreateOrUpdateTagsTypeRequestTypeDef = { # (1)
"Tags": ...,
}
parent.create_or_update_tags(**kwargs)
delete_auto_scaling_group
Deletes the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").delete_auto_scaling_group
method.
boto3 documentation
def delete_auto_scaling_group(
self,
*,
AutoScalingGroupName: str,
ForceDelete: bool = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteAutoScalingGroupTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.delete_auto_scaling_group(**kwargs)
delete_launch_configuration
Deletes the specified launch configuration.
Type annotations and code completion for boto3.client("autoscaling").delete_launch_configuration
method.
boto3 documentation
def delete_launch_configuration(
self,
*,
LaunchConfigurationName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: LaunchConfigurationNameTypeRequestTypeDef = { # (1)
"LaunchConfigurationName": ...,
}
parent.delete_launch_configuration(**kwargs)
delete_lifecycle_hook
Deletes the specified lifecycle hook.
Type annotations and code completion for boto3.client("autoscaling").delete_lifecycle_hook
method.
boto3 documentation
def delete_lifecycle_hook(
self,
*,
LifecycleHookName: str,
AutoScalingGroupName: str,
) -> Dict[str, Any]:
...
kwargs: DeleteLifecycleHookTypeRequestTypeDef = { # (1)
"LifecycleHookName": ...,
"AutoScalingGroupName": ...,
}
parent.delete_lifecycle_hook(**kwargs)
delete_notification_configuration
Deletes the specified notification.
Type annotations and code completion for boto3.client("autoscaling").delete_notification_configuration
method.
boto3 documentation
def delete_notification_configuration(
self,
*,
AutoScalingGroupName: str,
TopicARN: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteNotificationConfigurationTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"TopicARN": ...,
}
parent.delete_notification_configuration(**kwargs)
delete_policy
Deletes the specified scaling policy.
Type annotations and code completion for boto3.client("autoscaling").delete_policy
method.
boto3 documentation
def delete_policy(
self,
*,
PolicyName: str,
AutoScalingGroupName: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeletePolicyTypeRequestTypeDef = { # (1)
"PolicyName": ...,
}
parent.delete_policy(**kwargs)
delete_scheduled_action
Deletes the specified scheduled action.
Type annotations and code completion for boto3.client("autoscaling").delete_scheduled_action
method.
boto3 documentation
def delete_scheduled_action(
self,
*,
AutoScalingGroupName: str,
ScheduledActionName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteScheduledActionTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"ScheduledActionName": ...,
}
parent.delete_scheduled_action(**kwargs)
delete_tags
Deletes the specified tags.
Type annotations and code completion for boto3.client("autoscaling").delete_tags
method.
boto3 documentation
def delete_tags(
self,
*,
Tags: Sequence[TagTypeDef], # (1)
) -> EmptyResponseMetadataTypeDef: # (2)
...
kwargs: DeleteTagsTypeRequestTypeDef = { # (1)
"Tags": ...,
}
parent.delete_tags(**kwargs)
delete_warm_pool
Deletes the warm pool for the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").delete_warm_pool
method.
boto3 documentation
def delete_warm_pool(
self,
*,
AutoScalingGroupName: str,
ForceDelete: bool = ...,
) -> Dict[str, Any]:
...
kwargs: DeleteWarmPoolTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.delete_warm_pool(**kwargs)
describe_account_limits
Describes the current Amazon EC2 Auto Scaling resource quotas for your account.
Type annotations and code completion for boto3.client("autoscaling").describe_account_limits
method.
boto3 documentation
def describe_account_limits(
self,
) -> DescribeAccountLimitsAnswerTypeDef: # (1)
...
describe_adjustment_types
Describes the available adjustment types for step scaling and simple scaling policies.
Type annotations and code completion for boto3.client("autoscaling").describe_adjustment_types
method.
boto3 documentation
def describe_adjustment_types(
self,
) -> DescribeAdjustmentTypesAnswerTypeDef: # (1)
...
describe_auto_scaling_groups
Gets information about the Auto Scaling groups in the account and Region.
Type annotations and code completion for boto3.client("autoscaling").describe_auto_scaling_groups
method.
boto3 documentation
def describe_auto_scaling_groups(
self,
*,
AutoScalingGroupNames: Sequence[str] = ...,
NextToken: str = ...,
MaxRecords: int = ...,
Filters: Sequence[FilterTypeDef] = ..., # (1)
) -> AutoScalingGroupsTypeTypeDef: # (2)
...
kwargs: AutoScalingGroupNamesTypeRequestTypeDef = { # (1)
"AutoScalingGroupNames": ...,
}
parent.describe_auto_scaling_groups(**kwargs)
describe_auto_scaling_instances
Gets information about the Auto Scaling instances in the account and Region.
Type annotations and code completion for boto3.client("autoscaling").describe_auto_scaling_instances
method.
boto3 documentation
def describe_auto_scaling_instances(
self,
*,
InstanceIds: Sequence[str] = ...,
MaxRecords: int = ...,
NextToken: str = ...,
) -> AutoScalingInstancesTypeTypeDef: # (1)
...
kwargs: DescribeAutoScalingInstancesTypeRequestTypeDef = { # (1)
"InstanceIds": ...,
}
parent.describe_auto_scaling_instances(**kwargs)
describe_auto_scaling_notification_types
Describes the notification types that are supported by Amazon EC2 Auto Scaling.
Type annotations and code completion for boto3.client("autoscaling").describe_auto_scaling_notification_types
method.
boto3 documentation
def describe_auto_scaling_notification_types(
self,
) -> DescribeAutoScalingNotificationTypesAnswerTypeDef: # (1)
...
describe_instance_refreshes
Gets information about the instance refreshes for the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").describe_instance_refreshes
method.
boto3 documentation
def describe_instance_refreshes(
self,
*,
AutoScalingGroupName: str,
InstanceRefreshIds: Sequence[str] = ...,
NextToken: str = ...,
MaxRecords: int = ...,
) -> DescribeInstanceRefreshesAnswerTypeDef: # (1)
...
kwargs: DescribeInstanceRefreshesTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.describe_instance_refreshes(**kwargs)
describe_launch_configurations
Gets information about the launch configurations in the account and Region.
Type annotations and code completion for boto3.client("autoscaling").describe_launch_configurations
method.
boto3 documentation
def describe_launch_configurations(
self,
*,
LaunchConfigurationNames: Sequence[str] = ...,
NextToken: str = ...,
MaxRecords: int = ...,
) -> LaunchConfigurationsTypeTypeDef: # (1)
...
kwargs: LaunchConfigurationNamesTypeRequestTypeDef = { # (1)
"LaunchConfigurationNames": ...,
}
parent.describe_launch_configurations(**kwargs)
describe_lifecycle_hook_types
Describes the available types of lifecycle hooks.
Type annotations and code completion for boto3.client("autoscaling").describe_lifecycle_hook_types
method.
boto3 documentation
def describe_lifecycle_hook_types(
self,
) -> DescribeLifecycleHookTypesAnswerTypeDef: # (1)
...
describe_lifecycle_hooks
Gets information about the lifecycle hooks for the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").describe_lifecycle_hooks
method.
boto3 documentation
def describe_lifecycle_hooks(
self,
*,
AutoScalingGroupName: str,
LifecycleHookNames: Sequence[str] = ...,
) -> DescribeLifecycleHooksAnswerTypeDef: # (1)
...
kwargs: DescribeLifecycleHooksTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.describe_lifecycle_hooks(**kwargs)
describe_load_balancer_target_groups
Gets information about the Elastic Load Balancing target groups for the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").describe_load_balancer_target_groups
method.
boto3 documentation
def describe_load_balancer_target_groups(
self,
*,
AutoScalingGroupName: str,
NextToken: str = ...,
MaxRecords: int = ...,
) -> DescribeLoadBalancerTargetGroupsResponseTypeDef: # (1)
...
kwargs: DescribeLoadBalancerTargetGroupsRequestRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.describe_load_balancer_target_groups(**kwargs)
describe_load_balancers
Gets information about the load balancers for the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").describe_load_balancers
method.
boto3 documentation
def describe_load_balancers(
self,
*,
AutoScalingGroupName: str,
NextToken: str = ...,
MaxRecords: int = ...,
) -> DescribeLoadBalancersResponseTypeDef: # (1)
...
kwargs: DescribeLoadBalancersRequestRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.describe_load_balancers(**kwargs)
describe_metric_collection_types
Describes the available CloudWatch metrics for Amazon EC2 Auto Scaling.
Type annotations and code completion for boto3.client("autoscaling").describe_metric_collection_types
method.
boto3 documentation
def describe_metric_collection_types(
self,
) -> DescribeMetricCollectionTypesAnswerTypeDef: # (1)
...
describe_notification_configurations
Gets information about the Amazon SNS notifications that are configured for one or more Auto Scaling groups.
Type annotations and code completion for boto3.client("autoscaling").describe_notification_configurations
method.
boto3 documentation
def describe_notification_configurations(
self,
*,
AutoScalingGroupNames: Sequence[str] = ...,
NextToken: str = ...,
MaxRecords: int = ...,
) -> DescribeNotificationConfigurationsAnswerTypeDef: # (1)
...
kwargs: DescribeNotificationConfigurationsTypeRequestTypeDef = { # (1)
"AutoScalingGroupNames": ...,
}
parent.describe_notification_configurations(**kwargs)
describe_policies
Gets information about the scaling policies in the account and Region.
Type annotations and code completion for boto3.client("autoscaling").describe_policies
method.
boto3 documentation
def describe_policies(
self,
*,
AutoScalingGroupName: str = ...,
PolicyNames: Sequence[str] = ...,
PolicyTypes: Sequence[str] = ...,
NextToken: str = ...,
MaxRecords: int = ...,
) -> PoliciesTypeTypeDef: # (1)
...
kwargs: DescribePoliciesTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.describe_policies(**kwargs)
describe_scaling_activities
Gets information about the scaling activities in the account and Region.
Type annotations and code completion for boto3.client("autoscaling").describe_scaling_activities
method.
boto3 documentation
def describe_scaling_activities(
self,
*,
ActivityIds: Sequence[str] = ...,
AutoScalingGroupName: str = ...,
IncludeDeletedGroups: bool = ...,
MaxRecords: int = ...,
NextToken: str = ...,
) -> ActivitiesTypeTypeDef: # (1)
...
kwargs: DescribeScalingActivitiesTypeRequestTypeDef = { # (1)
"ActivityIds": ...,
}
parent.describe_scaling_activities(**kwargs)
describe_scaling_process_types
Describes the scaling process types for use with the ResumeProcesses and SuspendProcesses APIs.
Type annotations and code completion for boto3.client("autoscaling").describe_scaling_process_types
method.
boto3 documentation
describe_scheduled_actions
Gets information about the scheduled actions that haven't run or that have not reached their end time.
Type annotations and code completion for boto3.client("autoscaling").describe_scheduled_actions
method.
boto3 documentation
def describe_scheduled_actions(
self,
*,
AutoScalingGroupName: str = ...,
ScheduledActionNames: Sequence[str] = ...,
StartTime: Union[datetime, str] = ...,
EndTime: Union[datetime, str] = ...,
NextToken: str = ...,
MaxRecords: int = ...,
) -> ScheduledActionsTypeTypeDef: # (1)
...
kwargs: DescribeScheduledActionsTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.describe_scheduled_actions(**kwargs)
describe_tags
Describes the specified tags.
Type annotations and code completion for boto3.client("autoscaling").describe_tags
method.
boto3 documentation
def describe_tags(
self,
*,
Filters: Sequence[FilterTypeDef] = ..., # (1)
NextToken: str = ...,
MaxRecords: int = ...,
) -> TagsTypeTypeDef: # (2)
...
- See FilterTypeDef
- See TagsTypeTypeDef
kwargs: DescribeTagsTypeRequestTypeDef = { # (1)
"Filters": ...,
}
parent.describe_tags(**kwargs)
describe_termination_policy_types
Describes the termination policies supported by Amazon EC2 Auto Scaling.
Type annotations and code completion for boto3.client("autoscaling").describe_termination_policy_types
method.
boto3 documentation
def describe_termination_policy_types(
self,
) -> DescribeTerminationPolicyTypesAnswerTypeDef: # (1)
...
describe_traffic_sources
**Reserved for use with Amazon VPC Lattice, which is in preview and subject to change.
Type annotations and code completion for boto3.client("autoscaling").describe_traffic_sources
method.
boto3 documentation
def describe_traffic_sources(
self,
*,
AutoScalingGroupName: str,
TrafficSourceType: str,
NextToken: str = ...,
MaxRecords: int = ...,
) -> DescribeTrafficSourcesResponseTypeDef: # (1)
...
kwargs: DescribeTrafficSourcesRequestRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"TrafficSourceType": ...,
}
parent.describe_traffic_sources(**kwargs)
describe_warm_pool
Gets information about a warm pool and its instances.
Type annotations and code completion for boto3.client("autoscaling").describe_warm_pool
method.
boto3 documentation
def describe_warm_pool(
self,
*,
AutoScalingGroupName: str,
MaxRecords: int = ...,
NextToken: str = ...,
) -> DescribeWarmPoolAnswerTypeDef: # (1)
...
kwargs: DescribeWarmPoolTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.describe_warm_pool(**kwargs)
detach_instances
Removes one or more instances from the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").detach_instances
method.
boto3 documentation
def detach_instances(
self,
*,
AutoScalingGroupName: str,
ShouldDecrementDesiredCapacity: bool,
InstanceIds: Sequence[str] = ...,
) -> DetachInstancesAnswerTypeDef: # (1)
...
kwargs: DetachInstancesQueryRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"ShouldDecrementDesiredCapacity": ...,
}
parent.detach_instances(**kwargs)
detach_load_balancer_target_groups
Detaches one or more target groups from the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").detach_load_balancer_target_groups
method.
boto3 documentation
def detach_load_balancer_target_groups(
self,
*,
AutoScalingGroupName: str,
TargetGroupARNs: Sequence[str],
) -> Dict[str, Any]:
...
kwargs: DetachLoadBalancerTargetGroupsTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"TargetGroupARNs": ...,
}
parent.detach_load_balancer_target_groups(**kwargs)
detach_load_balancers
Detaches one or more Classic Load Balancers from the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").detach_load_balancers
method.
boto3 documentation
def detach_load_balancers(
self,
*,
AutoScalingGroupName: str,
LoadBalancerNames: Sequence[str],
) -> Dict[str, Any]:
...
kwargs: DetachLoadBalancersTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"LoadBalancerNames": ...,
}
parent.detach_load_balancers(**kwargs)
detach_traffic_sources
**Reserved for use with Amazon VPC Lattice, which is in preview and subject to change.
Type annotations and code completion for boto3.client("autoscaling").detach_traffic_sources
method.
boto3 documentation
def detach_traffic_sources(
self,
*,
AutoScalingGroupName: str,
TrafficSources: Sequence[TrafficSourceIdentifierTypeDef], # (1)
) -> Dict[str, Any]:
...
kwargs: DetachTrafficSourcesTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"TrafficSources": ...,
}
parent.detach_traffic_sources(**kwargs)
disable_metrics_collection
Disables group metrics collection for the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").disable_metrics_collection
method.
boto3 documentation
def disable_metrics_collection(
self,
*,
AutoScalingGroupName: str,
Metrics: Sequence[str] = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DisableMetricsCollectionQueryRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.disable_metrics_collection(**kwargs)
enable_metrics_collection
Enables group metrics collection for the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").enable_metrics_collection
method.
boto3 documentation
def enable_metrics_collection(
self,
*,
AutoScalingGroupName: str,
Granularity: str,
Metrics: Sequence[str] = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: EnableMetricsCollectionQueryRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"Granularity": ...,
}
parent.enable_metrics_collection(**kwargs)
enter_standby
Moves the specified instances into the standby state.
Type annotations and code completion for boto3.client("autoscaling").enter_standby
method.
boto3 documentation
def enter_standby(
self,
*,
AutoScalingGroupName: str,
ShouldDecrementDesiredCapacity: bool,
InstanceIds: Sequence[str] = ...,
) -> EnterStandbyAnswerTypeDef: # (1)
...
kwargs: EnterStandbyQueryRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"ShouldDecrementDesiredCapacity": ...,
}
parent.enter_standby(**kwargs)
execute_policy
Executes the specified policy.
Type annotations and code completion for boto3.client("autoscaling").execute_policy
method.
boto3 documentation
def execute_policy(
self,
*,
PolicyName: str,
AutoScalingGroupName: str = ...,
HonorCooldown: bool = ...,
MetricValue: float = ...,
BreachThreshold: float = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: ExecutePolicyTypeRequestTypeDef = { # (1)
"PolicyName": ...,
}
parent.execute_policy(**kwargs)
exit_standby
Moves the specified instances out of the standby state.
Type annotations and code completion for boto3.client("autoscaling").exit_standby
method.
boto3 documentation
def exit_standby(
self,
*,
AutoScalingGroupName: str,
InstanceIds: Sequence[str] = ...,
) -> ExitStandbyAnswerTypeDef: # (1)
...
kwargs: ExitStandbyQueryRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.exit_standby(**kwargs)
generate_presigned_url
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for boto3.client("autoscaling").generate_presigned_url
method.
boto3 documentation
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
get_predictive_scaling_forecast
Retrieves the forecast data for a predictive scaling policy.
Type annotations and code completion for boto3.client("autoscaling").get_predictive_scaling_forecast
method.
boto3 documentation
def get_predictive_scaling_forecast(
self,
*,
AutoScalingGroupName: str,
PolicyName: str,
StartTime: Union[datetime, str],
EndTime: Union[datetime, str],
) -> GetPredictiveScalingForecastAnswerTypeDef: # (1)
...
kwargs: GetPredictiveScalingForecastTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"PolicyName": ...,
"StartTime": ...,
"EndTime": ...,
}
parent.get_predictive_scaling_forecast(**kwargs)
put_lifecycle_hook
Creates or updates a lifecycle hook for the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").put_lifecycle_hook
method.
boto3 documentation
def put_lifecycle_hook(
self,
*,
LifecycleHookName: str,
AutoScalingGroupName: str,
LifecycleTransition: str = ...,
RoleARN: str = ...,
NotificationTargetARN: str = ...,
NotificationMetadata: str = ...,
HeartbeatTimeout: int = ...,
DefaultResult: str = ...,
) -> Dict[str, Any]:
...
kwargs: PutLifecycleHookTypeRequestTypeDef = { # (1)
"LifecycleHookName": ...,
"AutoScalingGroupName": ...,
}
parent.put_lifecycle_hook(**kwargs)
put_notification_configuration
Configures an Auto Scaling group to send notifications when specified events take place.
Type annotations and code completion for boto3.client("autoscaling").put_notification_configuration
method.
boto3 documentation
def put_notification_configuration(
self,
*,
AutoScalingGroupName: str,
TopicARN: str,
NotificationTypes: Sequence[str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: PutNotificationConfigurationTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"TopicARN": ...,
"NotificationTypes": ...,
}
parent.put_notification_configuration(**kwargs)
put_scaling_policy
Creates or updates a scaling policy for an Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").put_scaling_policy
method.
boto3 documentation
def put_scaling_policy(
self,
*,
AutoScalingGroupName: str,
PolicyName: str,
PolicyType: str = ...,
AdjustmentType: str = ...,
MinAdjustmentStep: int = ...,
MinAdjustmentMagnitude: int = ...,
ScalingAdjustment: int = ...,
Cooldown: int = ...,
MetricAggregationType: str = ...,
StepAdjustments: Sequence[StepAdjustmentTypeDef] = ..., # (1)
EstimatedInstanceWarmup: int = ...,
TargetTrackingConfiguration: TargetTrackingConfigurationTypeDef = ..., # (2)
Enabled: bool = ...,
PredictiveScalingConfiguration: PredictiveScalingConfigurationTypeDef = ..., # (3)
) -> PolicyARNTypeTypeDef: # (4)
...
- See StepAdjustmentTypeDef
- See TargetTrackingConfigurationTypeDef
- See PredictiveScalingConfigurationTypeDef
- See PolicyARNTypeTypeDef
kwargs: PutScalingPolicyTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"PolicyName": ...,
}
parent.put_scaling_policy(**kwargs)
put_scheduled_update_group_action
Creates or updates a scheduled scaling action for an Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").put_scheduled_update_group_action
method.
boto3 documentation
def put_scheduled_update_group_action(
self,
*,
AutoScalingGroupName: str,
ScheduledActionName: str,
Time: Union[datetime, str] = ...,
StartTime: Union[datetime, str] = ...,
EndTime: Union[datetime, str] = ...,
Recurrence: str = ...,
MinSize: int = ...,
MaxSize: int = ...,
DesiredCapacity: int = ...,
TimeZone: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: PutScheduledUpdateGroupActionTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"ScheduledActionName": ...,
}
parent.put_scheduled_update_group_action(**kwargs)
put_warm_pool
Creates or updates a warm pool for the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").put_warm_pool
method.
boto3 documentation
def put_warm_pool(
self,
*,
AutoScalingGroupName: str,
MaxGroupPreparedCapacity: int = ...,
MinSize: int = ...,
PoolState: WarmPoolStateType = ..., # (1)
InstanceReusePolicy: InstanceReusePolicyTypeDef = ..., # (2)
) -> Dict[str, Any]:
...
kwargs: PutWarmPoolTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.put_warm_pool(**kwargs)
record_lifecycle_action_heartbeat
Records a heartbeat for the lifecycle action associated with the specified token or instance.
Type annotations and code completion for boto3.client("autoscaling").record_lifecycle_action_heartbeat
method.
boto3 documentation
def record_lifecycle_action_heartbeat(
self,
*,
LifecycleHookName: str,
AutoScalingGroupName: str,
LifecycleActionToken: str = ...,
InstanceId: str = ...,
) -> Dict[str, Any]:
...
kwargs: RecordLifecycleActionHeartbeatTypeRequestTypeDef = { # (1)
"LifecycleHookName": ...,
"AutoScalingGroupName": ...,
}
parent.record_lifecycle_action_heartbeat(**kwargs)
resume_processes
Resumes the specified suspended auto scaling processes, or all suspended process, for the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").resume_processes
method.
boto3 documentation
def resume_processes(
self,
*,
AutoScalingGroupName: str,
ScalingProcesses: Sequence[str] = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: ScalingProcessQueryRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.resume_processes(**kwargs)
rollback_instance_refresh
Cancels an instance refresh that is in progress and rolls back any changes that it made.
Type annotations and code completion for boto3.client("autoscaling").rollback_instance_refresh
method.
boto3 documentation
def rollback_instance_refresh(
self,
*,
AutoScalingGroupName: str = ...,
) -> RollbackInstanceRefreshAnswerTypeDef: # (1)
...
kwargs: RollbackInstanceRefreshTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.rollback_instance_refresh(**kwargs)
set_desired_capacity
Sets the size of the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").set_desired_capacity
method.
boto3 documentation
def set_desired_capacity(
self,
*,
AutoScalingGroupName: str,
DesiredCapacity: int,
HonorCooldown: bool = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: SetDesiredCapacityTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"DesiredCapacity": ...,
}
parent.set_desired_capacity(**kwargs)
set_instance_health
Sets the health status of the specified instance.
Type annotations and code completion for boto3.client("autoscaling").set_instance_health
method.
boto3 documentation
def set_instance_health(
self,
*,
InstanceId: str,
HealthStatus: str,
ShouldRespectGracePeriod: bool = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: SetInstanceHealthQueryRequestTypeDef = { # (1)
"InstanceId": ...,
"HealthStatus": ...,
}
parent.set_instance_health(**kwargs)
set_instance_protection
Updates the instance protection settings of the specified instances.
Type annotations and code completion for boto3.client("autoscaling").set_instance_protection
method.
boto3 documentation
def set_instance_protection(
self,
*,
InstanceIds: Sequence[str],
AutoScalingGroupName: str,
ProtectedFromScaleIn: bool,
) -> Dict[str, Any]:
...
kwargs: SetInstanceProtectionQueryRequestTypeDef = { # (1)
"InstanceIds": ...,
"AutoScalingGroupName": ...,
"ProtectedFromScaleIn": ...,
}
parent.set_instance_protection(**kwargs)
start_instance_refresh
Starts an instance refresh.
Type annotations and code completion for boto3.client("autoscaling").start_instance_refresh
method.
boto3 documentation
def start_instance_refresh(
self,
*,
AutoScalingGroupName: str,
Strategy: RefreshStrategyType = ..., # (1)
DesiredConfiguration: DesiredConfigurationTypeDef = ..., # (2)
Preferences: RefreshPreferencesTypeDef = ..., # (3)
) -> StartInstanceRefreshAnswerTypeDef: # (4)
...
- See RefreshStrategyType
- See DesiredConfigurationTypeDef
- See RefreshPreferencesTypeDef
- See StartInstanceRefreshAnswerTypeDef
kwargs: StartInstanceRefreshTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.start_instance_refresh(**kwargs)
suspend_processes
Suspends the specified auto scaling processes, or all processes, for the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").suspend_processes
method.
boto3 documentation
def suspend_processes(
self,
*,
AutoScalingGroupName: str,
ScalingProcesses: Sequence[str] = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: ScalingProcessQueryRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.suspend_processes(**kwargs)
terminate_instance_in_auto_scaling_group
Terminates the specified instance and optionally adjusts the desired group size.
Type annotations and code completion for boto3.client("autoscaling").terminate_instance_in_auto_scaling_group
method.
boto3 documentation
def terminate_instance_in_auto_scaling_group(
self,
*,
InstanceId: str,
ShouldDecrementDesiredCapacity: bool,
) -> ActivityTypeTypeDef: # (1)
...
kwargs: TerminateInstanceInAutoScalingGroupTypeRequestTypeDef = { # (1)
"InstanceId": ...,
"ShouldDecrementDesiredCapacity": ...,
}
parent.terminate_instance_in_auto_scaling_group(**kwargs)
update_auto_scaling_group
We strongly recommend that all Auto Scaling groups use launch templates to ensure full functionality for Amazon EC2 Auto Scaling and Amazon EC2. Updates the configuration for the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").update_auto_scaling_group
method.
boto3 documentation
def update_auto_scaling_group(
self,
*,
AutoScalingGroupName: str,
LaunchConfigurationName: str = ...,
LaunchTemplate: LaunchTemplateSpecificationTypeDef = ..., # (1)
MixedInstancesPolicy: MixedInstancesPolicyTypeDef = ..., # (2)
MinSize: int = ...,
MaxSize: int = ...,
DesiredCapacity: int = ...,
DefaultCooldown: int = ...,
AvailabilityZones: Sequence[str] = ...,
HealthCheckType: str = ...,
HealthCheckGracePeriod: int = ...,
PlacementGroup: str = ...,
VPCZoneIdentifier: str = ...,
TerminationPolicies: Sequence[str] = ...,
NewInstancesProtectedFromScaleIn: bool = ...,
ServiceLinkedRoleARN: str = ...,
MaxInstanceLifetime: int = ...,
CapacityRebalance: bool = ...,
Context: str = ...,
DesiredCapacityType: str = ...,
DefaultInstanceWarmup: int = ...,
) -> EmptyResponseMetadataTypeDef: # (3)
...
- See LaunchTemplateSpecificationTypeDef
- See MixedInstancesPolicyTypeDef
- See EmptyResponseMetadataTypeDef
kwargs: UpdateAutoScalingGroupTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.update_auto_scaling_group(**kwargs)
get_paginator
Type annotations and code completion for boto3.client("autoscaling").get_paginator
method with overloads.
client.get_paginator("describe_auto_scaling_groups")
-> DescribeAutoScalingGroupsPaginatorclient.get_paginator("describe_auto_scaling_instances")
-> DescribeAutoScalingInstancesPaginatorclient.get_paginator("describe_launch_configurations")
-> DescribeLaunchConfigurationsPaginatorclient.get_paginator("describe_load_balancer_target_groups")
-> DescribeLoadBalancerTargetGroupsPaginatorclient.get_paginator("describe_load_balancers")
-> DescribeLoadBalancersPaginatorclient.get_paginator("describe_notification_configurations")
-> DescribeNotificationConfigurationsPaginatorclient.get_paginator("describe_policies")
-> DescribePoliciesPaginatorclient.get_paginator("describe_scaling_activities")
-> DescribeScalingActivitiesPaginatorclient.get_paginator("describe_scheduled_actions")
-> DescribeScheduledActionsPaginatorclient.get_paginator("describe_tags")
-> DescribeTagsPaginator