pub struct Builder { /* private fields */ }Expand description
A builder for LifecycleHookSpecification.
Implementations§
source§impl Builder
impl Builder
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 lifecycle_transition(self, input: impl Into<String>) -> Self
pub fn lifecycle_transition(self, input: impl Into<String>) -> Self
The 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.
sourcepub fn set_lifecycle_transition(self, input: Option<String>) -> Self
pub fn set_lifecycle_transition(self, input: Option<String>) -> Self
The 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.
sourcepub fn notification_metadata(self, input: impl Into<String>) -> Self
pub fn notification_metadata(self, input: impl Into<String>) -> Self
Additional information that you want to include any time Amazon EC2 Auto Scaling sends a message to the notification target.
sourcepub fn set_notification_metadata(self, input: Option<String>) -> Self
pub fn set_notification_metadata(self, input: Option<String>) -> Self
Additional information that you want to include any time Amazon EC2 Auto Scaling sends a message to the notification target.
sourcepub fn heartbeat_timeout(self, input: i32) -> Self
pub fn heartbeat_timeout(self, input: i32) -> Self
The maximum time, in seconds, that can elapse before the lifecycle hook times out. The range is from 30 to 7200 seconds. The default value is 3600 seconds (1 hour).
sourcepub fn set_heartbeat_timeout(self, input: Option<i32>) -> Self
pub fn set_heartbeat_timeout(self, input: Option<i32>) -> Self
The maximum time, in seconds, that can elapse before the lifecycle hook times out. The range is from 30 to 7200 seconds. The default value is 3600 seconds (1 hour).
sourcepub fn default_result(self, input: impl Into<String>) -> Self
pub fn default_result(self, input: impl Into<String>) -> Self
The 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
sourcepub fn set_default_result(self, input: Option<String>) -> Self
pub fn set_default_result(self, input: Option<String>) -> Self
The 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
sourcepub fn notification_target_arn(self, input: impl Into<String>) -> Self
pub fn notification_target_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the notification target that Amazon EC2 Auto Scaling sends notifications to when an instance is in a wait state for the lifecycle hook. You can specify an Amazon SNS topic or an Amazon SQS queue.
sourcepub fn set_notification_target_arn(self, input: Option<String>) -> Self
pub fn set_notification_target_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the notification target that Amazon EC2 Auto Scaling sends notifications to when an instance is in a wait state for the lifecycle hook. You can specify an Amazon SNS topic or an Amazon SQS queue.
sourcepub fn role_arn(self, input: impl Into<String>) -> Self
pub fn role_arn(self, input: impl Into<String>) -> Self
The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target. For information about creating this role, see Configure a notification target for a lifecycle hook in the Amazon EC2 Auto Scaling User Guide.
Valid only if the notification target is an Amazon SNS topic or an Amazon SQS queue.
sourcepub fn set_role_arn(self, input: Option<String>) -> Self
pub fn set_role_arn(self, input: Option<String>) -> Self
The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target. For information about creating this role, see Configure a notification target for a lifecycle hook in the Amazon EC2 Auto Scaling User Guide.
Valid only if the notification target is an Amazon SNS topic or an Amazon SQS queue.
sourcepub fn build(self) -> LifecycleHookSpecification
pub fn build(self) -> LifecycleHookSpecification
Consumes the builder and constructs a LifecycleHookSpecification.