ops-manager: go.mongodb.org/ops-manager/opsmngr Index | Files

package opsmngr

import "go.mongodb.org/ops-manager/opsmngr"

Package opsmngr provides a client for using the MongoDB Ops Manager and Cloud Manager API.

Usage

import "go.mongodb.org/ops-manager/opsmngr"

Construct a new Ops Manager client, then use the various services on the client to access different parts of the Ops Manager API. For example:

client := opsmngr.NewClient(nil)

The services of a client divide the API into logical chunks and correspond to the structure of the Ops Manager API documentation at https://docs.opsmanager.mongodb.com/v4.2/reference/api/.

NOTE: Using the https://godoc.org/context package, one can easily pass cancellation signals and deadlines to various services of the client for handling a request. In case there is no context available, then context.Background() can be used as a starting point.

Authentication

The ops-manager library does not directly handle authentication. Instead, when creating a new client, pass an http.Client that can handle Digest Access authentication for you. The easiest way to do this is using the https://github.com/mongodb-forks/digest library, but you can always use any other library that provides an `http.Client`. If you have a private and public API token pair, you can use it with the digest library using:

import (
	"context"
	"log"

	"github.com/mongodb-forks/digest"
	"go.mongodb.org/ops-manager/opsmngr"
)

func main() {
	t := digest.NewTransport("your public key", "your private key")
	tc, err := t.Client()
	if err != nil {
		log.Fatalf(err.Error())
	}

	client := opsmngr.NewClient(tc)
	orgs, _, err := client.Organizations.List(context.Background(), nil)
}

Note that when using an authenticated Client, all calls made by the client will include the specified tokens. Therefore, authenticated clients should almost never be shared between different users.

To get your API Keys please refer to our docs for:

- Ops Manager: https://docs.opsmanager.mongodb.com/current/tutorial/configure-public-api-access/,

- Cloud Manager: https://docs.cloudmanager.mongodb.com/tutorial/manage-programmatic-api-keys/.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Package Files

agents.go agents_api_keys.go automation.go automation_agent_update.go automation_config.go automation_status.go backup_agent_config.go backup_configs.go blockstore_config.go checkpoints.go clusters.go daemon_config.go deployments.go deployments_databases.go deployments_disks.go deployments_hosts.go diagnostics.go doc.go feature_control_policies.go file_system_store_config.go global_alerts.go global_api_key_whitelists.go global_api_keys.go logs.go maintenance.go measurements.go measurements_databases.go measurements_disks.go measurements_hosts.go monitoring_agent_config.go oplog_store_config.go opsmngr.go organizations.go performance_advisor.go project_job_config.go projects.go s3_blockstore_config.go server_usage.go snapshot_schedule.go sync_store_config.go teams.go unauth_users.go users.go version_manifest.go

Constants

const (

    // APIPublicV1Path specifies the v1 api path
    APIPublicV1Path = "api/public/v1.0/"
)

type AdminBackupConfig Uses

type AdminBackupConfig struct {
    ID                   string   `json:"id,omitempty"`
    URI                  string   `json:"uri,omitempty"`
    WriteConcern         string   `json:"writeConcern,omitempty"`
    Labels               []string `json:"labels,omitempty"`
    SSL                  *bool    `json:"ssl,omitempty"`
    AssignmentEnabled    *bool    `json:"assignmentEnabled,omitempty"`
    EncryptedCredentials *bool    `json:"encryptedCredentials,omitempty"`
    UsedSize             int64    `json:"usedSize,omitempty"`
}

AdminBackupConfig contains the common fields of backup administrator structs

type Agent Uses

type Agent struct {
    TypeName  string  `json:"typeName"`
    Hostname  string  `json:"hostname"`
    ConfCount int64   `json:"confCount"`
    LastConf  string  `json:"lastConf"`
    StateName string  `json:"stateName"`
    PingCount int64   `json:"pingCount"`
    IsManaged bool    `json:"isManaged"`
    LastPing  string  `json:"lastPing"`
    Tag       *string `json:"tag"`
}

Agent represents an Ops Manager agent

type AgentAPIKey Uses

type AgentAPIKey struct {
    ID            string  `json:"_id"`
    Key           string  `json:"key"`
    Desc          string  `json:"desc"`
    CreatedTime   int64   `json:"createdTime"`
    CreatedUserID *string `json:"createdUserId"`
    CreatedIPAddr *string `json:"createdIpAddr"`
    CreatedBy     string  `json:"createdBy"`
}

AgentAPIKey defines the structure for an Agent API key

type AgentAPIKeysRequest Uses

type AgentAPIKeysRequest struct {
    Desc string `json:"desc"`
}

AgentAPIKeysRequest a creation request for Agent API keys

type AgentConfig Uses

type AgentConfig struct {
    LogPath                 string                  `json:"logPath,omitempty"`
    LogPathWindows          string                  `json:"logPathWindows,omitempty"`
    LogRotate               *LogRotate              `json:"logRotate,omitempty"`
    ConfigOverrides         *map[string]string      `json:"configOverrides,omitempty"`
    HasPassword             *bool                   `json:"hasPassword,omitempty"`
    Username                string                  `json:"username,omitempty"`
    Password                string                  `json:"password,omitempty"`
    SSLPEMKeyFile           string                  `json:"sslPEMKeyFile,omitempty"`
    SSLPEMKeyFileWindows    string                  `json:"sslPEMKeyFileWindows,omitempty"`
    SSLPEMKeyPwd            string                  `json:"sslPEMKeyPwd,omitempty"`
    KerberosPrincipal       string                  `json:"kerberosPrincipal,omitempty"`
    KerberosKeytab          string                  `json:"kerberosKeytab,omitempty"`
    KerberosWindowsUsername string                  `json:"kerberosWindowsUsername,omitempty"`
    KerberosWindowsPassword string                  `json:"kerberosWindowsPassword,omitempty"`
    HasSslPEMKeyPwd         *bool                   `json:"hasSslPEMKeyPwd,omitempty"`
    LDAPGroupDN             string                  `json:"ldapGroupDN,omitempty"`
    URLs                    *map[string]interface{} `json:"urls,omitempty"`
}

type AgentVersion Uses

type AgentVersion struct {
    Address             string `json:"address"`
    ConfCount           int    `json:"confCount"`
    Hostname            string `json:"hostname"`
    HostnameShort       string `json:"hostnameShort"`
    IsManaged           bool   `json:"isManaged"`
    IsModule            bool   `json:"isModule"`
    IsPrimary           bool   `json:"isPrimary"`
    IsVersionOld        bool   `json:"isVersionOld"`
    IsVersionDeprecated bool   `json:"isVersionDeprecated"`
    LastConf            int64  `json:"lastConf"`
    LastPing            int64  `json:"lastPing"`
    MsSinceLastConf     int64  `json:"msSinceLastConf"`
    NumProcess          int    `json:"numProcess"`
    PingCount           int    `json:"pingCount"`
    PingState           string `json:"pingState"`
    TagName             string `json:"tagName"`
    Version             string `json:"version"`
}

type AgentVersions Uses

type AgentVersions struct {
    Count                       int             `json:"count"`
    Entries                     []*AgentVersion `json:"entries"`
    IsAnyAgentNotManaged        bool            `json:"isAnyAgentNotManaged"`
    IsAnyAgentVersionDeprecated bool            `json:"isAnyAgentVersionDeprecated"`
    IsAnyAgentVersionOld        bool            `json:"isAnyAgentVersionOld"`
    Links                       []*atlas.Link   `json:"links"`
    MinimumAgentVersionDetected string          `json:"minimumAgentVersionDetected"`
    MinimumVersion              string          `json:"minimumVersion"`
}

AgentVersions is a set of available agents and agent versions for a project

type Agents Uses

type Agents struct {
    Links      []*atlas.Link `json:"links"`
    Results    []*Agent      `json:"results"`
    TotalCount int           `json:"totalCount"`
}

Agents is a paginated collection of Agent

type AgentsService Uses

type AgentsService interface {
    ListAgentLinks(context.Context, string) (*Agents, *atlas.Response, error)
    ListAgentsByType(context.Context, string, string) (*Agents, *atlas.Response, error)
    CreateAgentAPIKey(context.Context, string, *AgentAPIKeysRequest) (*AgentAPIKey, *atlas.Response, error)
    ListAgentAPIKeys(context.Context, string) ([]*AgentAPIKey, *atlas.Response, error)
    DeleteAgentAPIKey(context.Context, string, string) (*atlas.Response, error)
    GlobalVersions(context.Context) (*SoftwareVersions, *atlas.Response, error)
    ProjectVersions(context.Context, string) (*AgentVersions, *atlas.Response, error)
}

AgentsService provides access to the agent related functions in the Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/agents/

type AgentsServiceOp Uses

type AgentsServiceOp service

AgentsServiceOp provides an implementation of the AgentsService interface

func (*AgentsServiceOp) CreateAgentAPIKey Uses

func (s *AgentsServiceOp) CreateAgentAPIKey(ctx context.Context, projectID string, agent *AgentAPIKeysRequest) (*AgentAPIKey, *atlas.Response, error)

CreateAgentAPIKey creates a new agent API key.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/agentapikeys/create-one-agent-api-key/

func (*AgentsServiceOp) DeleteAgentAPIKey Uses

func (s *AgentsServiceOp) DeleteAgentAPIKey(ctx context.Context, projectID, agentAPIKey string) (*atlas.Response, error)

DeleteAgentAPIKey removes an agent API key from a project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/agentapikeys/delete-one-agent-api-key/

func (*AgentsServiceOp) GlobalVersions Uses

func (s *AgentsServiceOp) GlobalVersions(ctx context.Context) (*SoftwareVersions, *atlas.Response, error)

GlobalVersions returns the supported versions of different software components supported by the Ops Manager installation.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/agents/get-agent-versions-global/

func (*AgentsServiceOp) ListAgentAPIKeys Uses

func (s *AgentsServiceOp) ListAgentAPIKeys(ctx context.Context, projectID string) ([]*AgentAPIKey, *atlas.Response, error)

ListAgentAPIKeys lists agent API keys.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/agentapikeys/get-all-agent-api-keys-for-project/

func (s *AgentsServiceOp) ListAgentLinks(ctx context.Context, groupID string) (*Agents, *atlas.Response, error)

ListAgentLinks gets links to monitoring, backup, and automation agent resources for a project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/agents-get-all/

func (*AgentsServiceOp) ListAgentsByType Uses

func (s *AgentsServiceOp) ListAgentsByType(ctx context.Context, groupID, agentType string) (*Agents, *atlas.Response, error)

ListAgentsByType gets agents of a specified type (i.e. Monitoring, Backup, or Automation) for a project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/agents-get-by-type/

func (*AgentsServiceOp) ProjectVersions Uses

func (s *AgentsServiceOp) ProjectVersions(ctx context.Context, groupID string) (*AgentVersions, *atlas.Response, error)

ProjectVersions returns a list of versions of all MongoDB Agents, in the provided project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/agents/get-agent-versions-per-project/

type AllClustersCluster Uses

type AllClustersCluster struct {
    ClusterID     string   `json:"clusterId"`
    Name          string   `json:"name"`
    Type          string   `json:"type"`
    Availability  string   `json:"availability"`
    Versions      []string `json:"versions"`
    BackupEnabled bool     `json:"backupEnabled"`
    AuthEnabled   bool     `json:"authEnabled"`
    SSLEnabled    bool     `json:"sslEnabled"`
    AlertCount    int64    `json:"alertCount"`
    DataSizeBytes int64    `json:"dataSizeBytes"`
    NodeCount     int64    `json:"nodeCount"`
}

AllClustersCluster represents MongoDB cluster.

type AllClustersProject Uses

type AllClustersProject struct {
    GroupName string               `json:"groupName"`
    OrgName   string               `json:"orgName"`
    PlanType  string               `json:"planType,omitempty"`
    GroupID   string               `json:"groupId"`
    OrgID     string               `json:"orgId"`
    Tags      []string             `json:"tags"`
    Clusters  []AllClustersCluster `json:"clusters"`
}

type AllClustersProjects Uses

type AllClustersProjects struct {
    Links      []*atlas.Link         `json:"links"`
    Results    []*AllClustersProject `json:"results"`
    TotalCount int                   `json:"totalCount"`
}

type Args26 Uses

type Args26 struct {
    AuditLog           *AuditLog               `json:"auditLog,omitempty"` // AuditLog configuration for audit logs
    BasisTech          *map[string]interface{} `json:"basisTech,omitempty"`
    NET                Net                     `json:"net"` // NET configuration for db connection (ports)
    OperationProfiling *map[string]interface{} `json:"operationProfiling,omitempty"`
    ProcessManagement  *map[string]interface{} `json:"processManagement,omitempty"`
    Replication        *Replication            `json:"replication,omitempty"` // Replication configuration for ReplicaSets, omit this field if setting Sharding
    Security           *map[string]interface{} `json:"security,omitempty"`
    Sharding           *Sharding               `json:"sharding,omitempty"` // Replication configuration for sharded clusters, omit this field if setting Replication
    Storage            *Storage                `json:"storage,omitempty"`  // Storage configuration for dbpath, config servers don't define this
    SNMP               *map[string]interface{} `json:"snmp,omitempty"`
    SystemLog          SystemLog               `json:"systemLog"` // SystemLog configuration for the dblog
}

Args26 part of the internal Process struct

type AuditLog Uses

type AuditLog struct {
    Destination string `json:"destination,omitempty"`
    Path        string `json:"path,omitempty"`
    Format      string `json:"format,omitempty"`
    Filter      string `json:"filter,omitempty"`
}

AuditLog part of the internal Process struct

type Auth Uses

type Auth struct {
    AuthoritativeSet         bool           `json:"authoritativeSet"`             // AuthoritativeSet indicates if the MongoDBUsers should be synced with the current list of Users
    AutoAuthMechanism        string         `json:"autoAuthMechanism"`            // AutoAuthMechanism is the currently active agent authentication mechanism. This is a read only field
    AutoAuthMechanisms       []string       `json:"autoAuthMechanisms,omitempty"` // AutoAuthMechanisms is a list of auth mechanisms the Automation Agent is able to use
    AutoAuthRestrictions     []interface{}  `json:"autoAuthRestrictions"`
    AutoKerberosKeytabPath   string         `json:"autoKerberosKeytabPath,omitempty"`
    AutoLdapGroupDN          string         `json:"autoLdapGroupDN,omitempty"`
    AutoPwd                  string         `json:"autoPwd,omitempty"`                  // AutoPwd is a required field when going from `Disabled=false` to `Disabled=true`
    AutoUser                 string         `json:"autoUser,omitempty"`                 // AutoUser is the MongoDB Automation Agent user, when x509 is enabled, it should be set to the subject of the AA's certificate
    DeploymentAuthMechanisms []string       `json:"deploymentAuthMechanisms,omitempty"` // DeploymentAuthMechanisms is a list of possible auth mechanisms that can be used within deployments
    Disabled                 bool           `json:"disabled"`
    Key                      string         `json:"key,omitempty"`            // Key is the contents of the KeyFile, the automation agent will ensure this a KeyFile with these contents exists at the `KeyFile` path
    KeyFile                  string         `json:"keyfile,omitempty"`        // KeyFile is the path to a keyfile with read & write permissions. It is a required field if `Disabled=false`
    KeyFileWindows           string         `json:"keyfileWindows,omitempty"` // KeyFileWindows is required if `Disabled=false` even if the value is not used
    UsersDelete              []*MongoDBUser `json:"usersDeleted"`
    Users                    []*MongoDBUser `json:"usersWanted"` // Users is a list which contains the desired users at the project level.
}

Auth authentication config

type AutomationConfig Uses

type AutomationConfig struct {
    AgentVersion         *map[string]interface{}   `json:"agentVersion,omitempty"`
    Auth                 Auth                      `json:"auth"`
    BackupVersions       []*ConfigVersion          `json:"backupVersions"`
    Balancer             *map[string]interface{}   `json:"balancer"`
    CPSModules           []*map[string]interface{} `json:"cpsModules"`
    IndexConfigs         []*IndexConfig            `json:"indexConfigs"`
    Kerberos             *map[string]interface{}   `json:"kerberos,omitempty"`
    LDAP                 *map[string]interface{}   `json:"ldap,omitempty"`
    MongoDBToolsVersion  *map[string]interface{}   `json:"mongoDbToolsVersion,omitempty"`
    MongoDBVersions      []*map[string]interface{} `json:"mongoDbVersions,omitempty"`
    MongoSQLDs           []*map[string]interface{} `json:"mongosqlds,omitempty"`
    MonitoringVersions   []*ConfigVersion          `json:"monitoringVersions,omitempty"`
    OnlineArchiveModules []*map[string]interface{} `json:"onlineArchiveModules,omitempty"`
    MongoTS              []*map[string]interface{} `json:"mongots,omitempty"`
    Options              *map[string]interface{}   `json:"options"`
    Processes            []*Process                `json:"processes"`
    ReplicaSets          []*ReplicaSet             `json:"replicaSets"`
    Roles                []*map[string]interface{} `json:"roles"`
    Sharding             []*ShardingConfig         `json:"sharding"`
    SSL                  *SSL                      `json:"ssl,omitempty"`
    TLS                  *SSL                      `json:"tls,omitempty"`
    UIBaseURL            *string                   `json:"uiBaseUrl"`
    Version              int                       `json:"version,omitempty"`
}

AutomationConfig represents an Ops Manager project automation config.

See more: https://docs.opsmanager.mongodb.com/current/reference/cluster-configuration/

type AutomationConfigAgent Uses

type AutomationConfigAgent struct {
    AutomationAgentVersion string `json:"automationAgentVersion"`
    BiConnectorVersion     string `json:"biConnectorVersion"`
}

AutomationConfigAgent components versions

type AutomationService Uses

type AutomationService interface {
    GetConfig(context.Context, string) (*AutomationConfig, *atlas.Response, error)
    UpdateConfig(context.Context, string, *AutomationConfig) (*atlas.Response, error)
    UpdateAgentVersion(context.Context, string) (*AutomationConfigAgent, *atlas.Response, error)
    GetBackupAgentConfig(context.Context, string) (*AgentConfig, *atlas.Response, error)
    GetMonitoringAgentConfig(context.Context, string) (*AgentConfig, *atlas.Response, error)
    GetStatus(context.Context, string) (*AutomationStatus, *atlas.Response, error)
}

AutomationService provides access to the automation related functions in the Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/nav/automation/

type AutomationServiceOp Uses

type AutomationServiceOp service

AutomationServiceOp provides an implementation of the AutomationService interface

func (*AutomationServiceOp) GetBackupAgentConfig Uses

func (s *AutomationServiceOp) GetBackupAgentConfig(ctx context.Context, groupID string) (*AgentConfig, *atlas.Response, error)

GetBackupAgentConfig retrieves the current backup agent configuration for a project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/automation-config/#get-backup-attributes

func (*AutomationServiceOp) GetConfig Uses

func (s *AutomationServiceOp) GetConfig(ctx context.Context, groupID string) (*AutomationConfig, *atlas.Response, error)

GetConfig retrieves the current automation configuration for a project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/automation-config/#get-the-automation-configuration

func (*AutomationServiceOp) GetMonitoringAgentConfig Uses

func (s *AutomationServiceOp) GetMonitoringAgentConfig(ctx context.Context, groupID string) (*AgentConfig, *atlas.Response, error)

GetMonitoringAgentConfig retrieves the current monitoring agent configuration for a project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/automation-config/#get-monitoring-attributes

func (*AutomationServiceOp) GetStatus Uses

func (s *AutomationServiceOp) GetStatus(ctx context.Context, groupID string) (*AutomationStatus, *atlas.Response, error)

GetStatus lets you see whether each MongoDB process is up-to-date with the current automation configuration. The endpoint returns the goalVersion field to report the current version of the automation configuration and the lastGoalVersionAchieved fields to report the versions of the configuration running on each server.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/automation-status/

func (*AutomationServiceOp) UpdateAgentVersion Uses

func (s *AutomationServiceOp) UpdateAgentVersion(ctx context.Context, groupID string) (*AutomationConfigAgent, *atlas.Response, error)

UpdateAgentVersion updates the MongoDB Agent and tools to the latest versions available at the time of the request.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/automation-config/#update-agend-versions-example

func (*AutomationServiceOp) UpdateConfig Uses

func (s *AutomationServiceOp) UpdateConfig(ctx context.Context, groupID string, updateRequest *AutomationConfig) (*atlas.Response, error)

UpdateConfig updates a project’s automation configuration. When you submit updates, Ops Manager makes internal modifications to the data and then saves your new configuration version.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/automation-config/#update-the-automation-configuration

type AutomationStatus Uses

type AutomationStatus struct {
    Processes   []ProcessStatus `json:"processes"`
    GoalVersion int             `json:"goalVersion"`
}

type BackupConfig Uses

type BackupConfig struct {
    GroupID            string   `json:"groupId,omitempty"`
    ClusterID          string   `json:"clusterId,omitempty"`
    StatusName         string   `json:"statusName,omitempty"`
    StorageEngineName  string   `json:"storageEngineName,omitempty"`
    AuthMechanismName  string   `json:"authMechanismName,omitempty"`
    Password           string   `json:"password,omitempty"`
    SyncSource         string   `json:"syncSource,omitempty"`
    Username           string   `json:"username,omitempty"`
    ExcludedNamespaces []string `json:"excludedNamespaces,omitempty"`
    IncludedNamespaces []string `json:"includedNamespaces,omitempty"`
    Provisioned        *bool    `json:"provisioned,omitempty"`
    EncryptionEnabled  *bool    `json:"encryptionEnabled,omitempty"`
    SSLEnabled         *bool    `json:"sslEnabled,omitempty"`
}

BackupConfigs represents a Backup configuration in the MongoDB Ops Manager API

type BackupConfigs Uses

type BackupConfigs struct {
    Links      []*atlas.Link   `json:"links"`
    Results    []*BackupConfig `json:"results"`
    TotalCount int             `json:"totalCount"`
}

BackupConfigs represents a paginated collection of BackupConfig

type BackupConfigsService Uses

type BackupConfigsService interface {
    List(context.Context, string, *atlas.ListOptions) (*BackupConfigs, *atlas.Response, error)
    Get(context.Context, string, string) (*BackupConfig, *atlas.Response, error)
    Update(context.Context, string, string, *BackupConfig) (*BackupConfig, *atlas.Response, error)
}

BackupConfigsService is an interface for using the Backup Configurations endpoints of the MongoDB Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/backup-configurations/

type BackupConfigsServiceOp Uses

type BackupConfigsServiceOp service

BackupConfigsServiceOp provides an implementation of the BackupConfigsService interface

func (*BackupConfigsServiceOp) Get Uses

func (s *BackupConfigsServiceOp) Get(ctx context.Context, groupID, clusterID string) (*BackupConfig, *atlas.Response, error)

Get retrieves a single backup configuration by cluster ID.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/backup/get-one-backup-config-by-cluster-id/

func (*BackupConfigsServiceOp) List Uses

func (s *BackupConfigsServiceOp) List(ctx context.Context, groupID string, opts *atlas.ListOptions) (*BackupConfigs, *atlas.Response, error)

List gets all backup configurations.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/backup/get-all-backup-configs-for-group/

func (*BackupConfigsServiceOp) Update Uses

func (s *BackupConfigsServiceOp) Update(ctx context.Context, groupID, clusterID string, backupConfig *BackupConfig) (*BackupConfig, *atlas.Response, error)

Update updates a single backup configuration.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/backup/update-backup-config/

type BackupStore Uses

type BackupStore struct {
    AdminBackupConfig
    LoadFactor    *int64 `json:"loadFactor,omitempty"`
    MaxCapacityGB *int64 `json:"maxCapacityGB,omitempty"`
    Provisioned   *bool  `json:"provisioned,omitempty"`
    SyncSource    string `json:"syncSource,omitempty"`
    Username      string `json:"username,omitempty"`
}

BackupStore represents a Blockstore, Oplog and Sync in the MongoDB Ops Manager API

type BackupStores Uses

type BackupStores struct {
    Links      []*atlas.Link  `json:"links"`
    Results    []*BackupStore `json:"results"`
    TotalCount int            `json:"totalCount"`
}

BackupStores represents a paginated collection of BackupStore

type BlockstoreConfigService Uses

type BlockstoreConfigService interface {
    List(context.Context, *atlas.ListOptions) (*BackupStores, *atlas.Response, error)
    Get(context.Context, string) (*BackupStore, *atlas.Response, error)
    Create(context.Context, *BackupStore) (*BackupStore, *atlas.Response, error)
    Update(context.Context, string, *BackupStore) (*BackupStore, *atlas.Response, error)
    Delete(context.Context, string) (*atlas.Response, error)
}

BlockstoreConfigService is an interface for using the Blockstore Configuration endpoints of the MongoDB Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/blockstore-config/

type BlockstoreConfigServiceOp Uses

type BlockstoreConfigServiceOp service

BackupConfigsServiceOp provides an implementation of the BackupConfigsService interface

func (*BlockstoreConfigServiceOp) Create Uses

func (s *BlockstoreConfigServiceOp) Create(ctx context.Context, blockstore *BackupStore) (*BackupStore, *atlas.Response, error)

Create creates a blockstore.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/snapshot/mongoConfigs/create-one-blockstore-configuration/

func (*BlockstoreConfigServiceOp) Delete Uses

func (s *BlockstoreConfigServiceOp) Delete(ctx context.Context, blockstoreID string) (*atlas.Response, error)

Delete removes a blockstore.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/snapshot/mongoConfigs/delete-one-blockstore-configuration/

func (*BlockstoreConfigServiceOp) Get Uses

func (s *BlockstoreConfigServiceOp) Get(ctx context.Context, blockstoreID string) (*BackupStore, *atlas.Response, error)

Get retrieves a blockstore.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/snapshot/mongoConfigs/get-one-blockstore-configuration-by-id/

func (*BlockstoreConfigServiceOp) List Uses

func (s *BlockstoreConfigServiceOp) List(ctx context.Context, options *atlas.ListOptions) (*BackupStores, *atlas.Response, error)

List retrieves all the blockstores.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/snapshot/mongoConfigs/get-all-blockstore-configurations/

func (*BlockstoreConfigServiceOp) Update Uses

func (s *BlockstoreConfigServiceOp) Update(ctx context.Context, blockstoreID string, blockstore *BackupStore) (*BackupStore, *atlas.Response, error)

Update updates a blockstore.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/snapshot/mongoConfigs/update-one-blockstore-configuration/

type Build Uses

type Build struct {
    Architecture       string    `json:"architecture,omitempty"`
    GitVersion         string    `json:"gitVersion,omitempty"`
    Platform           string    `json:"platform,omitempty"`
    URL                string    `json:"url,omitempty"`
    MaxOSVersion       string    `json:"maxOsVersion,omitempty"`
    MinOSVersion       string    `json:"minOsVersion,omitempty"`
    Win2008plus        bool      `json:"win2008plus,omitempty"`
    WinVCRedistDLL     string    `json:"winVCRedistDll,omitempty"`
    WinVCRedistOptions []*string `json:"winVCRedistOptions,omitempty"`
    WinVCRedistURL     string    `json:"winVCRedistUrl,omitempty"`
    WinVCRedistVersion string    `json:"winVCRedistVersion,omitempty"`
    Flavor             string    `json:"flavor,omitempty"`
}

type CheckpointsService Uses

type CheckpointsService interface {
    List(context.Context, string, string, *atlas.ListOptions) (*atlas.Checkpoints, *atlas.Response, error)
    Get(context.Context, string, string, string) (*atlas.Checkpoint, *atlas.Response, error)
}

CheckpointsService provides access to the backup related functions in the Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/checkpoints/

type CheckpointsServiceOp Uses

type CheckpointsServiceOp service

CheckpointsServiceOp provides an implementation of the CheckpointsService interface

func (*CheckpointsServiceOp) Get Uses

func (s *CheckpointsServiceOp) Get(ctx context.Context, groupID, clusterID, checkpointID string) (*atlas.Checkpoint, *atlas.Response, error)

Get gets a checkpoint.

See https://docs.opsmanager.mongodb.com/current/reference/api/checkpoints/#get-one-checkpoint

func (*CheckpointsServiceOp) List Uses

func (s *CheckpointsServiceOp) List(ctx context.Context, groupID, clusterName string, listOptions *atlas.ListOptions) (*atlas.Checkpoints, *atlas.Response, error)

List lists checkpoints.

See https://docs.opsmanager.mongodb.com/current/reference/api/checkpoints/#get-all-checkpoints

type ChildJob Uses

type ChildJob struct {
    AutomationAgentID          string `json:"automationAgentId,omitempty"`
    ErrorMessage               string `json:"errorMessage,omitempty"`
    FinishDate                 string `json:"finishDate"`
    HostName                   string `json:"hostName"`
    LogCollectionType          string `json:"logCollectionType"`
    Path                       string `json:"path"`
    StartDate                  string `json:"startDate"`
    Status                     string `json:"status"`
    UncompressedDiskSpaceBytes int64  `json:"uncompressedDiskSpaceBytes"`
}

ChildJob represents a ChildJob in the MongoDB Ops Manager API.

type Client Uses

type Client struct {
    BaseURL   *url.URL
    UserAgent string

    Organizations          OrganizationsService
    Projects               ProjectsService
    Users                  UsersService
    Teams                  TeamsService
    Automation             AutomationService
    UnauthUsers            UnauthUsersService
    AlertConfigurations    atlas.AlertConfigurationsService
    Alerts                 atlas.AlertsService
    ContinuousSnapshots    atlas.ContinuousSnapshotsService
    ContinuousRestoreJobs  atlas.ContinuousRestoreJobsService
    Events                 atlas.EventsService
    OrganizationAPIKeys    atlas.APIKeysService
    ProjectAPIKeys         atlas.ProjectAPIKeysService
    WhitelistAPIKeys       atlas.WhitelistAPIKeysService
    Agents                 AgentsService
    Checkpoints            CheckpointsService
    GlobalAlerts           GlobalAlertsService
    Deployments            DeploymentsService
    Measurements           MeasurementsService
    Clusters               ClustersService
    Logs                   LogsService
    LogCollections         LogCollectionService
    Diagnostics            DiagnosticsService
    GlobalAPIKeys          GlobalAPIKeysService
    GlobalAPIKeysWhitelist GlobalAPIKeyWhitelistsService
    MaintenanceWindows     MaintenanceWindowsService
    PerformanceAdvisor     PerformanceAdvisorService
    VersionManifest        VersionManifestService
    BackupConfigs          BackupConfigsService
    ProjectJobConfig       ProjectJobConfigService
    BlockstoreConfig       BlockstoreConfigService
    FileSystemStoreConfig  FileSystemStoreConfigService
    S3BlockstoreConfig     S3BlockstoreConfigService
    OplogStoreConfig       OplogStoreConfigService
    SyncStoreConfig        SyncStoreConfigService
    DaemonConfig           DaemonConfigService
    SnapshotSchedule       SnapshotScheduleService
    FeatureControlPolicies FeatureControlPoliciesService
    ServerUsage            ServerUsageService
    ServerUsageReport      ServerUsageReportService
    // contains filtered or unexported fields
}

Client manages communication with Ops Manager API

func New Uses

func New(httpClient *http.Client, opts ...ClientOpt) (*Client, error)

New returns a new Ops Manager API client instance.

func NewClient Uses

func NewClient(httpClient *http.Client) *Client

NewClient returns a new Ops Manager API client. If a nil httpClient is provided, a http.DefaultClient will be used. To use API methods which require authentication, provide an http.Client that will perform the authentication for you (such as that provided by the https://github.com/mongodb-forks/digest).

func (*Client) Do Uses

func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*atlas.Response, error)

Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response will be written to v, without attempting to decode it. The provided ctx must be non-nil, if it is nil an error is returned. If it is canceled or times out, ctx.Err() will be returned.

func (*Client) NewGZipRequest Uses

func (c *Client) NewGZipRequest(ctx context.Context, method, urlStr string) (*http.Request, error)

NewGZipRequest creates an API gzip request. A relative URL can be provided in urlStr, in which case it is resolved relative to the BaseURL of the Client. Relative URLs should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.

func (*Client) NewRequest Uses

func (c *Client) NewRequest(ctx context.Context, method, urlStr string, body interface{}) (*http.Request, error)

NewRequest creates an API request. A relative URL can be provided in urlStr, in which case it is resolved relative to the BaseURL of the Client. Relative URLs should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.

func (*Client) OnRequestCompleted Uses

func (c *Client) OnRequestCompleted(rc atlas.RequestCompletionCallback)

OnRequestCompleted sets the DO API request completion callback

type ClientOpt Uses

type ClientOpt func(*Client) error

ClientOpt are options for New.

func SetBaseURL Uses

func SetBaseURL(bu string) ClientOpt

SetBaseURL is a client option for setting the base URL.

func SetUserAgent Uses

func SetUserAgent(ua string) ClientOpt

SetUserAgent is a client option for setting the user agent.

type Cluster Uses

type Cluster struct {
    ClusterName    string        `json:"clusterName,omitempty"`
    GroupID        string        `json:"groupId,omitempty"`
    ID             string        `json:"id,omitempty"`
    LastHeartbeat  string        `json:"lastHeartbeat,omitempty"`
    Links          []*atlas.Link `json:"links,omitempty"`
    ReplicaSetName string        `json:"replicaSetName,omitempty"`
    ShardName      string        `json:"shardName,omitempty"`
    TypeName       string        `json:"typeName,omitempty"`
}

Cluster represents a cluster in Ops Manager.

type Clusters Uses

type Clusters struct {
    Links      []*atlas.Link `json:"links"`
    Results    []*Cluster    `json:"results"`
    TotalCount int           `json:"totalCount"`
}

Clusters is a list of clusters.

type ClustersService Uses

type ClustersService interface {
    List(context.Context, string, *atlas.ListOptions) (*Clusters, *atlas.Response, error)
    Get(context.Context, string, string) (*Cluster, *atlas.Response, error)
    ListAll(ctx context.Context) (*AllClustersProjects, *atlas.Response, error)
}

ClustersService provides access to the cluster related functions in the Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/clusters/

type ClustersServiceOp Uses

type ClustersServiceOp service

ClustersServiceOp provides an implementation of the ClustersService interface

func (*ClustersServiceOp) Get Uses

func (s *ClustersServiceOp) Get(ctx context.Context, groupID, clusterID string) (*Cluster, *atlas.Response, error)

Get get a single cluster by ID.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/clusters/#get-a-cluster

func (*ClustersServiceOp) List Uses

func (s *ClustersServiceOp) List(ctx context.Context, groupID string, listOptions *atlas.ListOptions) (*Clusters, *atlas.Response, error)

List all clusters for a project

See more: https://docs.opsmanager.mongodb.com/current/reference/api/clusters/#get-all-clusters

func (*ClustersServiceOp) ListAll Uses

func (s *ClustersServiceOp) ListAll(ctx context.Context) (*AllClustersProjects, *atlas.Response, error)

ListAll list all clusters available to the user.

type ConfigVersion Uses

type ConfigVersion struct {
    Name     string `json:"name"`
    Hostname string `json:"hostname"`
}

type CreateUserResponse Uses

type CreateUserResponse struct {
    APIKey             string       `json:"apiKey,omitempty"`
    ProgrammaticAPIKey atlas.APIKey `json:"programmaticApiKey,omitempty"`
    User               *User        `json:"user"`
}

CreateUserResponse API response for the CreateFirstUser() call

type Daemon Uses

type Daemon struct {
    AdminBackupConfig
    BackupJobsEnabled           bool     `json:"backupJobsEnabled"`
    Configured                  bool     `json:"configured"`
    GarbageCollectionEnabled    bool     `json:"garbageCollectionEnabled"`
    ResourceUsageEnabled        bool     `json:"resourceUsageEnabled"`
    RestoreQueryableJobsEnabled bool     `json:"restoreQueryableJobsEnabled"`
    HeadDiskType                string   `json:"headDiskType,omitempty"`
    NumWorkers                  int64    `json:"numWorkers,omitempty"`
    Machine                     *Machine `json:"machine,omitempty"`
}

Daemon represents a Backup Daemon Configuration in the MongoDB Ops Manager API

type DaemonConfigService Uses

type DaemonConfigService interface {
    List(context.Context, *atlas.ListOptions) (*Daemons, *atlas.Response, error)
    Get(context.Context, string) (*Daemon, *atlas.Response, error)
    Update(context.Context, string, *Daemon) (*Daemon, *atlas.Response, error)
    Delete(context.Context, string) (*atlas.Response, error)
}

DaemonConfigService is an interface for using the Backup Daemon endpoints of the MongoDB Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/backup-daemon-config/

type DaemonConfigServiceOp Uses

type DaemonConfigServiceOp service

BackupConfigsServiceOp provides an implementation of the BackupConfigsService interface

func (*DaemonConfigServiceOp) Delete Uses

func (s *DaemonConfigServiceOp) Delete(ctx context.Context, daemonID string) (*atlas.Response, error)

Delete removes a Daemon.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/daemonConfigs/delete-one-backup-daemon-configuration/

func (*DaemonConfigServiceOp) Get Uses

func (s *DaemonConfigServiceOp) Get(ctx context.Context, daemonID string) (*Daemon, *atlas.Response, error)

Get retrieves a Daemon.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/daemonConfigs/get-one-backup-daemon-configuration-by-host/

func (*DaemonConfigServiceOp) List Uses

func (s *DaemonConfigServiceOp) List(ctx context.Context, options *atlas.ListOptions) (*Daemons, *atlas.Response, error)

List retrieves all the Daemons.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/daemonConfigs/get-all-backup-daemon-configurations/

func (*DaemonConfigServiceOp) Update Uses

func (s *DaemonConfigServiceOp) Update(ctx context.Context, daemonID string, daemon *Daemon) (*Daemon, *atlas.Response, error)

Update updates a Daemon.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/daemonConfigs/update-one-backup-daemon-configuration/

type Daemons Uses

type Daemons struct {
    Links      []*atlas.Link `json:"links"`
    Results    []*Daemon     `json:"results"`
    TotalCount int           `json:"totalCount"`
}

Daemons represents a paginated collection of Daemon

type DeploymentsService Uses

type DeploymentsService interface {
    ListHosts(context.Context, string, *HostListOptions) (*Hosts, *atlas.Response, error)
    GetHost(context.Context, string, string) (*Host, *atlas.Response, error)
    GetHostByHostname(context.Context, string, string, int) (*Host, *atlas.Response, error)
    StartMonitoring(context.Context, string, *Host) (*Host, *atlas.Response, error)
    UpdateMonitoring(context.Context, string, string, *Host) (*Host, *atlas.Response, error)
    StopMonitoring(context.Context, string, string) (*atlas.Response, error)
    ListPartitions(context.Context, string, string, *atlas.ListOptions) (*atlas.ProcessDisksResponse, *atlas.Response, error)
    GetPartition(context.Context, string, string, string) (*atlas.ProcessDisk, *atlas.Response, error)
    ListDatabases(context.Context, string, string, *atlas.ListOptions) (*atlas.ProcessDatabasesResponse, *atlas.Response, error)
    GetDatabase(context.Context, string, string, string) (*atlas.ProcessDatabase, *atlas.Response, error)
}

DeploymentsService provides access to the deployment related functions in the Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/nav/deployments/

type DeploymentsServiceOp Uses

type DeploymentsServiceOp service

DeploymentsServiceOp provides an implementation of the DeploymentsService interface

func (*DeploymentsServiceOp) GetDatabase Uses

func (s *DeploymentsServiceOp) GetDatabase(ctx context.Context, groupID, hostID, name string) (*atlas.ProcessDatabase, *atlas.Response, error)

GetDatabase retrieve a single database by name.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/disk-get-one/

func (*DeploymentsServiceOp) GetHost Uses

func (s *DeploymentsServiceOp) GetHost(ctx context.Context, groupID, hostID string) (*Host, *atlas.Response, error)

GetHost gets the MongoDB process with the specified host ID.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/hosts/get-one-host-by-id/

func (*DeploymentsServiceOp) GetHostByHostname Uses

func (s *DeploymentsServiceOp) GetHostByHostname(ctx context.Context, groupID, hostname string, port int) (*Host, *atlas.Response, error)

GetHostByHostname gets a single MongoDB process by its hostname and port combination.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/hosts/get-one-host-by-hostname-port/

func (*DeploymentsServiceOp) GetPartition Uses

func (s *DeploymentsServiceOp) GetPartition(ctx context.Context, groupID, hostID, name string) (*atlas.ProcessDisk, *atlas.Response, error)

GetPartition retrieves a disk partition.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/disk-get-one/

func (*DeploymentsServiceOp) ListDatabases Uses

func (s *DeploymentsServiceOp) ListDatabases(ctx context.Context, groupID, hostID string, opts *atlas.ListOptions) (*atlas.ProcessDatabasesResponse, *atlas.Response, error)

ListDatabases retrieve all databases running on the specified host.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/databases-get-all-on-host/

func (*DeploymentsServiceOp) ListHosts Uses

func (s *DeploymentsServiceOp) ListHosts(ctx context.Context, groupID string, opts *HostListOptions) (*Hosts, *atlas.Response, error)

ListHosts lists all MongoDB hosts in a project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/hosts/get-all-hosts-in-group/

func (*DeploymentsServiceOp) ListPartitions Uses

func (s *DeploymentsServiceOp) ListPartitions(ctx context.Context, groupID, hostID string, opts *atlas.ListOptions) (*atlas.ProcessDisksResponse, *atlas.Response, error)

ListPartitions retrieves all disk partitions on the specified host.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/disks-get-all/

func (*DeploymentsServiceOp) StartMonitoring Uses

func (s *DeploymentsServiceOp) StartMonitoring(ctx context.Context, groupID string, host *Host) (*Host, *atlas.Response, error)

StartMonitoring starts monitoring a new MongoDB process.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/hosts/create-one-host/

func (*DeploymentsServiceOp) StopMonitoring Uses

func (s *DeploymentsServiceOp) StopMonitoring(ctx context.Context, groupID, hostID string) (*atlas.Response, error)

StopMonitoring stops the Monitoring from monitoring the MongoDB process on the hostname and port you specify.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/hosts/delete-one-host/

func (*DeploymentsServiceOp) UpdateMonitoring Uses

func (s *DeploymentsServiceOp) UpdateMonitoring(ctx context.Context, groupID, hostID string, host *Host) (*Host, *atlas.Response, error)

UpdateMonitoring updates the configuration of a monitored MongoDB process.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/hosts/update-one-host/

type DiagnosticsListOpts Uses

type DiagnosticsListOpts struct {
    Limit   int64 `json:"limit,omitempty"`
    Minutes int64 `json:"minutes,omitempty"`
}

DiagnosticsListOpts query options for getting the archive

type DiagnosticsService Uses

type DiagnosticsService interface {
    Get(context.Context, string, *DiagnosticsListOpts, io.Writer) (*atlas.Response, error)
}

DiagnosticsService is an interface for interfacing with Diagnostic Archives in MongoDB Ops Manager APIs

https://docs.opsmanager.mongodb.com/current/reference/api/diagnostic-archives/

type DiagnosticsServiceOp Uses

type DiagnosticsServiceOp struct {
    Client atlas.GZipRequestDoer
}

DiagnosticsServiceOp provides an implementation of the DiagnosticsService interface

func (*DiagnosticsServiceOp) Get Uses

func (s *DiagnosticsServiceOp) Get(ctx context.Context, groupID string, opts *DiagnosticsListOpts, out io.Writer) (*atlas.Response, error)

Get retrieves the project’s diagnostics archive file.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/diagnostics/get-project-diagnostic-archive/

type ExternalManagementSystem Uses

type ExternalManagementSystem struct {
    Name     string `json:"name"`
    SystemID string `json:"systemId,omitempty"`
    Version  string `json:"version,omitempty"`
}

ExternalManagementSystem contains parameters for the external system that manages this Ops Manager Project

type FeatureControlPoliciesService Uses

type FeatureControlPoliciesService interface {
    List(context.Context, string, *atlas.ListOptions) (*FeaturePolicy, *atlas.Response, error)
    Update(context.Context, string, *FeaturePolicy) (*FeaturePolicy, *atlas.Response, error)
    ListSupportedPolicies(context.Context, *atlas.ListOptions) (*FeaturePolicy, *atlas.Response, error)
}

FeatureControlPoliciesService provides access to the Feature Control Policies related functions in the Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/feature-control-policies/

type FeatureControlPoliciesServiceOp Uses

type FeatureControlPoliciesServiceOp service

AgentsServiceOp provides an implementation of the AgentsService interface

func (*FeatureControlPoliciesServiceOp) List Uses

func (s *FeatureControlPoliciesServiceOp) List(ctx context.Context, groupID string, opts *atlas.ListOptions) (*FeaturePolicy, *atlas.Response, error)

List retrieves the policies that have been set on a project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/controlled-features/get-controlled-features-for-one-project/

func (*FeatureControlPoliciesServiceOp) ListSupportedPolicies Uses

func (s *FeatureControlPoliciesServiceOp) ListSupportedPolicies(ctx context.Context, opts *atlas.ListOptions) (*FeaturePolicy, *atlas.Response, error)

ListSupportedPolicies retrieves all supported policies by Ops Manager.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/controlled-features/get-all-feature-control-policies/

func (*FeatureControlPoliciesServiceOp) Update Uses

func (s *FeatureControlPoliciesServiceOp) Update(ctx context.Context, groupID string, policy *FeaturePolicy) (*FeaturePolicy, *atlas.Response, error)

Update updates the Feature Control Policies for one Project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/controlled-features/update-controlled-features-for-one-project/

type FeaturePolicy Uses

type FeaturePolicy struct {
    Created                  string                    `json:"created,omitempty"`
    Updated                  string                    `json:"updated,omitempty"`
    ExternalManagementSystem *ExternalManagementSystem `json:"externalManagementSystem,omitempty"`
    Policies                 []*Policy                 `json:"policies,omitempty"`
}

Agent represents an Ops Manager agent

type FileSystemStoreConfigService Uses

type FileSystemStoreConfigService interface {
    List(context.Context, *atlas.ListOptions) (*FileSystemStoreConfigurations, *atlas.Response, error)
    Get(context.Context, string) (*FileSystemStoreConfiguration, *atlas.Response, error)
    Create(context.Context, *FileSystemStoreConfiguration) (*FileSystemStoreConfiguration, *atlas.Response, error)
    Update(context.Context, string, *FileSystemStoreConfiguration) (*FileSystemStoreConfiguration, *atlas.Response, error)
    Delete(context.Context, string) (*atlas.Response, error)
}

FileSystemStoreService is an interface for using the File System Store Configuration endpoints of the MongoDB Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/file-system-store-config/

type FileSystemStoreConfigServiceOp Uses

type FileSystemStoreConfigServiceOp service

BackupConfigsServiceOp provides an implementation of the BackupConfigsService interface

func (*FileSystemStoreConfigServiceOp) Create Uses

func (s *FileSystemStoreConfigServiceOp) Create(ctx context.Context, fileSystem *FileSystemStoreConfiguration) (*FileSystemStoreConfiguration, *atlas.Response, error)

Create configures one new file system store.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/snapshot/fileSystemConfigs/create-one-file-system-store-configuration/

func (*FileSystemStoreConfigServiceOp) Delete Uses

func (s *FileSystemStoreConfigServiceOp) Delete(ctx context.Context, fileSystemID string) (*atlas.Response, error)

Delete deletes the configuration of one file system store.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/snapshot/fileSystemConfigs/delete-one-file-system-store-configuration/

func (*FileSystemStoreConfigServiceOp) Get Uses

func (s *FileSystemStoreConfigServiceOp) Get(ctx context.Context, fileSystemID string) (*FileSystemStoreConfiguration, *atlas.Response, error)

Get retrieves a File System Store Configuration.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/snapshot/fileSystemConfigs/get-one-file-system-store-configuration-by-id/

func (*FileSystemStoreConfigServiceOp) List Uses

func (s *FileSystemStoreConfigServiceOp) List(ctx context.Context, opts *atlas.ListOptions) (*FileSystemStoreConfigurations, *atlas.Response, error)

List retrieves the configurations of all file system stores.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/snapshot/fileSystemConfigs/get-all-file-system-store-configurations/

func (*FileSystemStoreConfigServiceOp) Update Uses

func (s *FileSystemStoreConfigServiceOp) Update(ctx context.Context, fileSystemID string, fileSystem *FileSystemStoreConfiguration) (*FileSystemStoreConfiguration, *atlas.Response, error)

Update updates the configuration of one file system store.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/snapshot/fileSystemConfigs/update-one-file-system-store-configuration/

type FileSystemStoreConfiguration Uses

type FileSystemStoreConfiguration struct {
    BackupStore
    MMAPV1CompressionSetting string `json:"mmapv1CompressionSetting,omitempty"`
    StorePath                string `json:"storePath,omitempty"`
    WTCompressionSetting     string `json:"wtCompressionSetting,omitempty"`
}

FileSystemStoreConfiguration represents a File System Store Configuration in the MongoDB Ops Manager API

type FileSystemStoreConfigurations Uses

type FileSystemStoreConfigurations struct {
    Links      []*atlas.Link                   `json:"links"`
    Results    []*FileSystemStoreConfiguration `json:"results"`
    TotalCount int                             `json:"totalCount"`
}

FileSystemStoreConfigurations represents a paginated collection of FileSystemStoreConfiguration

type GlobalAPIKeyWhitelistsService Uses

type GlobalAPIKeyWhitelistsService interface {
    List(context.Context, *atlas.ListOptions) (*GlobalWhitelistAPIKeys, *atlas.Response, error)
    Get(context.Context, string) (*GlobalWhitelistAPIKey, *atlas.Response, error)
    Create(context.Context, *WhitelistAPIKeysReq) (*GlobalWhitelistAPIKey, *atlas.Response, error)
    Delete(context.Context, string) (*atlas.Response, error)
}

GlobalAPIKeyWhitelistsService provides access to the global alerts related functions in the Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/global-api-key-whitelists/

type GlobalAPIKeyWhitelistsServiceOp Uses

type GlobalAPIKeyWhitelistsServiceOp service

GlobalAPIKeyWhitelistsServiceOp provides an implementation of the GlobalAPIKeyWhitelistsService interface

func (*GlobalAPIKeyWhitelistsServiceOp) Create Uses

func (s *GlobalAPIKeyWhitelistsServiceOp) Create(ctx context.Context, createRequest *WhitelistAPIKeysReq) (*GlobalWhitelistAPIKey, *atlas.Response, error)

Create one global whitelist entry.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/api-keys/global/create-one-global-whitelist/

func (*GlobalAPIKeyWhitelistsServiceOp) Delete Uses

func (s *GlobalAPIKeyWhitelistsServiceOp) Delete(ctx context.Context, id string) (*atlas.Response, error)

Delete the global whitelist entry specified by id.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/api-keys/global/delete-one-global-whitelist/

func (*GlobalAPIKeyWhitelistsServiceOp) Get Uses

func (s *GlobalAPIKeyWhitelistsServiceOp) Get(ctx context.Context, id string) (*GlobalWhitelistAPIKey, *atlas.Response, error)

Get one global whitelist entry.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/api-keys/global/get-one-global-whitelist/

func (*GlobalAPIKeyWhitelistsServiceOp) List Uses

func (s *GlobalAPIKeyWhitelistsServiceOp) List(ctx context.Context, listOptions *atlas.ListOptions) (*GlobalWhitelistAPIKeys, *atlas.Response, error)

List all global whitelist entries.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/api-keys/global/get-all-global-whitelist/

type GlobalAPIKeysService Uses

type GlobalAPIKeysService interface {
    List(context.Context, *atlas.ListOptions) ([]atlas.APIKey, *atlas.Response, error)
    Get(context.Context, string) (*atlas.APIKey, *atlas.Response, error)
    Create(context.Context, *atlas.APIKeyInput) (*atlas.APIKey, *atlas.Response, error)
    Update(context.Context, string, *atlas.APIKeyInput) (*atlas.APIKey, *atlas.Response, error)
    Delete(context.Context, string) (*atlas.Response, error)
}

GlobalAPIKeysService provides access to the global alerts related functions in the Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/global-api-keys/

type GlobalAPIKeysServiceOp Uses

type GlobalAPIKeysServiceOp service

GlobalAPIKeysServiceOp provides an implementation of the GlobalAPIKeysService interface

func (*GlobalAPIKeysServiceOp) Create Uses

func (s *GlobalAPIKeysServiceOp) Create(ctx context.Context, createRequest *atlas.APIKeyInput) (*atlas.APIKey, *atlas.Response, error)

Create an API Key.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/api-keys/global/create-one-global-api-key/

func (*GlobalAPIKeysServiceOp) Delete Uses

func (s *GlobalAPIKeysServiceOp) Delete(ctx context.Context, apiKeyID string) (*atlas.Response, error)

Delete the API Key with ID apiKeyID.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/api-keys/global/delete-one-global-api-key/

func (*GlobalAPIKeysServiceOp) Get Uses

func (s *GlobalAPIKeysServiceOp) Get(ctx context.Context, apiKeyID string) (*atlas.APIKey, *atlas.Response, error)

Get gets one API Key with ID apiKeyID.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/api-keys/global/get-one-global-api-key/

func (*GlobalAPIKeysServiceOp) List Uses

func (s *GlobalAPIKeysServiceOp) List(ctx context.Context, listOptions *atlas.ListOptions) ([]atlas.APIKey, *atlas.Response, error)

List gets all Global API Keys.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/api-keys/global/get-all-global-api-keys/

func (*GlobalAPIKeysServiceOp) Update Uses

func (s *GlobalAPIKeysServiceOp) Update(ctx context.Context, apiKeyID string, updateRequest *atlas.APIKeyInput) (*atlas.APIKey, *atlas.Response, error)

Update one API Key with ID apiKeyID.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/api-keys/global/update-one-global-api-key/

type GlobalAlert Uses

type GlobalAlert struct {
    atlas.Alert
    SourceTypeName string        `json:"sourceTypeName,omitempty"`
    Tags           []string      `json:"tags,omitempty"`
    Links          []*atlas.Link `json:"links,omitempty"`
    HostID         string        `json:"hostId,omitempty"`
    ClusterID      string        `json:"clusterId,omitempty"`
}

GlobalAlert configuration struct

type GlobalAlerts Uses

type GlobalAlerts struct {
    Links      []*atlas.Link  `json:"links"`
    Results    []*GlobalAlert `json:"results"`
    TotalCount int            `json:"totalCount"`
}

GlobalAlerts collection of configurations

type GlobalAlertsService Uses

type GlobalAlertsService interface {
    Get(context.Context, string) (*GlobalAlert, *atlas.Response, error)
    List(context.Context, *atlas.AlertsListOptions) (*GlobalAlerts, *atlas.Response, error)
    Acknowledge(context.Context, string, *atlas.AcknowledgeRequest) (*GlobalAlert, *atlas.Response, error)
}

GlobalAlertsService provides access to the global alerts related functions in the Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/global-alerts/

type GlobalAlertsServiceOp Uses

type GlobalAlertsServiceOp service

GlobalAlertsServiceOp provides an implementation of the GlobalAlertsService interface

func (*GlobalAlertsServiceOp) Acknowledge Uses

func (s *GlobalAlertsServiceOp) Acknowledge(ctx context.Context, alertID string, body *atlas.AcknowledgeRequest) (*GlobalAlert, *atlas.Response, error)

Acknowledge acknowledges a global alert.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/global-alerts/

func (*GlobalAlertsServiceOp) Get Uses

func (s *GlobalAlertsServiceOp) Get(ctx context.Context, alertID string) (*GlobalAlert, *atlas.Response, error)

Get gets a global alert.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/global-alerts/

func (*GlobalAlertsServiceOp) List Uses

func (s *GlobalAlertsServiceOp) List(ctx context.Context, opts *atlas.AlertsListOptions) (*GlobalAlerts, *atlas.Response, error)

List gets all global alerts.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/global-alerts/

type GlobalWhitelistAPIKey Uses

type GlobalWhitelistAPIKey struct {
    ID          string `json:"id,omitempty"`
    CidrBlock   string `json:"cidrBlock,omitempty"`
    Created     string `json:"created,omitempty"`
    Description string `json:"description,omitempty"`
    Type        string `json:"type,omitempty"`
    Updated     string `json:"updated,omitempty"`
}

GlobalWhitelistAPIKey represents a Whitelist API key.

type GlobalWhitelistAPIKeys Uses

type GlobalWhitelistAPIKeys struct {
    Results    []*GlobalWhitelistAPIKey `json:"results,omitempty"`    // Includes one GlobalWhitelistAPIKey object for each item detailed in the results array section.
    Links      []*atlas.Link            `json:"links,omitempty"`      // One or more links to sub-resources and/or related resources.
    TotalCount int                      `json:"totalCount,omitempty"` // Count of the total number of items in the result set. It may be greater than the number of objects in the results array if the entire result set is paginated.
}

GlobalWhitelistAPIKeys represents all Whitelist API keys.

type Host Uses

type Host struct {
    Aliases            []string      `json:"aliases,omitempty"`
    AuthMechanismName  string        `json:"authMechanismName,omitempty"`
    ClusterID          string        `json:"clusterId,omitempty"`
    Created            string        `json:"created,omitempty"`
    GroupID            string        `json:"groupId,omitempty"`
    Hostname           string        `json:"hostname"`
    ID                 string        `json:"id,omitempty"`
    IPAddress          string        `json:"ipAddress,omitempty"`
    LastPing           string        `json:"lastPing,omitempty"`
    LastRestart        string        `json:"lastRestart,omitempty"`
    ReplicaSetName     string        `json:"replicaSetName,omitempty"`
    ReplicaStateName   string        `json:"replicaStateName,omitempty"`
    ShardName          string        `json:"shardName,omitempty"`
    TypeName           string        `json:"typeName,omitempty"`
    Version            string        `json:"version,omitempty"`
    Username           string        `json:"username,omitempty"`
    Password           string        `json:"password,omitempty"`
    Deactivated        bool          `json:"deactivated,omitempty"`
    HasStartupWarnings bool          `json:"hasStartupWarnings,omitempty"`
    Hidden             bool          `json:"hidden,omitempty"`
    HiddenSecondary    bool          `json:"hiddenSecondary,omitempty"`
    HostEnabled        bool          `json:"hostEnabled,omitempty"`
    JournalingEnabled  bool          `json:"journalingEnabled,omitempty"`
    LowUlimit          bool          `json:"lowUlimit,omitempty"`
    LogsEnabled        *bool         `json:"logsEnabled,omitempty"`
    AlertsEnabled      *bool         `json:"alertsEnabled,omitempty"`
    ProfilerEnabled    *bool         `json:"profilerEnabled,omitempty"`
    SSLEnabled         *bool         `json:"sslEnabled,omitempty"`
    LastDataSizeBytes  float64       `json:"lastDataSizeBytes,omitempty"`
    LastIndexSizeBytes float64       `json:"lastIndexSizeBytes,omitempty"`
    Port               int32         `json:"port"`
    SlaveDelaySec      int64         `json:"slaveDelaySec,omitempty"`
    UptimeMsec         int64         `json:"uptimeMsec,omitempty"`
    Links              []*atlas.Link `json:"links,omitempty"`
}

Host represents a MongoDB host process in Ops Manager

type HostAssignment Uses

type HostAssignment struct {
    GroupID      string                   `json:"groupId,omitempty"`
    Hostname     string                   `json:"hostname,omitempty"`
    Processes    []*HostAssignmentProcess `json:"processes,omitempty"`
    ServerType   *ServerType              `json:"serverType,omitempty"`
    MemSizeMB    int64                    `json:"memSizeMB,omitempty"`
    IsChargeable *bool                    `json:"isChargeable,omitempty"`
}

HostAssignment represents a HostAssignment in the MongoDB Ops Manager API

type HostAssignmentProcess Uses

type HostAssignmentProcess struct {
    Cluster                  string `json:"cluster,omitempty"`
    GroupName                string `json:"groupName,omitempty"`
    OrgName                  string `json:"orgName,omitempty"`
    GroupID                  string `json:"groupId,omitempty"`
    Name                     string `json:"name,omitempty"`
    HasConflictingServerType bool   `json:"hasConflictingServerType"`
    ProcessType              int64  `json:"processType"`
}

HostAssignmentProcess represents a HostAssignmentProcess in the MongoDB Ops Manager API

type HostAssignments Uses

type HostAssignments struct {
    Links      []*atlas.Link     `json:"links"`
    Results    []*HostAssignment `json:"results"`
    TotalCount int               `json:"totalCount"`
}

HostAssignments represents a paginated collection of HostAssignment

type HostCount Uses

type HostCount struct {
    Arbiter   int `json:"arbiter"`
    Config    int `json:"config"`
    Master    int `json:"master"`
    Mongos    int `json:"mongos"`
    Primary   int `json:"primary"`
    Secondary int `json:"secondary"`
    Slave     int `json:"slave"`
}

HostCount number of processes per project.

type HostListOptions Uses

type HostListOptions struct {
    atlas.ListOptions
    ClusterID string `url:"clusterId,omitempty"`
}

type Hosts Uses

type Hosts struct {
    Links      []*atlas.Link `json:"links"`
    Results    []*Host       `json:"results"`
    TotalCount int           `json:"totalCount"`
}

type IndexConfig Uses

type IndexConfig struct {
    DBName         string                  `json:"dbName"`              // Database that is indexed
    CollectionName string                  `json:"collectionName"`      // Collection that is indexed
    RSName         string                  `json:"rsName"`              // The replica set that the index is built on
    Key            [][]string              `json:"key"`                 // Keys array of keys to index and their type, sorting of keys is important for an index
    Options        *atlas.IndexOptions     `json:"options,omitempty"`   // Options MongoDB index options
    Collation      *atlas.CollationOptions `json:"collation,omitempty"` // Collation Mongo collation index options
}

IndexConfig represents a new index requests for a given database and collection.

type LDAPGroupMapping Uses

type LDAPGroupMapping struct {
    RoleName   string   `json:"roleName"`
    LDAPGroups []string `json:"ldapGroups"`
}

LDAPGroupMapping for LDAP-backed Ops Manager, the mappings of LDAP groups to Ops Manager project roles. Only present for LDAP-backed Ops Manager.

type LogCollectionJob Uses

type LogCollectionJob struct {
    ID                         string      `json:"id,omitempty"`
    GroupID                    string      `json:"groupId,omitempty"`
    UserID                     string      `json:"userId,omitempty"`
    CreationDate               string      `json:"creationDate,omitempty"`
    ExpirationDate             string      `json:"expirationDate,omitempty"`
    Status                     string      `json:"status,omitempty"`
    ResourceType               string      `json:"resourceType,omitempty"`
    ResourceName               string      `json:"resourceName,omitempty"`
    RootResourceName           string      `json:"rootResourceName,omitempty"`
    RootResourceType           string      `json:"rootResourceType,omitempty"`
    URL                        string      `json:"downloadUrl,omitempty"`
    Redacted                   *bool       `json:"redacted,omitempty"`
    LogTypes                   []string    `json:"logTypes,omitempty"`
    SizeRequestedPerFileBytes  int64       `json:"sizeRequestedPerFileBytes,omitempty"`
    UncompressedDiskSpaceBytes int64       `json:"uncompressedSizeTotalBytes,omitempty"`
    ChildJobs                  []*ChildJob `json:"childJobs,omitempty"` // ChildJobs included if verbose is true
}

LogCollectionJob represents a Log Collection Job in the MongoDB Ops Manager API.

type LogCollectionJobs Uses

type LogCollectionJobs struct {
    Links      []*atlas.Link       `json:"links"`
    Results    []*LogCollectionJob `json:"results"`
    TotalCount int                 `json:"totalCount"`
}

LogCollectionJobs represents a array of LogCollectionJobs

type LogCollectionService Uses

type LogCollectionService interface {
    List(context.Context, string, *LogListOptions) (*LogCollectionJobs, *atlas.Response, error)
    Get(context.Context, string, string, *LogListOptions) (*LogCollectionJob, *atlas.Response, error)
    Retry(context.Context, string, string) (*atlas.Response, error)
    Create(context.Context, string, *LogCollectionJob) (*LogCollectionJob, *atlas.Response, error)
    Extend(context.Context, string, string, *LogCollectionJob) (*atlas.Response, error)
    Delete(context.Context, string, string) (*atlas.Response, error)
}

LogCollectionService is an interface for interfacing with the Log Collection Jobs endpoints of the MongoDB Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/log-collection/

type LogCollectionServiceOp Uses

type LogCollectionServiceOp service

LogCollectionServiceOp provides an implementation of the DiagnosticsService interface

func (*LogCollectionServiceOp) Create Uses

func (s *LogCollectionServiceOp) Create(ctx context.Context, groupID string, log *LogCollectionJob) (*LogCollectionJob, *atlas.Response, error)

Create creates a log collection job.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/log-collections/log-collections-submit/

func (*LogCollectionServiceOp) Delete Uses

func (s *LogCollectionServiceOp) Delete(ctx context.Context, groupID, jobID string) (*atlas.Response, error)

Delete removes a log collection job.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/log-collections/log-collections-delete-one/

func (*LogCollectionServiceOp) Extend Uses

func (s *LogCollectionServiceOp) Extend(ctx context.Context, groupID, jobID string, log *LogCollectionJob) (*atlas.Response, error)

Extend extends the expiration data of a log collection job.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/log-collections/log-collections-update-one/

func (*LogCollectionServiceOp) Get Uses

func (s *LogCollectionServiceOp) Get(ctx context.Context, groupID, jobID string, opts *LogListOptions) (*LogCollectionJob, *atlas.Response, error)

Get gets a log collection job.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/log-collections/log-collections-get-one/

func (*LogCollectionServiceOp) List Uses

func (s *LogCollectionServiceOp) List(ctx context.Context, groupID string, opts *LogListOptions) (*LogCollectionJobs, *atlas.Response, error)

List gets all collection log jobs.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/log-collections/log-collections-get-all/

func (*LogCollectionServiceOp) Retry Uses

func (s *LogCollectionServiceOp) Retry(ctx context.Context, groupID, jobID string) (*atlas.Response, error)

Retry retries a single failed log collection job.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/log-collections/log-collections-retry/

type LogListOptions Uses

type LogListOptions struct {
    atlas.ListOptions
    Verbose bool `url:"verbose,omitempty"`
}

LogListOptions specifies the optional parameters to List methods that support pagination.

type LogRotate Uses

type LogRotate struct {
    SizeThresholdMB  float64 `json:"sizeThresholdMB,omitempty"`
    TimeThresholdHrs int     `json:"timeThresholdHrs,omitempty"`
}

LogRotate part of the internal Process struct

type LogsService Uses

type LogsService interface {
    Download(context.Context, string, string, io.Writer) (*atlas.Response, error)
}

LogsService is an interface for interfacing with the Log Collection Jobs endpoints of the MongoDB Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/log-collection/

type LogsServiceOp Uses

type LogsServiceOp struct {
    Client atlas.GZipRequestDoer
}

LogsServiceOp handles communication with the Log Collection Jobs download method of the MongoDB Ops Manager API

func (*LogsServiceOp) Download Uses

func (s *LogsServiceOp) Download(ctx context.Context, groupID, jobID string, out io.Writer) (*atlas.Response, error)

Download allows to download a log from a collection job.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/log-collections/log-collections-download-job/

type Machine Uses

type Machine struct {
    Machine           string `json:"machine,omitempty"`
    HeadRootDirectory string `json:"headRootDirectory,omitempty"`
}

type MaintenanceWindow Uses

type MaintenanceWindow struct {
    ID             string   `json:"id,omitempty"`
    GroupID        string   `json:"groupId,omitempty"`
    Created        string   `json:"created,omitempty"`
    StartDate      string   `json:"startDate,omitempty"`
    EndDate        string   `json:"endDate,omitempty"`
    Updated        string   `json:"updated,omitempty"`
    AlertTypeNames []string `json:"alertTypeNames,omitempty"`
    Description    string   `json:"description,omitempty"`
}

MaintenanceWindow represents MongoDB Maintenance Windows

type MaintenanceWindows Uses

type MaintenanceWindows struct {
    Links      []*atlas.Link        `json:"links,omitempty"`
    Results    []*MaintenanceWindow `json:"results,omitempty"`
    TotalCount int                  `json:"totalCount,omitempty"`
}

MaintenanceWindows is the response from the MaintenanceWindowsService.List.

type MaintenanceWindowsService Uses

type MaintenanceWindowsService interface {
    Get(context.Context, string, string) (*MaintenanceWindow, *atlas.Response, error)
    List(context.Context, string) (*MaintenanceWindows, *atlas.Response, error)
    Create(context.Context, string, *MaintenanceWindow) (*MaintenanceWindow, *atlas.Response, error)
    Update(context.Context, string, string, *MaintenanceWindow) (*MaintenanceWindow, *atlas.Response, error)
    Delete(context.Context, string, string) (*atlas.Response, error)
}

MaintenanceWindowsService is an interface for interfacing with the Maintenance Windows endpoints of the MongoDB Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/maintenance-windows/

type MaintenanceWindowsServiceOp Uses

type MaintenanceWindowsServiceOp service

MaintenanceWindowsServiceOp handles communication with the MaintenanceWindows related methods of the OpsManager Atlas API

func (*MaintenanceWindowsServiceOp) Create Uses

func (s *MaintenanceWindowsServiceOp) Create(ctx context.Context, groupID string, maintenanceWindow *MaintenanceWindow) (*MaintenanceWindow, *atlas.Response, error)

Create creates one maintenance window.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/maintenance-windows-create-one/

func (*MaintenanceWindowsServiceOp) Delete Uses

func (s *MaintenanceWindowsServiceOp) Delete(ctx context.Context, groupID, maintenanceWindowID string) (*atlas.Response, error)

Delete removes one maintenance window with an end date in the future.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/maintenance-windows-delete-one/

func (*MaintenanceWindowsServiceOp) Get Uses

func (s *MaintenanceWindowsServiceOp) Get(ctx context.Context, groupID, maintenanceWindowID string) (*MaintenanceWindow, *atlas.Response, error)

Get gets a maintenance window.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/maintenance-windows-get-one/

func (*MaintenanceWindowsServiceOp) List Uses

func (s *MaintenanceWindowsServiceOp) List(ctx context.Context, groupID string) (*MaintenanceWindows, *atlas.Response, error)

List gets all maintenance windows.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/maintenance-windows-get-all/

func (*MaintenanceWindowsServiceOp) Update Uses

func (s *MaintenanceWindowsServiceOp) Update(ctx context.Context, groupID, maintenanceWindowID string, maintenanceWindow *MaintenanceWindow) (*MaintenanceWindow, *atlas.Response, error)

Update updates one maintenance window with an end date in the future.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/maintenance-windows-update-one/

type MeasurementsService Uses

type MeasurementsService interface {
    Host(context.Context, string, string, *atlas.ProcessMeasurementListOptions) (*atlas.ProcessMeasurements, *atlas.Response, error)
    Disk(context.Context, string, string, string, *atlas.ProcessMeasurementListOptions) (*atlas.ProcessDiskMeasurements, *atlas.Response, error)
    Database(context.Context, string, string, string, *atlas.ProcessMeasurementListOptions) (*atlas.ProcessDatabaseMeasurements, *atlas.Response, error)
}

MeasurementsService provides access to the measurement related functions in the Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/measurements/

type MeasurementsServiceOp Uses

type MeasurementsServiceOp service

MeasurementsServiceOp provides an implementation of the MeasurementsService interface

func (*MeasurementsServiceOp) Database Uses

func (s *MeasurementsServiceOp) Database(ctx context.Context, groupID, hostID, databaseName string, opts *atlas.ProcessMeasurementListOptions) (*atlas.ProcessDatabaseMeasurements, *atlas.Response, error)

Database measurements provide statistics on database performance and storage. The Monitoring collects database measurements through the dbStats command.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/measures/get-database-measurements/

func (*MeasurementsServiceOp) Disk Uses

func (s *MeasurementsServiceOp) Disk(ctx context.Context, groupID, hostID, diskName string, opts *atlas.ProcessMeasurementListOptions) (*atlas.ProcessDiskMeasurements, *atlas.Response, error)

Disk measurements provide data on IOPS, disk use, and disk latency on the disk partitions for hosts running MongoDB that the Automations collect. You must run Ops Manager Automation to retrieve disk measurements.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/measures/get-disk-measurements/

func (*MeasurementsServiceOp) Host Uses

func (s *MeasurementsServiceOp) Host(ctx context.Context, projectID, hostID string, listOptions *atlas.ProcessMeasurementListOptions) (*atlas.ProcessMeasurements, *atlas.Response, error)

Host measurements provide data on the state of the MongoDB process. The Monitoring collects host measurements through the MongoDB serverStatus and dbStats commands.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/measures/get-host-process-system-measurements/

type Member Uses

type Member struct {
    ID           int                     `json:"_id"`
    ArbiterOnly  bool                    `json:"arbiterOnly"`
    BuildIndexes bool                    `json:"buildIndexes"`
    Hidden       bool                    `json:"hidden"`
    Host         string                  `json:"host"`
    Priority     float64                 `json:"priority"`
    SlaveDelay   float64                 `json:"slaveDelay"`
    Tags         *map[string]interface{} `json:"tags"`
    Votes        float64                 `json:"votes"`
}

Member configs

type MongoDBUser Uses

type MongoDBUser struct {
    AuthenticationRestrictions []string       `json:"authenticationRestrictions"`
    Database                   string         `json:"db"`
    InitPassword               string         `json:"initPwd,omitempty"` // The cleartext password to be assigned to the user
    Mechanisms                 []string       `json:"mechanisms"`
    Password                   string         `json:"pwd,omitempty"`
    Roles                      []*Role        `json:"roles"`
    ScramSha256Creds           *ScramShaCreds `json:"scramSha256Creds,omitempty"`
    ScramSha1Creds             *ScramShaCreds `json:"scramSha1Creds,omitempty"`
    Username                   string         `json:"user"`
}

MongoDBUser database user

type Net Uses

type Net struct {
    BindIP                 *string                 `json:"bindIp,omitempty"`
    BindIPAll              *bool                   `json:"bindIpAll,omitempty"`
    Compression            *map[string]interface{} `json:"compression,omitempty"`
    HTTP                   *map[string]interface{} `json:"journal,omitempty"`
    IPV6                   *bool                   `json:"ipv6,omitempty"`
    ListenBacklog          string                  `json:"listenBacklog,omitempty"`
    MaxIncomingConnections *int                    `json:"maxIncomingConnections,omitempty"`
    Port                   int                     `json:"port,omitempty"`
    ServiceExecutor        string                  `json:"serviceExecutor,omitempty"`
    SSL                    *TLS                    `json:"ssl,omitempty"`
    TLS                    *TLS                    `json:"tls,omitempty"`
    TransportLayer         string                  `json:"transportLayer,omitempty"`
}

Net part of the internal Process struct

type OplogStoreConfigService Uses

type OplogStoreConfigService interface {
    List(context.Context, *atlas.ListOptions) (*BackupStores, *atlas.Response, error)
    Get(context.Context, string) (*BackupStore, *atlas.Response, error)
    Create(context.Context, *BackupStore) (*BackupStore, *atlas.Response, error)
    Update(context.Context, string, *BackupStore) (*BackupStore, *atlas.Response, error)
    Delete(context.Context, string) (*atlas.Response, error)
}

OplogStoreConfigService is an interface for using the Oplog endpoints of the MongoDB Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/oplog-store-config/

type OplogStoreConfigServiceOp Uses

type OplogStoreConfigServiceOp service

BackupConfigsServiceOp provides an implementation of the BackupConfigsService interface

func (*OplogStoreConfigServiceOp) Create Uses

func (s *OplogStoreConfigServiceOp) Create(ctx context.Context, oplog *BackupStore) (*BackupStore, *atlas.Response, error)

Create create a Oplog.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/oplog/mongoConfigs/create-one-oplog-configuration/

func (*OplogStoreConfigServiceOp) Delete Uses

func (s *OplogStoreConfigServiceOp) Delete(ctx context.Context, oplogID string) (*atlas.Response, error)

Delete removes a Oplog.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/snapshot/s3Configs/delete-one-s3-blockstore-configuration/

func (*OplogStoreConfigServiceOp) Get Uses

func (s *OplogStoreConfigServiceOp) Get(ctx context.Context, oplogID string) (*BackupStore, *atlas.Response, error)

Get retrieves a Oplog.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/oplog/mongoConfigs/get-one-oplog-configuration-by-id/

func (*OplogStoreConfigServiceOp) List Uses

func (s *OplogStoreConfigServiceOp) List(ctx context.Context, options *atlas.ListOptions) (*BackupStores, *atlas.Response, error)

List retrieves all the Oplogs.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/oplog/mongoConfigs/get-all-oplog-configurations/

func (*OplogStoreConfigServiceOp) Update Uses

func (s *OplogStoreConfigServiceOp) Update(ctx context.Context, oplogID string, oplog *BackupStore) (*BackupStore, *atlas.Response, error)

Update updates a Oplog.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/oplog/mongoConfigs/update-one-oplog-configuration/

type OrganizationsService Uses

type OrganizationsService interface {
    List(context.Context, *atlas.OrganizationsListOptions) (*atlas.Organizations, *atlas.Response, error)
    ListUsers(context.Context, string, *atlas.ListOptions) (*UsersResponse, *atlas.Response, error)
    Get(context.Context, string) (*atlas.Organization, *atlas.Response, error)
    Projects(context.Context, string, *atlas.ListOptions) (*Projects, *atlas.Response, error)
    Create(context.Context, *atlas.Organization) (*atlas.Organization, *atlas.Response, error)
    Delete(context.Context, string) (*atlas.Response, error)
}

OrganizationsService provides access to the organization related functions in the Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/organizations/

type OrganizationsServiceOp Uses

type OrganizationsServiceOp service

OrganizationsServiceOp provides an implementation of the OrganizationsService interface

func (*OrganizationsServiceOp) Create Uses

func (s *OrganizationsServiceOp) Create(ctx context.Context, createRequest *atlas.Organization) (*atlas.Organization, *atlas.Response, error)

Create creates an organization.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/organizations/organization-create-one/

func (*OrganizationsServiceOp) Delete Uses

func (s *OrganizationsServiceOp) Delete(ctx context.Context, orgID string) (*atlas.Response, error)

Delete deletes an organization.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/organizations/organization-delete-one/

func (*OrganizationsServiceOp) Get Uses

func (s *OrganizationsServiceOp) Get(ctx context.Context, orgID string) (*atlas.Organization, *atlas.Response, error)

Get gets a single organization.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/organizations/organization-get-one/

func (*OrganizationsServiceOp) List Uses

func (s *OrganizationsServiceOp) List(ctx context.Context, opts *atlas.OrganizationsListOptions) (*atlas.Organizations, *atlas.Response, error)

List gets all organizations.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/organizations/organization-get-all/

func (*OrganizationsServiceOp) ListUsers Uses

func (s *OrganizationsServiceOp) ListUsers(ctx context.Context, orgID string, opts *atlas.ListOptions) (*UsersResponse, *atlas.Response, error)

ListUsers gets all users in an organization.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/organizations/organization-get-all-users/

func (*OrganizationsServiceOp) Projects Uses

func (s *OrganizationsServiceOp) Projects(ctx context.Context, orgID string, opts *atlas.ListOptions) (*Projects, *atlas.Response, error)

Projects gets all projects for the given organization ID.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/organizations/organization-get-all-projects/

type PerformanceAdvisorService Uses

type PerformanceAdvisorService interface {
    GetNamespaces(context.Context, string, string, *atlas.NamespaceOptions) (*atlas.Namespaces, *atlas.Response, error)
    GetSlowQueries(context.Context, string, string, *atlas.SlowQueryOptions) (*atlas.SlowQueries, *atlas.Response, error)
    GetSuggestedIndexes(context.Context, string, string, *atlas.SuggestedIndexOptions) (*atlas.SuggestedIndexes, *atlas.Response, error)
}

PerformanceAdvisorService is an interface of the Performance Advisor endpoints of the MongoDB Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/performance-advisor/index.html

type PerformanceAdvisorServiceOp Uses

type PerformanceAdvisorServiceOp service

PerformanceAdvisorServiceOp handles communication with the Performance Advisor related methods of the MongoDB Atlas API

func (*PerformanceAdvisorServiceOp) GetNamespaces Uses

func (s *PerformanceAdvisorServiceOp) GetNamespaces(ctx context.Context, groupID, processName string, opts *atlas.NamespaceOptions) (*atlas.Namespaces, *atlas.Response, error)

GetNamespaces retrieves the namespaces for collections experiencing slow queries for a specified host.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/performance-advisor/pa-namespaces-get-all/

func (*PerformanceAdvisorServiceOp) GetSlowQueries Uses

func (s *PerformanceAdvisorServiceOp) GetSlowQueries(ctx context.Context, groupID, processName string, opts *atlas.SlowQueryOptions) (*atlas.SlowQueries, *atlas.Response, error)

GetSlowQueries gets log lines for slow queries as determined by the Performance Advisor.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/performance-advisor/get-slow-queries/

func (*PerformanceAdvisorServiceOp) GetSuggestedIndexes Uses

func (s *PerformanceAdvisorServiceOp) GetSuggestedIndexes(ctx context.Context, groupID, processName string, opts *atlas.SuggestedIndexOptions) (*atlas.SuggestedIndexes, *atlas.Response, error)

GetSuggestedIndexes gets suggested indexes as determined by the Performance Advisor.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/performance-advisor/get-suggested-indexes/

type Policy Uses

type Policy struct {
    Policy         string   `json:"policy,omitempty"`
    DisabledParams []string `json:"disabledParams,omitempty"`
}

Policy contains policies that the external system applies to this Ops Manager Project

type Process Uses

type Process struct {
    Alias                                      string             `json:"alias,omitempty"`
    Args26                                     Args26             `json:"args2_6"`
    AuthSchemaVersion                          int                `json:"authSchemaVersion,omitempty"`
    BackupPITRestoreType                       string             `json:"backupPitRestoreType,omitempty"`
    BackupRestoreCertificateValidationHostname string             `json:"backupRestoreCertificateValidationHostname,omitempty"`
    BackupRestoreCheckpointTimestamp           string             `json:"backupRestoreCheckpointTimestamp,omitempty"`
    BackupRestoreDesiredTime                   string             `json:"backupRestoreDesiredTime,omitempty"`
    BackupRestoreJobID                         string             `json:"backupRestoreJobId,omitempty"`
    BackupRestoreURL                           string             `json:"backupRestoreUrl,omitempty"`
    BackupRestoreOplogBaseURL                  string             `json:"backupRestoreOplogBaseUrl,omitempty"`
    BackupRestoreRsVersion                     *int               `json:"backupRestoreRsVersion,omitempty"`
    BackupRestoreSourceGroupID                 string             `json:"backupRestoreSourceGroupId,omitempty"`
    BackupRestoreSourceRsID                    string             `json:"backupRestoreSourceRsId,omitempty"`
    BackupRestoreSystemRolesUUID               string             `json:"backupRestoreSystemRolesUUID,omitempty"`
    BackupRestoreSystemUsersUUID               string             `json:"backupRestoreSystemUsersUUID,omitempty"`
    BackupRestoreVerificationKey               string             `json:"backupRestoreVerificationKey,omitempty"`
    CPUAffinity                                []int              `json:"cpuAffinity,omitempty"`
    Cluster                                    string             `json:"cluster,omitempty"`
    CredentialsVersion                         *int               `json:"credentialsVersion,omitempty"`
    Disabled                                   bool               `json:"disabled"`
    FeatureCompatibilityVersion                string             `json:"featureCompatibilityVersion,omitempty"`
    FullVersion                                interface{}        `json:"fullVersion,omitempty"`
    Horizons                                   *map[string]string `json:"horizons,omitempty"`
    Hostname                                   string             `json:"hostname,omitempty"`
    KMIPProxyPort                              *int               `json:"kmipProxyPort,omitempty"`
    LastCompact                                string             `json:"lastCompact,omitempty"`
    LastResync                                 string             `json:"lastResync,omitempty"`
    LastRestart                                string             `json:"lastRestart,omitempty"`
    LastGoalVersionAchieved                    int                `json:"lastGoalVersionAchieved,omitempty"`
    LastKMIPMasterKeyRotation                  string             `json:"lastKmipMasterKeyRotation,omitempty"`
    LogLevel                                   *int               `json:"logLevel,omitempty"`
    LogRotate                                  *LogRotate         `json:"logRotate,omitempty"`
    ManualMode                                 bool               `json:"manualMode"`
    Name                                       string             `json:"name,omitempty"`
    NumCores                                   int                `json:"numCores"`
    Plan                                       []string           `json:"plan,omitempty"`
    ProcessType                                string             `json:"processType,omitempty"`
    Version                                    string             `json:"version,omitempty"`
}

Process represents a single process in a deployment

type ProcessStatus Uses

type ProcessStatus struct {
    Plan                    []string `json:"plan"`
    LastGoalVersionAchieved int      `json:"lastGoalVersionAchieved"`
    Name                    string   `json:"name"`
    Hostname                string   `json:"hostname"`
}

type Project Uses

type Project struct {
    ActiveAgentCount  int                 `json:"activeAgentCount,omitempty"`
    AgentAPIKey       string              `json:"agentApiKey,omitempty"`
    HostCounts        *HostCount          `json:"hostCounts,omitempty"`
    ID                string              `json:"id,omitempty"`
    LastActiveAgent   string              `json:"lastActiveAgent,omitempty"`
    LDAPGroupMappings []*LDAPGroupMapping `json:"ldapGroupMappings,omitempty"`
    Links             []*atlas.Link       `json:"links,omitempty"`
    Name              string              `json:"name,omitempty"`
    OrgID             string              `json:"orgId,omitempty"`
    PublicAPIEnabled  bool                `json:"publicApiEnabled,omitempty"`
    ReplicaSetCount   int                 `json:"replicaSetCount,omitempty"`
    ShardCount        int                 `json:"shardCount,omitempty"`
    Tags              []*string           `json:"tags,omitempty"`
}

Project represents the structure of a project.

type ProjectJob Uses

type ProjectJob struct {
    AdminBackupConfig
    KMIPClientCertPassword string         `json:"kmipClientCertPassword,omitempty"`
    KMIPClientCertPath     string         `json:"kmipClientCertPath,omitempty"`
    LabelFilter            []string       `json:"labelFilter,omitempty"`
    SyncStoreFilter        []string       `json:"syncStoreFilter,omitempty"`
    DaemonFilter           []*Machine     `json:"daemonFilter,omitempty"`
    OplogStoreFilter       []*StoreFilter `json:"oplogStoreFilter,omitempty"`
    SnapshotStoreFilter    []*StoreFilter `json:"snapshotStoreFilter,omitempty"`
}

ProjectJob represents a Backup Project Configuration Job in the MongoDB Ops Manager API

type ProjectJobConfigService Uses

type ProjectJobConfigService interface {
    List(context.Context, *atlas.ListOptions) (*ProjectJobs, *atlas.Response, error)
    Get(context.Context, string) (*ProjectJob, *atlas.Response, error)
    Update(context.Context, string, *ProjectJob) (*ProjectJob, *atlas.Response, error)
}

ProjectJobConfigService is an interface for using the Project Job endpoints of the MongoDB Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/backup-group-config/

type ProjectJobConfigServiceOp Uses

type ProjectJobConfigServiceOp service

BackupConfigsServiceOp provides an implementation of the BackupConfigsService interface

func (*ProjectJobConfigServiceOp) Get Uses

func (s *ProjectJobConfigServiceOp) Get(ctx context.Context, projectJobID string) (*ProjectJob, *atlas.Response, error)

Get retrieves the configuration of one project’s backup jobs.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/groups/get-one-backup-group-configuration-by-id/

func (*ProjectJobConfigServiceOp) List Uses

func (s *ProjectJobConfigServiceOp) List(ctx context.Context, options *atlas.ListOptions) (*ProjectJobs, *atlas.Response, error)

List retrieves the configurations of all project’s backup jobs.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/sync/mongoConfigs/get-all-sync-store-configurations/

func (*ProjectJobConfigServiceOp) Update Uses

func (s *ProjectJobConfigServiceOp) Update(ctx context.Context, projectJobID string, projectJob *ProjectJob) (*ProjectJob, *atlas.Response, error)

Update updates the configuration of one project’s backup jobs.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/groups/update-one-backup-group-configuration/

type ProjectJobs Uses

type ProjectJobs struct {
    Links      []*atlas.Link `json:"links"`
    Results    []*ProjectJob `json:"results"`
    TotalCount int           `json:"totalCount"`
}

ProjectJobs represents a paginated collection of ProjectJob

type Projects Uses

type Projects struct {
    Links      []*atlas.Link `json:"links"`
    Results    []*Project    `json:"results"`
    TotalCount int           `json:"totalCount"`
}

Projects represents a array of project

type ProjectsService Uses

type ProjectsService interface {
    List(context.Context, *atlas.ListOptions) (*Projects, *atlas.Response, error)
    ListUsers(context.Context, string, *atlas.ListOptions) ([]*User, *atlas.Response, error)
    Get(context.Context, string) (*Project, *atlas.Response, error)
    GetByName(context.Context, string) (*Project, *atlas.Response, error)
    Create(context.Context, *Project) (*Project, *atlas.Response, error)
    Delete(context.Context, string) (*atlas.Response, error)
    RemoveUser(context.Context, string, string) (*atlas.Response, error)
    AddTeamsToProject(context.Context, string, []*atlas.ProjectTeam) (*atlas.TeamsAssigned, *atlas.Response, error)
    GetTeams(context.Context, string, *atlas.ListOptions) (*atlas.TeamsAssigned, *atlas.Response, error)
}

ProjectsService provides access to the project related functions in the Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/groups/

type ProjectsServiceOp Uses

type ProjectsServiceOp service

ProjectsServiceOp provides an implementation of the ProjectsService interface

func (*ProjectsServiceOp) AddTeamsToProject Uses

func (s *ProjectsServiceOp) AddTeamsToProject(ctx context.Context, projectID string, createRequest []*atlas.ProjectTeam) (*atlas.TeamsAssigned, *atlas.Response, error)

AddTeamsToProject adds teams to a project

See more: https://docs.opsmanager.mongodb.com/current/reference/api/groups/project-add-team/

func (*ProjectsServiceOp) Create Uses

func (s *ProjectsServiceOp) Create(ctx context.Context, createRequest *Project) (*Project, *atlas.Response, error)

Create creates a project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/groups/create-one-group/

func (*ProjectsServiceOp) Delete Uses

func (s *ProjectsServiceOp) Delete(ctx context.Context, projectID string) (*atlas.Response, error)

Delete deletes a project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/groups/delete-one-group/

func (*ProjectsServiceOp) Get Uses

func (s *ProjectsServiceOp) Get(ctx context.Context, groupID string) (*Project, *atlas.Response, error)

Get gets a single project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/groups/get-one-group-by-id/

func (*ProjectsServiceOp) GetByName Uses

func (s *ProjectsServiceOp) GetByName(ctx context.Context, groupName string) (*Project, *atlas.Response, error)

GetByName gets a single project by its name.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/groups/get-one-group-by-name/

func (*ProjectsServiceOp) GetTeams Uses

func (s *ProjectsServiceOp) GetTeams(ctx context.Context, projectID string, opts *atlas.ListOptions) (*atlas.TeamsAssigned, *atlas.Response, error)

GetTeams gets all teams in a project

See more: https://docs.opsmanager.mongodb.com/current/reference/api/groups/project-get-teams/

func (*ProjectsServiceOp) List Uses

func (s *ProjectsServiceOp) List(ctx context.Context, opts *atlas.ListOptions) (*Projects, *atlas.Response, error)

List gets all projects.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/groups/get-all-groups-for-current-user/

func (*ProjectsServiceOp) ListUsers Uses

func (s *ProjectsServiceOp) ListUsers(ctx context.Context, projectID string, opts *atlas.ListOptions) ([]*User, *atlas.Response, error)

ListUsers gets all users in a project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/groups/get-all-users-in-one-group/

func (*ProjectsServiceOp) RemoveUser Uses

func (s *ProjectsServiceOp) RemoveUser(ctx context.Context, projectID, userID string) (*atlas.Response, error)

RemoveUser removes a user from a project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/groups/remove-one-user-from-one-group/

type ReplicaSet Uses

type ReplicaSet struct {
    ID                                 string                  `json:"_id"`
    ProtocolVersion                    string                  `json:"protocolVersion,omitempty"`
    Members                            []Member                `json:"members"`
    Settings                           *map[string]interface{} `json:"settings,omitempty"`
    WriteConcernMajorityJournalDefault string                  `json:"writeConcernMajorityJournalDefault,omitempty"`
}

ReplicaSet configs

type Replication Uses

type Replication struct {
    EnableMajorityReadConcern *bool  `json:"enableMajorityReadConcern,omitempty"`
    OplogSizeMB               *int   `json:"oplogSizeMB,omitempty"`
    ReplSetName               string `json:"replSetName,omitempty"`
}

Replication is part of the internal Process struct

type Role Uses

type Role struct {
    Role     string `json:"role"`
    Database string `json:"db"`
}

Role of a database user

type S3Blockstore Uses

type S3Blockstore struct {
    BackupStore
    AWSAccessKey           string `json:"awsAccessKey,omitempty"`
    AWSSecretKey           string `json:"awsSecretKey,omitempty"`
    S3AuthMethod           string `json:"s3AuthMethod,omitempty"`
    S3BucketEndpoint       string `json:"s3BucketEndpoint,omitempty"`
    S3BucketName           string `json:"s3BucketName,omitempty"`
    S3MaxConnections       int64  `json:"s3MaxConnections,omitempty"`
    DisableProxyS3         *bool  `json:"disableProxyS3,omitempty"`
    AcceptedTos            *bool  `json:"acceptedTos"`
    SSEEnabled             *bool  `json:"sseEnabled"`
    PathStyleAccessEnabled *bool  `json:"pathStyleAccessEnabled"`
}

S3Blockstore represents a S3Blockstore in the MongoDB Ops Manager API

type S3BlockstoreConfigService Uses

type S3BlockstoreConfigService interface {
    List(context.Context, *atlas.ListOptions) (*S3Blockstores, *atlas.Response, error)
    Get(context.Context, string) (*S3Blockstore, *atlas.Response, error)
    Create(context.Context, *S3Blockstore) (*S3Blockstore, *atlas.Response, error)
    Update(context.Context, string, *S3Blockstore) (*S3Blockstore, *atlas.Response, error)
    Delete(context.Context, string) (*atlas.Response, error)
}

S3BlockstoreService is an interface for using the S3 Blockstore Service endpoints of the MongoDB Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/s3-blockstore-config/

type S3BlockstoreConfigServiceOp Uses

type S3BlockstoreConfigServiceOp service

S3BlockstoreConfigServiceOp provides an implementation of the S3BlockstoreConfigServiceinterface

func (*S3BlockstoreConfigServiceOp) Create Uses

func (s *S3BlockstoreConfigServiceOp) Create(ctx context.Context, blockstore *S3Blockstore) (*S3Blockstore, *atlas.Response, error)

Create create a S3Blockstore.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/snapshot/s3Configs/create-one-s3-blockstore-configuration/

func (*S3BlockstoreConfigServiceOp) Delete Uses

func (s *S3BlockstoreConfigServiceOp) Delete(ctx context.Context, s3BlockstoreID string) (*atlas.Response, error)

Delete removes a blockstore.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/snapshot/s3Configs/delete-one-s3-blockstore-configuration/

func (*S3BlockstoreConfigServiceOp) Get Uses

func (s *S3BlockstoreConfigServiceOp) Get(ctx context.Context, s3BlockstoreID string) (*S3Blockstore, *atlas.Response, error)

Get retrieves a Get.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/snapshot/s3Configs/get-one-s3-blockstore-configuration-by-id/

func (*S3BlockstoreConfigServiceOp) List Uses

func (s *S3BlockstoreConfigServiceOp) List(ctx context.Context, options *atlas.ListOptions) (*S3Blockstores, *atlas.Response, error)

List retrieves all the S3Blockstore.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/snapshot/s3Configs/get-all-s3-blockstore-configurations/

func (*S3BlockstoreConfigServiceOp) Update Uses

func (s *S3BlockstoreConfigServiceOp) Update(ctx context.Context, s3BlockstoreID string, blockstore *S3Blockstore) (*S3Blockstore, *atlas.Response, error)

Update updates a S3Blockstore.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/snapshot/s3Configs/update-one-s3-blockstore-configuration/

type S3Blockstores Uses

type S3Blockstores struct {
    Links      []*atlas.Link   `json:"links"`
    Results    []*S3Blockstore `json:"results"`
    TotalCount int             `json:"totalCount"`
}

S3Blockstores represents a paginated collection of S3Blockstore

type SSL Uses

type SSL struct {
    AutoPEMKeyFilePath    string `json:"autoPEMKeyFilePath,omitempty"`
    CAFilePath            string `json:"CAFilePath,omitempty"`
    ClientCertificateMode string `json:"clientCertificateMode,omitempty"`
}

SSL config properties

type ScramShaCreds Uses

type ScramShaCreds struct {
    IterationCount int    `json:"iterationCount"`
    Salt           string `json:"salt"`
    ServerKey      string `json:"serverKey"`
    StoredKey      string `json:"storedKey"`
}

ScramShaCreds configuration

type ServerType Uses

type ServerType struct {
    Name  string `json:"name,omitempty"`
    Label string `json:"label,omitempty"`
}

ServerType represents a ServerType in the MongoDB Ops Manager API

type ServerTypeOptions Uses

type ServerTypeOptions struct {
    atlas.ListOptions
    StartDate  string `url:"startDate,omitempty"`
    EndDate    string `url:"endDate,omitempty"`
    FileFormat string `url:"fileFormat,omitempty"`
}

ServerTypeOptions specifies the optional parameters to List methods that support pagination.

type ServerTypeRequest Uses

type ServerTypeRequest struct {
    ServerType *ServerType `json:"serverType,omitempty"`
}

ServerTypeRequest contains request body parameters for Server Usage Service

type ServerUsageReportService Uses

type ServerUsageReportService interface {
    Download(context.Context, *ServerTypeOptions, io.Writer) (*atlas.Response, error)
}

type ServerUsageReportService interface { is an interface for interfacing with the ServerUsage Report Service endpoints of the MongoDB Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/usage/create-one-report/

type ServerUsageReportServiceOp Uses

type ServerUsageReportServiceOp struct {
    Client atlas.GZipRequestDoer
}

LogsServiceOp handles communication with the Log Collection Jobs download method of the MongoDB Ops Manager API

func (*ServerUsageReportServiceOp) Download Uses

func (s *ServerUsageReportServiceOp) Download(ctx context.Context, options *ServerTypeOptions, out io.Writer) (*atlas.Response, error)

Download downloads a compressed report of server usage in a given timeframe.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/usage/create-one-report/

type ServerUsageService Uses

type ServerUsageService interface {
    GenerateDailyUsageSnapshot(context.Context) (*atlas.Response, error)
    ListAllHostAssignment(context.Context, *ServerTypeOptions) (*HostAssignments, *atlas.Response, error)
    ProjectHostAssignments(context.Context, string, *ServerTypeOptions) (*HostAssignments, *atlas.Response, error)
    OrganizationHostAssignments(context.Context, string, *ServerTypeOptions) (*HostAssignments, *atlas.Response, error)
    GetServerTypeProject(context.Context, string) (*ServerType, *atlas.Response, error)
    GetServerTypeOrganization(context.Context, string) (*ServerType, *atlas.Response, error)
    UpdateProjectServerType(context.Context, string, *ServerTypeRequest) (*atlas.Response, error)
    UpdateOrganizationServerType(context.Context, string, *ServerTypeRequest) (*atlas.Response, error)
}

ServerUsageService is an interface for using the Server Usage Service endpoints of the MongoDB Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/s3-blockstore-config/

type ServerUsageServiceOp Uses

type ServerUsageServiceOp service

ServerUsageServiceOp provides an implementation of the ServerUsageService

func (*ServerUsageServiceOp) GenerateDailyUsageSnapshot Uses

func (s *ServerUsageServiceOp) GenerateDailyUsageSnapshot(ctx context.Context) (*atlas.Response, error)

GenerateDailyUsageSnapshot generates snapshot of usage for the processes Ops Manager manages..

See more: https://docs.opsmanager.mongodb.com/current/reference/api/usage/generate-daily-usage-snapshot/

func (*ServerUsageServiceOp) GetServerTypeOrganization Uses

func (s *ServerUsageServiceOp) GetServerTypeOrganization(ctx context.Context, orgID string) (*ServerType, *atlas.Response, error)

GetServerTypeOrganization retrieves one default server type for one organization.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/usage/get-default-server-type-for-one-organization/

func (*ServerUsageServiceOp) GetServerTypeProject Uses

func (s *ServerUsageServiceOp) GetServerTypeProject(ctx context.Context, groupID string) (*ServerType, *atlas.Response, error)

GetServerTypeProject retrieves one default server type for one project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/usage/get-default-server-type-for-one-project/

func (*ServerUsageServiceOp) ListAllHostAssignment Uses

func (s *ServerUsageServiceOp) ListAllHostAssignment(ctx context.Context, options *ServerTypeOptions) (*HostAssignments, *atlas.Response, error)

ListAllHostAssignment retrieves all host assignments.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/usage/list-all-host-assignments/

func (*ServerUsageServiceOp) OrganizationHostAssignments Uses

func (s *ServerUsageServiceOp) OrganizationHostAssignments(ctx context.Context, orgID string, options *ServerTypeOptions) (*HostAssignments, *atlas.Response, error)

OrganizationHostAssignments retrieves all host assignments in a organization.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/usage/list-all-host-assignments-in-one-organization/

func (*ServerUsageServiceOp) ProjectHostAssignments Uses

func (s *ServerUsageServiceOp) ProjectHostAssignments(ctx context.Context, groupID string, options *ServerTypeOptions) (*HostAssignments, *atlas.Response, error)

ProjectHostAssignments retrieves all host assignments in a project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/usage/list-all-host-assignments-in-one-project/

func (*ServerUsageServiceOp) UpdateOrganizationServerType Uses

func (s *ServerUsageServiceOp) UpdateOrganizationServerType(ctx context.Context, groupID string, serverType *ServerTypeRequest) (*atlas.Response, error)

UpdateOrganizationServerType update the default server type for one organization.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/usage/update-default-server-type-for-one-organization/

func (*ServerUsageServiceOp) UpdateProjectServerType Uses

func (s *ServerUsageServiceOp) UpdateProjectServerType(ctx context.Context, groupID string, serverType *ServerTypeRequest) (*atlas.Response, error)

UpdateProjectServerType update the default server type for one project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/usage/update-default-server-type-for-one-project/

type Shard Uses

type Shard struct {
    ID   string   `json:"_id"`
    RS   string   `json:"rs"`
    Tags []string `json:"tags"`
}

Shard details

type Sharding Uses

type Sharding struct {
    ArchiveMovedChunks *bool  `json:"archiveMovedChunks,omitempty"`
    AutoSplit          *bool  `json:"autoSplit,omitempty"`
    ChunkSize          *int   `json:"chunkSize,omitempty"`
    ClusterRole        string `json:"clusterRole,omitempty"`
}

Sharding is part of the internal Process struct

type ShardingConfig Uses

type ShardingConfig struct {
    Collections         []*map[string]interface{} `json:"collections"`
    ConfigServerReplica string                    `json:"configServerReplica"`
    Draining            []string                  `json:"draining"`
    ManagedSharding     bool                      `json:"managedSharding"`
    Name                string                    `json:"name"`
    Shards              []*Shard                  `json:"shards"`
    Tags                []string                  `json:"tags"`
}

ShardingConfig sharded clusters configuration

type SnapshotSchedule Uses

type SnapshotSchedule struct {
    ClusterID                      string        `json:"clusterId"`
    GroupID                        string        `json:"groupId"`
    ReferenceTimeZoneOffset        string        `json:"referenceTimeZoneOffset,omitempty"`
    DailySnapshotRetentionDays     int           `json:"dailySnapshotRetentionDays,omitempty"`
    ClusterCheckpointIntervalMin   int           `json:"clusterCheckpointIntervalMin,omitempty"`
    Links                          []*atlas.Link `json:"links,omitempty"`
    MonthlySnapshotRetentionMonths int           `json:"monthlySnapshotRetentionMonths,omitempty"`
    PointInTimeWindowHours         *int          `json:"pointInTimeWindowHours,omitempty"`
    ReferenceHourOfDay             *int          `json:"referenceHourOfDay,omitempty"`
    ReferenceMinuteOfHour          *int          `json:"referenceMinuteOfHour,omitempty"`
    SnapshotIntervalHours          int           `json:"snapshotIntervalHours,omitempty"`
    SnapshotRetentionDays          int           `json:"snapshotRetentionDays,omitempty"`
    WeeklySnapshotRetentionWeeks   int           `json:"weeklySnapshotRetentionWeeks,omitempty"`
}

type SnapshotScheduleService Uses

type SnapshotScheduleService interface {
    Get(context.Context, string, string) (*SnapshotSchedule, *atlas.Response, error)
    Update(context.Context, string, string, *SnapshotSchedule) (*SnapshotSchedule, *atlas.Response, error)
}

SnapshotScheduleService is an interface for using the Snapshot schedule endpoints of the MongoDB Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/snapshot-schedule/

type SnapshotScheduleServiceOp Uses

type SnapshotScheduleServiceOp service

SnapshotScheduleServiceOp provides an implementation of the SnapshotScheduleService interface

func (*SnapshotScheduleServiceOp) Get Uses

func (s *SnapshotScheduleServiceOp) Get(ctx context.Context, groupID, clusterID string) (*SnapshotSchedule, *atlas.Response, error)

Get gets the snapshot schedule for an instance.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/backup/get-snapshot-schedule/

func (*SnapshotScheduleServiceOp) Update Uses

func (s *SnapshotScheduleServiceOp) Update(ctx context.Context, groupID, clusterID string, snapshot *SnapshotSchedule) (*SnapshotSchedule, *atlas.Response, error)

Update updates the parameters of snapshot creation and retention.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/backup/update-one-snapshot-schedule-by-cluster-id/

type SoftwareVersions Uses

type SoftwareVersions struct {
    AutomationVersion         string        `json:"automationVersion"`
    AutomationMinimumVersion  string        `json:"automationMinimumVersion"`
    BiConnectorVersion        string        `json:"biConnectorVersion"`
    BiConnectorMinimumVersion string        `json:"biConnectorMinimumVersion"`
    Links                     []*atlas.Link `json:"links"`
    MongoDBToolsVersion       string        `json:"mongoDbToolsVersion"`
}

SoftwareVersions is a set of software components and their expected current and minimum versions

type Storage Uses

type Storage struct {
    DBPath            string                  `json:"dbPath,omitempty"`
    DirectoryPerDB    *bool                   `json:"directoryPerDB,omitempty"`
    Engine            string                  `json:"engine,omitempty"`
    IndexBuildRetry   *bool                   `json:"indexBuildRetry,omitempty"`
    InMemory          *map[string]interface{} `json:"inMemory,omitempty"`
    Journal           *map[string]interface{} `json:"journal,omitempty"`
    NSSize            *int                    `json:"nsSize,omitempty"`
    PreAllocDataFiles *bool                   `json:"preallocDataFiles,omitempty"`
    Quota             *map[string]interface{} `json:"quota,omitempty"`
    RepairPath        string                  `json:"repairPath,omitempty"`
    SmallFiles        *bool                   `json:"smallFiles,omitempty"`
    SyncPeriodSecs    *float64                `json:"syncPeriodSecs,omitempty"`
    WiredTiger        *map[string]interface{} `json:"wiredTiger,omitempty"`
}

Storage part of the internal Process struct

type StoreFilter Uses

type StoreFilter struct {
    ID   string `json:"id,omitempty"`
    Type string `json:"type,omitempty"`
}

StoreFilter represents a StoreFilter in the MongoDB Ops Manager API

type SyncStoreConfigService Uses

type SyncStoreConfigService interface {
    List(context.Context, *atlas.ListOptions) (*BackupStores, *atlas.Response, error)
    Get(context.Context, string) (*BackupStore, *atlas.Response, error)
    Create(context.Context, *BackupStore) (*BackupStore, *atlas.Response, error)
    Update(context.Context, string, *BackupStore) (*BackupStore, *atlas.Response, error)
    Delete(context.Context, string) (*atlas.Response, error)
}

SyncService is an interface for using the Sync endpoints of the MongoDB Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/sync-store-config/

type SyncStoreConfigServiceOp Uses

type SyncStoreConfigServiceOp service

SyncStoreConfigServiceOp provides an implementation of the SyncStoreConfigService interface

func (*SyncStoreConfigServiceOp) Create Uses

func (s *SyncStoreConfigServiceOp) Create(ctx context.Context, sync *BackupStore) (*BackupStore, *atlas.Response, error)

Create create a Sync.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/sync/mongoConfigs/create-one-sync-store-configuration/

func (*SyncStoreConfigServiceOp) Delete Uses

func (s *SyncStoreConfigServiceOp) Delete(ctx context.Context, syncID string) (*atlas.Response, error)

Delete removes a Sync.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/sync/mongoConfigs/delete-one-sync-store-configuration/

func (*SyncStoreConfigServiceOp) Get Uses

func (s *SyncStoreConfigServiceOp) Get(ctx context.Context, syncID string) (*BackupStore, *atlas.Response, error)

Get retrieves a Sync.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/sync/mongoConfigs/get-one-sync-store-configuration-by-id/

func (*SyncStoreConfigServiceOp) List Uses

func (s *SyncStoreConfigServiceOp) List(ctx context.Context, options *atlas.ListOptions) (*BackupStores, *atlas.Response, error)

List retrieves all the Syncs.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/sync/mongoConfigs/get-all-sync-store-configurations/

func (*SyncStoreConfigServiceOp) Update Uses

func (s *SyncStoreConfigServiceOp) Update(ctx context.Context, syncID string, sync *BackupStore) (*BackupStore, *atlas.Response, error)

Update updates a Sync.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/admin/backup/sync/mongoConfigs/update-one-sync-store-configuration/

type SystemLog Uses

type SystemLog struct {
    Destination     string `json:"destination,omitempty"`
    Path            string `json:"path,omitempty"`
    LogAppend       bool   `json:"logAppend,omitempty"`
    Verbosity       int    `json:"verbosity,omitempty"`
    Quiet           bool   `json:"quiet,omitempty"`
    SyslogFacility  string `json:"syslogFacility,omitempty"`
    LogRotate       string `json:"logRotate,omitempty"`
    TimeStampFormat string `json:"timeStampFormat,omitempty"`
}

SystemLog part of the internal Process struct

type TLS Uses

type TLS struct {
    CAFile                     string `json:"CAFile,omitempty"`
    CertificateKeyFile         string `json:"certificateKeyFile,omitempty"`
    CertificateKeyFilePassword string `json:"certificateKeyFilePassword,omitempty"`
    CertificateSelector        string `json:"certificateSelector,omitempty"`
    ClusterCertificateSelector string `json:"clusterCertificateSelector,omitempty"`
    ClusterFile                string `json:"clusterFile,omitempty"`
    ClusterPassword            string `json:"clusterPassword,omitempty"`
    CRLFile                    string `json:"CRLFile,omitempty"`
    DisabledProtocols          string `json:"disabledProtocols,omitempty"`
    FIPSMode                   string `json:"FIPSMode,omitempty"`
    Mode                       string `json:"mode,omitempty"`
    PEMKeyFile                 string `json:"PEMKeyFile,omitempty"`
}

TLS defines TLS parameters for Net

type TeamsService Uses

type TeamsService interface {
    List(context.Context, string, *atlas.ListOptions) ([]atlas.Team, *atlas.Response, error)
    Get(context.Context, string, string) (*atlas.Team, *atlas.Response, error)
    GetOneTeamByName(context.Context, string, string) (*atlas.Team, *atlas.Response, error)
    GetTeamUsersAssigned(context.Context, string, string) ([]*User, *atlas.Response, error)
    Create(context.Context, string, *atlas.Team) (*atlas.Team, *atlas.Response, error)
    Rename(context.Context, string, string, string) (*atlas.Team, *atlas.Response, error)
    UpdateTeamRoles(context.Context, string, string, *atlas.TeamUpdateRoles) ([]atlas.TeamRoles, *atlas.Response, error)
    AddUsersToTeam(context.Context, string, string, []string) ([]*User, *atlas.Response, error)
    RemoveUserToTeam(context.Context, string, string, string) (*atlas.Response, error)
    RemoveTeamFromOrganization(context.Context, string, string) (*atlas.Response, error)
    RemoveTeamFromProject(context.Context, string, string) (*atlas.Response, error)
}

TeamsService provides access to the team related functions in the Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/teams/

type TeamsServiceOp Uses

type TeamsServiceOp service

TeamsServiceOp provides an implementation of the TeamsService interface

func (*TeamsServiceOp) AddUsersToTeam Uses

func (s *TeamsServiceOp) AddUsersToTeam(ctx context.Context, orgID, teamID string, usersID []string) ([]*User, *atlas.Response, error)

AddUsersToTeam adds a users from the organization associated with {ORG-ID} to the team with ID {TEAM-ID}.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/teams/teams-add-user/

func (*TeamsServiceOp) Create Uses

func (s *TeamsServiceOp) Create(ctx context.Context, orgID string, createRequest *atlas.Team) (*atlas.Team, *atlas.Response, error)

Create creates a team.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/teams/teams-create-one/

func (*TeamsServiceOp) Get Uses

func (s *TeamsServiceOp) Get(ctx context.Context, orgID, teamID string) (*atlas.Team, *atlas.Response, error)

Get gets a single team in the organization by team ID.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/teams/teams-get-one-by-id/

func (*TeamsServiceOp) GetOneTeamByName Uses

func (s *TeamsServiceOp) GetOneTeamByName(ctx context.Context, orgID, teamName string) (*atlas.Team, *atlas.Response, error)

GetOneTeamByName gets a single project by its name.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/teams/teams-get-one-by-name/

func (*TeamsServiceOp) GetTeamUsersAssigned Uses

func (s *TeamsServiceOp) GetTeamUsersAssigned(ctx context.Context, orgID, teamID string) ([]*User, *atlas.Response, error)

GetTeamUsersAssigned gets all the users assigned to a team.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/teams/teams-get-all-users/

func (*TeamsServiceOp) List Uses

func (s *TeamsServiceOp) List(ctx context.Context, orgID string, listOptions *atlas.ListOptions) ([]atlas.Team, *atlas.Response, error)

List gets all teams.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/teams/teams-get-all/

func (*TeamsServiceOp) RemoveTeamFromOrganization Uses

func (s *TeamsServiceOp) RemoveTeamFromOrganization(ctx context.Context, orgID, teamID string) (*atlas.Response, error)

RemoveTeamFromOrganization deletes the team with ID {TEAM-ID} from the organization specified to {ORG-ID}.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/teams/teams-delete-one/

func (*TeamsServiceOp) RemoveTeamFromProject Uses

func (s *TeamsServiceOp) RemoveTeamFromProject(ctx context.Context, groupID, teamID string) (*atlas.Response, error)

RemoveTeamFromProject removes the specified team from the specified project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/teams/teams-remove-from-project/

func (*TeamsServiceOp) RemoveUserToTeam Uses

func (s *TeamsServiceOp) RemoveUserToTeam(ctx context.Context, orgID, teamID, userID string) (*atlas.Response, error)

RemoveUserToTeam removes the specified user from the specified team.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/teams/teams-remove-user/

func (*TeamsServiceOp) Rename Uses

func (s *TeamsServiceOp) Rename(ctx context.Context, orgID, teamID, teamName string) (*atlas.Team, *atlas.Response, error)

Rename renames a team.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/teams/teams-rename-one/

func (*TeamsServiceOp) UpdateTeamRoles Uses

func (s *TeamsServiceOp) UpdateTeamRoles(ctx context.Context, orgID, teamID string, updateTeamRolesRequest *atlas.TeamUpdateRoles) ([]atlas.TeamRoles, *atlas.Response, error)

UpdateTeamRoles Update the roles of a team in an Atlas project.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/teams/teams-update-roles/

type UnauthUsersService Uses

type UnauthUsersService interface {
    CreateFirstUser(context.Context, *User, *WhitelistOpts) (*CreateUserResponse, *atlas.Response, error)
}

UnauthUsersService is an interface for interfacing with unauthenticated APIs

type UnauthUsersServiceOp Uses

type UnauthUsersServiceOp service

UnauthUsersServiceOp handles communication with the unauthenticated API

func (*UnauthUsersServiceOp) CreateFirstUser Uses

func (s *UnauthUsersServiceOp) CreateFirstUser(ctx context.Context, user *User, opts *WhitelistOpts) (*CreateUserResponse, *atlas.Response, error)

CreateFirstUser creates the first user for a new installation.

See more: https://docs.opsmanager.mongodb.com/master/reference/api/user-create-first/

type User Uses

type User struct {
    ID           string        `json:"id,omitempty"`
    EmailAddress string        `json:"emailAddress,omitempty"`
    FirstName    string        `json:"firstName,omitempty"`
    LastName     string        `json:"lastName,omitempty"`
    Links        []*atlas.Link `json:"links,omitempty"`
    MobileNumber string        `json:"mobileNumber,omitempty"`
    Password     string        `json:"password,omitempty"`
    TeamIds      []string      `json:"teamIds,omitempty"`
    Roles        []*UserRole   `json:"roles,omitempty"`
    Username     string        `json:"username"`
    Country      string        `json:"country,omitempty"`
}

User wrapper for a user response, augmented with a few extra fields

type UserRole Uses

type UserRole struct {
    RoleName string `json:"roleName"`
    GroupID  string `json:"groupId,omitempty"`
    OrgID    string `json:"orgId,omitempty"`
}

UserRole denotes a single user role

type UsersResponse Uses

type UsersResponse struct {
    Links      []*atlas.Link `json:"links"`
    Results    []*User       `json:"results"`
    TotalCount int           `json:"totalCount"`
}

UsersResponse represents a array of users

type UsersService Uses

type UsersService interface {
    Get(context.Context, string) (*User, *atlas.Response, error)
    GetByName(context.Context, string) (*User, *atlas.Response, error)
    Create(context.Context, *User) (*User, *atlas.Response, error)
    Delete(context.Context, string) (*atlas.Response, error)
}

UsersService provides access to the user related functions in the Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/users/

type UsersServiceOp Uses

type UsersServiceOp service

UsersServiceOp provides an implementation of the UsersService interface

func (*UsersServiceOp) Create Uses

func (s *UsersServiceOp) Create(ctx context.Context, createRequest *User) (*User, *atlas.Response, error)

Create creates a new IAM user.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/user-create/

func (*UsersServiceOp) Delete Uses

func (s *UsersServiceOp) Delete(ctx context.Context, userID string) (*atlas.Response, error)

Delete deletes a user.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/users/delete-one-user/

func (*UsersServiceOp) Get Uses

func (s *UsersServiceOp) Get(ctx context.Context, userID string) (*User, *atlas.Response, error)

Get gets a single user by ID.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/user-get-by-id/

func (*UsersServiceOp) GetByName Uses

func (s *UsersServiceOp) GetByName(ctx context.Context, username string) (*User, *atlas.Response, error)

GetByName gets a single user by name.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/user-get-by-name/

type Version Uses

type Version struct {
    Name   string   `json:"name,omitempty"`
    Builds []*Build `json:"builds,omitempty"`
}

type VersionManifest Uses

type VersionManifest struct {
    Updated  int64      `json:"updated,omitempty"`
    Versions []*Version `json:"versions,omitempty"`
}

type VersionManifestService Uses

type VersionManifestService interface {
    Get(context.Context, string) (*VersionManifest, *atlas.Response, error)
    Update(context.Context, *VersionManifest) (*VersionManifest, *atlas.Response, error)
}

VersionManifestService is an interface for using the Version Manifest endpoints of the MongoDB Ops Manager API.

See more: https://docs.opsmanager.mongodb.com/current/reference/api/version-manifest/

type VersionManifestServiceOp Uses

type VersionManifestServiceOp service

VersionManifestServiceOp provides an implementation of the VersionManifestService interface

func (*VersionManifestServiceOp) Get Uses

func (s *VersionManifestServiceOp) Get(ctx context.Context, version string) (*VersionManifest, *atlas.Response, error)

Get retrieves the version manifest

See more: https://docs.opsmanager.mongodb.com/current/reference/api/version-manifest/view-version-manifest/

func (*VersionManifestServiceOp) Update Uses

func (s *VersionManifestServiceOp) Update(ctx context.Context, versionManifest *VersionManifest) (*VersionManifest, *atlas.Response, error)

Update updates the version manifest

See more: https://docs.opsmanager.mongodb.com/current/reference/api/version-manifest/update-version-manifest/

type WhitelistAPIKeysReq Uses

type WhitelistAPIKeysReq struct {
    CidrBlock   string `json:"cidrBlock"`
    Description string `json:"description"`
}

WhitelistAPIKeysReq represents a source allowed to use global API keys

type WhitelistOpts Uses

type WhitelistOpts struct {
    Whitelist []string `url:"whitelist"`
}

WhitelistOpts allows access from given IPs

Package opsmngr imports 12 packages (graph) and is imported by 3 packages. Updated 2020-10-20. Refresh now. Tools for package owners.