Reboots a replication instance. Rebooting results in a momentary outage, until the replication instance becomes available again.
Parameters:
-
replication_instance_arn
(String)
–
The Amazon Resource Name (ARN) of the replication instance.
-
force_failover
(Optional[BooleanOptional], default:
None
)
–
If this parameter is true, the reboot is conducted through a Multi-AZ failover. If the instance isn't configured for Multi-AZ, then you can't specify true. ( --force-planned-failover and --force-failover can't both be set to true.)
-
force_planned_failover
(Optional[BooleanOptional], default:
None
)
–
If this parameter is true, the reboot is conducted through a planned Multi-AZ failover where resources are released and cleaned up prior to conducting the failover. If the instance isn''t configured for Multi-AZ, then you can't specify true. ( --force-planned-failover and --force-failover can't both be set to true.)
Raises:
Source code in docs_src/capo_database_migration_service/_services/database_migration_service.py
| def reboot_replication_instance(
self,
replication_instance_arn: "capo_database_migration_service.types.string.String",
*,
config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
force_failover: Optional[
"capo_database_migration_service.types.boolean_optional.BooleanOptional"
] = None,
force_planned_failover: Optional[
"capo_database_migration_service.types.boolean_optional.BooleanOptional"
] = None,
) -> "capo_database_migration_service.types.reboot_replication_instance_response.RebootReplicationInstanceResponse":
"""<p>Reboots a replication instance. Rebooting results in a momentary outage, until the replication instance becomes available again.</p>
Args:
replication_instance_arn: <p>The Amazon Resource Name (ARN) of the replication instance.</p>
force_failover: <p>If this parameter is <code>true</code>, the reboot is conducted through a Multi-AZ failover. If the instance isn't configured for Multi-AZ, then you can't specify <code>true</code>. ( <code>--force-planned-failover</code> and <code>--force-failover</code> can't both be set to <code>true</code>.)</p>
force_planned_failover: <p>If this parameter is <code>true</code>, the reboot is conducted through a planned Multi-AZ failover where resources are released and cleaned up prior to conducting the failover. If the instance isn''t configured for Multi-AZ, then you can't specify <code>true</code>. ( <code>--force-planned-failover</code> and <code>--force-failover</code> can't both be set to <code>true</code>.)</p>
Raises:
capo_database_migration_service.errors.invalid_resource_state_fault.InvalidResourceStateFault: <p>The resource is in a state that prevents it from being used for database migration.</p>
capo_database_migration_service.errors.resource_not_found_fault.ResourceNotFoundFault: <p>The resource could not be found.</p>
capo_database_migration_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_database_migration_service.types.reboot_replication_instance_message.RebootReplicationInstanceMessage]",
) -> OperationResponse[
"capo_database_migration_service.types.reboot_replication_instance_response.RebootReplicationInstanceResponse"
]:
import capo_database_migration_service._operations.amazon_dm_sv20160101.reboot_replication_instance
output, http_response = (
capo_database_migration_service._operations.amazon_dm_sv20160101.reboot_replication_instance.reboot_replication_instance(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("RebootReplicationInstance")
)
input_: capo_database_migration_service.types.reboot_replication_instance_message.RebootReplicationInstanceMessage = {
"replication_instance_arn": replication_instance_arn
}
if force_failover is not None:
input_["force_failover"] = force_failover
if force_planned_failover is not None:
input_["force_planned_failover"] = force_planned_failover
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|