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
# AutoScalingClient usage example
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.
# Exceptions.exceptions usage example
client = boto3.client("autoscaling")
try:
do_something(client)
except (
client.exceptions.ActiveInstanceRefreshNotFoundFault,
client.exceptions.AlreadyExistsFault,
client.exceptions.ClientError,
client.exceptions.InstanceRefreshInProgressFault,
client.exceptions.InvalidNextToken,
client.exceptions.IrreversibleInstanceRefreshFault,
client.exceptions.LimitExceededFault,
client.exceptions.ResourceContentionFault,
client.exceptions.ResourceInUseFault,
client.exceptions.ScalingActivityInProgressFault,
client.exceptions.ServiceLinkedRoleFailure,
) as e:
print(e)
# Exceptions.exceptions type checking example
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
# attach_instances method definition
def attach_instances(
self,
*,
AutoScalingGroupName: str,
InstanceIds: Sequence[str] = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# attach_instances method usage example with argument unpacking
kwargs: AttachInstancesQueryRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
}
parent.attach_instances(**kwargs)
attach_load_balancer_target_groups#
.
Type annotations and code completion for boto3.client("autoscaling").attach_load_balancer_target_groups
method.
boto3 documentation
# attach_load_balancer_target_groups method definition
def attach_load_balancer_target_groups(
self,
*,
AutoScalingGroupName: str,
TargetGroupARNs: Sequence[str],
) -> Dict[str, Any]:
...
# attach_load_balancer_target_groups method usage example with argument unpacking
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
# attach_load_balancers method definition
def attach_load_balancers(
self,
*,
AutoScalingGroupName: str,
LoadBalancerNames: Sequence[str],
) -> Dict[str, Any]:
...
# attach_load_balancers method usage example with argument unpacking
kwargs: AttachLoadBalancersTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"LoadBalancerNames": ...,
}
parent.attach_load_balancers(**kwargs)
attach_traffic_sources#
Attaches one or more traffic sources to the specified Auto Scaling group.
Type annotations and code completion for boto3.client("autoscaling").attach_traffic_sources
method.
boto3 documentation
# attach_traffic_sources method definition
def attach_traffic_sources(
self,
*,
AutoScalingGroupName: str,
TrafficSources: Sequence[TrafficSourceIdentifierTypeDef], # (1)
) -> Dict[str, Any]:
...
# attach_traffic_sources method usage example with argument unpacking
kwargs: AttachTrafficSourcesTypeRequestTypeDef = { # (1)
"AutoScalingGroupName": ...,
"TrafficSources": ...,
}
parent.attach_traffic_sources(**kwargs)