Skip to content

increase_replication_factor

increase_replication_factor(
    cluster_name: String,
    new_replication_factor: Integer,
    *,
    config_overrides: Optional[DAXClientConfig] = None,
    availability_zones: Optional[AvailabilityZoneList] = None,
) -> IncreaseReplicationFactorResponse

Adds one or more nodes to a DAX cluster.

Parameters:

  • cluster_name (String) –

    The name of the DAX cluster that will receive additional nodes.

  • new_replication_factor (Integer) –

    The new number of nodes for the DAX cluster.

  • availability_zones (Optional[AvailabilityZoneList], default: None ) –

    The Availability Zones (AZs) in which the cluster nodes will be created. All nodes belonging to the cluster are placed in these Availability Zones. Use this parameter if you want to distribute the nodes across multiple AZs.

Raises:

Source code in docs_src/capo_dax/_services/dax.py
def increase_replication_factor(
    self,
    cluster_name: "capo_dax.types.string.String",
    new_replication_factor: "capo_dax.types.integer.Integer",
    *,
    config_overrides: Optional[DAXClientConfig] = None,
    availability_zones: Optional[
        "capo_dax.types.availability_zone_list.AvailabilityZoneList"
    ] = None,
) -> "capo_dax.types.increase_replication_factor_response.IncreaseReplicationFactorResponse":
    """<p>Adds one or more nodes to a DAX cluster.</p>

    Args:
        cluster_name: <p>The name of the DAX cluster that will receive additional nodes.</p>
        new_replication_factor: <p>The new number of nodes for the DAX cluster.</p>
        availability_zones: <p>The Availability Zones (AZs) in which the cluster nodes will be created. All nodes belonging to the cluster are placed in these Availability Zones. Use this parameter if you want to distribute the nodes across multiple AZs.</p>

    Raises:
        capo_dax.errors.cluster_not_found_fault.ClusterNotFoundFault: <p>The requested cluster ID does not refer to an existing DAX cluster.</p>
        capo_dax.errors.insufficient_cluster_capacity_fault.InsufficientClusterCapacityFault: <p>There are not enough system resources to create the cluster you requested (or to resize an already-existing cluster). </p>
        capo_dax.errors.invalid_cluster_state_fault.InvalidClusterStateFault: <p>The requested DAX cluster is not in the <i>available</i> state.</p>
        capo_dax.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>Two or more incompatible parameters were specified.</p>
        capo_dax.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value for a parameter is invalid.</p>
        capo_dax.errors.invalid_vpc_network_state_fault.InvalidVPCNetworkStateFault: <p>The VPC network is in an invalid state.</p>
        capo_dax.errors.node_quota_for_cluster_exceeded_fault.NodeQuotaForClusterExceededFault: <p>You have attempted to exceed the maximum number of nodes for a DAX cluster.</p>
        capo_dax.errors.node_quota_for_customer_exceeded_fault.NodeQuotaForCustomerExceededFault: <p>You have attempted to exceed the maximum number of nodes for your Amazon Web Services account.</p>
        capo_dax.errors.service_linked_role_not_found_fault.ServiceLinkedRoleNotFoundFault: <p>The specified service linked role (SLR) was not found.</p>
        capo_dax.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_dax.types.increase_replication_factor_request.IncreaseReplicationFactorRequest]",
    ) -> OperationResponse[
        "capo_dax.types.increase_replication_factor_response.IncreaseReplicationFactorResponse"
    ]:
        import capo_dax._operations.amazon_daxv3.increase_replication_factor

        output, http_response = (
            capo_dax._operations.amazon_daxv3.increase_replication_factor.increase_replication_factor(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("IncreaseReplicationFactor")
    )
    input_: capo_dax.types.increase_replication_factor_request.IncreaseReplicationFactorRequest = {
        "cluster_name": cluster_name,
        "new_replication_factor": new_replication_factor,
    }
    if availability_zones is not None:
        input_["availability_zones"] = availability_zones

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output