pub struct SetTerminationProtection<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* private fields */ }Expand description
Fluent builder constructing a request to SetTerminationProtection.
SetTerminationProtection locks a cluster (job flow) so the EC2 instances in the cluster cannot be terminated by user intervention, an API call, or in the event of a job-flow error. The cluster still terminates upon successful completion of the job flow. Calling SetTerminationProtection on a cluster is similar to calling the Amazon EC2 DisableAPITermination API on all EC2 instances in a cluster.
SetTerminationProtection is used to prevent accidental termination of a cluster and to ensure that in the event of an error, the instances persist so that you can recover any data stored in their ephemeral instance storage.
To terminate a cluster that has been locked by setting SetTerminationProtection to true, you must first unlock the job flow by a subsequent call to SetTerminationProtection in which you set the value to false.
For more information, seeManaging Cluster Termination in the Amazon EMR Management Guide.
Implementations
impl<C, M, R> SetTerminationProtection<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> SetTerminationProtection<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
pub async fn send(
self
) -> Result<SetTerminationProtectionOutput, SdkError<SetTerminationProtectionError>> where
R::Policy: SmithyRetryPolicy<SetTerminationProtectionInputOperationOutputAlias, SetTerminationProtectionOutput, SetTerminationProtectionError, SetTerminationProtectionInputOperationRetryAlias>,
pub async fn send(
self
) -> Result<SetTerminationProtectionOutput, SdkError<SetTerminationProtectionError>> where
R::Policy: SmithyRetryPolicy<SetTerminationProtectionInputOperationOutputAlias, SetTerminationProtectionOutput, SetTerminationProtectionError, SetTerminationProtectionInputOperationRetryAlias>,
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.
Appends an item to JobFlowIds.
To override the contents of this collection use set_job_flow_ids.
A list of strings that uniquely identify the clusters to protect. This identifier is returned by RunJobFlow and can also be obtained from DescribeJobFlows .
A list of strings that uniquely identify the clusters to protect. This identifier is returned by RunJobFlow and can also be obtained from DescribeJobFlows .
A Boolean that indicates whether to protect the cluster and prevent the Amazon EC2 instances in the cluster from shutting down due to API calls, user intervention, or job-flow error.
A Boolean that indicates whether to protect the cluster and prevent the Amazon EC2 instances in the cluster from shutting down due to API calls, user intervention, or job-flow error.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !RefUnwindSafe for SetTerminationProtection<C, M, R>
impl<C, M, R> Send for SetTerminationProtection<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Sync for SetTerminationProtection<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Unpin for SetTerminationProtection<C, M, R>
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !UnwindSafe for SetTerminationProtection<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more