Files
iris-context/commands/ops/mongocli.go
VERSE ebde9ba68f refactor(commands): separate commands and its core into two folders (#32)
- I think it would be better if one for commands only, one for the spec
handling core logic so people won't be confused by the core logic inside
the commands folder (cleaner I guess)
- Regen docs
2026-07-05 11:27:30 +07:00

107 lines
7.6 KiB
Go

package ops
import (
"github.com/versenilvis/iris/spec"
)
func init() {
spec.Register(&spec.Spec{
Name: "mongocli",
Description: "CLI tool to manage your MongoDB Cloud",
Subcommands: []spec.Subcommand{
{Name: "config", Description: "Configure a profile to store access settings for your MongoDB deployment"},
{Name: "set", Description: "Configure specific properties of a profile"},
{Name: "ls", Description: "List available profiles"},
{Name: "get", Description: "Return a specific profile"},
{Name: "mv", Description: "Rename a profile"},
{Name: "rm", Description: "Delete a profile"},
{Name: "atlas", Description: "MongoDB Atlas operations"},
{Name: "quickstart", Description: "Create and access an Atlas Cluster"},
{Name: "cluster", Description: "Manage clusters for your project"},
{Name: "create", Description: "Create one cluster in the specified project"},
{Name: "watch", Description: "Watch for a cluster to be available"},
{Name: "update", Description: "Update a MongoDB cluster"},
{Name: "pause", Description: "Pause a running MongoDB cluster in Atlas"},
{Name: "start", Description: "Start a paused MongoDB cluster in Atlas"},
{Name: "loadSampleData", Description: "Load sample data into a MongoDB cluster in Atlas"},
{Name: "index", Description: "Manage cluster rolling indexes for your project"},
{Name: "fts", Description: "Manage Atlas Search for your cluster"},
{Name: "describe", Description: "Describe a search index for a cluster"},
{Name: "onlinearchives", Description: "Manage online archives for your cluster"},
{Name: "connectionstrings", Description: "Manage MongoDB cluster connection string"},
{Name: "availableregions", Description: "Manage available regions for your project"},
{Name: "dbuser", Description: "Manage database users for your project"},
{Name: "cert", Description: "Manage Atlas x509 certificates for your database users"},
{Name: "customdbroles", Description: "Manage custom database roles for your project"},
{Name: "accesslists", Description: "Manage the access IP access list for your project"},
{Name: "datalakes", Description: "Manage Atlas Data Lakes for your project"},
{Name: "alert", Description: "Manage alerts for your project"},
{Name: "field", Description: "Manages alert configuration fields for your project"},
{Name: "types", Description: "Lists available field types for your alert configurations"},
{Name: "ack", Description: "Acknowledges one alert for the specified project"},
{Name: "unack", Description: "Unacknowledges one alert for the specified project"},
{Name: "global", Description: "Retrieves all the global alerts for the specified Ops Manager project"},
{Name: "backup", Description: "Manage cloud backups for your project"},
{Name: "snapshot", Description: "Manage cloud backup snapshots for your project"},
{Name: "take", Description: "Create a backup snapshot for your project and cluster"},
{Name: "restore", Description: "Manage cloud backup restore jobs for your project"},
{Name: "event", Description: "Manage events for your organization or project"},
{Name: "organization", Description: "Organization operations"},
{Name: "project", Description: "Project operations"},
{Name: "metric", Description: "Get metrics on the MongoDB process"},
{Name: "process", Description: "Get MongoDB process metrics for a given host"},
{Name: "disk", Description: "List available disks or disk metrics for a given host"},
{Name: "database", Description: "List available databases or database metrics for a given host"},
{Name: "performanceadvisor", Description: "Performance Advisor operations"},
{Name: "namespace", Description: "Retrieve namespaces for collections experiencing slow queries"},
{Name: "slowquerylogs", Description: "Get log lines for slow queries for a specified host"},
{Name: "suggestedindexes", Description: "Get suggested indexes for collections experiencing slow queries"},
{Name: "slowOT", Description: "Enable or disable management of the slow operation threshold for your cluster"},
{Name: "disable", Description: "Disable the application-managed slow operation threshold for your project"},
{Name: "log", Description: "Download host logs for your project"},
},
Options: []spec.Option{
{Name: "--output", Description: "Return a specific profile"},
{Name: "--force", Description: "MongoDB Atlas operations"},
{Name: "--accessListIp", Description: "IP address to be allowed to access the deployment"},
{Name: "--clusterName", Description: "Name of the cluster"},
{Name: "--default", Description: "User's password"},
{Name: "--projectId", Description: "Name of your cloud service provider. Valid values are AWS, AZURE, or GCP"},
{Name: "--region", Description: "Indicates whether to skip accessing your deployment with MongoDB Shell"},
{Name: "--skipSampleData", Description: "Indicates whether to skip loading sample data into your Atlas Cluster"},
{Name: "--tier", Description: "Tier for each data-bearing server in the cluster"},
{Name: "--username", Description: "Username for authenticating to MongoDB"},
{Name: "--limit", Description: "Number of items per page"},
{Name: "--backup", Description: "If true, enables Continuous Cloud Backup for your deployment"},
{Name: "--biConnector", Description: "If true, enables BI Connector for Atlas on the deployment"},
{Name: "--diskSizeGB", Description: "Capacity, in gigabytes, of the host's root volume"},
{Name: "--file", Description: "File name to use, optional file with a json cluster configuration"},
{Name: "--mdbVersion", Description: "MongoDB version of the cluster to deploy"},
{Name: "--members", Description: "Number of members in the replica set"},
{Name: "--type", Description: "Watch for a cluster to be available"},
{Name: "--collection", Description: "Collection name"},
{Name: "--db", Description: "Database name"},
{Name: "--key", Description: "Field to be indexed and the type of index in the following format: field:type"},
{Name: "--analyzer", Description: "Analyzer to use when creating the index"},
{Name: "--dynamic", Description: "Indicates whether the index uses dynamic or static mappings"},
{Name: "--field", Description: "Static field specifications"},
{Name: "--indexName", Description: "Name of the index"},
{Name: "--archiveAfter", Description: "Name of the cluster"},
{Name: "--dateField", Description: "Name of an already indexed date field from the documents"},
{Name: "--dateFormat", Description: "Database name"},
{Name: "--authDB", Description: "Authentication database name"},
{Name: "--awsIAMType", Description: "Timestamp in ISO 8601 in UTC after which Atlas deletes the user"},
{Name: "--ldapType", Description: "User's password"},
{Name: "--scope", Description: "Array of clusters and Atlas Data Lakes that this user has access to"},
{Name: "--x509Type", Description: "Delete a database user for your project"},
{Name: "--monthsUntilExpiration", Description: "Number of months that the certificate is valid for"},
{Name: "--inheritedRole", Description: "List of inherited roles and the database on which the role is granted"},
{Name: "--append", Description: "The input action and inheritedRoles that will be appended to the existing role"},
{Name: "--comment", Description: "Optional description or comment for the entry"},
{Name: "--currentIp", Description: "ISO-8601-formatted UTC date after which Atlas removes the value from the entry"},
{Name: "--apiKey", Description: "Datadog API Key, Opsgenie API Key, VictorOps API key"},
{Name: "--enabled", Description: "If set to true, the alert configuration is enabled"},
},
})
}