Skip to content

backtrack_db_cluster async

backtrack_db_cluster(
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_cluster_identifier: Optional[String] = None,
    backtrack_to: Optional[TStamp] = None,
    force: Optional[BooleanOptional] = None,
    use_earliest_time_on_point_in_time_unavailable: Optional[BooleanOptional] = None,
) -> DBClusterBacktrack

Backtracks a DB cluster to a specific time, without creating a new DB cluster.

For more information on backtracking, see Backtracking an Aurora DB Cluster in the Amazon Aurora User Guide.

This action applies only to Aurora MySQL DB clusters.

Parameters:

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

    The DB cluster identifier of the DB cluster to be backtracked. This parameter is stored as a lowercase string.

    Constraints:

    • Must contain from 1 to 63 alphanumeric characters or hyphens.

    • First character must be a letter.

    • Can't end with a hyphen or contain two consecutive hyphens.

    Example: my-cluster1

  • backtrack_to (Optional[TStamp], default: None ) –

    The timestamp of the time to backtrack the DB cluster to, specified in ISO 8601 format. For more information about ISO 8601, see the ISO8601 Wikipedia page.

    If the specified time isn't a consistent time for the DB cluster, Aurora automatically chooses the nearest possible consistent time for the DB cluster.

    Constraints:

    • Must contain a valid ISO 8601 timestamp.

    • Can't contain a timestamp set in the future.

    Example: 2017-07-08T18:00Z

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

    Specifies whether to force the DB cluster to backtrack when binary logging is enabled. Otherwise, an error occurs when binary logging is enabled.

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

    Specifies whether to backtrack the DB cluster to the earliest possible backtrack time when BacktrackTo is set to a timestamp earlier than the earliest backtrack time. When this parameter is disabled and BacktrackTo is set to a timestamp earlier than the earliest backtrack time, an error occurs.

Raises:

Source code in docs_src/capo_rds/_services/async_rds.py
async def backtrack_db_cluster(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_cluster_identifier: Optional["capo_rds.types.string.String"] = None,
    backtrack_to: Optional["capo_rds.types.t_stamp.TStamp"] = None,
    force: Optional["capo_rds.types.boolean_optional.BooleanOptional"] = None,
    use_earliest_time_on_point_in_time_unavailable: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
) -> "capo_rds.types.db_cluster_backtrack.DBClusterBacktrack":
    """<p>Backtracks a DB cluster to a specific time, without creating a new DB cluster.</p> <p>For more information on backtracking, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Managing.Backtrack.html"> Backtracking an Aurora DB Cluster</a> in the <i>Amazon Aurora User Guide</i>.</p> <note> <p>This action applies only to Aurora MySQL DB clusters.</p> </note>

    Args:
        db_cluster_identifier: <p>The DB cluster identifier of the DB cluster to be backtracked. This parameter is stored as a lowercase string.</p> <p>Constraints:</p> <ul> <li> <p>Must contain from 1 to 63 alphanumeric characters or hyphens.</p> </li> <li> <p>First character must be a letter.</p> </li> <li> <p>Can't end with a hyphen or contain two consecutive hyphens.</p> </li> </ul> <p>Example: <code>my-cluster1</code> </p>
        backtrack_to: <p>The timestamp of the time to backtrack the DB cluster to, specified in ISO 8601 format. For more information about ISO 8601, see the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO8601 Wikipedia page.</a> </p> <note> <p>If the specified time isn't a consistent time for the DB cluster, Aurora automatically chooses the nearest possible consistent time for the DB cluster.</p> </note> <p>Constraints:</p> <ul> <li> <p>Must contain a valid ISO 8601 timestamp.</p> </li> <li> <p>Can't contain a timestamp set in the future.</p> </li> </ul> <p>Example: <code>2017-07-08T18:00Z</code> </p>
        force: <p>Specifies whether to force the DB cluster to backtrack when binary logging is enabled. Otherwise, an error occurs when binary logging is enabled.</p>
        use_earliest_time_on_point_in_time_unavailable: <p>Specifies whether to backtrack the DB cluster to the earliest possible backtrack time when <i>BacktrackTo</i> is set to a timestamp earlier than the earliest backtrack time. When this parameter is disabled and <i>BacktrackTo</i> is set to a timestamp earlier than the earliest backtrack time, an error occurs.</p>

    Raises:
        capo_rds.errors.db_cluster_not_found_fault.DBClusterNotFoundFault: <p> <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.</p>
        capo_rds.errors.invalid_db_cluster_state_fault.InvalidDBClusterStateFault: <p>The requested operation can't be performed while the cluster is in this state.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rds.types.backtrack_db_cluster_message.BacktrackDBClusterMessage]",
    ) -> AsyncOperationResponse[
        "capo_rds.types.db_cluster_backtrack.DBClusterBacktrack"
    ]:
        import capo_rds._operations.amazon_rd_sv19.backtrack_db_cluster

        (
            output,
            http_response,
        ) = await capo_rds._operations.amazon_rd_sv19.backtrack_db_cluster.async_backtrack_db_cluster(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BacktrackDBCluster")
    )
    input_: capo_rds.types.backtrack_db_cluster_message.BacktrackDBClusterMessage = {}
    if db_cluster_identifier is not None:
        input_["db_cluster_identifier"] = db_cluster_identifier
    if backtrack_to is not None:
        input_["backtrack_to"] = backtrack_to
    if force is not None:
        input_["force"] = force
    if use_earliest_time_on_point_in_time_unavailable is not None:
        input_["use_earliest_time_on_point_in_time_unavailable"] = (
            use_earliest_time_on_point_in_time_unavailable
        )

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output