Skip to content

modify_db_shard_group async

modify_db_shard_group(
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_shard_group_identifier: Optional[DBShardGroupIdentifier] = None,
    max_acu: Optional[DoubleOptional] = None,
    min_acu: Optional[DoubleOptional] = None,
    compute_redundancy: Optional[IntegerOptional] = None,
) -> DBShardGroup

Modifies the settings of an Aurora Limitless Database DB shard group. You can change one or more settings by specifying these parameters and the new values in the request.

Parameters:

  • db_shard_group_identifier (Optional[DBShardGroupIdentifier], default: None ) –

    The name of the DB shard group to modify.

  • max_acu (Optional[DoubleOptional], default: None ) –

    The maximum capacity of the DB shard group in Aurora capacity units (ACUs).

  • min_acu (Optional[DoubleOptional], default: None ) –

    The minimum capacity of the DB shard group in Aurora capacity units (ACUs).

  • compute_redundancy (Optional[IntegerOptional], default: None ) –

    Specifies whether to create standby DB shard groups for the DB shard group. Valid values are the following:

    • 0 - Creates a DB shard group without a standby DB shard group. This is the default value.

    • 1 - Creates a DB shard group with a standby DB shard group in a different Availability Zone (AZ).

    • 2 - Creates a DB shard group with two standby DB shard groups in two different AZs.

Raises:

Source code in docs_src/capo_rds/_services/async_rds.py
async def modify_db_shard_group(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_shard_group_identifier: Optional[
        "capo_rds.types.db_shard_group_identifier.DBShardGroupIdentifier"
    ] = None,
    max_acu: Optional["capo_rds.types.double_optional.DoubleOptional"] = None,
    min_acu: Optional["capo_rds.types.double_optional.DoubleOptional"] = None,
    compute_redundancy: Optional[
        "capo_rds.types.integer_optional.IntegerOptional"
    ] = None,
) -> "capo_rds.types.db_shard_group.DBShardGroup":
    """<p>Modifies the settings of an Aurora Limitless Database DB shard group. You can change one or more settings by specifying these parameters and the new values in the request.</p>

    Args:
        db_shard_group_identifier: <p>The name of the DB shard group to modify.</p>
        max_acu: <p>The maximum capacity of the DB shard group in Aurora capacity units (ACUs).</p>
        min_acu: <p>The minimum capacity of the DB shard group in Aurora capacity units (ACUs).</p>
        compute_redundancy: <p>Specifies whether to create standby DB shard groups for the DB shard group. Valid values are the following:</p> <ul> <li> <p>0 - Creates a DB shard group without a standby DB shard group. This is the default value.</p> </li> <li> <p>1 - Creates a DB shard group with a standby DB shard group in a different Availability Zone (AZ).</p> </li> <li> <p>2 - Creates a DB shard group with two standby DB shard groups in two different AZs.</p> </li> </ul>

    Raises:
        capo_rds.errors.db_shard_group_already_exists_fault.DBShardGroupAlreadyExistsFault: <p>The specified DB shard group name must be unique in your Amazon Web Services account in the specified Amazon Web Services Region.</p>
        capo_rds.errors.db_shard_group_not_found_fault.DBShardGroupNotFoundFault: <p>The specified DB shard group name wasn't found.</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.modify_db_shard_group_message.ModifyDBShardGroupMessage]",
    ) -> AsyncOperationResponse["capo_rds.types.db_shard_group.DBShardGroup"]:
        import capo_rds._operations.amazon_rd_sv19.modify_db_shard_group

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyDBShardGroup")
    )
    input_: capo_rds.types.modify_db_shard_group_message.ModifyDBShardGroupMessage = {}
    if db_shard_group_identifier is not None:
        input_["db_shard_group_identifier"] = db_shard_group_identifier
    if max_acu is not None:
        input_["max_acu"] = max_acu
    if min_acu is not None:
        input_["min_acu"] = min_acu
    if compute_redundancy is not None:
        input_["compute_redundancy"] = compute_redundancy

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