Help us shape the future of Go! Take the 2026 Go Developer Survey

mongo-atlas

command module
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2020 License: MIT Imports: 5 Imported by: 0

README

MongoDB Atlas API

Invoke MongoDB Atlas API using Golang.

Supported Functions

  • Clusters summary
  • Create/Terminate a cluster
  • Start/Pause a cluster
  • Download FTDC
  • Download Logs
  • Display Alerts Settings
  • Add Recommended Alerts

Get clusters summary

matlas --info "atlas://{pub_key}:{pri_key}"

Pause a Cluster

matlas --pause "atlas://{pub_key}:{pri_key}@{group}/{cluster}"

Resume a Cluster

matlas --resume "atlas://{pub_key}:{pri_key}@{group}/{cluster}"

Download log files

By default, without specifying startDate nor endDate, it downloads today's logs.

matlas --loginfo "atlas://{pub_key}:{pri_key}@{group}/{cluster}[?startDate=yyyy-mm-dd&endDate=yyyy-mm-dd]"

Create a Cluster

matlas --request POST "{pub_key}:{pri_key}@{group}" '
{
    "name": "Cluster0",
    "numShards": 1,
    "providerSettings": {
        "providerName": "AWS",
        "instanceSizeName": "M10",
        "regionName": "US_EAST_1"
    },
    "clusterType" : "REPLICASET",
    "backupEnabled": false
}'

Terminate a Cluster

matlas --request DELETE "{pub_key}:{pri_key}@{group}/{cluster}"

Get All Alerts

matlas --alerts "{pub_key}:{pri_key}@{group}"
matlas --addAlerts conf/alerts.json "{pub_key}:{pri_key}@{group}"

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL