Skip to content

stop_db_instance_automated_backups_replication async

stop_db_instance_automated_backups_replication(
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    source_db_instance_arn: Optional[String] = None,
) -> StopDBInstanceAutomatedBackupsReplicationResult

Stops automated backup replication for a DB instance.

This command doesn't apply to RDS Custom, Aurora MySQL, and Aurora PostgreSQL.

For more information, see Replicating Automated Backups to Another Amazon Web Services Region in the Amazon RDS User Guide.

Parameters:

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

    The Amazon Resource Name (ARN) of the source DB instance for which to stop replicating automate backups, for example, arn:aws:rds:us-west-2:123456789012:db:mydatabase.

Raises:

Examples:

To stop replicating automated backups The following example ends replication of automated backups. Replicated backups are retained according to the set backup retention period.

>>> await client.stop_db_instance_automated_backups_replication(source_db_instance_arn='arn:aws:rds:us-east-1:123456789012:db:new-orcl-db')
Source code in docs_src/capo_rds/_services/async_rds.py
async def stop_db_instance_automated_backups_replication(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    source_db_instance_arn: Optional["capo_rds.types.string.String"] = None,
) -> "capo_rds.types.stop_db_instance_automated_backups_replication_result.StopDBInstanceAutomatedBackupsReplicationResult":
    """<p>Stops automated backup replication for a DB instance.</p> <p>This command doesn't apply to RDS Custom, Aurora MySQL, and Aurora PostgreSQL.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReplicateBackups.html"> Replicating Automated Backups to Another Amazon Web Services Region</a> in the <i>Amazon RDS User Guide.</i> </p>

    Args:
        source_db_instance_arn: <p>The Amazon Resource Name (ARN) of the source DB instance for which to stop replicating automate backups, for example, <code>arn:aws:rds:us-west-2:123456789012:db:mydatabase</code>.</p>

    Raises:
        capo_rds.errors.db_instance_not_found_fault.DBInstanceNotFoundFault: <p> <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.</p>
        capo_rds.errors.invalid_db_instance_state_fault.InvalidDBInstanceStateFault: <p>The DB instance isn't in a valid state.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To stop replicating automated backups
        The following example ends replication of automated backups. Replicated backups are retained according to the set backup retention period.

        >>> await client.stop_db_instance_automated_backups_replication(source_db_instance_arn='arn:aws:rds:us-east-1:123456789012:db:new-orcl-db')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rds.types.stop_db_instance_automated_backups_replication_message.StopDBInstanceAutomatedBackupsReplicationMessage]",
    ) -> AsyncOperationResponse[
        "capo_rds.types.stop_db_instance_automated_backups_replication_result.StopDBInstanceAutomatedBackupsReplicationResult"
    ]:
        import capo_rds._operations.amazon_rd_sv19.stop_db_instance_automated_backups_replication

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

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("StopDBInstanceAutomatedBackupsReplication"),
    )
    input_: capo_rds.types.stop_db_instance_automated_backups_replication_message.StopDBInstanceAutomatedBackupsReplicationMessage = {}
    if source_db_instance_arn is not None:
        input_["source_db_instance_arn"] = source_db_instance_arn

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