Skip to content

modify_cluster_snapshot_schedule

modify_cluster_snapshot_schedule(
    *,
    config_overrides: Optional[RedshiftClientConfig] = None,
    cluster_identifier: Optional[String] = None,
    schedule_identifier: Optional[String] = None,
    disassociate_schedule: Optional[BooleanOptional] = None,
) -> None

Modifies a snapshot schedule for a cluster.

Parameters:

  • cluster_identifier (Optional[String], default: None ) –

    A unique identifier for the cluster whose snapshot schedule you want to modify.

  • schedule_identifier (Optional[String], default: None ) –

    A unique alphanumeric identifier for the schedule that you want to associate with the cluster.

  • disassociate_schedule (Optional[BooleanOptional], default: None ) –

    A boolean to indicate whether to remove the assoiciation between the cluster and the schedule.

Raises:

Source code in docs_src/capo_redshift/_services/redshift.py
def modify_cluster_snapshot_schedule(
    self,
    *,
    config_overrides: Optional[RedshiftClientConfig] = None,
    cluster_identifier: Optional["capo_redshift.types.string.String"] = None,
    schedule_identifier: Optional["capo_redshift.types.string.String"] = None,
    disassociate_schedule: Optional[
        "capo_redshift.types.boolean_optional.BooleanOptional"
    ] = None,
) -> None:
    """<p>Modifies a snapshot schedule for a cluster.</p>

    Args:
        cluster_identifier: <p>A unique identifier for the cluster whose snapshot schedule you want to modify. </p>
        schedule_identifier: <p>A unique alphanumeric identifier for the schedule that you want to associate with the cluster.</p>
        disassociate_schedule: <p>A boolean to indicate whether to remove the assoiciation between the cluster and the schedule.</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_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.modify_cluster_snapshot_schedule_message.ModifyClusterSnapshotScheduleMessage]",
    ) -> OperationResponse[None]:
        import capo_redshift._operations.redshift_service_version20121201.modify_cluster_snapshot_schedule

        output, http_response = (
            capo_redshift._operations.redshift_service_version20121201.modify_cluster_snapshot_schedule.modify_cluster_snapshot_schedule(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyClusterSnapshotSchedule")
    )
    input_: capo_redshift.types.modify_cluster_snapshot_schedule_message.ModifyClusterSnapshotScheduleMessage = {}
    if cluster_identifier is not None:
        input_["cluster_identifier"] = cluster_identifier
    if schedule_identifier is not None:
        input_["schedule_identifier"] = schedule_identifier
    if disassociate_schedule is not None:
        input_["disassociate_schedule"] = disassociate_schedule

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output