pub struct CompleteLifecycleAction { /* private fields */ }Expand description
Fluent builder constructing a request to CompleteLifecycleAction.
Completes the lifecycle action for the specified token or instance with the specified result.
This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:
-
(Optional) Create a launch template or launch configuration with a user data script that runs while an instance is in a wait state due to a lifecycle hook.
-
(Optional) Create a Lambda function and a rule that allows Amazon EventBridge to invoke your Lambda function when an instance is put into a wait state due to a lifecycle hook.
-
(Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish lifecycle notifications to the target.
-
Create the lifecycle hook. Specify whether the hook is used when the instances launch or terminate.
-
If you need more time, record the lifecycle action heartbeat to keep the instance in a wait state.
-
If you finish before the timeout period ends, send a callback by using the
CompleteLifecycleActionAPI call.
For more information, see Amazon EC2 Auto Scaling lifecycle hooks in the Amazon EC2 Auto Scaling User Guide.
Implementations§
source§impl CompleteLifecycleAction
impl CompleteLifecycleAction
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<CompleteLifecycleAction, AwsResponseRetryClassifier>, SdkError<CompleteLifecycleActionError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<CompleteLifecycleAction, AwsResponseRetryClassifier>, SdkError<CompleteLifecycleActionError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<CompleteLifecycleActionOutput, SdkError<CompleteLifecycleActionError>>
pub async fn send(
self
) -> Result<CompleteLifecycleActionOutput, SdkError<CompleteLifecycleActionError>>
Sends the request and returns the response.
If an error occurs, an SdkError will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn lifecycle_hook_name(self, input: impl Into<String>) -> Self
pub fn lifecycle_hook_name(self, input: impl Into<String>) -> Self
The name of the lifecycle hook.
sourcepub fn set_lifecycle_hook_name(self, input: Option<String>) -> Self
pub fn set_lifecycle_hook_name(self, input: Option<String>) -> Self
The name of the lifecycle hook.
sourcepub fn auto_scaling_group_name(self, input: impl Into<String>) -> Self
pub fn auto_scaling_group_name(self, input: impl Into<String>) -> Self
The name of the Auto Scaling group.
sourcepub fn set_auto_scaling_group_name(self, input: Option<String>) -> Self
pub fn set_auto_scaling_group_name(self, input: Option<String>) -> Self
The name of the Auto Scaling group.
sourcepub fn lifecycle_action_token(self, input: impl Into<String>) -> Self
pub fn lifecycle_action_token(self, input: impl Into<String>) -> Self
A 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.
sourcepub fn set_lifecycle_action_token(self, input: Option<String>) -> Self
pub fn set_lifecycle_action_token(self, input: Option<String>) -> Self
A 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.
sourcepub fn lifecycle_action_result(self, input: impl Into<String>) -> Self
pub fn lifecycle_action_result(self, input: impl Into<String>) -> Self
The action for the group to take. You can specify either CONTINUE or ABANDON.
sourcepub fn set_lifecycle_action_result(self, input: Option<String>) -> Self
pub fn set_lifecycle_action_result(self, input: Option<String>) -> Self
The action for the group to take. You can specify either CONTINUE or ABANDON.
sourcepub fn instance_id(self, input: impl Into<String>) -> Self
pub fn instance_id(self, input: impl Into<String>) -> Self
The ID of the instance.
sourcepub fn set_instance_id(self, input: Option<String>) -> Self
pub fn set_instance_id(self, input: Option<String>) -> Self
The ID of the instance.
Trait Implementations§
source§impl Clone for CompleteLifecycleAction
impl Clone for CompleteLifecycleAction
source§fn clone(&self) -> CompleteLifecycleAction
fn clone(&self) -> CompleteLifecycleAction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more