pub struct Client { /* private fields */ }
Expand description
Client for Auto Scaling
Client for invoking operations on Auto Scaling. Each operation on Auto Scaling is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_autoscaling::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Builder
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_autoscaling::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the AttachInstances
operation has
a Client::attach_instances
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.attach_instances()
.auto_scaling_group_name("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
§Waiters
This client provides wait_until
methods behind the Waiters
trait.
To use them, simply import the trait, and then call one of the wait_until
methods. This will
return a waiter fluent builder that takes various parameters, which are documented on the builder
type. Once parameters have been provided, the wait
method can be called to initiate waiting.
For example, if there was a wait_until_thing
method, it could look like:
let result = client.wait_until_thing()
.thing_id("someId")
.wait(Duration::from_secs(120))
.await;
Implementations§
Source§impl Client
impl Client
Sourcepub fn attach_instances(&self) -> AttachInstancesFluentBuilder
pub fn attach_instances(&self) -> AttachInstancesFluentBuilder
Constructs a fluent builder for the AttachInstances
operation.
- The fluent builder is configurable:
instance_ids(impl Into<String>)
/set_instance_ids(Option<Vec::<String>>)
:
required: falseThe IDs of the instances. You can specify up to 20 instances.
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
- On success, responds with
AttachInstancesOutput
- On failure, responds with
SdkError<AttachInstancesError>
Source§impl Client
impl Client
Sourcepub fn attach_load_balancer_target_groups(
&self,
) -> AttachLoadBalancerTargetGroupsFluentBuilder
pub fn attach_load_balancer_target_groups( &self, ) -> AttachLoadBalancerTargetGroupsFluentBuilder
Constructs a fluent builder for the AttachLoadBalancerTargetGroups
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
target_group_arns(impl Into<String>)
/set_target_group_arns(Option<Vec::<String>>)
:
required: trueThe Amazon Resource Names (ARNs) of the target groups. You can specify up to 10 target groups. To get the ARN of a target group, use the Elastic Load Balancing DescribeTargetGroups API operation.
- On success, responds with
AttachLoadBalancerTargetGroupsOutput
- On failure, responds with
SdkError<AttachLoadBalancerTargetGroupsError>
Source§impl Client
impl Client
Sourcepub fn attach_load_balancers(&self) -> AttachLoadBalancersFluentBuilder
pub fn attach_load_balancers(&self) -> AttachLoadBalancersFluentBuilder
Constructs a fluent builder for the AttachLoadBalancers
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
load_balancer_names(impl Into<String>)
/set_load_balancer_names(Option<Vec::<String>>)
:
required: trueThe names of the load balancers. You can specify up to 10 load balancers.
- On success, responds with
AttachLoadBalancersOutput
- On failure, responds with
SdkError<AttachLoadBalancersError>
Source§impl Client
impl Client
Sourcepub fn attach_traffic_sources(&self) -> AttachTrafficSourcesFluentBuilder
pub fn attach_traffic_sources(&self) -> AttachTrafficSourcesFluentBuilder
Constructs a fluent builder for the AttachTrafficSources
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
traffic_sources(TrafficSourceIdentifier)
/set_traffic_sources(Option<Vec::<TrafficSourceIdentifier>>)
:
required: trueThe unique identifiers of one or more traffic sources. You can specify up to 10 traffic sources.
skip_zonal_shift_validation(bool)
/set_skip_zonal_shift_validation(Option<bool>)
:
required: falseIf you enable zonal shift with cross-zone disabled load balancers, capacity could become imbalanced across Availability Zones. To skip the validation, specify
true
. For more information, see Auto Scaling group zonal shift in the Amazon EC2 Auto Scaling User Guide.
- On success, responds with
AttachTrafficSourcesOutput
- On failure, responds with
SdkError<AttachTrafficSourcesError>
Source§impl Client
impl Client
Sourcepub fn batch_delete_scheduled_action(
&self,
) -> BatchDeleteScheduledActionFluentBuilder
pub fn batch_delete_scheduled_action( &self, ) -> BatchDeleteScheduledActionFluentBuilder
Constructs a fluent builder for the BatchDeleteScheduledAction
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
scheduled_action_names(impl Into<String>)
/set_scheduled_action_names(Option<Vec::<String>>)
:
required: trueThe names of the scheduled actions to delete. The maximum number allowed is 50.
- On success, responds with
BatchDeleteScheduledActionOutput
with field(s):failed_scheduled_actions(Option<Vec::<FailedScheduledUpdateGroupActionRequest>>)
:The names of the scheduled actions that could not be deleted, including an error message.
- On failure, responds with
SdkError<BatchDeleteScheduledActionError>
Source§impl Client
impl Client
Sourcepub fn batch_put_scheduled_update_group_action(
&self,
) -> BatchPutScheduledUpdateGroupActionFluentBuilder
pub fn batch_put_scheduled_update_group_action( &self, ) -> BatchPutScheduledUpdateGroupActionFluentBuilder
Constructs a fluent builder for the BatchPutScheduledUpdateGroupAction
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
scheduled_update_group_actions(ScheduledUpdateGroupActionRequest)
/set_scheduled_update_group_actions(Option<Vec::<ScheduledUpdateGroupActionRequest>>)
:
required: trueOne or more scheduled actions. The maximum number allowed is 50.
- On success, responds with
BatchPutScheduledUpdateGroupActionOutput
with field(s):failed_scheduled_update_group_actions(Option<Vec::<FailedScheduledUpdateGroupActionRequest>>)
:The names of the scheduled actions that could not be created or updated, including an error message.
- On failure, responds with
SdkError<BatchPutScheduledUpdateGroupActionError>
Source§impl Client
impl Client
Sourcepub fn cancel_instance_refresh(&self) -> CancelInstanceRefreshFluentBuilder
pub fn cancel_instance_refresh(&self) -> CancelInstanceRefreshFluentBuilder
Constructs a fluent builder for the CancelInstanceRefresh
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
- On success, responds with
CancelInstanceRefreshOutput
with field(s):instance_refresh_id(Option<String>)
:The instance refresh ID associated with the request. This is the unique ID assigned to the instance refresh when it was started.
- On failure, responds with
SdkError<CancelInstanceRefreshError>
Source§impl Client
impl Client
Sourcepub fn complete_lifecycle_action(&self) -> CompleteLifecycleActionFluentBuilder
pub fn complete_lifecycle_action(&self) -> CompleteLifecycleActionFluentBuilder
Constructs a fluent builder for the CompleteLifecycleAction
operation.
- The fluent builder is configurable:
lifecycle_hook_name(impl Into<String>)
/set_lifecycle_hook_name(Option<String>)
:
required: trueThe name of the lifecycle hook.
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
lifecycle_action_token(impl Into<String>)
/set_lifecycle_action_token(Option<String>)
:
required: falseA universally unique identifier (UUID) that identifies a specific lifecycle action associated with an instance. Amazon EC2 Auto Scaling sends this token to the notification target you specified when you created the lifecycle hook.
lifecycle_action_result(impl Into<String>)
/set_lifecycle_action_result(Option<String>)
:
required: trueThe action for the group to take. You can specify either
CONTINUE
orABANDON
.instance_id(impl Into<String>)
/set_instance_id(Option<String>)
:
required: falseThe ID of the instance.
- On success, responds with
CompleteLifecycleActionOutput
- On failure, responds with
SdkError<CompleteLifecycleActionError>
Source§impl Client
impl Client
Sourcepub fn create_auto_scaling_group(&self) -> CreateAutoScalingGroupFluentBuilder
pub fn create_auto_scaling_group(&self) -> CreateAutoScalingGroupFluentBuilder
Constructs a fluent builder for the CreateAutoScalingGroup
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group. This name must be unique per Region per account.
The name can contain any ASCII character 33 to 126 including most punctuation characters, digits, and upper and lowercased letters.
You cannot use a colon (:) in the name.
launch_configuration_name(impl Into<String>)
/set_launch_configuration_name(Option<String>)
:
required: falseThe name of the launch configuration to use to launch instances.
Conditional: You must specify either a launch template (
LaunchTemplate
orMixedInstancesPolicy
) or a launch configuration (LaunchConfigurationName
orInstanceId
).launch_template(LaunchTemplateSpecification)
/set_launch_template(Option<LaunchTemplateSpecification>)
:
required: falseInformation used to specify the launch template and version to use to launch instances.
Conditional: You must specify either a launch template (
LaunchTemplate
orMixedInstancesPolicy
) or a launch configuration (LaunchConfigurationName
orInstanceId
).The launch template that is specified must be configured for use with an Auto Scaling group. For more information, see Create a launch template for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
mixed_instances_policy(MixedInstancesPolicy)
/set_mixed_instances_policy(Option<MixedInstancesPolicy>)
:
required: falseThe mixed instances policy. For more information, see Auto Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User Guide.
instance_id(impl Into<String>)
/set_instance_id(Option<String>)
:
required: falseThe ID of the instance used to base the launch configuration on. If specified, Amazon EC2 Auto Scaling uses the configuration values from the specified instance to create a new launch configuration. To get the instance ID, use the Amazon EC2 DescribeInstances API operation. For more information, see Create an Auto Scaling group using parameters from an existing instance in the Amazon EC2 Auto Scaling User Guide.
min_size(i32)
/set_min_size(Option<i32>)
:
required: trueThe minimum size of the group.
max_size(i32)
/set_max_size(Option<i32>)
:
required: trueThe maximum size of the group.
With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above
MaxSize
to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go aboveMaxSize
by more than your largest instance weight (weights that define how many units each instance contributes to the desired capacity of the group).desired_capacity(i32)
/set_desired_capacity(Option<i32>)
:
required: falseThe desired capacity is the initial capacity of the Auto Scaling group at the time of its creation and the capacity it attempts to maintain. It can scale beyond this capacity if you configure auto scaling. This number must be greater than or equal to the minimum size of the group and less than or equal to the maximum size of the group. If you do not specify a desired capacity, the default is the minimum size of the group.
default_cooldown(i32)
/set_default_cooldown(Option<i32>)
:
required: falseOnly needed if you use simple scaling policies.
The amount of time, in seconds, between one scaling activity ending and another one starting due to simple scaling policies. For more information, see Scaling cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
Default:
300
secondsavailability_zones(impl Into<String>)
/set_availability_zones(Option<Vec::<String>>)
:
required: falseA list of Availability Zones where instances in the Auto Scaling group can be created. Used for launching into the default VPC subnet in each Availability Zone when not using the
VPCZoneIdentifier
property, or for attaching a network interface when an existing network interface ID is specified in a launch template.load_balancer_names(impl Into<String>)
/set_load_balancer_names(Option<Vec::<String>>)
:
required: falseA list of Classic Load Balancers associated with this Auto Scaling group. For Application Load Balancers, Network Load Balancers, and Gateway Load Balancers, specify the
TargetGroupARNs
property instead.target_group_arns(impl Into<String>)
/set_target_group_arns(Option<Vec::<String>>)
:
required: falseThe Amazon Resource Names (ARN) of the Elastic Load Balancing target groups to associate with the Auto Scaling group. Instances are registered as targets with the target groups. The target groups receive incoming traffic and route requests to one or more registered targets. For more information, see Use Elastic Load Balancing to distribute traffic across the instances in your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
health_check_type(impl Into<String>)
/set_health_check_type(Option<String>)
:
required: falseA comma-separated value string of one or more health check types.
The valid values are
EC2
,EBS
,ELB
, andVPC_LATTICE
.EC2
is the default health check and cannot be disabled. For more information, see Health checks for instances in an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.Only specify
EC2
if you must clear a value that was previously set.health_check_grace_period(i32)
/set_health_check_grace_period(Option<i32>)
:
required: falseThe amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service and marking it unhealthy due to a failed health check. This is useful if your instances do not immediately pass their health checks after they enter the
InService
state. For more information, see Set the health check grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.Default:
0
secondsplacement_group(impl Into<String>)
/set_placement_group(Option<String>)
:
required: falseThe name of the placement group into which to launch your instances. For more information, see Placement groups in the Amazon EC2 User Guide.
A cluster placement group is a logical grouping of instances within a single Availability Zone. You cannot specify multiple Availability Zones and a cluster placement group.
vpc_zone_identifier(impl Into<String>)
/set_vpc_zone_identifier(Option<String>)
:
required: falseA comma-separated list of subnet IDs for a virtual private cloud (VPC) where instances in the Auto Scaling group can be created. If you specify
VPCZoneIdentifier
withAvailabilityZones
, the subnets that you specify must reside in those Availability Zones.termination_policies(impl Into<String>)
/set_termination_policies(Option<Vec::<String>>)
:
required: falseA policy or a list of policies that are used to select the instance to terminate. These policies are executed in the order that you list them. For more information, see Configure termination policies for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
Valid values:
Default
|AllocationStrategy
|ClosestToNextInstanceHour
|NewestInstance
|OldestInstance
|OldestLaunchConfiguration
|OldestLaunchTemplate
|arn:aws:lambda:region:account-id:function:my-function:my-alias
new_instances_protected_from_scale_in(bool)
/set_new_instances_protected_from_scale_in(Option<bool>)
:
required: falseIndicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see Use instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
capacity_rebalance(bool)
/set_capacity_rebalance(Option<bool>)
:
required: falseIndicates whether Capacity Rebalancing is enabled. Otherwise, Capacity Rebalancing is disabled. When you turn on Capacity Rebalancing, Amazon EC2 Auto Scaling attempts to launch a Spot Instance whenever Amazon EC2 notifies that a Spot Instance is at an elevated risk of interruption. After launching a new instance, it then terminates an old instance. For more information, see Use Capacity Rebalancing to handle Amazon EC2 Spot Interruptions in the in the Amazon EC2 Auto Scaling User Guide.
lifecycle_hook_specification_list(LifecycleHookSpecification)
/set_lifecycle_hook_specification_list(Option<Vec::<LifecycleHookSpecification>>)
:
required: falseOne or more lifecycle hooks to add to the Auto Scaling group before instances are launched.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseOne or more tags. You can tag your Auto Scaling group and propagate the tags to the Amazon EC2 instances it launches. Tags are not propagated to Amazon EBS volumes. To add tags to Amazon EBS volumes, specify the tags in a launch template but use caution. If the launch template specifies an instance tag with a key that is also specified for the Auto Scaling group, Amazon EC2 Auto Scaling overrides the value of that instance tag with the value specified by the Auto Scaling group. For more information, see Tag Auto Scaling groups and instances in the Amazon EC2 Auto Scaling User Guide.
service_linked_role_arn(impl Into<String>)
/set_service_linked_role_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other Amazon Web Services service on your behalf. By default, Amazon EC2 Auto Scaling uses a service-linked role named
AWSServiceRoleForAutoScaling
, which it creates if it does not exist. For more information, see Service-linked roles in the Amazon EC2 Auto Scaling User Guide.max_instance_lifetime(i32)
/set_max_instance_lifetime(Option<i32>)
:
required: falseThe maximum amount of time, in seconds, that an instance can be in service. The default is null. If specified, the value must be either 0 or a number equal to or greater than 86,400 seconds (1 day). For more information, see Replace Auto Scaling instances based on maximum instance lifetime in the Amazon EC2 Auto Scaling User Guide.
context(impl Into<String>)
/set_context(Option<String>)
:
required: falseReserved.
desired_capacity_type(impl Into<String>)
/set_desired_capacity_type(Option<String>)
:
required: falseThe unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports
DesiredCapacityType
for attribute-based instance type selection only. For more information, see Create a mixed instances group using attribute-based instance type selection in the Amazon EC2 Auto Scaling User Guide.By default, Amazon EC2 Auto Scaling specifies
units
, which translates into number of instances.Valid values:
units
|vcpu
|memory-mib
default_instance_warmup(i32)
/set_default_instance_warmup(Option<i32>)
:
required: falseThe amount of time, in seconds, until a new instance is considered to have finished initializing and resource consumption to become stable after it enters the
InService
state.During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an instance before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the warm-up period before aggregating the metrics for new instances with existing instances in the Amazon CloudWatch metrics that are used for scaling, resulting in more reliable usage data. For more information, see Set the default instance warmup for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
To manage various warm-up settings at the group level, we recommend that you set the default instance warmup, even if it is set to 0 seconds. To remove a value that you previously set, include the property but specify
-1
for the value. However, we strongly recommend keeping the default instance warmup enabled by specifying a value of0
or other nominal value.Default: None
traffic_sources(TrafficSourceIdentifier)
/set_traffic_sources(Option<Vec::<TrafficSourceIdentifier>>)
:
required: falseThe list of traffic sources to attach to this Auto Scaling group. You can use any of the following as traffic sources for an Auto Scaling group: Classic Load Balancer, Application Load Balancer, Gateway Load Balancer, Network Load Balancer, and VPC Lattice.
instance_maintenance_policy(InstanceMaintenancePolicy)
/set_instance_maintenance_policy(Option<InstanceMaintenancePolicy>)
:
required: falseAn instance maintenance policy. For more information, see Set instance maintenance policy in the Amazon EC2 Auto Scaling User Guide.
availability_zone_distribution(AvailabilityZoneDistribution)
/set_availability_zone_distribution(Option<AvailabilityZoneDistribution>)
:
required: falseThe instance capacity distribution across Availability Zones.
availability_zone_impairment_policy(AvailabilityZoneImpairmentPolicy)
/set_availability_zone_impairment_policy(Option<AvailabilityZoneImpairmentPolicy>)
:
required: falseThe policy for Availability Zone impairment.
skip_zonal_shift_validation(bool)
/set_skip_zonal_shift_validation(Option<bool>)
:
required: falseIf you enable zonal shift with cross-zone disabled load balancers, capacity could become imbalanced across Availability Zones. To skip the validation, specify
true
. For more information, see Auto Scaling group zonal shift in the Amazon EC2 Auto Scaling User Guide.capacity_reservation_specification(CapacityReservationSpecification)
/set_capacity_reservation_specification(Option<CapacityReservationSpecification>)
:
required: falseThe capacity reservation specification for the Auto Scaling group.
- On success, responds with
CreateAutoScalingGroupOutput
- On failure, responds with
SdkError<CreateAutoScalingGroupError>
Source§impl Client
impl Client
Sourcepub fn create_launch_configuration(
&self,
) -> CreateLaunchConfigurationFluentBuilder
pub fn create_launch_configuration( &self, ) -> CreateLaunchConfigurationFluentBuilder
Constructs a fluent builder for the CreateLaunchConfiguration
operation.
- The fluent builder is configurable:
launch_configuration_name(impl Into<String>)
/set_launch_configuration_name(Option<String>)
:
required: trueThe name of the launch configuration. This name must be unique per Region per account.
image_id(impl Into<String>)
/set_image_id(Option<String>)
:
required: falseThe ID of the Amazon Machine Image (AMI) that was assigned during registration. For more information, see Find a Linux AMI in the Amazon EC2 User Guide.
If you specify
InstanceId
, anImageId
is not required.key_name(impl Into<String>)
/set_key_name(Option<String>)
:
required: falseThe name of the key pair. For more information, see Amazon EC2 key pairs and Amazon EC2 instances in the Amazon EC2 User Guide.
security_groups(impl Into<String>)
/set_security_groups(Option<Vec::<String>>)
:
required: falseA list that contains the security group IDs to assign to the instances in the Auto Scaling group. For more information, see Control traffic to your Amazon Web Services resources using security groups in the Amazon Virtual Private Cloud User Guide.
classic_link_vpc_id(impl Into<String>)
/set_classic_link_vpc_id(Option<String>)
:
required: falseAvailable for backward compatibility.
classic_link_vpc_security_groups(impl Into<String>)
/set_classic_link_vpc_security_groups(Option<Vec::<String>>)
:
required: falseAvailable for backward compatibility.
user_data(impl Into<String>)
/set_user_data(Option<String>)
:
required: falseThe user data to make available to the launched EC2 instances. For more information, see Instance metadata and user data (Linux) and Instance metadata and user data (Windows). If you are using a command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is limited to 16 KB.
instance_id(impl Into<String>)
/set_instance_id(Option<String>)
:
required: falseThe ID of the instance to use to create the launch configuration. The new launch configuration derives attributes from the instance, except for the block device mapping.
To create a launch configuration with a block device mapping or override any other instance attributes, specify them as part of the same request.
For more information, see Create a launch configuration in the Amazon EC2 Auto Scaling User Guide.
instance_type(impl Into<String>)
/set_instance_type(Option<String>)
:
required: falseSpecifies the instance type of the EC2 instance. For information about available instance types, see Available instance types in the Amazon EC2 User Guide.
If you specify
InstanceId
, anInstanceType
is not required.kernel_id(impl Into<String>)
/set_kernel_id(Option<String>)
:
required: falseThe ID of the kernel associated with the AMI.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User provided kernels in the Amazon EC2 User Guide.
ramdisk_id(impl Into<String>)
/set_ramdisk_id(Option<String>)
:
required: falseThe ID of the RAM disk to select.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User provided kernels in the Amazon EC2 User Guide.
block_device_mappings(BlockDeviceMapping)
/set_block_device_mappings(Option<Vec::<BlockDeviceMapping>>)
:
required: falseThe block device mapping entries that define the block devices to attach to the instances at launch. By default, the block devices specified in the block device mapping for the AMI are used. For more information, see Block device mappings in the Amazon EC2 User Guide.
instance_monitoring(InstanceMonitoring)
/set_instance_monitoring(Option<InstanceMonitoring>)
:
required: falseControls whether instances in this group are launched with detailed (
true
) or basic (false
) monitoring.The default value is
true
(enabled).When detailed monitoring is enabled, Amazon CloudWatch generates metrics every minute and your account is charged a fee. When you disable detailed monitoring, CloudWatch generates metrics every 5 minutes. For more information, see Configure monitoring for Auto Scaling instances in the Amazon EC2 Auto Scaling User Guide.
spot_price(impl Into<String>)
/set_spot_price(Option<String>)
:
required: falseThe maximum hourly price to be paid for any Spot Instance launched to fulfill the request. Spot Instances are launched when the price you specify exceeds the current Spot price. For more information, see Request Spot Instances for fault-tolerant and flexible applications in the Amazon EC2 Auto Scaling User Guide.
Valid Range: Minimum value of 0.001
When you change your maximum price by creating a new launch configuration, running instances will continue to run as long as the maximum price for those running instances is higher than the current Spot price.
iam_instance_profile(impl Into<String>)
/set_iam_instance_profile(Option<String>)
:
required: falseThe name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance. The instance profile contains the IAM role. For more information, see IAM role for applications that run on Amazon EC2 instances in the Amazon EC2 Auto Scaling User Guide.
ebs_optimized(bool)
/set_ebs_optimized(Option<bool>)
:
required: falseSpecifies whether the launch configuration is optimized for EBS I/O (
true
) or not (false
). The optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization is not available with all instance types. Additional fees are incurred when you enable EBS optimization for an instance type that is not EBS-optimized by default. For more information, see Amazon EBS-optimized instances in the Amazon EC2 User Guide.The default value is
false
.associate_public_ip_address(bool)
/set_associate_public_ip_address(Option<bool>)
:
required: falseSpecifies whether to assign a public IPv4 address to the group’s instances. If the instance is launched into a default subnet, the default is to assign a public IPv4 address, unless you disabled the option to assign a public IPv4 address on the subnet. If the instance is launched into a nondefault subnet, the default is not to assign a public IPv4 address, unless you enabled the option to assign a public IPv4 address on the subnet.
If you specify
true
, each instance in the Auto Scaling group receives a unique public IPv4 address. For more information, see Provide network connectivity for your Auto Scaling instances using Amazon VPC in the Amazon EC2 Auto Scaling User Guide.If you specify this property, you must specify at least one subnet for
VPCZoneIdentifier
when you create your group.placement_tenancy(impl Into<String>)
/set_placement_tenancy(Option<String>)
:
required: falseThe tenancy of the instance, either
default
ordedicated
. An instance withdedicated
tenancy runs on isolated, single-tenant hardware and can only be launched into a VPC. To launch dedicated instances into a shared tenancy VPC (a VPC with the instance placement tenancy attribute set todefault
), you must set the value of this property todedicated
.If you specify
PlacementTenancy
, you must specify at least one subnet forVPCZoneIdentifier
when you create your group.Valid values:
default
|dedicated
metadata_options(InstanceMetadataOptions)
/set_metadata_options(Option<InstanceMetadataOptions>)
:
required: falseThe metadata options for the instances. For more information, see Configure the instance metadata options in the Amazon EC2 Auto Scaling User Guide.
- On success, responds with
CreateLaunchConfigurationOutput
- On failure, responds with
SdkError<CreateLaunchConfigurationError>
Source§impl Client
impl Client
Constructs a fluent builder for the CreateOrUpdateTags
operation.
- The fluent builder is configurable:
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: trueOne or more tags.
- On success, responds with
CreateOrUpdateTagsOutput
- On failure, responds with
SdkError<CreateOrUpdateTagsError>
Source§impl Client
impl Client
Sourcepub fn delete_auto_scaling_group(&self) -> DeleteAutoScalingGroupFluentBuilder
pub fn delete_auto_scaling_group(&self) -> DeleteAutoScalingGroupFluentBuilder
Constructs a fluent builder for the DeleteAutoScalingGroup
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
force_delete(bool)
/set_force_delete(Option<bool>)
:
required: falseSpecifies that the group is to be deleted along with all instances associated with the group, without waiting for all instances to be terminated. This action also deletes any outstanding lifecycle actions associated with the group.
- On success, responds with
DeleteAutoScalingGroupOutput
- On failure, responds with
SdkError<DeleteAutoScalingGroupError>
Source§impl Client
impl Client
Sourcepub fn delete_launch_configuration(
&self,
) -> DeleteLaunchConfigurationFluentBuilder
pub fn delete_launch_configuration( &self, ) -> DeleteLaunchConfigurationFluentBuilder
Constructs a fluent builder for the DeleteLaunchConfiguration
operation.
- The fluent builder is configurable:
launch_configuration_name(impl Into<String>)
/set_launch_configuration_name(Option<String>)
:
required: trueThe name of the launch configuration.
- On success, responds with
DeleteLaunchConfigurationOutput
- On failure, responds with
SdkError<DeleteLaunchConfigurationError>
Source§impl Client
impl Client
Sourcepub fn delete_lifecycle_hook(&self) -> DeleteLifecycleHookFluentBuilder
pub fn delete_lifecycle_hook(&self) -> DeleteLifecycleHookFluentBuilder
Constructs a fluent builder for the DeleteLifecycleHook
operation.
- The fluent builder is configurable:
lifecycle_hook_name(impl Into<String>)
/set_lifecycle_hook_name(Option<String>)
:
required: trueThe name of the lifecycle hook.
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
- On success, responds with
DeleteLifecycleHookOutput
- On failure, responds with
SdkError<DeleteLifecycleHookError>
Source§impl Client
impl Client
Sourcepub fn delete_notification_configuration(
&self,
) -> DeleteNotificationConfigurationFluentBuilder
pub fn delete_notification_configuration( &self, ) -> DeleteNotificationConfigurationFluentBuilder
Constructs a fluent builder for the DeleteNotificationConfiguration
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
topic_arn(impl Into<String>)
/set_topic_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the Amazon SNS topic.
- On success, responds with
DeleteNotificationConfigurationOutput
- On failure, responds with
SdkError<DeleteNotificationConfigurationError>
Source§impl Client
impl Client
Sourcepub fn delete_policy(&self) -> DeletePolicyFluentBuilder
pub fn delete_policy(&self) -> DeletePolicyFluentBuilder
Constructs a fluent builder for the DeletePolicy
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: falseThe name of the Auto Scaling group.
policy_name(impl Into<String>)
/set_policy_name(Option<String>)
:
required: trueThe name or Amazon Resource Name (ARN) of the policy.
- On success, responds with
DeletePolicyOutput
- On failure, responds with
SdkError<DeletePolicyError>
Source§impl Client
impl Client
Sourcepub fn delete_scheduled_action(&self) -> DeleteScheduledActionFluentBuilder
pub fn delete_scheduled_action(&self) -> DeleteScheduledActionFluentBuilder
Constructs a fluent builder for the DeleteScheduledAction
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
scheduled_action_name(impl Into<String>)
/set_scheduled_action_name(Option<String>)
:
required: trueThe name of the action to delete.
- On success, responds with
DeleteScheduledActionOutput
- On failure, responds with
SdkError<DeleteScheduledActionError>
Source§impl Client
impl Client
Constructs a fluent builder for the DeleteTags
operation.
- The fluent builder is configurable:
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: trueOne or more tags.
- On success, responds with
DeleteTagsOutput
- On failure, responds with
SdkError<DeleteTagsError>
Source§impl Client
impl Client
Sourcepub fn delete_warm_pool(&self) -> DeleteWarmPoolFluentBuilder
pub fn delete_warm_pool(&self) -> DeleteWarmPoolFluentBuilder
Constructs a fluent builder for the DeleteWarmPool
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
force_delete(bool)
/set_force_delete(Option<bool>)
:
required: falseSpecifies that the warm pool is to be deleted along with all of its associated instances, without waiting for all instances to be terminated. This parameter also deletes any outstanding lifecycle actions associated with the warm pool instances.
- On success, responds with
DeleteWarmPoolOutput
- On failure, responds with
SdkError<DeleteWarmPoolError>
Source§impl Client
impl Client
Sourcepub fn describe_account_limits(&self) -> DescribeAccountLimitsFluentBuilder
pub fn describe_account_limits(&self) -> DescribeAccountLimitsFluentBuilder
Constructs a fluent builder for the DescribeAccountLimits
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
DescribeAccountLimitsOutput
with field(s):max_number_of_auto_scaling_groups(Option<i32>)
:The maximum number of groups allowed for your account. The default is 200 groups per Region.
max_number_of_launch_configurations(Option<i32>)
:The maximum number of launch configurations allowed for your account. The default is 200 launch configurations per Region.
number_of_auto_scaling_groups(Option<i32>)
:The current number of groups for your account.
number_of_launch_configurations(Option<i32>)
:The current number of launch configurations for your account.
- On failure, responds with
SdkError<DescribeAccountLimitsError>
Source§impl Client
impl Client
Sourcepub fn describe_adjustment_types(&self) -> DescribeAdjustmentTypesFluentBuilder
pub fn describe_adjustment_types(&self) -> DescribeAdjustmentTypesFluentBuilder
Constructs a fluent builder for the DescribeAdjustmentTypes
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
DescribeAdjustmentTypesOutput
with field(s):adjustment_types(Option<Vec::<AdjustmentType>>)
:The policy adjustment types.
- On failure, responds with
SdkError<DescribeAdjustmentTypesError>
Source§impl Client
impl Client
Sourcepub fn describe_auto_scaling_groups(
&self,
) -> DescribeAutoScalingGroupsFluentBuilder
pub fn describe_auto_scaling_groups( &self, ) -> DescribeAutoScalingGroupsFluentBuilder
Constructs a fluent builder for the DescribeAutoScalingGroups
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
auto_scaling_group_names(impl Into<String>)
/set_auto_scaling_group_names(Option<Vec::<String>>)
:
required: falseThe names of the Auto Scaling groups. By default, you can only specify up to 50 names. You can optionally increase this limit using the
MaxRecords
property.If you omit this property, all Auto Scaling groups are described.
include_instances(bool)
/set_include_instances(Option<bool>)
:
required: falseSpecifies whether to include information about Amazon EC2 instances in the response. When set to
true
(default), the response includes instance details.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
max_records(i32)
/set_max_records(Option<i32>)
:
required: falseThe maximum number of items to return with this call. The default value is
50
and the maximum value is100
.filters(Filter)
/set_filters(Option<Vec::<Filter>>)
:
required: falseOne or more filters to limit the results based on specific tags.
- On success, responds with
DescribeAutoScalingGroupsOutput
with field(s):auto_scaling_groups(Option<Vec::<AutoScalingGroup>>)
:The groups.
next_token(Option<String>)
:A string that indicates that the response contains more items than can be returned in a single response. To receive additional items, specify this string for the
NextToken
value when requesting the next set of items. This value is null when there are no more items to return.
- On failure, responds with
SdkError<DescribeAutoScalingGroupsError>
Source§impl Client
impl Client
Sourcepub fn describe_auto_scaling_instances(
&self,
) -> DescribeAutoScalingInstancesFluentBuilder
pub fn describe_auto_scaling_instances( &self, ) -> DescribeAutoScalingInstancesFluentBuilder
Constructs a fluent builder for the DescribeAutoScalingInstances
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
instance_ids(impl Into<String>)
/set_instance_ids(Option<Vec::<String>>)
:
required: falseThe IDs of the instances. If you omit this property, all Auto Scaling instances are described. If you specify an ID that does not exist, it is ignored with no error.
Array Members: Maximum number of 50 items.
max_records(i32)
/set_max_records(Option<i32>)
:
required: falseThe maximum number of items to return with this call. The default value is
50
and the maximum value is50
.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
- On success, responds with
DescribeAutoScalingInstancesOutput
with field(s):auto_scaling_instances(Option<Vec::<AutoScalingInstanceDetails>>)
:The instances.
next_token(Option<String>)
:A string that indicates that the response contains more items than can be returned in a single response. To receive additional items, specify this string for the
NextToken
value when requesting the next set of items. This value is null when there are no more items to return.
- On failure, responds with
SdkError<DescribeAutoScalingInstancesError>
Source§impl Client
impl Client
Sourcepub fn describe_auto_scaling_notification_types(
&self,
) -> DescribeAutoScalingNotificationTypesFluentBuilder
pub fn describe_auto_scaling_notification_types( &self, ) -> DescribeAutoScalingNotificationTypesFluentBuilder
Constructs a fluent builder for the DescribeAutoScalingNotificationTypes
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
DescribeAutoScalingNotificationTypesOutput
with field(s):auto_scaling_notification_types(Option<Vec::<String>>)
:The notification types.
- On failure, responds with
SdkError<DescribeAutoScalingNotificationTypesError>
Source§impl Client
impl Client
Sourcepub fn describe_instance_refreshes(
&self,
) -> DescribeInstanceRefreshesFluentBuilder
pub fn describe_instance_refreshes( &self, ) -> DescribeInstanceRefreshesFluentBuilder
Constructs a fluent builder for the DescribeInstanceRefreshes
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
instance_refresh_ids(impl Into<String>)
/set_instance_refresh_ids(Option<Vec::<String>>)
:
required: falseOne or more instance refresh IDs.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
max_records(i32)
/set_max_records(Option<i32>)
:
required: falseThe maximum number of items to return with this call. The default value is
50
and the maximum value is100
.
- On success, responds with
DescribeInstanceRefreshesOutput
with field(s):instance_refreshes(Option<Vec::<InstanceRefresh>>)
:The instance refreshes for the specified group, sorted by creation timestamp in descending order.
next_token(Option<String>)
:A string that indicates that the response contains more items than can be returned in a single response. To receive additional items, specify this string for the
NextToken
value when requesting the next set of items. This value is null when there are no more items to return.
- On failure, responds with
SdkError<DescribeInstanceRefreshesError>
Source§impl Client
impl Client
Sourcepub fn describe_launch_configurations(
&self,
) -> DescribeLaunchConfigurationsFluentBuilder
pub fn describe_launch_configurations( &self, ) -> DescribeLaunchConfigurationsFluentBuilder
Constructs a fluent builder for the DescribeLaunchConfigurations
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
launch_configuration_names(impl Into<String>)
/set_launch_configuration_names(Option<Vec::<String>>)
:
required: falseThe launch configuration names. If you omit this property, all launch configurations are described.
Array Members: Maximum number of 50 items.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
max_records(i32)
/set_max_records(Option<i32>)
:
required: falseThe maximum number of items to return with this call. The default value is
50
and the maximum value is100
.
- On success, responds with
DescribeLaunchConfigurationsOutput
with field(s):launch_configurations(Option<Vec::<LaunchConfiguration>>)
:The launch configurations.
next_token(Option<String>)
:A string that indicates that the response contains more items than can be returned in a single response. To receive additional items, specify this string for the
NextToken
value when requesting the next set of items. This value is null when there are no more items to return.
- On failure, responds with
SdkError<DescribeLaunchConfigurationsError>
Source§impl Client
impl Client
Sourcepub fn describe_lifecycle_hook_types(
&self,
) -> DescribeLifecycleHookTypesFluentBuilder
pub fn describe_lifecycle_hook_types( &self, ) -> DescribeLifecycleHookTypesFluentBuilder
Constructs a fluent builder for the DescribeLifecycleHookTypes
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
DescribeLifecycleHookTypesOutput
with field(s):lifecycle_hook_types(Option<Vec::<String>>)
:The lifecycle hook types.
- On failure, responds with
SdkError<DescribeLifecycleHookTypesError>
Source§impl Client
impl Client
Sourcepub fn describe_lifecycle_hooks(&self) -> DescribeLifecycleHooksFluentBuilder
pub fn describe_lifecycle_hooks(&self) -> DescribeLifecycleHooksFluentBuilder
Constructs a fluent builder for the DescribeLifecycleHooks
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
lifecycle_hook_names(impl Into<String>)
/set_lifecycle_hook_names(Option<Vec::<String>>)
:
required: falseThe names of one or more lifecycle hooks. If you omit this property, all lifecycle hooks are described.
- On success, responds with
DescribeLifecycleHooksOutput
with field(s):lifecycle_hooks(Option<Vec::<LifecycleHook>>)
:The lifecycle hooks for the specified group.
- On failure, responds with
SdkError<DescribeLifecycleHooksError>
Source§impl Client
impl Client
Sourcepub fn describe_load_balancer_target_groups(
&self,
) -> DescribeLoadBalancerTargetGroupsFluentBuilder
pub fn describe_load_balancer_target_groups( &self, ) -> DescribeLoadBalancerTargetGroupsFluentBuilder
Constructs a fluent builder for the DescribeLoadBalancerTargetGroups
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
max_records(i32)
/set_max_records(Option<i32>)
:
required: falseThe maximum number of items to return with this call. The default value is
100
and the maximum value is100
.
- On success, responds with
DescribeLoadBalancerTargetGroupsOutput
with field(s):load_balancer_target_groups(Option<Vec::<LoadBalancerTargetGroupState>>)
:Information about the target groups.
next_token(Option<String>)
:A string that indicates that the response contains more items than can be returned in a single response. To receive additional items, specify this string for the
NextToken
value when requesting the next set of items. This value is null when there are no more items to return.
- On failure, responds with
SdkError<DescribeLoadBalancerTargetGroupsError>
Source§impl Client
impl Client
Sourcepub fn describe_load_balancers(&self) -> DescribeLoadBalancersFluentBuilder
pub fn describe_load_balancers(&self) -> DescribeLoadBalancersFluentBuilder
Constructs a fluent builder for the DescribeLoadBalancers
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
max_records(i32)
/set_max_records(Option<i32>)
:
required: falseThe maximum number of items to return with this call. The default value is
100
and the maximum value is100
.
- On success, responds with
DescribeLoadBalancersOutput
with field(s):load_balancers(Option<Vec::<LoadBalancerState>>)
:The load balancers.
next_token(Option<String>)
:A string that indicates that the response contains more items than can be returned in a single response. To receive additional items, specify this string for the
NextToken
value when requesting the next set of items. This value is null when there are no more items to return.
- On failure, responds with
SdkError<DescribeLoadBalancersError>
Source§impl Client
impl Client
Sourcepub fn describe_metric_collection_types(
&self,
) -> DescribeMetricCollectionTypesFluentBuilder
pub fn describe_metric_collection_types( &self, ) -> DescribeMetricCollectionTypesFluentBuilder
Constructs a fluent builder for the DescribeMetricCollectionTypes
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
DescribeMetricCollectionTypesOutput
with field(s):metrics(Option<Vec::<MetricCollectionType>>)
:The metrics.
granularities(Option<Vec::<MetricGranularityType>>)
:The granularities for the metrics.
- On failure, responds with
SdkError<DescribeMetricCollectionTypesError>
Source§impl Client
impl Client
Sourcepub fn describe_notification_configurations(
&self,
) -> DescribeNotificationConfigurationsFluentBuilder
pub fn describe_notification_configurations( &self, ) -> DescribeNotificationConfigurationsFluentBuilder
Constructs a fluent builder for the DescribeNotificationConfigurations
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
auto_scaling_group_names(impl Into<String>)
/set_auto_scaling_group_names(Option<Vec::<String>>)
:
required: falseThe name of the Auto Scaling group.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
max_records(i32)
/set_max_records(Option<i32>)
:
required: falseThe maximum number of items to return with this call. The default value is
50
and the maximum value is100
.
- On success, responds with
DescribeNotificationConfigurationsOutput
with field(s):notification_configurations(Option<Vec::<NotificationConfiguration>>)
:The notification configurations.
next_token(Option<String>)
:A string that indicates that the response contains more items than can be returned in a single response. To receive additional items, specify this string for the
NextToken
value when requesting the next set of items. This value is null when there are no more items to return.
- On failure, responds with
SdkError<DescribeNotificationConfigurationsError>
Source§impl Client
impl Client
Sourcepub fn describe_policies(&self) -> DescribePoliciesFluentBuilder
pub fn describe_policies(&self) -> DescribePoliciesFluentBuilder
Constructs a fluent builder for the DescribePolicies
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: falseThe name of the Auto Scaling group.
policy_names(impl Into<String>)
/set_policy_names(Option<Vec::<String>>)
:
required: falseThe names of one or more policies. If you omit this property, all policies are described. If a group name is provided, the results are limited to that group. If you specify an unknown policy name, it is ignored with no error.
Array Members: Maximum number of 50 items.
policy_types(impl Into<String>)
/set_policy_types(Option<Vec::<String>>)
:
required: falseOne or more policy types. The valid values are
SimpleScaling
,StepScaling
,TargetTrackingScaling
, andPredictiveScaling
.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
max_records(i32)
/set_max_records(Option<i32>)
:
required: falseThe maximum number of items to be returned with each call. The default value is
50
and the maximum value is100
.
- On success, responds with
DescribePoliciesOutput
with field(s):scaling_policies(Option<Vec::<ScalingPolicy>>)
:The scaling policies.
next_token(Option<String>)
:A string that indicates that the response contains more items than can be returned in a single response. To receive additional items, specify this string for the
NextToken
value when requesting the next set of items. This value is null when there are no more items to return.
- On failure, responds with
SdkError<DescribePoliciesError>
Source§impl Client
impl Client
Sourcepub fn describe_scaling_activities(
&self,
) -> DescribeScalingActivitiesFluentBuilder
pub fn describe_scaling_activities( &self, ) -> DescribeScalingActivitiesFluentBuilder
Constructs a fluent builder for the DescribeScalingActivities
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
activity_ids(impl Into<String>)
/set_activity_ids(Option<Vec::<String>>)
:
required: falseThe activity IDs of the desired scaling activities. If you omit this property, all activities for the past six weeks are described. If unknown activities are requested, they are ignored with no error. If you specify an Auto Scaling group, the results are limited to that group.
Array Members: Maximum number of 50 IDs.
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: falseThe name of the Auto Scaling group.
include_deleted_groups(bool)
/set_include_deleted_groups(Option<bool>)
:
required: falseIndicates whether to include scaling activity from deleted Auto Scaling groups.
max_records(i32)
/set_max_records(Option<i32>)
:
required: falseThe maximum number of items to return with this call. The default value is
100
and the maximum value is100
.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
- On success, responds with
DescribeScalingActivitiesOutput
with field(s):activities(Option<Vec::<Activity>>)
:The scaling activities. Activities are sorted by start time. Activities still in progress are described first.
next_token(Option<String>)
:A string that indicates that the response contains more items than can be returned in a single response. To receive additional items, specify this string for the
NextToken
value when requesting the next set of items. This value is null when there are no more items to return.
- On failure, responds with
SdkError<DescribeScalingActivitiesError>
Source§impl Client
impl Client
Sourcepub fn describe_scaling_process_types(
&self,
) -> DescribeScalingProcessTypesFluentBuilder
pub fn describe_scaling_process_types( &self, ) -> DescribeScalingProcessTypesFluentBuilder
Constructs a fluent builder for the DescribeScalingProcessTypes
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
DescribeScalingProcessTypesOutput
with field(s):processes(Option<Vec::<ProcessType>>)
:The names of the process types.
- On failure, responds with
SdkError<DescribeScalingProcessTypesError>
Source§impl Client
impl Client
Sourcepub fn describe_scheduled_actions(
&self,
) -> DescribeScheduledActionsFluentBuilder
pub fn describe_scheduled_actions( &self, ) -> DescribeScheduledActionsFluentBuilder
Constructs a fluent builder for the DescribeScheduledActions
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: falseThe name of the Auto Scaling group.
scheduled_action_names(impl Into<String>)
/set_scheduled_action_names(Option<Vec::<String>>)
:
required: falseThe names of one or more scheduled actions. If you omit this property, all scheduled actions are described. If you specify an unknown scheduled action, it is ignored with no error.
Array Members: Maximum number of 50 actions.
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: falseThe earliest scheduled start time to return. If scheduled action names are provided, this property is ignored.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: falseThe latest scheduled start time to return. If scheduled action names are provided, this property is ignored.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
max_records(i32)
/set_max_records(Option<i32>)
:
required: falseThe maximum number of items to return with this call. The default value is
50
and the maximum value is100
.
- On success, responds with
DescribeScheduledActionsOutput
with field(s):scheduled_update_group_actions(Option<Vec::<ScheduledUpdateGroupAction>>)
:The scheduled actions.
next_token(Option<String>)
:A string that indicates that the response contains more items than can be returned in a single response. To receive additional items, specify this string for the
NextToken
value when requesting the next set of items. This value is null when there are no more items to return.
- On failure, responds with
SdkError<DescribeScheduledActionsError>
Source§impl Client
impl Client
Constructs a fluent builder for the DescribeTags
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
filters(Filter)
/set_filters(Option<Vec::<Filter>>)
:
required: falseOne or more filters to scope the tags to return. The maximum number of filters per filter type (for example,
auto-scaling-group
) is 1000.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
max_records(i32)
/set_max_records(Option<i32>)
:
required: falseThe maximum number of items to return with this call. The default value is
50
and the maximum value is100
.
- On success, responds with
DescribeTagsOutput
with field(s):tags(Option<Vec::<TagDescription>>)
:One or more tags.
next_token(Option<String>)
:A string that indicates that the response contains more items than can be returned in a single response. To receive additional items, specify this string for the
NextToken
value when requesting the next set of items. This value is null when there are no more items to return.
- On failure, responds with
SdkError<DescribeTagsError>
Source§impl Client
impl Client
Sourcepub fn describe_termination_policy_types(
&self,
) -> DescribeTerminationPolicyTypesFluentBuilder
pub fn describe_termination_policy_types( &self, ) -> DescribeTerminationPolicyTypesFluentBuilder
Constructs a fluent builder for the DescribeTerminationPolicyTypes
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
DescribeTerminationPolicyTypesOutput
with field(s):termination_policy_types(Option<Vec::<String>>)
:The termination policies supported by Amazon EC2 Auto Scaling:
OldestInstance
,OldestLaunchConfiguration
,NewestInstance
,ClosestToNextInstanceHour
,Default
,OldestLaunchTemplate
, andAllocationStrategy
.
- On failure, responds with
SdkError<DescribeTerminationPolicyTypesError>
Source§impl Client
impl Client
Sourcepub fn describe_traffic_sources(&self) -> DescribeTrafficSourcesFluentBuilder
pub fn describe_traffic_sources(&self) -> DescribeTrafficSourcesFluentBuilder
Constructs a fluent builder for the DescribeTrafficSources
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
traffic_source_type(impl Into<String>)
/set_traffic_source_type(Option<String>)
:
required: falseThe traffic source type that you want to describe.
The following lists the valid values:
-
elb
if the traffic source is a Classic Load Balancer. -
elbv2
if the traffic source is a Application Load Balancer, Gateway Load Balancer, or Network Load Balancer. -
vpc-lattice
if the traffic source is VPC Lattice.
-
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. (You received this token from a previous call.)
max_records(i32)
/set_max_records(Option<i32>)
:
required: falseThe maximum number of items to return with this call. The maximum value is
50
.
- On success, responds with
DescribeTrafficSourcesOutput
with field(s):traffic_sources(Option<Vec::<TrafficSourceState>>)
:Information about the traffic sources.
next_token(Option<String>)
:This string indicates that the response contains more items than can be returned in a single response. To receive additional items, specify this string for the
NextToken
value when requesting the next set of items. This value is null when there are no more items to return.
- On failure, responds with
SdkError<DescribeTrafficSourcesError>
Source§impl Client
impl Client
Sourcepub fn describe_warm_pool(&self) -> DescribeWarmPoolFluentBuilder
pub fn describe_warm_pool(&self) -> DescribeWarmPoolFluentBuilder
Constructs a fluent builder for the DescribeWarmPool
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
max_records(i32)
/set_max_records(Option<i32>)
:
required: falseThe maximum number of instances to return with this call. The maximum value is
50
.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of instances to return. (You received this token from a previous call.)
- On success, responds with
DescribeWarmPoolOutput
with field(s):warm_pool_configuration(Option<WarmPoolConfiguration>)
:The warm pool configuration details.
instances(Option<Vec::<Instance>>)
:The instances that are currently in the warm pool.
next_token(Option<String>)
:This string indicates that the response contains more items than can be returned in a single response. To receive additional items, specify this string for the
NextToken
value when requesting the next set of items. This value is null when there are no more items to return.
- On failure, responds with
SdkError<DescribeWarmPoolError>
Source§impl Client
impl Client
Sourcepub fn detach_instances(&self) -> DetachInstancesFluentBuilder
pub fn detach_instances(&self) -> DetachInstancesFluentBuilder
Constructs a fluent builder for the DetachInstances
operation.
- The fluent builder is configurable:
instance_ids(impl Into<String>)
/set_instance_ids(Option<Vec::<String>>)
:
required: falseThe IDs of the instances. You can specify up to 20 instances.
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
should_decrement_desired_capacity(bool)
/set_should_decrement_desired_capacity(Option<bool>)
:
required: trueIndicates whether the Auto Scaling group decrements the desired capacity value by the number of instances detached.
- On success, responds with
DetachInstancesOutput
with field(s):activities(Option<Vec::<Activity>>)
:The activities related to detaching the instances from the Auto Scaling group.
- On failure, responds with
SdkError<DetachInstancesError>
Source§impl Client
impl Client
Sourcepub fn detach_load_balancer_target_groups(
&self,
) -> DetachLoadBalancerTargetGroupsFluentBuilder
pub fn detach_load_balancer_target_groups( &self, ) -> DetachLoadBalancerTargetGroupsFluentBuilder
Constructs a fluent builder for the DetachLoadBalancerTargetGroups
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
target_group_arns(impl Into<String>)
/set_target_group_arns(Option<Vec::<String>>)
:
required: trueThe Amazon Resource Names (ARN) of the target groups. You can specify up to 10 target groups.
- On success, responds with
DetachLoadBalancerTargetGroupsOutput
- On failure, responds with
SdkError<DetachLoadBalancerTargetGroupsError>
Source§impl Client
impl Client
Sourcepub fn detach_load_balancers(&self) -> DetachLoadBalancersFluentBuilder
pub fn detach_load_balancers(&self) -> DetachLoadBalancersFluentBuilder
Constructs a fluent builder for the DetachLoadBalancers
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
load_balancer_names(impl Into<String>)
/set_load_balancer_names(Option<Vec::<String>>)
:
required: trueThe names of the load balancers. You can specify up to 10 load balancers.
- On success, responds with
DetachLoadBalancersOutput
- On failure, responds with
SdkError<DetachLoadBalancersError>
Source§impl Client
impl Client
Sourcepub fn detach_traffic_sources(&self) -> DetachTrafficSourcesFluentBuilder
pub fn detach_traffic_sources(&self) -> DetachTrafficSourcesFluentBuilder
Constructs a fluent builder for the DetachTrafficSources
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
traffic_sources(TrafficSourceIdentifier)
/set_traffic_sources(Option<Vec::<TrafficSourceIdentifier>>)
:
required: trueThe unique identifiers of one or more traffic sources. You can specify up to 10 traffic sources.
- On success, responds with
DetachTrafficSourcesOutput
- On failure, responds with
SdkError<DetachTrafficSourcesError>
Source§impl Client
impl Client
Sourcepub fn disable_metrics_collection(
&self,
) -> DisableMetricsCollectionFluentBuilder
pub fn disable_metrics_collection( &self, ) -> DisableMetricsCollectionFluentBuilder
Constructs a fluent builder for the DisableMetricsCollection
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
metrics(impl Into<String>)
/set_metrics(Option<Vec::<String>>)
:
required: falseIdentifies the metrics to disable.
You can specify one or more of the following metrics:
-
GroupMinSize
-
GroupMaxSize
-
GroupDesiredCapacity
-
GroupInServiceInstances
-
GroupPendingInstances
-
GroupStandbyInstances
-
GroupTerminatingInstances
-
GroupTotalInstances
-
GroupInServiceCapacity
-
GroupPendingCapacity
-
GroupStandbyCapacity
-
GroupTerminatingCapacity
-
GroupTotalCapacity
-
WarmPoolDesiredCapacity
-
WarmPoolWarmedCapacity
-
WarmPoolPendingCapacity
-
WarmPoolTerminatingCapacity
-
WarmPoolTotalCapacity
-
GroupAndWarmPoolDesiredCapacity
-
GroupAndWarmPoolTotalCapacity
If you omit this property, all metrics are disabled.
For more information, see Amazon CloudWatch metrics for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
-
- On success, responds with
DisableMetricsCollectionOutput
- On failure, responds with
SdkError<DisableMetricsCollectionError>
Source§impl Client
impl Client
Sourcepub fn enable_metrics_collection(&self) -> EnableMetricsCollectionFluentBuilder
pub fn enable_metrics_collection(&self) -> EnableMetricsCollectionFluentBuilder
Constructs a fluent builder for the EnableMetricsCollection
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
metrics(impl Into<String>)
/set_metrics(Option<Vec::<String>>)
:
required: falseIdentifies the metrics to enable.
You can specify one or more of the following metrics:
-
GroupMinSize
-
GroupMaxSize
-
GroupDesiredCapacity
-
GroupInServiceInstances
-
GroupPendingInstances
-
GroupStandbyInstances
-
GroupTerminatingInstances
-
GroupTotalInstances
-
GroupInServiceCapacity
-
GroupPendingCapacity
-
GroupStandbyCapacity
-
GroupTerminatingCapacity
-
GroupTotalCapacity
-
WarmPoolDesiredCapacity
-
WarmPoolWarmedCapacity
-
WarmPoolPendingCapacity
-
WarmPoolTerminatingCapacity
-
WarmPoolTotalCapacity
-
GroupAndWarmPoolDesiredCapacity
-
GroupAndWarmPoolTotalCapacity
If you specify
Granularity
and don’t specify any metrics, all metrics are enabled.For more information, see Amazon CloudWatch metrics for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
-
granularity(impl Into<String>)
/set_granularity(Option<String>)
:
required: trueThe frequency at which Amazon EC2 Auto Scaling sends aggregated data to CloudWatch. The only valid value is
1Minute
.
- On success, responds with
EnableMetricsCollectionOutput
- On failure, responds with
SdkError<EnableMetricsCollectionError>
Source§impl Client
impl Client
Sourcepub fn enter_standby(&self) -> EnterStandbyFluentBuilder
pub fn enter_standby(&self) -> EnterStandbyFluentBuilder
Constructs a fluent builder for the EnterStandby
operation.
- The fluent builder is configurable:
instance_ids(impl Into<String>)
/set_instance_ids(Option<Vec::<String>>)
:
required: falseThe IDs of the instances. You can specify up to 20 instances.
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
should_decrement_desired_capacity(bool)
/set_should_decrement_desired_capacity(Option<bool>)
:
required: trueIndicates whether to decrement the desired capacity of the Auto Scaling group by the number of instances moved to
Standby
mode.
- On success, responds with
EnterStandbyOutput
with field(s):activities(Option<Vec::<Activity>>)
:The activities related to moving instances into
Standby
mode.
- On failure, responds with
SdkError<EnterStandbyError>
Source§impl Client
impl Client
Sourcepub fn execute_policy(&self) -> ExecutePolicyFluentBuilder
pub fn execute_policy(&self) -> ExecutePolicyFluentBuilder
Constructs a fluent builder for the ExecutePolicy
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: falseThe name of the Auto Scaling group.
policy_name(impl Into<String>)
/set_policy_name(Option<String>)
:
required: trueThe name or ARN of the policy.
honor_cooldown(bool)
/set_honor_cooldown(Option<bool>)
:
required: falseIndicates whether Amazon EC2 Auto Scaling waits for the cooldown period to complete before executing the policy.
Valid only if the policy type is
SimpleScaling
. For more information, see Scaling cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.metric_value(f64)
/set_metric_value(Option<f64>)
:
required: falseThe metric value to compare to
BreachThreshold
. This enables you to execute a policy of typeStepScaling
and determine which step adjustment to use. For example, if the breach threshold is 50 and you want to use a step adjustment with a lower bound of 0 and an upper bound of 10, you can set the metric value to 59.If you specify a metric value that doesn’t correspond to a step adjustment for the policy, the call returns an error.
Required if the policy type is
StepScaling
and not supported otherwise.breach_threshold(f64)
/set_breach_threshold(Option<f64>)
:
required: falseThe breach threshold for the alarm.
Required if the policy type is
StepScaling
and not supported otherwise.
- On success, responds with
ExecutePolicyOutput
- On failure, responds with
SdkError<ExecutePolicyError>
Source§impl Client
impl Client
Sourcepub fn exit_standby(&self) -> ExitStandbyFluentBuilder
pub fn exit_standby(&self) -> ExitStandbyFluentBuilder
Constructs a fluent builder for the ExitStandby
operation.
- The fluent builder is configurable:
instance_ids(impl Into<String>)
/set_instance_ids(Option<Vec::<String>>)
:
required: falseThe IDs of the instances. You can specify up to 20 instances.
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
- On success, responds with
ExitStandbyOutput
with field(s):activities(Option<Vec::<Activity>>)
:The activities related to moving instances out of
Standby
mode.
- On failure, responds with
SdkError<ExitStandbyError>
Source§impl Client
impl Client
Sourcepub fn get_predictive_scaling_forecast(
&self,
) -> GetPredictiveScalingForecastFluentBuilder
pub fn get_predictive_scaling_forecast( &self, ) -> GetPredictiveScalingForecastFluentBuilder
Constructs a fluent builder for the GetPredictiveScalingForecast
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
policy_name(impl Into<String>)
/set_policy_name(Option<String>)
:
required: trueThe name of the policy.
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: trueThe inclusive start time of the time range for the forecast data to get. At most, the date and time can be one year before the current date and time.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: trueThe exclusive end time of the time range for the forecast data to get. The maximum time duration between the start and end time is 30 days.
Although this parameter can accept a date and time that is more than two days in the future, the availability of forecast data has limits. Amazon EC2 Auto Scaling only issues forecasts for periods of two days in advance.
- On success, responds with
GetPredictiveScalingForecastOutput
with field(s):load_forecast(Option<Vec::<LoadForecast>>)
:The load forecast.
capacity_forecast(Option<CapacityForecast>)
:The capacity forecast.
update_time(Option<DateTime>)
:The time the forecast was made.
- On failure, responds with
SdkError<GetPredictiveScalingForecastError>
Source§impl Client
impl Client
Sourcepub fn put_lifecycle_hook(&self) -> PutLifecycleHookFluentBuilder
pub fn put_lifecycle_hook(&self) -> PutLifecycleHookFluentBuilder
Constructs a fluent builder for the PutLifecycleHook
operation.
- The fluent builder is configurable:
lifecycle_hook_name(impl Into<String>)
/set_lifecycle_hook_name(Option<String>)
:
required: trueThe name of the lifecycle hook.
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
lifecycle_transition(impl Into<String>)
/set_lifecycle_transition(Option<String>)
:
required: falseThe lifecycle transition. For Auto Scaling groups, there are two major lifecycle transitions.
-
To create a lifecycle hook for scale-out events, specify
autoscaling:EC2_INSTANCE_LAUNCHING
. -
To create a lifecycle hook for scale-in events, specify
autoscaling:EC2_INSTANCE_TERMINATING
.
Required for new lifecycle hooks, but optional when updating existing hooks.
-
role_arn(impl Into<String>)
/set_role_arn(Option<String>)
:
required: falseThe ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.
Valid only if the notification target is an Amazon SNS topic or an Amazon SQS queue. Required for new lifecycle hooks, but optional when updating existing hooks.
notification_target_arn(impl Into<String>)
/set_notification_target_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the notification target that Amazon EC2 Auto Scaling uses to notify you when an instance is in a wait state for the lifecycle hook. You can specify either an Amazon SNS topic or an Amazon SQS queue.
If you specify an empty string, this overrides the current ARN.
This operation uses the JSON format when sending notifications to an Amazon SQS queue, and an email key-value pair format when sending notifications to an Amazon SNS topic.
When you specify a notification target, Amazon EC2 Auto Scaling sends it a test message. Test messages contain the following additional key-value pair:
“Event”: “autoscaling:TEST_NOTIFICATION”
.notification_metadata(impl Into<String>)
/set_notification_metadata(Option<String>)
:
required: falseAdditional information that you want to include any time Amazon EC2 Auto Scaling sends a message to the notification target.
heartbeat_timeout(i32)
/set_heartbeat_timeout(Option<i32>)
:
required: falseThe maximum time, in seconds, that can elapse before the lifecycle hook times out. The range is from
30
to7200
seconds. The default value is3600
seconds (1 hour).default_result(impl Into<String>)
/set_default_result(Option<String>)
:
required: falseThe action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs. The default value is
ABANDON
.Valid values:
CONTINUE
|ABANDON
- On success, responds with
PutLifecycleHookOutput
- On failure, responds with
SdkError<PutLifecycleHookError>
Source§impl Client
impl Client
Sourcepub fn put_notification_configuration(
&self,
) -> PutNotificationConfigurationFluentBuilder
pub fn put_notification_configuration( &self, ) -> PutNotificationConfigurationFluentBuilder
Constructs a fluent builder for the PutNotificationConfiguration
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
topic_arn(impl Into<String>)
/set_topic_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the Amazon SNS topic.
notification_types(impl Into<String>)
/set_notification_types(Option<Vec::<String>>)
:
required: trueThe type of event that causes the notification to be sent. To query the notification types supported by Amazon EC2 Auto Scaling, call the DescribeAutoScalingNotificationTypes API.
- On success, responds with
PutNotificationConfigurationOutput
- On failure, responds with
SdkError<PutNotificationConfigurationError>
Source§impl Client
impl Client
Sourcepub fn put_scaling_policy(&self) -> PutScalingPolicyFluentBuilder
pub fn put_scaling_policy(&self) -> PutScalingPolicyFluentBuilder
Constructs a fluent builder for the PutScalingPolicy
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
policy_name(impl Into<String>)
/set_policy_name(Option<String>)
:
required: trueThe name of the policy.
policy_type(impl Into<String>)
/set_policy_type(Option<String>)
:
required: falseOne of the following policy types:
-
TargetTrackingScaling
-
StepScaling
-
SimpleScaling
(default) -
PredictiveScaling
-
adjustment_type(impl Into<String>)
/set_adjustment_type(Option<String>)
:
required: falseSpecifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage). The valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.Required if the policy type is
StepScaling
orSimpleScaling
. For more information, see Scaling adjustment types in the Amazon EC2 Auto Scaling User Guide.min_adjustment_step(i32)
/set_min_adjustment_step(Option<i32>)
:
required: falseAvailable for backward compatibility. Use
MinAdjustmentMagnitude
instead.min_adjustment_magnitude(i32)
/set_min_adjustment_magnitude(Option<i32>)
:
required: falseThe minimum value to scale by when the adjustment type is
PercentChangeInCapacity
. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify aMinAdjustmentMagnitude
of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified aMinAdjustmentMagnitude
of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances.Valid only if the policy type is
StepScaling
orSimpleScaling
. For more information, see Scaling adjustment types in the Amazon EC2 Auto Scaling User Guide.Some Auto Scaling groups use instance weights. In this case, set the
MinAdjustmentMagnitude
to a value that is at least as large as your largest instance weight.scaling_adjustment(i32)
/set_scaling_adjustment(Option<i32>)
:
required: falseThe amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a non-negative value.
Required if the policy type is
SimpleScaling
. (Not used with any other policy type.)cooldown(i32)
/set_cooldown(Option<i32>)
:
required: falseA cooldown period, in seconds, that applies to a specific simple scaling policy. When a cooldown period is specified here, it overrides the default cooldown.
Valid only if the policy type is
SimpleScaling
. For more information, see Scaling cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.Default: None
metric_aggregation_type(impl Into<String>)
/set_metric_aggregation_type(Option<String>)
:
required: falseThe aggregation type for the CloudWatch metrics. The valid values are
Minimum
,Maximum
, andAverage
. If the aggregation type is null, the value is treated asAverage
.Valid only if the policy type is
StepScaling
.step_adjustments(StepAdjustment)
/set_step_adjustments(Option<Vec::<StepAdjustment>>)
:
required: falseA set of adjustments that enable you to scale based on the size of the alarm breach.
Required if the policy type is
StepScaling
. (Not used with any other policy type.)estimated_instance_warmup(i32)
/set_estimated_instance_warmup(Option<i32>)
:
required: falseNot needed if the default instance warmup is defined for the group.
The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. This warm-up period applies to instances launched due to a specific target tracking or step scaling policy. When a warm-up period is specified here, it overrides the default instance warmup.
Valid only if the policy type is
TargetTrackingScaling
orStepScaling
.The default is to use the value for the default instance warmup defined for the group. If default instance warmup is null, then
EstimatedInstanceWarmup
falls back to the value of default cooldown.target_tracking_configuration(TargetTrackingConfiguration)
/set_target_tracking_configuration(Option<TargetTrackingConfiguration>)
:
required: falseA target tracking scaling policy. Provides support for predefined or custom metrics.
The following predefined metrics are available:
-
ASGAverageCPUUtilization
-
ASGAverageNetworkIn
-
ASGAverageNetworkOut
-
ALBRequestCountPerTarget
If you specify
ALBRequestCountPerTarget
for the metric, you must specify theResourceLabel
property with thePredefinedMetricSpecification
.For more information, see TargetTrackingConfiguration in the Amazon EC2 Auto Scaling API Reference.
Required if the policy type is
TargetTrackingScaling
.-
enabled(bool)
/set_enabled(Option<bool>)
:
required: falseIndicates whether the scaling policy is enabled or disabled. The default is enabled. For more information, see Disable a scaling policy for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
predictive_scaling_configuration(PredictiveScalingConfiguration)
/set_predictive_scaling_configuration(Option<PredictiveScalingConfiguration>)
:
required: falseA predictive scaling policy. Provides support for predefined and custom metrics.
Predefined metrics include CPU utilization, network in/out, and the Application Load Balancer request count.
For more information, see PredictiveScalingConfiguration in the Amazon EC2 Auto Scaling API Reference.
Required if the policy type is
PredictiveScaling
.
- On success, responds with
PutScalingPolicyOutput
with field(s):policy_arn(Option<String>)
:The Amazon Resource Name (ARN) of the policy.
alarms(Option<Vec::<Alarm>>)
:The CloudWatch alarms created for the target tracking scaling policy.
- On failure, responds with
SdkError<PutScalingPolicyError>
Source§impl Client
impl Client
Sourcepub fn put_scheduled_update_group_action(
&self,
) -> PutScheduledUpdateGroupActionFluentBuilder
pub fn put_scheduled_update_group_action( &self, ) -> PutScheduledUpdateGroupActionFluentBuilder
Constructs a fluent builder for the PutScheduledUpdateGroupAction
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
scheduled_action_name(impl Into<String>)
/set_scheduled_action_name(Option<String>)
:
required: trueThe name of this scaling action.
time(DateTime)
/set_time(Option<DateTime>)
:
required: falseThis property is no longer used.
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: falseThe date and time for this action to start, in YYYY-MM-DDThh:mm:ssZ format in UTC/GMT only and in quotes (for example,
“2021-06-01T00:00:00Z”
).If you specify
Recurrence
andStartTime
, Amazon EC2 Auto Scaling performs the action at this time, and then performs the action based on the specified recurrence.end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: falseThe date and time for the recurring schedule to end, in UTC. For example,
“2021-06-01T00:00:00Z”
.recurrence(impl Into<String>)
/set_recurrence(Option<String>)
:
required: falseThe recurring schedule for this action. This format consists of five fields separated by white spaces: [Minute] [Hour] [Day_of_Month] [Month_of_Year] [Day_of_Week]. The value must be in quotes (for example, “30 0 1 1,6,12 *”). For more information about this format, see Crontab.
When
StartTime
andEndTime
are specified withRecurrence
, they form the boundaries of when the recurring action starts and stops.Cron expressions use Universal Coordinated Time (UTC) by default.
min_size(i32)
/set_min_size(Option<i32>)
:
required: falseThe minimum size of the Auto Scaling group.
max_size(i32)
/set_max_size(Option<i32>)
:
required: falseThe maximum size of the Auto Scaling group.
desired_capacity(i32)
/set_desired_capacity(Option<i32>)
:
required: falseThe desired capacity is the initial capacity of the Auto Scaling group after the scheduled action runs and the capacity it attempts to maintain. It can scale beyond this capacity if you add more scaling conditions.
You must specify at least one of the following properties:
MaxSize
,MinSize
, orDesiredCapacity
.time_zone(impl Into<String>)
/set_time_zone(Option<String>)
:
required: falseSpecifies the time zone for a cron expression. If a time zone is not provided, UTC is used by default.
Valid values are the canonical names of the IANA time zones, derived from the IANA Time Zone Database (such as
Etc/GMT+9
orPacific/Tahiti
). For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
- On success, responds with
PutScheduledUpdateGroupActionOutput
- On failure, responds with
SdkError<PutScheduledUpdateGroupActionError>
Source§impl Client
impl Client
Sourcepub fn put_warm_pool(&self) -> PutWarmPoolFluentBuilder
pub fn put_warm_pool(&self) -> PutWarmPoolFluentBuilder
Constructs a fluent builder for the PutWarmPool
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
max_group_prepared_capacity(i32)
/set_max_group_prepared_capacity(Option<i32>)
:
required: falseSpecifies the maximum number of instances that are allowed to be in the warm pool or in any state except
Terminated
for the Auto Scaling group. This is an optional property. Specify it only if you do not want the warm pool size to be determined by the difference between the group’s maximum capacity and its desired capacity.If a value for
MaxGroupPreparedCapacity
is not specified, Amazon EC2 Auto Scaling launches and maintains the difference between the group’s maximum capacity and its desired capacity. If you specify a value forMaxGroupPreparedCapacity
, Amazon EC2 Auto Scaling uses the difference between theMaxGroupPreparedCapacity
and the desired capacity instead.The size of the warm pool is dynamic. Only when
MaxGroupPreparedCapacity
andMinSize
are set to the same value does the warm pool have an absolute size.If the desired capacity of the Auto Scaling group is higher than the
MaxGroupPreparedCapacity
, the capacity of the warm pool is 0, unless you specify a value forMinSize
. To remove a value that you previously set, include the property but specify -1 for the value.min_size(i32)
/set_min_size(Option<i32>)
:
required: falseSpecifies the minimum number of instances to maintain in the warm pool. This helps you to ensure that there is always a certain number of warmed instances available to handle traffic spikes. Defaults to 0 if not specified.
pool_state(WarmPoolState)
/set_pool_state(Option<WarmPoolState>)
:
required: falseSets the instance state to transition to after the lifecycle actions are complete. Default is
Stopped
.instance_reuse_policy(InstanceReusePolicy)
/set_instance_reuse_policy(Option<InstanceReusePolicy>)
:
required: falseIndicates whether instances in the Auto Scaling group can be returned to the warm pool on scale in. The default is to terminate instances in the Auto Scaling group when the group scales in.
- On success, responds with
PutWarmPoolOutput
- On failure, responds with
SdkError<PutWarmPoolError>
Source§impl Client
impl Client
Sourcepub fn record_lifecycle_action_heartbeat(
&self,
) -> RecordLifecycleActionHeartbeatFluentBuilder
pub fn record_lifecycle_action_heartbeat( &self, ) -> RecordLifecycleActionHeartbeatFluentBuilder
Constructs a fluent builder for the RecordLifecycleActionHeartbeat
operation.
- The fluent builder is configurable:
lifecycle_hook_name(impl Into<String>)
/set_lifecycle_hook_name(Option<String>)
:
required: trueThe name of the lifecycle hook.
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
lifecycle_action_token(impl Into<String>)
/set_lifecycle_action_token(Option<String>)
:
required: falseA token that uniquely identifies a specific lifecycle action associated with an instance. Amazon EC2 Auto Scaling sends this token to the notification target that you specified when you created the lifecycle hook.
instance_id(impl Into<String>)
/set_instance_id(Option<String>)
:
required: falseThe ID of the instance.
- On success, responds with
RecordLifecycleActionHeartbeatOutput
- On failure, responds with
SdkError<RecordLifecycleActionHeartbeatError>
Source§impl Client
impl Client
Sourcepub fn resume_processes(&self) -> ResumeProcessesFluentBuilder
pub fn resume_processes(&self) -> ResumeProcessesFluentBuilder
Constructs a fluent builder for the ResumeProcesses
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
scaling_processes(impl Into<String>)
/set_scaling_processes(Option<Vec::<String>>)
:
required: falseOne or more of the following processes:
-
Launch
-
Terminate
-
AddToLoadBalancer
-
AlarmNotification
-
AZRebalance
-
HealthCheck
-
InstanceRefresh
-
ReplaceUnhealthy
-
ScheduledActions
If you omit this property, all processes are specified.
-
- On success, responds with
ResumeProcessesOutput
- On failure, responds with
SdkError<ResumeProcessesError>
Source§impl Client
impl Client
Sourcepub fn rollback_instance_refresh(&self) -> RollbackInstanceRefreshFluentBuilder
pub fn rollback_instance_refresh(&self) -> RollbackInstanceRefreshFluentBuilder
Constructs a fluent builder for the RollbackInstanceRefresh
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
- On success, responds with
RollbackInstanceRefreshOutput
with field(s):instance_refresh_id(Option<String>)
:The instance refresh ID associated with the request. This is the unique ID assigned to the instance refresh when it was started.
- On failure, responds with
SdkError<RollbackInstanceRefreshError>
Source§impl Client
impl Client
Sourcepub fn set_desired_capacity(&self) -> SetDesiredCapacityFluentBuilder
pub fn set_desired_capacity(&self) -> SetDesiredCapacityFluentBuilder
Constructs a fluent builder for the SetDesiredCapacity
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
desired_capacity(i32)
/set_desired_capacity(Option<i32>)
:
required: trueThe desired capacity is the initial capacity of the Auto Scaling group after this operation completes and the capacity it attempts to maintain.
honor_cooldown(bool)
/set_honor_cooldown(Option<bool>)
:
required: falseIndicates whether Amazon EC2 Auto Scaling waits for the cooldown period to complete before initiating a scaling activity to set your Auto Scaling group to its new capacity. By default, Amazon EC2 Auto Scaling does not honor the cooldown period during manual scaling activities.
- On success, responds with
SetDesiredCapacityOutput
- On failure, responds with
SdkError<SetDesiredCapacityError>
Source§impl Client
impl Client
Sourcepub fn set_instance_health(&self) -> SetInstanceHealthFluentBuilder
pub fn set_instance_health(&self) -> SetInstanceHealthFluentBuilder
Constructs a fluent builder for the SetInstanceHealth
operation.
- The fluent builder is configurable:
instance_id(impl Into<String>)
/set_instance_id(Option<String>)
:
required: trueThe ID of the instance.
health_status(impl Into<String>)
/set_health_status(Option<String>)
:
required: trueThe health status of the instance. Set to
Healthy
to have the instance remain in service. Set toUnhealthy
to have the instance be out of service. Amazon EC2 Auto Scaling terminates and replaces the unhealthy instance.should_respect_grace_period(bool)
/set_should_respect_grace_period(Option<bool>)
:
required: falseIf the Auto Scaling group of the specified instance has a
HealthCheckGracePeriod
specified for the group, by default, this call respects the grace period. Set this toFalse
, to have the call not respect the grace period associated with the group.For more information about the health check grace period, see Set the health check grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
- On success, responds with
SetInstanceHealthOutput
- On failure, responds with
SdkError<SetInstanceHealthError>
Source§impl Client
impl Client
Sourcepub fn set_instance_protection(&self) -> SetInstanceProtectionFluentBuilder
pub fn set_instance_protection(&self) -> SetInstanceProtectionFluentBuilder
Constructs a fluent builder for the SetInstanceProtection
operation.
- The fluent builder is configurable:
instance_ids(impl Into<String>)
/set_instance_ids(Option<Vec::<String>>)
:
required: trueOne or more instance IDs. You can specify up to 50 instances.
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
protected_from_scale_in(bool)
/set_protected_from_scale_in(Option<bool>)
:
required: trueIndicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
- On success, responds with
SetInstanceProtectionOutput
- On failure, responds with
SdkError<SetInstanceProtectionError>
Source§impl Client
impl Client
Sourcepub fn start_instance_refresh(&self) -> StartInstanceRefreshFluentBuilder
pub fn start_instance_refresh(&self) -> StartInstanceRefreshFluentBuilder
Constructs a fluent builder for the StartInstanceRefresh
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
strategy(RefreshStrategy)
/set_strategy(Option<RefreshStrategy>)
:
required: falseThe strategy to use for the instance refresh. The only valid value is
Rolling
.desired_configuration(DesiredConfiguration)
/set_desired_configuration(Option<DesiredConfiguration>)
:
required: falseThe desired configuration. For example, the desired configuration can specify a new launch template or a new version of the current launch template.
Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the settings of the Auto Scaling group to reflect the new desired configuration.
When you specify a new launch template or a new version of the current launch template for your desired configuration, consider enabling the
SkipMatching
property in preferences. If it’s enabled, Amazon EC2 Auto Scaling skips replacing instances that already use the specified launch template and instance types. This can help you reduce the number of replacements that are required to apply updates.preferences(RefreshPreferences)
/set_preferences(Option<RefreshPreferences>)
:
required: falseSets your preferences for the instance refresh so that it performs as expected when you start it. Includes the instance warmup time, the minimum and maximum healthy percentages, and the behaviors that you want Amazon EC2 Auto Scaling to use if instances that are in
Standby
state or protected from scale in are found. You can also choose to enable additional features, such as the following:-
Auto rollback
-
Checkpoints
-
CloudWatch alarms
-
Skip matching
-
Bake time
-
- On success, responds with
StartInstanceRefreshOutput
with field(s):instance_refresh_id(Option<String>)
:A unique ID for tracking the progress of the instance refresh.
- On failure, responds with
SdkError<StartInstanceRefreshError>
Source§impl Client
impl Client
Sourcepub fn suspend_processes(&self) -> SuspendProcessesFluentBuilder
pub fn suspend_processes(&self) -> SuspendProcessesFluentBuilder
Constructs a fluent builder for the SuspendProcesses
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
scaling_processes(impl Into<String>)
/set_scaling_processes(Option<Vec::<String>>)
:
required: falseOne or more of the following processes:
-
Launch
-
Terminate
-
AddToLoadBalancer
-
AlarmNotification
-
AZRebalance
-
HealthCheck
-
InstanceRefresh
-
ReplaceUnhealthy
-
ScheduledActions
If you omit this property, all processes are specified.
-
- On success, responds with
SuspendProcessesOutput
- On failure, responds with
SdkError<SuspendProcessesError>
Source§impl Client
impl Client
Sourcepub fn terminate_instance_in_auto_scaling_group(
&self,
) -> TerminateInstanceInAutoScalingGroupFluentBuilder
pub fn terminate_instance_in_auto_scaling_group( &self, ) -> TerminateInstanceInAutoScalingGroupFluentBuilder
Constructs a fluent builder for the TerminateInstanceInAutoScalingGroup
operation.
- The fluent builder is configurable:
instance_id(impl Into<String>)
/set_instance_id(Option<String>)
:
required: trueThe ID of the instance.
should_decrement_desired_capacity(bool)
/set_should_decrement_desired_capacity(Option<bool>)
:
required: trueIndicates whether terminating the instance also decrements the size of the Auto Scaling group.
- On success, responds with
TerminateInstanceInAutoScalingGroupOutput
with field(s):activity(Option<Activity>)
:A scaling activity.
- On failure, responds with
SdkError<TerminateInstanceInAutoScalingGroupError>
Source§impl Client
impl Client
Sourcepub fn update_auto_scaling_group(&self) -> UpdateAutoScalingGroupFluentBuilder
pub fn update_auto_scaling_group(&self) -> UpdateAutoScalingGroupFluentBuilder
Constructs a fluent builder for the UpdateAutoScalingGroup
operation.
- The fluent builder is configurable:
auto_scaling_group_name(impl Into<String>)
/set_auto_scaling_group_name(Option<String>)
:
required: trueThe name of the Auto Scaling group.
launch_configuration_name(impl Into<String>)
/set_launch_configuration_name(Option<String>)
:
required: falseThe name of the launch configuration. If you specify
LaunchConfigurationName
in your update request, you can’t specifyLaunchTemplate
orMixedInstancesPolicy
.launch_template(LaunchTemplateSpecification)
/set_launch_template(Option<LaunchTemplateSpecification>)
:
required: falseThe launch template and version to use to specify the updates. If you specify
LaunchTemplate
in your update request, you can’t specifyLaunchConfigurationName
orMixedInstancesPolicy
.mixed_instances_policy(MixedInstancesPolicy)
/set_mixed_instances_policy(Option<MixedInstancesPolicy>)
:
required: falseThe mixed instances policy. For more information, see Auto Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User Guide.
min_size(i32)
/set_min_size(Option<i32>)
:
required: falseThe minimum size of the Auto Scaling group.
max_size(i32)
/set_max_size(Option<i32>)
:
required: falseThe maximum size of the Auto Scaling group.
With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above
MaxSize
to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go aboveMaxSize
by more than your largest instance weight (weights that define how many units each instance contributes to the desired capacity of the group).desired_capacity(i32)
/set_desired_capacity(Option<i32>)
:
required: falseThe desired capacity is the initial capacity of the Auto Scaling group after this operation completes and the capacity it attempts to maintain. This number must be greater than or equal to the minimum size of the group and less than or equal to the maximum size of the group.
default_cooldown(i32)
/set_default_cooldown(Option<i32>)
:
required: falseOnly needed if you use simple scaling policies.
The amount of time, in seconds, between one scaling activity ending and another one starting due to simple scaling policies. For more information, see Scaling cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
availability_zones(impl Into<String>)
/set_availability_zones(Option<Vec::<String>>)
:
required: falseOne or more Availability Zones for the group.
health_check_type(impl Into<String>)
/set_health_check_type(Option<String>)
:
required: falseA comma-separated value string of one or more health check types.
The valid values are
EC2
,EBS
,ELB
, andVPC_LATTICE
.EC2
is the default health check and cannot be disabled. For more information, see Health checks for instances in an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.Only specify
EC2
if you must clear a value that was previously set.health_check_grace_period(i32)
/set_health_check_grace_period(Option<i32>)
:
required: falseThe amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service and marking it unhealthy due to a failed health check. This is useful if your instances do not immediately pass their health checks after they enter the
InService
state. For more information, see Set the health check grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.placement_group(impl Into<String>)
/set_placement_group(Option<String>)
:
required: falseThe name of an existing placement group into which to launch your instances. To remove the placement group setting, pass an empty string for
placement-group
. For more information about placement groups, see Placement groups in the Amazon EC2 User Guide.A cluster placement group is a logical grouping of instances within a single Availability Zone. You cannot specify multiple Availability Zones and a cluster placement group.
vpc_zone_identifier(impl Into<String>)
/set_vpc_zone_identifier(Option<String>)
:
required: falseA comma-separated list of subnet IDs for a virtual private cloud (VPC). If you specify
VPCZoneIdentifier
withAvailabilityZones
, the subnets that you specify must reside in those Availability Zones.termination_policies(impl Into<String>)
/set_termination_policies(Option<Vec::<String>>)
:
required: falseA policy or a list of policies that are used to select the instances to terminate. The policies are executed in the order that you list them. For more information, see Configure termination policies for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
Valid values:
Default
|AllocationStrategy
|ClosestToNextInstanceHour
|NewestInstance
|OldestInstance
|OldestLaunchConfiguration
|OldestLaunchTemplate
|arn:aws:lambda:region:account-id:function:my-function:my-alias
new_instances_protected_from_scale_in(bool)
/set_new_instances_protected_from_scale_in(Option<bool>)
:
required: falseIndicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see Use instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
service_linked_role_arn(impl Into<String>)
/set_service_linked_role_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other Amazon Web Services on your behalf. For more information, see Service-linked roles in the Amazon EC2 Auto Scaling User Guide.
max_instance_lifetime(i32)
/set_max_instance_lifetime(Option<i32>)
:
required: falseThe maximum amount of time, in seconds, that an instance can be in service. The default is null. If specified, the value must be either 0 or a number equal to or greater than 86,400 seconds (1 day). To clear a previously set value, specify a new value of 0. For more information, see Replacing Auto Scaling instances based on maximum instance lifetime in the Amazon EC2 Auto Scaling User Guide.
capacity_rebalance(bool)
/set_capacity_rebalance(Option<bool>)
:
required: falseEnables or disables Capacity Rebalancing. If Capacity Rebalancing is disabled, proactive replacement of at-risk Spot Instances does not occur. For more information, see Capacity Rebalancing in Auto Scaling to replace at-risk Spot Instances in the Amazon EC2 Auto Scaling User Guide.
To suspend rebalancing across Availability Zones, use the SuspendProcesses API.
context(impl Into<String>)
/set_context(Option<String>)
:
required: falseReserved.
desired_capacity_type(impl Into<String>)
/set_desired_capacity_type(Option<String>)
:
required: falseThe unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports
DesiredCapacityType
for attribute-based instance type selection only. For more information, see Create a mixed instances group using attribute-based instance type selection in the Amazon EC2 Auto Scaling User Guide.By default, Amazon EC2 Auto Scaling specifies
units
, which translates into number of instances.Valid values:
units
|vcpu
|memory-mib
default_instance_warmup(i32)
/set_default_instance_warmup(Option<i32>)
:
required: falseThe amount of time, in seconds, until a new instance is considered to have finished initializing and resource consumption to become stable after it enters the
InService
state.During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an instance before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the warm-up period before aggregating the metrics for new instances with existing instances in the Amazon CloudWatch metrics that are used for scaling, resulting in more reliable usage data. For more information, see Set the default instance warmup for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
To manage various warm-up settings at the group level, we recommend that you set the default instance warmup, even if it is set to 0 seconds. To remove a value that you previously set, include the property but specify
-1
for the value. However, we strongly recommend keeping the default instance warmup enabled by specifying a value of0
or other nominal value.instance_maintenance_policy(InstanceMaintenancePolicy)
/set_instance_maintenance_policy(Option<InstanceMaintenancePolicy>)
:
required: falseAn instance maintenance policy. For more information, see Set instance maintenance policy in the Amazon EC2 Auto Scaling User Guide.
availability_zone_distribution(AvailabilityZoneDistribution)
/set_availability_zone_distribution(Option<AvailabilityZoneDistribution>)
:
required: falseThe instance capacity distribution across Availability Zones.
availability_zone_impairment_policy(AvailabilityZoneImpairmentPolicy)
/set_availability_zone_impairment_policy(Option<AvailabilityZoneImpairmentPolicy>)
:
required: falseThe policy for Availability Zone impairment.
skip_zonal_shift_validation(bool)
/set_skip_zonal_shift_validation(Option<bool>)
:
required: falseIf you enable zonal shift with cross-zone disabled load balancers, capacity could become imbalanced across Availability Zones. To skip the validation, specify
true
. For more information, see Auto Scaling group zonal shift in the Amazon EC2 Auto Scaling User Guide.capacity_reservation_specification(CapacityReservationSpecification)
/set_capacity_reservation_specification(Option<CapacityReservationSpecification>)
:
required: falseThe capacity reservation specification for the Auto Scaling group.
- On success, responds with
UpdateAutoScalingGroupOutput
- On failure, responds with
SdkError<UpdateAutoScalingGroupError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Source§impl Waiters for Client
impl Waiters for Client
Source§fn wait_until_group_exists(&self) -> GroupExistsFluentBuilder
fn wait_until_group_exists(&self) -> GroupExistsFluentBuilder
group_exists
Source§fn wait_until_group_in_service(&self) -> GroupInServiceFluentBuilder
fn wait_until_group_in_service(&self) -> GroupInServiceFluentBuilder
group_in_service
Source§fn wait_until_group_not_exists(&self) -> GroupNotExistsFluentBuilder
fn wait_until_group_not_exists(&self) -> GroupNotExistsFluentBuilder
group_not_exists
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);