Skip to content

delete_snapshot_schedule async

delete_snapshot_schedule(
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    schedule_identifier: Optional[String] = None,
) -> None

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/async_redshift.py
async def delete_snapshot_schedule(
    self,
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = 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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_redshift.types.delete_snapshot_schedule_message.DeleteSnapshotScheduleMessage]",
    ) -> AsyncOperationResponse[None]:
        import capo_redshift._operations.redshift_service_version20121201.delete_snapshot_schedule

        (
            output,
            http_response,
        ) = await capo_redshift._operations.redshift_service_version20121201.delete_snapshot_schedule.async_delete_snapshot_schedule(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output