Deletes a snapshot schedule.
Parameters:
-
schedule_identifier
(Optional[String], default:
None
)
–
A unique identifier of the snapshot schedule to delete.
Raises:
Source code in docs_src/capo_redshift/_services/redshift.py
| def delete_snapshot_schedule(
self,
*,
config_overrides: Optional[RedshiftClientConfig] = None,
schedule_identifier: Optional["capo_redshift.types.string.String"] = None,
) -> None:
"""<p>Deletes a snapshot schedule.</p>
Args:
schedule_identifier: <p>A unique identifier of the snapshot schedule to delete.</p>
Raises:
capo_redshift.errors.invalid_cluster_snapshot_schedule_state_fault.InvalidClusterSnapshotScheduleStateFault: <p>The cluster snapshot schedule state is not valid.</p>
capo_redshift.errors.snapshot_schedule_not_found_fault.SnapshotScheduleNotFoundFault: <p>We could not find the specified snapshot schedule. </p>
capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_redshift.types.delete_snapshot_schedule_message.DeleteSnapshotScheduleMessage]",
) -> OperationResponse[None]:
import capo_redshift._operations.redshift_service_version20121201.delete_snapshot_schedule
output, http_response = (
capo_redshift._operations.redshift_service_version20121201.delete_snapshot_schedule.delete_snapshot_schedule(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteSnapshotSchedule")
)
input_: capo_redshift.types.delete_snapshot_schedule_message.DeleteSnapshotScheduleMessage = {}
if schedule_identifier is not None:
input_["schedule_identifier"] = schedule_identifier
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|