MySQL Shell 9.2

7.8.3 Importing and Exporting Routing Guidelines

Routing Guidelines can be imported or exported using the following:

For example, to import a Routing Guideline, routingguideline1.json, to a cluster:

cluster.import_routing_guideline("~/Shell/RGs/routingguideline1.json")
      

For example, to export a Routing Guideline, RG1, from a cluster to the filesystem, as JSON:

var rg = cluster.get_routing_guideline("RG1")
rg.export("~/Shell/RGs/RG1.json")