Reboots a cluster. This action is taken as soon as possible. It results in a momentary outage to the cluster, during which the cluster status is set to rebooting. A cluster event is created when the reboot is completed. Any pending cluster modifications (see ModifyCluster) are applied at this reboot. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Cluster Management Guide.
Parameters:
Raises:
Source code in docs_src/capo_redshift/_services/async_redshift.py
| async def reboot_cluster(
self,
*,
config_overrides: Optional[AsyncRedshiftClientConfig] = None,
cluster_identifier: Optional["capo_redshift.types.string.String"] = None,
) -> "capo_redshift.types.reboot_cluster_result.RebootClusterResult":
"""<p>Reboots a cluster. This action is taken as soon as possible. It results in a momentary outage to the cluster, during which the cluster status is set to <code>rebooting</code>. A cluster event is created when the reboot is completed. Any pending cluster modifications (see <a>ModifyCluster</a>) are applied at this reboot. For more information about managing clusters, go to <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html">Amazon Redshift Clusters</a> in the <i>Amazon Redshift Cluster Management Guide</i>. </p>
Args:
cluster_identifier: <p>The cluster identifier.</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.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_redshift.types.reboot_cluster_message.RebootClusterMessage]",
) -> AsyncOperationResponse[
"capo_redshift.types.reboot_cluster_result.RebootClusterResult"
]:
import capo_redshift._operations.redshift_service_version20121201.reboot_cluster
(
output,
http_response,
) = await capo_redshift._operations.redshift_service_version20121201.reboot_cluster.async_reboot_cluster(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_redshift.types.reboot_cluster_result.RebootClusterResult",
) -> dict[str, Any]:
import capo_redshift.types.reboot_cluster_result
return capo_redshift.types.reboot_cluster_result.redact_sensitive(output)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("RebootCluster", redact_output=_redact_output),
)
input_: capo_redshift.types.reboot_cluster_message.RebootClusterMessage = {}
if cluster_identifier is not None:
input_["cluster_identifier"] = cluster_identifier
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|