volixer 5 miesięcy temu
rodzic
commit
c4cd262da5
1 zmienionych plików z 61 dodań i 0 usunięć
  1. 61 0
      scripts/bash/README.md

+ 61 - 0
scripts/bash/README.md

@@ -0,0 +1,61 @@
+# OVH-BASH
+
+This is a simple **OVH API wrapper** in BASH
+It use the same configuration file as for the [go-ovh](https://github.com/ovh/go-ovh?tab=readme-ov-file#application-keyapplication-secret) wrapper
+
+## Token creation
+
+You need to follow : [createApp](https://www.ovh.com/auth/api/createApp)
+And add the Application_key,secret_key and consumer_key to the [](#/../golang/ovh.conf)
+
+## How to use
+
+**Example**
+1. Get all VPS
+```bash
+./ovh-bash get vps
+
+[
+  "vps-3e2da6b4.vps.ovh.net",
+  "vps-556c9180.vps.ovh.net",
+  "vps-59e2e922.vps.ovh.net",
+  "vps-76fdb68a.vps.ovh.net",
+  "vps-89819518.vps.ovh.net",
+  "vps-b280dcff.vps.ovh.net",
+  "vps-f31d3392.vps.ovh.net"
+]
+```
+2. Get all records for a DNS Zone "linuxforward.com"
+```bash
+./ovh-bash get domain/zone/linuxforward.com/record/
+[
+  5344790631,
+  5344790632,
+  5344790633,
+  5344790634,
+  5344790635,
+  5344790636,
+  5344790637,
+  [...]
+  5344790668,
+  5344790669,
+  5344790670,
+  5344790671
+]
+```
+
+3. Get info from a specific DNS Zone record
+
+```bash
+./ovh-bash get domain/zone/linuxforward.com/record/5344790650
+{
+  "fieldType": "A",
+  "id": 5344790650,
+  "subDomain": "demodev",
+  "target": "51.91.101.38",
+  "ttl": 0,
+  "zone": "linuxforward.com"
+}
+
+```
+