# Module cartridge.lua-api.edit-topology

Administration functions ( `edit-topology` implementation).

## Editing topology

### edit_topology (args)

Edit cluster topology. This function can be used for:

- bootstrapping cluster from scratch

- joining a server to an existing replicaset

- creating new replicaset with one or more servers

- editing uri/labels of servers

- disabling and expelling servers

(Added in v1.0.0-17)

Parameters:

- args:

  - servers: (optional {EditServerParams,..})

  - replicasets: (optional {EditReplicasetParams,..})

### EditReplicasetParams

Replicatets modifications.

Fields:

- uuid: (optional string)

- alias: (optional string)

- roles: (optional {string,…})

- all_rw: (optional boolean)

- weight: (optional number)

- failover_priority: (optional {string,…}) array of uuids specifying servers failover priority

- vshard_group: (optional string)

- join_servers: (optional {JoinServerParams,…})

### JoinServerParams

Parameters required for joining a new server.

Fields:

- uri: (string)

- uuid: (optional string)

- zone: (optional string) (Added in v2.4.0-14)

- labels: (optional table)

### EditServerParams

Servers modifications.

Fields:

- uri: (optional string)

- uuid: (string)

- zone: (optional string)

- labels: (optional table)

- disabled: (optional boolean)

- expelled: (optional boolean) Expelling an instance is permanent and can’t be undone.It’s suitable for situations when the hardware is destroyed,snapshots are lost and there is no hope to bring it back to life.