Cancels a resize operation for a cluster.
Parameters:
-
cluster_identifier
(Optional[String], default:
None
)
–
The unique identifier for the cluster that you want to cancel a resize operation for.
Raises:
Source code in docs_src/capo_redshift/_services/redshift.py
| def cancel_resize(
self,
*,
config_overrides: Optional[RedshiftClientConfig] = None,
cluster_identifier: Optional["capo_redshift.types.string.String"] = None,
) -> "capo_redshift.types.resize_progress_message.ResizeProgressMessage":
"""<p>Cancels a resize operation for a cluster.</p>
Args:
cluster_identifier: <p>The unique identifier for the cluster that you want to cancel a resize operation for.</p>
Raises:
capo_redshift.errors.cluster_not_found_fault.ClusterNotFoundFault: <p>The <code>ClusterIdentifier</code> parameter does not refer to an existing cluster. </p>
capo_redshift.errors.invalid_cluster_state_fault.InvalidClusterStateFault: <p>The specified cluster is not in the <code>available</code> state. </p>
capo_redshift.errors.resize_not_found_fault.ResizeNotFoundFault: <p>A resize operation for the specified cluster is not found.</p>
capo_redshift.errors.unsupported_operation_fault.UnsupportedOperationFault: <p>The requested operation isn't supported.</p>
capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_redshift.types.cancel_resize_message.CancelResizeMessage]",
) -> OperationResponse[
"capo_redshift.types.resize_progress_message.ResizeProgressMessage"
]:
import capo_redshift._operations.redshift_service_version20121201.cancel_resize
output, http_response = (
capo_redshift._operations.redshift_service_version20121201.cancel_resize.cancel_resize(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CancelResize")
)
input_: capo_redshift.types.cancel_resize_message.CancelResizeMessage = {}
if cluster_identifier is not None:
input_["cluster_identifier"] = cluster_identifier
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|