Apply the service update to a list of clusters supplied. For more information on service updates and applying them, see Applying the service updates.
Parameters:
Raises:
Source code in docs_src/capo_memorydb/_services/memory_db.py
| def batch_update_cluster(
self,
cluster_names: "capo_memorydb.types.cluster_name_list.ClusterNameList",
*,
config_overrides: Optional[MemoryDBClientConfig] = None,
service_update: Optional[
"capo_memorydb.types.service_update_request.ServiceUpdateRequest"
] = None,
) -> "capo_memorydb.types.batch_update_cluster_response.BatchUpdateClusterResponse":
"""<p>Apply the service update to a list of clusters supplied. For more information on service updates and applying them, see <a href="https://docs.aws.amazon.com/MemoryDB/latest/devguide/managing-updates.html#applying-updates">Applying the service updates</a>.</p>
Args:
cluster_names: <p>The cluster names to apply the updates.</p>
service_update: <p>The unique ID of the service update</p>
Raises:
capo_memorydb.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The specified parameter value is not valid.</p>
capo_memorydb.errors.service_update_not_found_fault.ServiceUpdateNotFoundFault: <p>The specified service update does not exist.</p>
capo_memorydb.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_memorydb.types.batch_update_cluster_request.BatchUpdateClusterRequest]",
) -> OperationResponse[
"capo_memorydb.types.batch_update_cluster_response.BatchUpdateClusterResponse"
]:
import capo_memorydb._operations.amazon_memory_db.batch_update_cluster
output, http_response = (
capo_memorydb._operations.amazon_memory_db.batch_update_cluster.batch_update_cluster(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("BatchUpdateCluster")
)
input_: capo_memorydb.types.batch_update_cluster_request.BatchUpdateClusterRequest = {
"cluster_names": cluster_names
}
if service_update is not None:
input_["service_update"] = service_update
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|