Documentation ¶
Overview ¶
Package mongodbatlas provides a client for using the MongoDB Atlas API.
Usage
import "go.mongodb.org/atlas/mongodbatlas"
Construct a new Atlas client, then use the various services on the client to access different parts of the Ops Manager API. For example:
client := mongodbatlas.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.atlas.mongodb.com/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 mongodbatlas 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 (https://docs.atlas.mongodb.com/configure-api-access), you can use it with the digest library using:
import ( "context" "log" "github.com/mongodb-forks/digest" "go.mongodb.org/atlas/mongodbatlas" ) func main() { t := digest.NewTransport("your public key", "your private key") tc, err := t.Client() if err != nil { log.Fatalf(err.Error()) } client := mongodbatlas.NewClient(tc) orgs, _, err := client.Projects.GetAllProjects(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.
Index ¶
- Constants
- Variables
- func DoRequestWithClient(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error)
- type APIKey
- type APIKeyInput
- type APIKeysService
- type APIKeysServiceOp
- func (s *APIKeysServiceOp) Create(ctx context.Context, orgID string, createRequest *APIKeyInput) (*APIKey, *Response, error)
- func (s *APIKeysServiceOp) Delete(ctx context.Context, orgID, apiKeyID string) (*Response, error)
- func (s *APIKeysServiceOp) Get(ctx context.Context, orgID, apiKeyID string) (*APIKey, *Response, error)
- func (s *APIKeysServiceOp) List(ctx context.Context, orgID string, listOptions *ListOptions) ([]APIKey, *Response, error)
- func (s *APIKeysServiceOp) Update(ctx context.Context, orgID, apiKeyID string, updateRequest *APIKeyInput) (*APIKey, *Response, error)
- type AWSCustomDNSService
- type AWSCustomDNSServiceOp
- type AWSCustomDNSSetting
- type AccessListAPIKey
- type AccessListAPIKeys
- type AccessListAPIKeysReq
- type AccessListAPIKeysService
- type AccessListAPIKeysServiceOp
- func (s *AccessListAPIKeysServiceOp) Create(ctx context.Context, orgID, apiKeyID string, ...) (*AccessListAPIKeys, *Response, error)
- func (s *AccessListAPIKeysServiceOp) Delete(ctx context.Context, orgID, apiKeyID, ipAddress string) (*Response, error)
- func (s *AccessListAPIKeysServiceOp) Get(ctx context.Context, orgID, apiKeyID, ipAddress string) (*AccessListAPIKey, *Response, error)
- func (s *AccessListAPIKeysServiceOp) List(ctx context.Context, orgID, apiKeyID string, listOptions *ListOptions) (*AccessListAPIKeys, *Response, error)
- type AccessLogOptions
- type AccessLogSettings
- type AccessLogs
- type AccessTrackingService
- type AccessTrackingServiceOp
- func (s *AccessTrackingServiceOp) ListByCluster(ctx context.Context, groupID, clusterName string, opts *AccessLogOptions) (*AccessLogSettings, *Response, error)
- func (s *AccessTrackingServiceOp) ListByHostname(ctx context.Context, groupID, hostname string, opts *AccessLogOptions) (*AccessLogSettings, *Response, error)
- type AcknowledgeRequest
- type Action
- type AdvancedAutoScaling
- type AdvancedCluster
- type AdvancedClustersResponse
- type AdvancedClustersService
- type AdvancedClustersServiceOp
- func (s *AdvancedClustersServiceOp) Create(ctx context.Context, groupID string, createRequest *AdvancedCluster) (*AdvancedCluster, *Response, error)
- func (s *AdvancedClustersServiceOp) Delete(ctx context.Context, groupID, clusterName string, ...) (*Response, error)
- func (s *AdvancedClustersServiceOp) Get(ctx context.Context, groupID, clusterName string) (*AdvancedCluster, *Response, error)
- func (s *AdvancedClustersServiceOp) List(ctx context.Context, groupID string, listOptions *ListOptions) (*AdvancedClustersResponse, *Response, error)
- func (s *AdvancedClustersServiceOp) TestFailover(ctx context.Context, groupID, clusterName string) (*Response, error)
- func (s *AdvancedClustersServiceOp) Update(ctx context.Context, groupID, clusterName string, ...) (*AdvancedCluster, *Response, error)
- type AdvancedRegionConfig
- type AdvancedReplicationSpec
- type Alert
- type AlertConfiguration
- type AlertConfigurationsResponse
- type AlertConfigurationsService
- type AlertConfigurationsServiceOp
- func (s *AlertConfigurationsServiceOp) Create(ctx context.Context, groupID string, createReq *AlertConfiguration) (*AlertConfiguration, *Response, error)
- func (s *AlertConfigurationsServiceOp) Delete(ctx context.Context, groupID, alertConfigID string) (*Response, error)
- func (s *AlertConfigurationsServiceOp) EnableAnAlertConfig(ctx context.Context, groupID, alertConfigID string, enabled *bool) (*AlertConfiguration, *Response, error)
- func (s *AlertConfigurationsServiceOp) GetAnAlertConfig(ctx context.Context, groupID, alertConfigID string) (*AlertConfiguration, *Response, error)
- func (s *AlertConfigurationsServiceOp) GetOpenAlertsConfig(ctx context.Context, groupID, alertConfigID string) ([]AlertConfiguration, *Response, error)
- func (s *AlertConfigurationsServiceOp) List(ctx context.Context, groupID string, listOptions *ListOptions) ([]AlertConfiguration, *Response, error)
- func (s *AlertConfigurationsServiceOp) ListMatcherFields(ctx context.Context) ([]string, *Response, error)
- func (s *AlertConfigurationsServiceOp) Update(ctx context.Context, groupID, alertConfigID string, ...) (*AlertConfiguration, *Response, error)
- type AlertsListOptions
- type AlertsResponse
- type AlertsService
- type AlertsServiceOp
- func (s *AlertsServiceOp) Acknowledge(ctx context.Context, groupID, alertID string, params *AcknowledgeRequest) (*Alert, *Response, error)
- func (s *AlertsServiceOp) Get(ctx context.Context, groupID, alertID string) (*Alert, *Response, error)
- func (s *AlertsServiceOp) List(ctx context.Context, groupID string, listOptions *AlertsListOptions) (*AlertsResponse, *Response, error)
- type ArgError
- type AssignAPIKey
- type AssociatedOrgs
- type AtlasRole
- type AtlasUser
- type AtlasUserAssigned
- type AtlasUsersResponse
- type AtlasUsersService
- type AtlasUsersServiceOp
- func (s *AtlasUsersServiceOp) Create(ctx context.Context, createRequest *AtlasUser) (*AtlasUser, *Response, error)
- func (s *AtlasUsersServiceOp) Get(ctx context.Context, userID string) (*AtlasUser, *Response, error)
- func (s *AtlasUsersServiceOp) GetByName(ctx context.Context, username string) (*AtlasUser, *Response, error)
- func (s *AtlasUsersServiceOp) List(ctx context.Context, orgID string, listOptions *ListOptions) ([]AtlasUser, *Response, error)
- type Auditing
- type AuditingsService
- type AuditingsServiceOp
- type AutoScaling
- type AvailableRegion
- type AwsCloudProviderConfig
- type AwsKms
- type AzureKeyVault
- type BackupCompliancePolicy
- type BackupCompliancePolicyService
- type BackupCompliancePolicyServiceOp
- type BiConnector
- type Certificates
- type ChangeStatus
- type Checkpoint
- type CheckpointPart
- type Checkpoints
- type CheckpointsService
- type CheckpointsServiceOp
- type Client
- func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error)
- func (c *Client) NewGZipRequest(ctx context.Context, method, urlStr string) (*http.Request, error)
- func (c *Client) NewPlainRequest(ctx context.Context, method, urlStr string) (*http.Request, error)
- func (c *Client) NewRequest(ctx context.Context, method, urlStr string, body interface{}) (*http.Request, error)
- func (c *Client) OnRequestCompleted(rc RequestCompletionCallback)
- func (c *Client) OnResponseProcessed(rc ResponseProcessedCallback)
- type ClientOpt
- type CloudProvider
- type CloudProviderAccessRole
- type CloudProviderAccessRoleRequest
- type CloudProviderAccessRoles
- type CloudProviderAccessService
- type CloudProviderAccessServiceOp
- func (s *CloudProviderAccessServiceOp) AuthorizeRole(ctx context.Context, groupID, roleID string, ...) (*CloudProviderAccessRole, *Response, error)
- func (s *CloudProviderAccessServiceOp) CreateRole(ctx context.Context, groupID string, request *CloudProviderAccessRoleRequest) (*CloudProviderAccessRole, *Response, error)
- func (s *CloudProviderAccessServiceOp) DeauthorizeRole(ctx context.Context, request *CloudProviderDeauthorizationRequest) (*Response, error)
- func (s *CloudProviderAccessServiceOp) GetRole(ctx context.Context, groupID, roleID string) (*CloudProviderAccessRole, *Response, error)
- func (s *CloudProviderAccessServiceOp) ListRoles(ctx context.Context, groupID string) (*CloudProviderAccessRoles, *Response, error)
- type CloudProviderConfig
- type CloudProviderDeauthorizationRequest
- type CloudProviderRegionsOptions
- type CloudProviderSnapshot
- type CloudProviderSnapshotBackupPoliciesService
- type CloudProviderSnapshotBackupPoliciesServiceOp
- func (s *CloudProviderSnapshotBackupPoliciesServiceOp) Delete(ctx context.Context, groupID, clusterName string) (*CloudProviderSnapshotBackupPolicy, *Response, error)
- func (s *CloudProviderSnapshotBackupPoliciesServiceOp) Get(ctx context.Context, groupID, clusterName string) (*CloudProviderSnapshotBackupPolicy, *Response, error)
- func (s *CloudProviderSnapshotBackupPoliciesServiceOp) Update(ctx context.Context, groupID, clusterName string, ...) (*CloudProviderSnapshotBackupPolicy, *Response, error)
- type CloudProviderSnapshotBackupPolicy
- type CloudProviderSnapshotExportBucket
- type CloudProviderSnapshotExportBuckets
- type CloudProviderSnapshotExportBucketsService
- type CloudProviderSnapshotExportBucketsServiceOp
- func (c CloudProviderSnapshotExportBucketsServiceOp) Create(ctx context.Context, projectID string, ...) (*CloudProviderSnapshotExportBucket, *Response, error)
- func (c CloudProviderSnapshotExportBucketsServiceOp) Delete(ctx context.Context, projectID, bucketID string) (*Response, error)
- func (c CloudProviderSnapshotExportBucketsServiceOp) Get(ctx context.Context, projectID, bucketID string) (*CloudProviderSnapshotExportBucket, *Response, error)
- func (c CloudProviderSnapshotExportBucketsServiceOp) List(ctx context.Context, projectID string, options *ListOptions) (*CloudProviderSnapshotExportBuckets, *Response, error)
- type CloudProviderSnapshotExportJob
- type CloudProviderSnapshotExportJobComponent
- type CloudProviderSnapshotExportJobCustomData
- type CloudProviderSnapshotExportJobStatus
- type CloudProviderSnapshotExportJobs
- type CloudProviderSnapshotExportJobsService
- type CloudProviderSnapshotExportJobsServiceOp
- func (c CloudProviderSnapshotExportJobsServiceOp) Create(ctx context.Context, projectID, clusterName string, ...) (*CloudProviderSnapshotExportJob, *Response, error)
- func (c CloudProviderSnapshotExportJobsServiceOp) Get(ctx context.Context, projectID, clusterName, exportID string) (*CloudProviderSnapshotExportJob, *Response, error)
- func (c CloudProviderSnapshotExportJobsServiceOp) List(ctx context.Context, projectID, clusterName string, options *ListOptions) (*CloudProviderSnapshotExportJobs, *Response, error)
- type CloudProviderSnapshotRestoreJob
- type CloudProviderSnapshotRestoreJobs
- type CloudProviderSnapshotRestoreJobsService
- type CloudProviderSnapshotRestoreJobsServiceOp
- func (s *CloudProviderSnapshotRestoreJobsServiceOp) Create(ctx context.Context, requestParameters *SnapshotReqPathParameters, ...) (*CloudProviderSnapshotRestoreJob, *Response, error)
- func (s *CloudProviderSnapshotRestoreJobsServiceOp) CreateForServerlessBackupRestore(ctx context.Context, projectID, instanceName string, ...) (*CloudProviderSnapshotRestoreJob, *Response, error)
- func (s *CloudProviderSnapshotRestoreJobsServiceOp) Delete(ctx context.Context, requestParameters *SnapshotReqPathParameters) (*Response, error)
- func (s *CloudProviderSnapshotRestoreJobsServiceOp) Get(ctx context.Context, requestParameters *SnapshotReqPathParameters) (*CloudProviderSnapshotRestoreJob, *Response, error)
- func (s *CloudProviderSnapshotRestoreJobsServiceOp) GetForServerlessBackupRestore(ctx context.Context, projectID, instanceName, jobID string) (*CloudProviderSnapshotRestoreJob, *Response, error)
- func (s *CloudProviderSnapshotRestoreJobsServiceOp) List(ctx context.Context, requestParameters *SnapshotReqPathParameters, ...) (*CloudProviderSnapshotRestoreJobs, *Response, error)
- func (s *CloudProviderSnapshotRestoreJobsServiceOp) ListForServerlessBackupRestore(ctx context.Context, projectID, instanceName string, listOptions *ListOptions) (*CloudProviderSnapshotRestoreJobs, *Response, error)
- type CloudProviderSnapshots
- type CloudProviderSnapshotsService
- type CloudProviderSnapshotsServiceOp
- func (s *CloudProviderSnapshotsServiceOp) Create(ctx context.Context, requestParameters *SnapshotReqPathParameters, ...) (*CloudProviderSnapshot, *Response, error)
- func (s *CloudProviderSnapshotsServiceOp) Delete(ctx context.Context, requestParameters *SnapshotReqPathParameters) (*Response, error)
- func (s *CloudProviderSnapshotsServiceOp) GetAllCloudProviderSnapshots(ctx context.Context, requestParameters *SnapshotReqPathParameters, ...) (*CloudProviderSnapshots, *Response, error)
- func (s *CloudProviderSnapshotsServiceOp) GetAllServerlessSnapshots(ctx context.Context, requestParameters *SnapshotReqPathParameters, ...) (*CloudProviderSnapshots, *Response, error)
- func (s *CloudProviderSnapshotsServiceOp) GetOneCloudProviderSnapshot(ctx context.Context, requestParameters *SnapshotReqPathParameters) (*CloudProviderSnapshot, *Response, error)
- func (s *CloudProviderSnapshotsServiceOp) GetOneServerlessSnapshot(ctx context.Context, requestParameters *SnapshotReqPathParameters) (*CloudProviderSnapshot, *Response, error)
- type CloudProviders
- type Cluster
- type ClusterOutageSimulation
- type ClusterOutageSimulationOutageFilter
- type ClusterOutageSimulationRequest
- type ClusterOutageSimulationService
- type ClusterOutageSimulationServiceOp
- func (s ClusterOutageSimulationServiceOp) EndOutageSimulation(ctx context.Context, groupID, clusterName string) (*ClusterOutageSimulation, *Response, error)
- func (s ClusterOutageSimulationServiceOp) GetOutageSimulation(ctx context.Context, groupID, clusterName string) (*ClusterOutageSimulation, *Response, error)
- func (s ClusterOutageSimulationServiceOp) StartOutageSimulation(ctx context.Context, groupID, clusterName string, ...) (*ClusterOutageSimulation, *Response, error)
- type ClusterStatus
- type ClustersResponse
- type ClustersService
- type ClustersServiceOp
- func (s *ClustersServiceOp) Create(ctx context.Context, groupID string, createRequest *Cluster) (*Cluster, *Response, error)
- func (s *ClustersServiceOp) Delete(ctx context.Context, groupID, clusterName string, ...) (*Response, error)
- func (s *ClustersServiceOp) Get(ctx context.Context, groupID, clusterName string) (*Cluster, *Response, error)
- func (s *ClustersServiceOp) GetProcessArgs(ctx context.Context, groupID, clusterName string) (*ProcessArgs, *Response, error)
- func (s *ClustersServiceOp) GetSampleDatasetStatus(ctx context.Context, groupID, id string) (*SampleDatasetJob, *Response, error)
- func (s *ClustersServiceOp) List(ctx context.Context, groupID string, listOptions *ListOptions) ([]Cluster, *Response, error)
- func (s *ClustersServiceOp) ListCloudProviderRegions(ctx context.Context, groupID string, options *CloudProviderRegionsOptions) (*CloudProviders, *Response, error)
- func (s *ClustersServiceOp) LoadSampleDataset(ctx context.Context, groupID, clusterName string) (*SampleDatasetJob, *Response, error)
- func (s *ClustersServiceOp) Status(ctx context.Context, groupID, clusterName string) (ClusterStatus, *Response, error)
- func (s *ClustersServiceOp) Update(ctx context.Context, groupID, clusterName string, updateRequest *Cluster) (*Cluster, *Response, error)
- func (s *ClustersServiceOp) UpdateProcessArgs(ctx context.Context, groupID, clusterName string, updateRequest *ProcessArgs) (*ProcessArgs, *Response, error)
- func (s *ClustersServiceOp) Upgrade(ctx context.Context, groupID string, upgradeRequest *Cluster) (*Cluster, *Response, error)
- type CollationOptions
- type Completer
- type Component
- type Compute
- type ConnectionStrings
- type Container
- type ContainersListOptions
- type ContainersService
- type ContainersServiceOp
- func (s *ContainersServiceOp) Create(ctx context.Context, groupID string, createRequest *Container) (*Container, *Response, error)
- func (s *ContainersServiceOp) Delete(ctx context.Context, groupID, containerID string) (*Response, error)
- func (s *ContainersServiceOp) Get(ctx context.Context, groupID, containerID string) (*Container, *Response, error)
- func (s *ContainersServiceOp) List(ctx context.Context, groupID string, listOptions *ContainersListOptions) ([]Container, *Response, error)
- func (s *ContainersServiceOp) ListAll(ctx context.Context, groupID string, listOptions *ListOptions) ([]Container, *Response, error)
- func (s *ContainersServiceOp) Update(ctx context.Context, groupID, containerID string, updateRequest *Container) (*Container, *Response, error)
- type ContinuousJob
- type ContinuousJobRequest
- type ContinuousJobs
- type ContinuousRestoreJobsService
- type ContinuousRestoreJobsServiceOp
- func (s *ContinuousRestoreJobsServiceOp) Create(ctx context.Context, groupID, clusterID string, request *ContinuousJobRequest) (*ContinuousJobs, *Response, error)
- func (s *ContinuousRestoreJobsServiceOp) Get(ctx context.Context, groupID, clusterID, jobID string) (*ContinuousJob, *Response, error)
- func (s *ContinuousRestoreJobsServiceOp) List(ctx context.Context, groupID, clusterID string, opts *ListOptions) (*ContinuousJobs, *Response, error)
- type ContinuousSnapshot
- type ContinuousSnapshots
- type ContinuousSnapshotsService
- type ContinuousSnapshotsServiceOp
- func (s *ContinuousSnapshotsServiceOp) ChangeExpiry(ctx context.Context, groupID, clusterID, snapshotID string, ...) (*ContinuousSnapshot, *Response, error)
- func (s *ContinuousSnapshotsServiceOp) Delete(ctx context.Context, groupID, clusterID, snapshotID string) (*Response, error)
- func (s *ContinuousSnapshotsServiceOp) Get(ctx context.Context, groupID, clusterID, snapshotID string) (*ContinuousSnapshot, *Response, error)
- func (s *ContinuousSnapshotsServiceOp) List(ctx context.Context, groupID, clusterID string, listOptions *ListOptions) (*ContinuousSnapshots, *Response, error)
- type CopySetting
- type CreateOrganizationRequest
- type CreateOrganizationResponse
- type CreateProjectOptions
- type CurrentValue
- type CustomDBRole
- type CustomDBRolesService
- type CustomDBRolesServiceOp
- func (s *CustomDBRolesServiceOp) Create(ctx context.Context, groupID string, createRequest *CustomDBRole) (*CustomDBRole, *Response, error)
- func (s *CustomDBRolesServiceOp) Delete(ctx context.Context, groupID, roleName string) (*Response, error)
- func (s *CustomDBRolesServiceOp) Get(ctx context.Context, groupID, roleName string) (*CustomDBRole, *Response, error)
- func (s *CustomDBRolesServiceOp) List(ctx context.Context, groupID string, listOptions *ListOptions) (*[]CustomDBRole, *Response, error)
- func (s *CustomDBRolesServiceOp) Update(ctx context.Context, groupID, roleName string, updateRequest *CustomDBRole) (*CustomDBRole, *Response, error)
- type CustomZoneMapping
- type CustomZoneMappingsRequest
- type CustomerX509
- type DataFederationCollection
- type DataFederationDataSource
- type DataFederationDatabase
- type DataFederationDatabaseView
- type DataFederationInstance
- type DataFederationQueryLimit
- type DataFederationService
- type DataFederationServiceOp
- func (s *DataFederationServiceOp) ConfigureQueryLimit(ctx context.Context, groupID, name, limitName string, ...) (*DataFederationQueryLimit, *Response, error)
- func (s *DataFederationServiceOp) Create(ctx context.Context, groupID string, createRequest *DataFederationInstance) (*DataFederationInstance, *Response, error)
- func (s *DataFederationServiceOp) Delete(ctx context.Context, groupID, name string) (*Response, error)
- func (s *DataFederationServiceOp) DeleteQueryLimit(ctx context.Context, groupID, name, limitName string) (*Response, error)
- func (s *DataFederationServiceOp) Get(ctx context.Context, groupID, name string) (*DataFederationInstance, *Response, error)
- func (s *DataFederationServiceOp) GetQueryLimit(ctx context.Context, groupID, name, limitName string) (*DataFederationQueryLimit, *Response, error)
- func (s *DataFederationServiceOp) List(ctx context.Context, groupID string) ([]*DataFederationInstance, *Response, error)
- func (s *DataFederationServiceOp) ListQueryLimits(ctx context.Context, groupID, name string) ([]*DataFederationQueryLimit, *Response, error)
- func (s *DataFederationServiceOp) Update(ctx context.Context, groupID, name string, ...) (*DataFederationInstance, *Response, error)
- type DataFederationStorage
- type DataFederationStore
- type DataFederationUpdateOptions
- type DataLake
- type DataLakeCollection
- type DataLakeCreateRequest
- type DataLakeDataSource
- type DataLakeDatabase
- type DataLakeDatabaseView
- type DataLakePipeline
- type DataLakePipelineIngestionSchedule
- type DataLakePipelinePartitionField
- type DataLakePipelineRun
- type DataLakePipelineRunStats
- type DataLakePipelineRunsResponse
- type DataLakePipelineService
- type DataLakePipelineServiceOp
- func (s *DataLakePipelineServiceOp) Create(ctx context.Context, groupID string, createRequest *DataLakePipeline) (*DataLakePipeline, *Response, error)
- func (s *DataLakePipelineServiceOp) Delete(ctx context.Context, groupID, name string) (*Response, error)
- func (s *DataLakePipelineServiceOp) Get(ctx context.Context, groupID, name string) (*DataLakePipeline, *Response, error)
- func (s *DataLakePipelineServiceOp) GetRun(ctx context.Context, groupID, name, id string) (*DataLakePipelineRun, *Response, error)
- func (s *DataLakePipelineServiceOp) List(ctx context.Context, groupID string) ([]*DataLakePipeline, *Response, error)
- func (s *DataLakePipelineServiceOp) ListIngestionSchedules(ctx context.Context, groupID, name string) ([]*DataLakePipelineIngestionSchedule, *Response, error)
- func (s *DataLakePipelineServiceOp) ListRuns(ctx context.Context, groupID, name string) (*DataLakePipelineRunsResponse, *Response, error)
- func (s *DataLakePipelineServiceOp) ListSnapshots(ctx context.Context, groupID, name string, ...) (*DataLakePipelineSnapshotsResponse, *Response, error)
- func (s *DataLakePipelineServiceOp) Update(ctx context.Context, groupID, name string, updateRequest *DataLakePipeline) (*DataLakePipeline, *Response, error)
- type DataLakePipelineSink
- type DataLakePipelineSnapshot
- type DataLakePipelineSnapshotsResponse
- type DataLakePipelineSource
- type DataLakePipelineTransformation
- type DataLakeService
- type DataLakeServiceOp
- func (s *DataLakeServiceOp) Create(ctx context.Context, groupID string, createRequest *DataLakeCreateRequest) (*DataLake, *Response, error)
- func (s *DataLakeServiceOp) CreatePrivateLinkEndpoint(ctx context.Context, groupID string, ...) (*PrivateLinkEndpointDataLakeResponse, *Response, error)
- func (s *DataLakeServiceOp) Delete(ctx context.Context, groupID, name string) (*Response, error)
- func (s *DataLakeServiceOp) DeletePrivateLinkEndpoint(ctx context.Context, groupID, endpointID string) (*Response, error)
- func (s *DataLakeServiceOp) Get(ctx context.Context, groupID, name string) (*DataLake, *Response, error)
- func (s *DataLakeServiceOp) GetPrivateLinkEndpoint(ctx context.Context, groupID, endpointID string) (*PrivateLinkEndpointDataLake, *Response, error)
- func (s *DataLakeServiceOp) List(ctx context.Context, groupID string) ([]DataLake, *Response, error)
- func (s *DataLakeServiceOp) ListPrivateLinkEndpoint(ctx context.Context, groupID string) (*PrivateLinkEndpointDataLakeResponse, *Response, error)
- func (s *DataLakeServiceOp) Update(ctx context.Context, groupID, name string, ...) (*DataLake, *Response, error)
- type DataLakeStore
- type DataLakeUpdateRequest
- type DataPoints
- type DataProcessRegion
- type DatabaseUser
- type DatabaseUsersService
- type DatabaseUsersServiceOp
- func (s *DatabaseUsersServiceOp) Create(ctx context.Context, groupID string, createRequest *DatabaseUser) (*DatabaseUser, *Response, error)
- func (s *DatabaseUsersServiceOp) Delete(ctx context.Context, databaseName, groupID, username string) (*Response, error)
- func (s *DatabaseUsersServiceOp) Get(ctx context.Context, databaseName, groupID, username string) (*DatabaseUser, *Response, error)
- func (s *DatabaseUsersServiceOp) List(ctx context.Context, groupID string, listOptions *ListOptions) ([]DatabaseUser, *Response, error)
- func (s *DatabaseUsersServiceOp) Update(ctx context.Context, groupID, username string, updateRequest *DatabaseUser) (*DatabaseUser, *Response, error)
- type DateRangetOptions
- type DefaultMongoDBMajorVersionService
- type DefaultMongoDBMajorVersionServiceOp
- type DeleteAdvanceClusterOptions
- type DeleteCopiedBackup
- type Delivery
- type Destination
- type DiskGB
- type Doer
- type EncryptionAtRest
- type EncryptionsAtRestService
- type EncryptionsAtRestServiceOp
- func (s *EncryptionsAtRestServiceOp) Create(ctx context.Context, createRequest *EncryptionAtRest) (*EncryptionAtRest, *Response, error)
- func (s *EncryptionsAtRestServiceOp) Delete(ctx context.Context, groupID string) (*Response, error)
- func (s *EncryptionsAtRestServiceOp) Get(ctx context.Context, groupID string) (*EncryptionAtRest, *Response, error)
- type Endpoint
- type ErrorResponse
- type Event
- type EventListOptions
- type EventResponse
- type EventsService
- type EventsServiceOp
- func (s *EventsServiceOp) GetOrganizationEvent(ctx context.Context, orgID, eventID string) (*Event, *Response, error)
- func (s *EventsServiceOp) GetProjectEvent(ctx context.Context, groupID, eventID string) (*Event, *Response, error)
- func (s *EventsServiceOp) ListOrganizationEvents(ctx context.Context, orgID string, listOptions *EventListOptions) (*EventResponse, *Response, error)
- func (s *EventsServiceOp) ListProjectEvents(ctx context.Context, groupID string, listOptions *EventListOptions) (*EventResponse, *Response, error)
- type Export
- type FeatureUsage
- type FederatedSettings
- type FederatedSettingsConnectedOrganization
- type FederatedSettingsConnectedOrganizations
- type FederatedSettingsIdentityProvider
- type FederatedSettingsIdentityProviders
- type FederatedSettingsOrganizationRoleMapping
- type FederatedSettingsOrganizationRoleMappings
- type FederatedSettingsService
- type FederatedSettingsServiceOp
- func (s *FederatedSettingsServiceOp) CreateRoleMapping(ctx context.Context, federationSettingsID, orgID string, ...) (*FederatedSettingsOrganizationRoleMapping, *Response, error)
- func (s *FederatedSettingsServiceOp) Delete(ctx context.Context, federationSettingsID string) (*Response, error)
- func (s *FederatedSettingsServiceOp) DeleteConnectedOrg(ctx context.Context, federationSettingsID, orgID string) (*Response, error)
- func (s *FederatedSettingsServiceOp) DeleteRoleMapping(ctx context.Context, federationSettingsID, orgID, roleMappingID string) (*Response, error)
- func (s *FederatedSettingsServiceOp) Get(ctx context.Context, orgID string) (*FederatedSettings, *Response, error)
- func (s *FederatedSettingsServiceOp) GetConnectedOrg(ctx context.Context, federationSettingsID, orgID string) (*FederatedSettingsConnectedOrganization, *Response, error)
- func (s *FederatedSettingsServiceOp) GetIdentityProvider(ctx context.Context, federationSettingsID, idpID string) (*FederatedSettingsIdentityProvider, *Response, error)
- func (s *FederatedSettingsServiceOp) GetRoleMapping(ctx context.Context, federationSettingsID, orgID, roleMappingID string) (*FederatedSettingsOrganizationRoleMapping, *Response, error)
- func (s *FederatedSettingsServiceOp) ListConnectedOrgs(ctx context.Context, federationSettingsID string, opts *ListOptions) (*FederatedSettingsConnectedOrganizations, *Response, error)
- func (s *FederatedSettingsServiceOp) ListIdentityProviders(ctx context.Context, federationSettingsID string, opts *ListOptions) ([]FederatedSettingsIdentityProvider, *Response, error)
- func (s *FederatedSettingsServiceOp) ListRoleMappings(ctx context.Context, federationSettingsID, orgID string, opts *ListOptions) (*FederatedSettingsOrganizationRoleMappings, *Response, error)
- func (s *FederatedSettingsServiceOp) UpdateConnectedOrg(ctx context.Context, federationSettingsID, orgID string, ...) (*FederatedSettingsConnectedOrganization, *Response, error)
- func (s *FederatedSettingsServiceOp) UpdateIdentityProvider(ctx context.Context, federationSettingsID, idpID string, ...) (*FederatedSettingsIdentityProvider, *Response, error)
- func (s *FederatedSettingsServiceOp) UpdateRoleMapping(ctx context.Context, federationSettingsID, orgID, roleMappingID string, ...) (*FederatedSettingsOrganizationRoleMapping, *Response, error)
- type GCPEndpoint
- type GZipRequestDoer
- type GlobalCluster
- type GlobalClustersService
- type GlobalClustersServiceOp
- func (s *GlobalClustersServiceOp) AddCustomZoneMappings(ctx context.Context, groupID, clusterName string, ...) (*GlobalCluster, *Response, error)
- func (s *GlobalClustersServiceOp) AddManagedNamespace(ctx context.Context, groupID, clusterName string, ...) (*GlobalCluster, *Response, error)
- func (s *GlobalClustersServiceOp) DeleteCustomZoneMappings(ctx context.Context, groupID, clusterName string) (*GlobalCluster, *Response, error)
- func (s *GlobalClustersServiceOp) DeleteManagedNamespace(ctx context.Context, groupID, clusterName string, ...) (*GlobalCluster, *Response, error)
- func (s *GlobalClustersServiceOp) Get(ctx context.Context, groupID, clusterName string) (*GlobalCluster, *Response, error)
- type GoogleCloudKms
- type Hash
- type IPInfo
- type IPInfoService
- type IPInfoServiceOp
- type IndexConfiguration
- type IndexMapping
- type IndexOptions
- type IndexesService
- type IndexesServiceOp
- type InheritedRole
- type InstanceSize
- type IntegrationsService
- type IntegrationsServiceOp
- func (s *IntegrationsServiceOp) Create(ctx context.Context, projectID, integrationType string, ...) (*ThirdPartyIntegrations, *Response, error)
- func (s *IntegrationsServiceOp) Delete(ctx context.Context, projectID, integrationType string) (*Response, error)
- func (s *IntegrationsServiceOp) Get(ctx context.Context, projectID, integrationType string) (*ThirdPartyIntegration, *Response, error)
- func (s *IntegrationsServiceOp) List(ctx context.Context, projectID string) (*ThirdPartyIntegrations, *Response, error)
- func (s *IntegrationsServiceOp) Replace(ctx context.Context, projectID, integrationType string, ...) (*ThirdPartyIntegrations, *Response, error)
- type InterfaceEndpointConnection
- type InterfaceEndpointConnectionDeprecated
- type Invitation
- type InvitationOptions
- type LDAP
- type LDAPConfiguration
- type LDAPConfigurationsService
- type LDAPConfigurationsServiceOp
- func (s *LDAPConfigurationsServiceOp) Delete(ctx context.Context, groupID string) (*LDAPConfiguration, *Response, error)
- func (s *LDAPConfigurationsServiceOp) Get(ctx context.Context, groupID string) (*LDAPConfiguration, *Response, error)
- func (s *LDAPConfigurationsServiceOp) GetStatus(ctx context.Context, groupID, requestID string) (*LDAPConfiguration, *Response, error)
- func (s *LDAPConfigurationsServiceOp) Save(ctx context.Context, groupID string, configuration *LDAPConfiguration) (*LDAPConfiguration, *Response, error)
- func (s *LDAPConfigurationsServiceOp) Verify(ctx context.Context, groupID string, configuration *LDAP) (*LDAPConfiguration, *Response, error)
- type LDAPRequest
- type LDAPValidation
- type Label
- type Link
- type LinkToken
- type ListDataLakePipelineSnapshotOptions
- type ListOptions
- type LiveMigration
- type LiveMigrationService
- type LiveMigrationServiceOp
- func (s *LiveMigrationServiceOp) Create(ctx context.Context, groupID string, body *LiveMigration) (*LiveMigration, *Response, error)
- func (s *LiveMigrationServiceOp) CreateLinkToken(ctx context.Context, orgID string, body *TokenCreateRequest) (*LinkToken, *Response, error)
- func (s *LiveMigrationServiceOp) CreateValidation(ctx context.Context, groupID string, body *LiveMigration) (*Validation, *Response, error)
- func (s *LiveMigrationServiceOp) DeleteLinkToken(ctx context.Context, orgID string) (*Response, error)
- func (s *LiveMigrationServiceOp) Get(ctx context.Context, groupID, id string) (*LiveMigration, *Response, error)
- func (s *LiveMigrationServiceOp) GetValidationStatus(ctx context.Context, groupID, id string) (*Validation, *Response, error)
- func (s *LiveMigrationServiceOp) Start(ctx context.Context, groupID, id string) (*Validation, *Response, error)
- type LogsService
- type LogsServiceOp
- type MaintenanceWindow
- type MaintenanceWindowsService
- type MaintenanceWindowsServiceOp
- func (s *MaintenanceWindowsServiceOp) AutoDefer(ctx context.Context, groupID string) (*Response, error)
- func (s *MaintenanceWindowsServiceOp) Defer(ctx context.Context, groupID string) (*Response, error)
- func (s *MaintenanceWindowsServiceOp) Get(ctx context.Context, groupID string) (*MaintenanceWindow, *Response, error)
- func (s *MaintenanceWindowsServiceOp) Reset(ctx context.Context, groupID string) (*Response, error)
- func (s *MaintenanceWindowsServiceOp) Update(ctx context.Context, groupID string, updateRequest *MaintenanceWindow) (*Response, error)
- type ManagedNamespace
- type Matcher
- type Measurements
- type Member
- type MetricThreshold
- type MissingShard
- type Namespace
- type NamespaceFilter
- type NamespaceOptions
- type Namespaces
- type Notification
- type OnlineArchive
- type OnlineArchiveCriteria
- type OnlineArchiveSchedule
- type OnlineArchiveService
- type OnlineArchiveServiceOp
- func (s *OnlineArchiveServiceOp) Create(ctx context.Context, projectID, clusterName string, r *OnlineArchive) (*OnlineArchive, *Response, error)
- func (s *OnlineArchiveServiceOp) CreatePrivateLinkEndpoint(ctx context.Context, groupID string, ...) (*PrivateLinkEndpointOnlineArchiveResponse, *Response, error)
- func (s *OnlineArchiveServiceOp) Delete(ctx context.Context, projectID, clusterName, archiveID string) (*Response, error)
- func (s *OnlineArchiveServiceOp) DeletePrivateLinkEndpoint(ctx context.Context, groupID, endpointID string) (*Response, error)
- func (s *OnlineArchiveServiceOp) Get(ctx context.Context, projectID, clusterName, archiveID string) (*OnlineArchive, *Response, error)
- func (s *OnlineArchiveServiceOp) GetPrivateLinkEndpoint(ctx context.Context, groupID, endpointID string) (*PrivateLinkEndpointOnlineArchive, *Response, error)
- func (s *OnlineArchiveServiceOp) List(ctx context.Context, projectID, clusterName string, listOptions *ListOptions) (*OnlineArchives, *Response, error)
- func (s *OnlineArchiveServiceOp) ListPrivateLinkEndpoint(ctx context.Context, groupID string) (*PrivateLinkEndpointOnlineArchiveResponse, *Response, error)
- func (s *OnlineArchiveServiceOp) Update(ctx context.Context, projectID, clusterName, archiveID string, ...) (*OnlineArchive, *Response, error)
- type OnlineArchives
- type Operation
- type Organization
- type Organizations
- type OrganizationsListOptions
- type OrganizationsService
- type OrganizationsServiceOp
- func (s *OrganizationsServiceOp) Create(ctx context.Context, request *CreateOrganizationRequest) (*CreateOrganizationResponse, *Response, error)
- func (s *OrganizationsServiceOp) Delete(ctx context.Context, orgID string) (*Response, error)
- func (s *OrganizationsServiceOp) DeleteInvitation(ctx context.Context, orgID, invitationID string) (*Response, error)
- func (s *OrganizationsServiceOp) Get(ctx context.Context, orgID string) (*Organization, *Response, error)
- func (s *OrganizationsServiceOp) Invitation(ctx context.Context, orgID, invitationID string) (*Invitation, *Response, error)
- func (s *OrganizationsServiceOp) Invitations(ctx context.Context, orgID string, opts *InvitationOptions) ([]*Invitation, *Response, error)
- func (s *OrganizationsServiceOp) InviteUser(ctx context.Context, orgID string, invitation *Invitation) (*Invitation, *Response, error)
- func (s *OrganizationsServiceOp) List(ctx context.Context, opts *OrganizationsListOptions) (*Organizations, *Response, error)
- func (s *OrganizationsServiceOp) Projects(ctx context.Context, orgID string, opts *ProjectsListOptions) (*Projects, *Response, error)
- func (s *OrganizationsServiceOp) Update(ctx context.Context, orgID string, org *Organization) (*Organization, *Response, error)
- func (s *OrganizationsServiceOp) UpdateInvitation(ctx context.Context, orgID string, invitation *Invitation) (*Invitation, *Response, error)
- func (s *OrganizationsServiceOp) UpdateInvitationByID(ctx context.Context, orgID, invitationID string, invitation *Invitation) (*Invitation, *Response, error)
- func (s *OrganizationsServiceOp) Users(ctx context.Context, orgID string, opts *ListOptions) (*AtlasUsersResponse, *Response, error)
- type Part
- type PartitionFields
- type Peer
- type PeersService
- type PeersServiceOp
- func (s *PeersServiceOp) Create(ctx context.Context, groupID string, createRequest *Peer) (*Peer, *Response, error)
- func (s *PeersServiceOp) Delete(ctx context.Context, groupID, peerID string) (*Response, error)
- func (s *PeersServiceOp) Get(ctx context.Context, groupID, peerID string) (*Peer, *Response, error)
- func (s *PeersServiceOp) List(ctx context.Context, groupID string, listOptions *ContainersListOptions) ([]Peer, *Response, error)
- func (s *PeersServiceOp) Update(ctx context.Context, groupID, peerID string, updateRequest *Peer) (*Peer, *Response, error)
- type PemFileInfo
- type PerformanceAdvisorService
- type PerformanceAdvisorServiceOp
- func (s *PerformanceAdvisorServiceOp) DisableManagedSlowOperationThreshold(ctx context.Context, groupID string) (*Response, error)
- func (s *PerformanceAdvisorServiceOp) EnableManagedSlowOperationThreshold(ctx context.Context, groupID string) (*Response, error)
- func (s *PerformanceAdvisorServiceOp) GetNamespaces(ctx context.Context, groupID, processName string, opts *NamespaceOptions) (*Namespaces, *Response, error)
- func (s *PerformanceAdvisorServiceOp) GetSlowQueries(ctx context.Context, groupID, processName string, opts *SlowQueryOptions) (*SlowQueries, *Response, error)
- func (s *PerformanceAdvisorServiceOp) GetSuggestedIndexes(ctx context.Context, groupID, processName string, opts *SuggestedIndexOptions) (*SuggestedIndexes, *Response, error)
- type PlainRequestDoer
- type Policy
- type PolicyItem
- type PrivateEndpoint
- type PrivateEndpointConnection
- type PrivateEndpointConnectionDeprecated
- type PrivateEndpointsService
- type PrivateEndpointsServiceDeprecated
- type PrivateEndpointsServiceOp
- func (s *PrivateEndpointsServiceOp) AddOnePrivateEndpoint(ctx context.Context, groupID, cloudProvider, endpointServiceID string, ...) (*InterfaceEndpointConnection, *Response, error)
- func (s *PrivateEndpointsServiceOp) Create(ctx context.Context, groupID string, createRequest *PrivateEndpointConnection) (*PrivateEndpointConnection, *Response, error)
- func (s *PrivateEndpointsServiceOp) Delete(ctx context.Context, groupID, cloudProvider, endpointServiceID string) (*Response, error)
- func (s *PrivateEndpointsServiceOp) DeleteOnePrivateEndpoint(ctx context.Context, ...) (*Response, error)
- func (s *PrivateEndpointsServiceOp) Get(ctx context.Context, groupID, cloudProvider, endpointServiceID string) (*PrivateEndpointConnection, *Response, error)
- func (s *PrivateEndpointsServiceOp) GetOnePrivateEndpoint(ctx context.Context, ...) (*InterfaceEndpointConnection, *Response, error)
- func (s *PrivateEndpointsServiceOp) GetRegionalizedPrivateEndpointSetting(ctx context.Context, groupID string) (*RegionalizedPrivateEndpointSetting, *Response, error)
- func (s *PrivateEndpointsServiceOp) List(ctx context.Context, groupID, cloudProvider string, listOptions *ListOptions) ([]PrivateEndpointConnection, *Response, error)
- func (s *PrivateEndpointsServiceOp) UpdateRegionalizedPrivateEndpointSetting(ctx context.Context, groupID string, enabled bool) (*RegionalizedPrivateEndpointSetting, *Response, error)
- type PrivateEndpointsServiceOpDeprecated
- func (s *PrivateEndpointsServiceOpDeprecated) AddOneInterfaceEndpoint(ctx context.Context, groupID, privateLinkID, interfaceEndpointID string) (*InterfaceEndpointConnectionDeprecated, *Response, error)
- func (s *PrivateEndpointsServiceOpDeprecated) Create(ctx context.Context, groupID string, ...) (*PrivateEndpointConnectionDeprecated, *Response, error)
- func (s *PrivateEndpointsServiceOpDeprecated) Delete(ctx context.Context, groupID, privateLinkID string) (*Response, error)
- func (s *PrivateEndpointsServiceOpDeprecated) DeleteOneInterfaceEndpoint(ctx context.Context, groupID, privateLinkID, interfaceEndpointID string) (*Response, error)
- func (s *PrivateEndpointsServiceOpDeprecated) Get(ctx context.Context, groupID, privateLinkID string) (*PrivateEndpointConnectionDeprecated, *Response, error)
- func (s *PrivateEndpointsServiceOpDeprecated) GetOneInterfaceEndpoint(ctx context.Context, groupID, privateLinkID, interfaceEndpointID string) (*InterfaceEndpointConnectionDeprecated, *Response, error)
- func (s *PrivateEndpointsServiceOpDeprecated) List(ctx context.Context, groupID string, listOptions *ListOptions) ([]PrivateEndpointConnectionDeprecated, *Response, error)
- type PrivateIPMode
- type PrivateIPModeService
- type PrivateIPModeServiceOp
- type PrivateLinkEndpointDataLake
- type PrivateLinkEndpointDataLakeResponse
- type PrivateLinkEndpointOnlineArchive
- type PrivateLinkEndpointOnlineArchiveResponse
- type Process
- type ProcessArgs
- type ProcessDatabase
- type ProcessDatabaseMeasurements
- type ProcessDatabaseMeasurementsService
- type ProcessDatabaseMeasurementsServiceOp
- type ProcessDatabasesResponse
- type ProcessDatabasesService
- type ProcessDatabasesServiceOp
- type ProcessDisk
- type ProcessDiskMeasurements
- type ProcessDiskMeasurementsService
- type ProcessDiskMeasurementsServiceOp
- type ProcessDisksResponse
- type ProcessDisksService
- type ProcessDisksServiceOp
- type ProcessMeasurementListOptions
- type ProcessMeasurements
- type ProcessMeasurementsService
- type ProcessMeasurementsServiceOp
- type ProcessesListOptions
- type ProcessesService
- type ProcessesServiceOp
- type Project
- type ProjectAPIKeysOp
- func (s *ProjectAPIKeysOp) Assign(ctx context.Context, groupID, keyID string, assignAPIKeyRequest *AssignAPIKey) (*Response, error)
- func (s *ProjectAPIKeysOp) Create(ctx context.Context, groupID string, createRequest *APIKeyInput) (*APIKey, *Response, error)
- func (s *ProjectAPIKeysOp) List(ctx context.Context, groupID string, listOptions *ListOptions) ([]APIKey, *Response, error)
- func (s *ProjectAPIKeysOp) Unassign(ctx context.Context, groupID, keyID string) (*Response, error)
- type ProjectAPIKeysService
- type ProjectIPAccessList
- type ProjectIPAccessListService
- type ProjectIPAccessListServiceOp
- func (s *ProjectIPAccessListServiceOp) Create(ctx context.Context, groupID string, createRequest []*ProjectIPAccessList) (*ProjectIPAccessLists, *Response, error)
- func (s *ProjectIPAccessListServiceOp) Delete(ctx context.Context, groupID, entry string) (*Response, error)
- func (s *ProjectIPAccessListServiceOp) Get(ctx context.Context, groupID, entry string) (*ProjectIPAccessList, *Response, error)
- func (s *ProjectIPAccessListServiceOp) List(ctx context.Context, groupID string, listOptions *ListOptions) (*ProjectIPAccessLists, *Response, error)
- type ProjectIPAccessLists
- type ProjectSettings
- type ProjectTeam
- type ProjectUpdateRequest
- type Projects
- type ProjectsListOptions
- type ProjectsService
- type ProjectsServiceOp
- func (s *ProjectsServiceOp) AddTeamsToProject(ctx context.Context, projectID string, createRequest []*ProjectTeam) (*TeamsAssigned, *Response, error)
- func (s *ProjectsServiceOp) Create(ctx context.Context, createRequest *Project, opts *CreateProjectOptions) (*Project, *Response, error)
- func (s *ProjectsServiceOp) Delete(ctx context.Context, projectID string) (*Response, error)
- func (s *ProjectsServiceOp) DeleteInvitation(ctx context.Context, groupID, invitationID string) (*Response, error)
- func (s *ProjectsServiceOp) GetAllProjects(ctx context.Context, listOptions *ListOptions) (*Projects, *Response, error)
- func (s *ProjectsServiceOp) GetOneProject(ctx context.Context, projectID string) (*Project, *Response, error)
- func (s *ProjectsServiceOp) GetOneProjectByName(ctx context.Context, projectName string) (*Project, *Response, error)
- func (s *ProjectsServiceOp) GetProjectSettings(ctx context.Context, groupID string) (*ProjectSettings, *Response, error)
- func (s *ProjectsServiceOp) GetProjectTeamsAssigned(ctx context.Context, projectID string) (*TeamsAssigned, *Response, error)
- func (s *ProjectsServiceOp) Invitation(ctx context.Context, groupID, invitationID string) (*Invitation, *Response, error)
- func (s *ProjectsServiceOp) Invitations(ctx context.Context, groupID string, opts *InvitationOptions) ([]*Invitation, *Response, error)
- func (s *ProjectsServiceOp) InviteUser(ctx context.Context, groupID string, invitation *Invitation) (*Invitation, *Response, error)
- func (s *ProjectsServiceOp) RemoveUserFromProject(ctx context.Context, projectID, userID string) (*Response, error)
- func (s *ProjectsServiceOp) Update(ctx context.Context, projectID string, updateRequest *ProjectUpdateRequest) (*Project, *Response, error)
- func (s *ProjectsServiceOp) UpdateInvitation(ctx context.Context, groupID string, invitation *Invitation) (*Invitation, *Response, error)
- func (s *ProjectsServiceOp) UpdateInvitationByID(ctx context.Context, groupID, invitationID string, invitation *Invitation) (*Invitation, *Response, error)
- func (s *ProjectsServiceOp) UpdateProjectSettings(ctx context.Context, groupID string, projectSettings *ProjectSettings) (*ProjectSettings, *Response, error)
- type ProviderSettings
- type ReadPreference
- type RegionalizedPrivateEndpointSetting
- type RegionsConfig
- type ReplicationSpec
- type RequestCompletionCallback
- type RequestDoer
- type Resource
- type Response
- type ResponseProcessedCallback
- type ResponseProcessor
- type Result
- type Role
- type RoleAssignments
- type RoleMappings
- type Root
- type RootService
- type RootServiceOp
- type SampleDatasetJob
- type ScheduledPolicyItem
- type Scope
- type SearchAnalyzer
- type SearchIndex
- type SearchService
- type SearchServiceOp
- func (s *SearchServiceOp) CreateIndex(ctx context.Context, projectID, clusterName string, r *SearchIndex) (*SearchIndex, *Response, error)
- func (s *SearchServiceOp) DeleteIndex(ctx context.Context, projectID, clusterName, indexID string) (*Response, error)
- func (s *SearchServiceOp) GetIndex(ctx context.Context, groupID, clusterName, indexID string) (*SearchIndex, *Response, error)
- func (s *SearchServiceOp) ListAnalyzers(ctx context.Context, groupID, clusterName string, listOptions *ListOptions) ([]*SearchAnalyzer, *Response, error)
- func (s *SearchServiceOp) ListIndexes(ctx context.Context, groupID, clusterName, databaseName, collectionName string, ...) ([]*SearchIndex, *Response, error)
- func (s *SearchServiceOp) UpdateAllAnalyzers(ctx context.Context, groupID, clusterName string, analyzers []*SearchAnalyzer) ([]*SearchAnalyzer, *Response, error)
- func (s *SearchServiceOp) UpdateIndex(ctx context.Context, projectID, clusterName, indexID string, r *SearchIndex) (*SearchIndex, *Response, error)
- type ServerlessBackupOptions
- type ServerlessCreateRequestParams
- type ServerlessInstancesService
- type ServerlessInstancesServiceOp
- func (s *ServerlessInstancesServiceOp) Create(ctx context.Context, projectID string, ...) (*Cluster, *Response, error)
- func (s *ServerlessInstancesServiceOp) Delete(ctx context.Context, projectID, instanceName string) (*Response, error)
- func (s *ServerlessInstancesServiceOp) Get(ctx context.Context, projectID, instanceName string) (*Cluster, *Response, error)
- func (s *ServerlessInstancesServiceOp) List(ctx context.Context, projectID string, listOptions *ListOptions) (*ClustersResponse, *Response, error)
- func (s *ServerlessInstancesServiceOp) Update(ctx context.Context, projectID, instanceName string, ...) (*Cluster, *Response, error)
- type ServerlessPrivateEndpointConnection
- type ServerlessPrivateEndpointsService
- type ServerlessPrivateEndpointsServiceOp
- func (s *ServerlessPrivateEndpointsServiceOp) Create(ctx context.Context, groupID, instanceName string, ...) (*ServerlessPrivateEndpointConnection, *Response, error)
- func (s *ServerlessPrivateEndpointsServiceOp) Delete(ctx context.Context, groupID, instanceName, privateEndpointID string) (*Response, error)
- func (s *ServerlessPrivateEndpointsServiceOp) Get(ctx context.Context, groupID, instanceName, privateEndpointID string) (*ServerlessPrivateEndpointConnection, *Response, error)
- func (s *ServerlessPrivateEndpointsServiceOp) List(ctx context.Context, groupID, instanceName string, listOptions *ListOptions) ([]ServerlessPrivateEndpointConnection, *Response, error)
- func (s *ServerlessPrivateEndpointsServiceOp) Update(ctx context.Context, groupID, instanceName, privateEndpointID string, ...) (*ServerlessPrivateEndpointConnection, *Response, error)
- type ServerlessProviderSettings
- type ServerlessUpdateRequestParams
- type ServiceVersion
- type ServiceVersionService
- type ServiceVersionServiceOp
- type Shape
- type SlowQueries
- type SlowQuery
- type SlowQueryOptions
- type SnapshotPart
- type SnapshotReqPathParameters
- type SnapshotTimestamp
- type Source
- type Specs
- type Stats
- type Storage
- type SuggestedIndex
- type SuggestedIndexOptions
- type SuggestedIndexes
- type Tag
- type TagSet
- type Team
- type TeamRoles
- type TeamUpdateRoles
- type TeamUpdateRolesResponse
- type TeamsAssigned
- type TeamsResponse
- type TeamsService
- type TeamsServiceOp
- func (s *TeamsServiceOp) AddUsersToTeam(ctx context.Context, orgID, teamID string, usersID []string) ([]AtlasUser, *Response, error)
- func (s *TeamsServiceOp) Create(ctx context.Context, orgID string, createRequest *Team) (*Team, *Response, error)
- func (s *TeamsServiceOp) Get(ctx context.Context, orgID, teamID string) (*Team, *Response, error)
- func (s *TeamsServiceOp) GetOneTeamByName(ctx context.Context, orgID, teamName string) (*Team, *Response, error)
- func (s *TeamsServiceOp) GetTeamUsersAssigned(ctx context.Context, orgID, teamID string) ([]AtlasUser, *Response, error)
- func (s *TeamsServiceOp) List(ctx context.Context, orgID string, listOptions *ListOptions) ([]Team, *Response, error)
- func (s *TeamsServiceOp) RemoveTeamFromOrganization(ctx context.Context, orgID, teamID string) (*Response, error)
- func (s *TeamsServiceOp) RemoveTeamFromProject(ctx context.Context, groupID, teamID string) (*Response, error)
- func (s *TeamsServiceOp) RemoveUserToTeam(ctx context.Context, orgID, teamID, userID string) (*Response, error)
- func (s *TeamsServiceOp) Rename(ctx context.Context, orgID, teamID, teamName string) (*Team, *Response, error)
- func (s *TeamsServiceOp) UpdateTeamRoles(ctx context.Context, groupID, teamID string, ...) ([]TeamRoles, *Response, error)
- type ThirdPartyIntegration
- type ThirdPartyIntegrations
- type Threshold
- type TokenCreateRequest
- type UserCertificate
- type UserCertificates
- type UserConflicts
- type UserSecurity
- type UserToDNMapping
- type Validation
- type X509AuthDBUsersService
- type X509AuthDBUsersServiceOp
- func (s *X509AuthDBUsersServiceOp) CreateUserCertificate(ctx context.Context, groupID, username string, monthsUntilExpiration int) (*UserCertificate, *Response, error)
- func (s *X509AuthDBUsersServiceOp) DisableCustomerX509(ctx context.Context, groupID string) (*Response, error)
- func (s *X509AuthDBUsersServiceOp) GetCurrentX509Conf(ctx context.Context, groupID string) (*CustomerX509, *Response, error)
- func (s *X509AuthDBUsersServiceOp) GetUserCertificates(ctx context.Context, groupID, username string, listOptions *ListOptions) ([]UserCertificate, *Response, error)
- func (s *X509AuthDBUsersServiceOp) SaveConfiguration(ctx context.Context, groupID string, customerX509 *CustomerX509) (*CustomerX509, *Response, error)
Constants ¶
const ( // CaCentral1 represents the CA_CENTRAL_1 America region for AWS Configuration. CaCentral1 = "CA_CENTRAL_1" // UsEast1 represents the US_EAST_1 America region for AWS Configuration. UsEast1 = "US_EAST_1" // UsEast2 represents the US_EAST_2 America region for AWS Configuration. UsEast2 = "US_EAST_2" // UsWest1 represents the US_WEST_1 America region for AWS Configuration. UsWest1 = "US_WEST_1" // UsWest2 represents the US_WEST_2 America region for AWS Configuration. UsWest2 = "US_WEST_2" // SaEast1 represents the SA_EAST_1 America region for AWS Configuration. SaEast1 = "SA_EAST_1" // ApNortheast1 represents the AP_NORTHEAST_1 Asia region for AWS Configuration. ApNortheast1 = "AP_NORTHEAST_1" // ApNortheast2 represents the AP_NORTHEAST_2 Asia region for AWS Configuration. ApNortheast2 = "AP_NORTHEAST_2" // ApSouth1 represents the AP_SOUTH_1 Asia region for AWS Configuration. ApSouth1 = "AP_SOUTH_1" // ApSoutheast1 represents the AP_SOUTHEAST_1 Asia region for AWS Configuration. ApSoutheast1 = "AP_SOUTHEAST_1" // ApSoutheast2 represents the AP_SOUTHEAST_2 Asia region for AWS Configuration. ApSoutheast2 = "AP_SOUTHEAST_2" // EuCentral1 represents the EU_CENTRAL_1 Europe region for AWS Configuration. EuCentral1 = "EU_CENTRAL_1" // EuWest1 represents the EU_WEST_1 Europe region for AWS Configuration. EuWest1 = "EU_WEST_1" // EuWest2 represents the EU_WEST_2 Europe region for AWS Configuration. EuWest2 = "EU_WEST_2" // EuWest3 represents the EU_WEST_3 Europe region for AWS Configuration. EuWest3 = "EU_WEST_3" // Azure represents `AZURE` where the Azure account credentials reside. Azure = "AZURE" // AzureChina represents `AZURE_CHINA` AZURE where the Azure account credentials reside. AzureChina = "AZURE_CHINA" // AzureGermany represents `AZURE_GERMANY` AZURE where the Azure account credentials reside. AzureGermany = "AZURE_GERMANY" )
const ( // Sunday day of the week when you would like the maintenance window to start. Sunday = 1 // Monday day of the week when you would like the maintenance window to start. Monday = 2 // Tuesday day of the week when you would like the maintenance window to start. Tuesday = 3 // Wednesday day of the week when you would like the maintenance window to start. Wednesday = 4 // Thursday day of the week when you would like the maintenance window to start. Thursday = 5 // Friday day of the week when you would like the maintenance window to start. Friday = 6 // Saturday day of the week when you would like the maintenance window to start. Saturday = 7 )
const ( // CloudURL is default base URL for the services. CloudURL = "https://cloud.mongodb.com/" // Version of the current API client. Should be set to the next version planned to be released. Version = "0.37.0" )
const ( // GroupOwner - Project Owner. GroupOwner = "GROUP_OWNER" // GroupReadOnly - Project Read Only. GroupReadOnly = "GROUP_READ_ONLY" // GroupDataAccessAdmin - Project Data Access Admin. GroupDataAccessAdmin = "GROUP_DATA_ACCESS_ADMIN" // GroupDataAccessReadWrite - Project Data Access Read/Write. GroupDataAccessReadWrite = "GROUP_DATA_ACCESS_READ_WRITE" // GroupDataAccessReadOnly - Project Data Access Read Only. GroupDataAccessReadOnly = "GROUP_DATA_ACCESS_READ_ONLY" )
const (
BackupCompliancePolicyBasePath = "api/atlas/v1.0/groups/%s/backupCompliancePolicy"
)
Variables ¶
var DefaultDiskSizeGB = map[string]map[string]float64{
"TENANT": {
"M2": 2,
"M5": 5,
},
"AWS": {
"M10": 10,
"M20": 20,
"M30": 40,
"M40": 80,
"R40": 80,
"M40_NVME": 380,
"M50": 160,
"R50": 160,
"M50_NVME": 760,
"M60": 320,
"R60": 320,
"M60_NVME": 1600,
"M80": 750,
"R80": 750,
"M80_NVME": 1600,
"M140": 1000,
"M200": 1500,
"R200": 1500,
"M200_NVME": 3100,
"M300": 2000,
"R300": 2000,
"R400": 3000,
"M400_NVME": 4000,
},
"GCP": {
"M10": 10,
"M20": 20,
"M30": 40,
"M40": 80,
"M50": 160,
"M60": 320,
"M80": 750,
"M200": 1500,
"M300": 2200,
},
"AZURE": {
"M10": 32,
"M20": 32,
"M30": 32,
"M40": 128,
"M50": 128,
"M60": 128,
"M80": 256,
"M200": 256,
},
}
DefaultDiskSizeGB represents the Tier and the default disk size for each one it can be use like: DefaultDiskSizeGB["AWS"]["M10"].
Functions ¶
Types ¶
type APIKey ¶
type APIKey struct { ID string `json:"id,omitempty"` Desc string `json:"desc,omitempty"` Roles []AtlasRole `json:"roles,omitempty"` PrivateKey string `json:"privateKey,omitempty"` PublicKey string `json:"publicKey,omitempty"` }
APIKey represents MongoDB API Key.
type APIKeyInput ¶
type APIKeyInput struct { Desc string `json:"desc,omitempty"` Roles []string `json:"roles,omitempty"` }
APIKeyInput represents MongoDB API key input request for Create.
type APIKeysService ¶
type APIKeysService interface { List(context.Context, string, *ListOptions) ([]APIKey, *Response, error) Get(context.Context, string, string) (*APIKey, *Response, error) Create(context.Context, string, *APIKeyInput) (*APIKey, *Response, error) Update(context.Context, string, string, *APIKeyInput) (*APIKey, *Response, error) Delete(context.Context, string, string) (*Response, error) }
APIKeysService is an interface for interfacing with the APIKeys endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/apiKeys/
type APIKeysServiceOp ¶
type APIKeysServiceOp service
APIKeysServiceOp handles communication with the APIKey related methods of the MongoDB Atlas API.
func (*APIKeysServiceOp) Create ¶
func (s *APIKeysServiceOp) Create(ctx context.Context, orgID string, createRequest *APIKeyInput) (*APIKey, *Response, error)
Create an API Key by the {ORG-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/apiKeys-orgs-create-one/
func (*APIKeysServiceOp) Delete ¶
Delete the API Key specified to {API-KEY-ID} from the organization associated to {ORG-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/apiKey-delete-one-apiKey/
func (*APIKeysServiceOp) Get ¶
func (s *APIKeysServiceOp) Get(ctx context.Context, orgID, apiKeyID string) (*APIKey, *Response, error)
Get gets the APIKey specified to {API-KEY-ID} from the organization associated to {ORG-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/apiKeys-orgs-get-one/
func (*APIKeysServiceOp) List ¶
func (s *APIKeysServiceOp) List(ctx context.Context, orgID string, listOptions *ListOptions) ([]APIKey, *Response, error)
List all API-KEY in the organization associated to {ORG-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/apiKeys-orgs-get-all/
func (*APIKeysServiceOp) Update ¶
func (s *APIKeysServiceOp) Update(ctx context.Context, orgID, apiKeyID string, updateRequest *APIKeyInput) (*APIKey, *Response, error)
Update a API Key in the organization associated to {ORG-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/apiKeys-orgs-update-one/
type AWSCustomDNSService ¶
type AWSCustomDNSService interface { Get(context.Context, string) (*AWSCustomDNSSetting, *Response, error) Update(context.Context, string, *AWSCustomDNSSetting) (*AWSCustomDNSSetting, *Response, error) }
AWSCustomDNSService provides access to the custom AWS DNS related functions in the Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/aws-custom-dns/
type AWSCustomDNSServiceOp ¶
type AWSCustomDNSServiceOp service
AWSCustomDNSServiceOp provides an implementation of the CustomAWSDNS interface.
func (*AWSCustomDNSServiceOp) Get ¶
func (s *AWSCustomDNSServiceOp) Get(ctx context.Context, groupID string) (*AWSCustomDNSSetting, *Response, error)
Get retrieves the custom DNS configuration of an Atlas project’s clusters deployed to AWS.
See more: https://docs.atlas.mongodb.com/reference/api/aws-custom-dns-get/
func (*AWSCustomDNSServiceOp) Update ¶
func (s *AWSCustomDNSServiceOp) Update(ctx context.Context, groupID string, r *AWSCustomDNSSetting) (*AWSCustomDNSSetting, *Response, error)
Update updates the custom DNS configuration of an Atlas project’s clusters deployed to AWS.
See more: https://docs.atlas.mongodb.com/reference/api/aws-custom-dns-update/
type AWSCustomDNSSetting ¶
type AWSCustomDNSSetting struct {
Enabled bool `json:"enabled"`
}
AWSCustomDNSSetting represents the dns settings.
type AccessListAPIKey ¶ added in v0.7.0
type AccessListAPIKey struct { CidrBlock string `json:"cidrBlock,omitempty"` // CIDR-notated range of permitted IP addresses. Count int `json:"count,omitempty"` // Total number of requests that have originated from this IP address. Created string `json:"created,omitempty"` // Date this IP address was added to the access list. IPAddress string `json:"ipAddress,omitempty"` // IP address in the API access list. LastUsed string `json:"lastUsed,omitempty"` // Timestamp in ISO 8601 date and time format in UTC when the most recent request that originated from this IP address. This parameter only appears if at least one request has originated from this IP address, and is only updated when a permitted resource is accessed. LastUsedAddress string `json:"lastUsedAddress,omitempty"` // IP address from which the last call to the API was issued. This field only appears if at least one request has originated from this IP address. Links []*Link `json:"links,omitempty"` // An array of documents, representing a link to one or more sub-resources and/or related resources such as list pagination. See Linking for more information.} }
AccessListAPIKey represents a AccessList API key.
type AccessListAPIKeys ¶ added in v0.7.0
type AccessListAPIKeys struct { Results []*AccessListAPIKey `json:"results,omitempty"` // Includes one AccessListAPIKey object for each item detailed in the results array section. Links []*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. }
AccessListAPIKeys represents all AccessList API keys.
type AccessListAPIKeysReq ¶ added in v0.7.0
type AccessListAPIKeysReq struct { IPAddress string `json:"ipAddress,omitempty"` // IP address to be added to the access list for the API key. CidrBlock string `json:"cidrBlock,omitempty"` // CIDR-notation block of IP addresses to be added to the access list for the API key. }
AccessListAPIKeysReq represents the request to the mehtod create.
type AccessListAPIKeysService ¶ added in v0.7.0
type AccessListAPIKeysService interface { List(context.Context, string, string, *ListOptions) (*AccessListAPIKeys, *Response, error) Get(context.Context, string, string, string) (*AccessListAPIKey, *Response, error) Create(context.Context, string, string, []*AccessListAPIKeysReq) (*AccessListAPIKeys, *Response, error) Delete(context.Context, string, string, string) (*Response, error) }
AccessListAPIKeysService is an interface for interfacing with the AccessList API Keys endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/apiKeys#organization-api-key-access-list-endpoints
type AccessListAPIKeysServiceOp ¶ added in v0.7.0
type AccessListAPIKeysServiceOp service
AccessListAPIKeysServiceOp handles communication with the AccessList API keys related methods of the MongoDB Atlas API.
func (*AccessListAPIKeysServiceOp) Create ¶ added in v0.7.0
func (s *AccessListAPIKeysServiceOp) Create(ctx context.Context, orgID, apiKeyID string, createRequest []*AccessListAPIKeysReq) (*AccessListAPIKeys, *Response, error)
Create creates one or more new access list entries for the specified API Key.
See more: https://docs.atlas.mongodb.com/reference/api/api-access-list/create-api-access-entries/
func (*AccessListAPIKeysServiceOp) Delete ¶ added in v0.7.0
func (s *AccessListAPIKeysServiceOp) Delete(ctx context.Context, orgID, apiKeyID, ipAddress string) (*Response, error)
Delete deletes the AccessList API keys.
See more: https://docs.atlas.mongodb.com/reference/api/api-access-list/delete-one-api-access-entry/
func (*AccessListAPIKeysServiceOp) Get ¶ added in v0.7.0
func (s *AccessListAPIKeysServiceOp) Get(ctx context.Context, orgID, apiKeyID, ipAddress string) (*AccessListAPIKey, *Response, error)
Get retrieves information on a single API Key access list entry using the unique identifier for the API Key and desired permitted address.
See more: https://docs.atlas.mongodb.com/reference/api/api-access-list/get-one-api-access-entry/
func (*AccessListAPIKeysServiceOp) List ¶ added in v0.7.0
func (s *AccessListAPIKeysServiceOp) List(ctx context.Context, orgID, apiKeyID string, listOptions *ListOptions) (*AccessListAPIKeys, *Response, error)
List gets all AccessList API keys.
See more: https://docs.atlas.mongodb.com/reference/api/api-access-list/get-all-api-access-entries/
type AccessLogOptions ¶ added in v0.12.0
type AccessLogOptions struct { Start string `url:"start,omitempty"` // Start is the timestamp in the number of milliseconds that have elapsed since the UNIX epoch for the first entry that Atlas returns from the database access logs. End string `url:"end,omitempty"` // End is the timestamp in the number of milliseconds that have elapsed since the UNIX epoch for the last entry that Atlas returns from the database access logs. NLogs int `url:"nLogs,omitempty"` // NLogs is the maximum number of log entries to return. Atlas accepts values between 0 and 20000, inclusive. IPAddress string `url:"ipAddress,omitempty"` // IPAddress is the single IP address that attempted to authenticate with the database. Atlas filters the returned logs to include documents with only this IP address. AuthResult *bool `url:"authResult,omitempty"` // AuthResult indicates whether to return either successful or failed authentication attempts. When set to true, Atlas filters the log to return only successful authentication attempts. When set to false, Atlas filters the log to return only failed authentication attempts. }
AccessLogOptions represents the query options of AccessTrackingService.List.
type AccessLogSettings ¶ added in v0.12.0
type AccessLogSettings struct {
AccessLogs []*AccessLogs `json:"accessLogs,omitempty"` // AccessLogs contains the authentication attempts made against the cluster.
}
AccessLogSettings represents database access history settings.
type AccessLogs ¶ added in v0.12.0
type AccessLogs struct { GroupID string `json:"groupId,omitempty"` // GroupID is the unique identifier for the project. Hostname string `json:"hostname,omitempty"` // Hostname is the hostname of the target node that received the authentication attempt. ClusterName string `json:"clusterName,omitempty"` // ClusterName is the name associated with the cluster. IPAddress string `json:"ipAddress,omitempty"` // IPAddress is the IP address that the authentication attempt originated from. AuthResult *bool `json:"authResult,omitempty"` // AuthResult is the result of the authentication attempt. Returns true if the authentication request was successful. Returns false if the authentication request resulted in failure. LogLine string `json:"logLine,omitempty"` // LogLine is the text of the server log concerning the authentication attempt. Timestamp string `json:"timestamp,omitempty"` // Timestamp is the UTC timestamp of the authentication attempt. Username string `json:"username,omitempty"` // Username is the username that attempted to authenticate. FailureReason string `json:"failureReason,omitempty"` // FailureReason is the reason that the request failed to authenticate. Returns null if the authentication request was successful. AuthSource string `json:"authSource,omitempty"` // AuthSource is the database that the request attempted to authenticate against. Returns admin if the authentication source for the user is SCRAM-SHA. Returns $external if the authentication source for the user is LDAP. }
AccessLogs represents authentication attempts made against the cluster.
type AccessTrackingService ¶ added in v0.12.0
type AccessTrackingService interface { ListByCluster(context.Context, string, string, *AccessLogOptions) (*AccessLogSettings, *Response, error) ListByHostname(context.Context, string, string, *AccessLogOptions) (*AccessLogSettings, *Response, error) }
AccessTrackingService is an interface for interfacing with the Access Tracking endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/access-tracking/
type AccessTrackingServiceOp ¶ added in v0.12.0
type AccessTrackingServiceOp service
AccessTrackingServiceOp handles communication with the AccessTrackingService related methods of the MongoDB Atlas API.
func (*AccessTrackingServiceOp) ListByCluster ¶ added in v0.12.0
func (s *AccessTrackingServiceOp) ListByCluster(ctx context.Context, groupID, clusterName string, opts *AccessLogOptions) (*AccessLogSettings, *Response, error)
ListByCluster retrieves the access logs of a cluster by hostname.
See more: https://docs.atlas.mongodb.com/reference/api/access-tracking-get-database-history-hostname/
func (*AccessTrackingServiceOp) ListByHostname ¶ added in v0.12.0
func (s *AccessTrackingServiceOp) ListByHostname(ctx context.Context, groupID, hostname string, opts *AccessLogOptions) (*AccessLogSettings, *Response, error)
ListByHostname retrieves the access logs of a cluster by hostname.
See more: https://docs.atlas.mongodb.com/reference/api/access-tracking-get-database-history-hostname/
type AcknowledgeRequest ¶
type AcknowledgeRequest struct { AcknowledgedUntil *string `json:"acknowledgedUntil,omitempty"` // The date through which the alert has been acknowledged. Will not be present if the alert has never been acknowledged. AcknowledgementComment string `json:"acknowledgementComment,omitempty"` // The comment left by the user who acknowledged the alert. Will not be present if the alert has never been acknowledged. }
AcknowledgeRequest contains the request Body Parameters.
type Action ¶
type Action struct { Action string `json:"action,omitempty"` Resources []Resource `json:"resources,omitempty"` }
An Action describes the operation the role will include, for a specific set of Resources.
type AdvancedAutoScaling ¶ added in v0.9.0
type AdvancedCluster ¶ added in v0.9.0
type AdvancedCluster struct { AcceptDataRisksAndForceReplicaSetReconfig string `json:"acceptDataRisksAndForceReplicaSetReconfig,omitempty"` BackupEnabled *bool `json:"backupEnabled,omitempty"` BiConnector *BiConnector `json:"biConnector,omitempty"` ClusterType string `json:"clusterType,omitempty"` ConnectionStrings *ConnectionStrings `json:"connectionStrings,omitempty"` DiskSizeGB *float64 `json:"diskSizeGB,omitempty"` EncryptionAtRestProvider string `json:"encryptionAtRestProvider,omitempty"` GroupID string `json:"groupId,omitempty"` ID string `json:"id,omitempty"` Labels []Label `json:"labels,omitempty"` MongoDBMajorVersion string `json:"mongoDBMajorVersion,omitempty"` MongoDBVersion string `json:"mongoDBVersion,omitempty"` Name string `json:"name,omitempty"` Paused *bool `json:"paused,omitempty"` PitEnabled *bool `json:"pitEnabled,omitempty"` StateName string `json:"stateName,omitempty"` ReplicationSpecs []*AdvancedReplicationSpec `json:"replicationSpecs,omitempty"` CreateDate string `json:"createDate,omitempty"` RootCertType string `json:"rootCertType,omitempty"` VersionReleaseSystem string `json:"versionReleaseSystem,omitempty"` TerminationProtectionEnabled *bool `json:"terminationProtectionEnabled,omitempty"` Tags []*Tag `json:"tags,omitempty"` }
AdvancedCluster represents MongoDB cluster.
type AdvancedClustersResponse ¶ added in v0.9.0
type AdvancedClustersResponse struct { Links []*Link `json:"links,omitempty"` Results []*AdvancedCluster `json:"results,omitempty"` TotalCount int `json:"totalCount,omitempty"` }
AdvancedClustersResponse is the response from the AdvancedClustersService.List.
type AdvancedClustersService ¶ added in v0.9.0
type AdvancedClustersService interface { List(ctx context.Context, groupID string, options *ListOptions) (*AdvancedClustersResponse, *Response, error) Get(ctx context.Context, groupID, clusterName string) (*AdvancedCluster, *Response, error) Create(ctx context.Context, groupID string, cluster *AdvancedCluster) (*AdvancedCluster, *Response, error) Update(ctx context.Context, groupID, clusterName string, cluster *AdvancedCluster) (*AdvancedCluster, *Response, error) Delete(ctx context.Context, groupID, clusterName string, options *DeleteAdvanceClusterOptions) (*Response, error) TestFailover(ctx context.Context, groupID, clusterName string) (*Response, error) }
AdvancedClustersService is an interface for interfacing with the Clusters (Advanced) endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/clusters-advanced/
type AdvancedClustersServiceOp ¶ added in v0.9.0
type AdvancedClustersServiceOp service
AdvancedClustersServiceOp handles communication with the Cluster (Advanced) related methods of the MongoDB Atlas API.
func (*AdvancedClustersServiceOp) Create ¶ added in v0.9.0
func (s *AdvancedClustersServiceOp) Create(ctx context.Context, groupID string, createRequest *AdvancedCluster) (*AdvancedCluster, *Response, error)
Create adds a cluster to the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/cluster-advanced/create-one-cluster-advanced/
func (*AdvancedClustersServiceOp) Delete ¶ added in v0.9.0
func (s *AdvancedClustersServiceOp) Delete(ctx context.Context, groupID, clusterName string, options *DeleteAdvanceClusterOptions) (*Response, error)
Delete the cluster specified to {CLUSTER-NAME} from the project associated to {GROUP-ID}.
func (*AdvancedClustersServiceOp) Get ¶ added in v0.9.0
func (s *AdvancedClustersServiceOp) Get(ctx context.Context, groupID, clusterName string) (*AdvancedCluster, *Response, error)
Get gets the cluster specified to {ClUSTER-NAME} from the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/cluster-advanced/get-one-cluster-advanced/
func (*AdvancedClustersServiceOp) List ¶ added in v0.9.0
func (s *AdvancedClustersServiceOp) List(ctx context.Context, groupID string, listOptions *ListOptions) (*AdvancedClustersResponse, *Response, error)
List all clusters in the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/cluster-advanced/get-all-cluster-advanced/
func (*AdvancedClustersServiceOp) TestFailover ¶ added in v0.22.0
func (s *AdvancedClustersServiceOp) TestFailover(ctx context.Context, groupID, clusterName string) (*Response, error)
TestFailover starts a failover test for the specified cluster in the specified project
func (*AdvancedClustersServiceOp) Update ¶ added in v0.9.0
func (s *AdvancedClustersServiceOp) Update(ctx context.Context, groupID, clusterName string, updateRequest *AdvancedCluster) (*AdvancedCluster, *Response, error)
Update a cluster in the project associated to {GROUP-ID}
See more: https://docs.atlas.mongodb.com/reference/api/cluster-advanced/modify-one-cluster-advanced/
type AdvancedRegionConfig ¶ added in v0.9.0
type AdvancedRegionConfig struct { AnalyticsAutoScaling *AdvancedAutoScaling `json:"analyticsAutoScaling,omitempty"` AnalyticsSpecs *Specs `json:"analyticsSpecs,omitempty"` ElectableSpecs *Specs `json:"electableSpecs,omitempty"` ReadOnlySpecs *Specs `json:"readOnlySpecs,omitempty"` AutoScaling *AdvancedAutoScaling `json:"autoScaling,omitempty"` BackingProviderName string `json:"backingProviderName,omitempty"` Priority *int `json:"priority,omitempty"` ProviderName string `json:"providerName,omitempty"` RegionName string `json:"regionName,omitempty"` }
type AdvancedReplicationSpec ¶ added in v0.10.0
type AdvancedReplicationSpec struct { NumShards int `json:"numShards,omitempty"` ID string `json:"id,omitempty"` ZoneName string `json:"zoneName,omitempty"` RegionConfigs []*AdvancedRegionConfig `json:"regionConfigs,omitempty"` }
type Alert ¶
type Alert struct { ID string `json:"id,omitempty"` // Unique identifier. GroupID string `json:"groupId,omitempty"` // Unique identifier of the project that owns this alert configuration. AlertConfigID string `json:"alertConfigId,omitempty"` // ID of the alert configuration that triggered this alert. EventTypeName string `json:"eventTypeName,omitempty"` // The type of event that will trigger an alert. Created string `json:"created,omitempty"` // Timestamp in ISO 8601 date and time format in UTC when this alert was opened. Updated string `json:"updated,omitempty"` // Timestamp in ISO 8601 date and time format in UTC when this alert was last updated. Enabled *bool `json:"enabled,omitempty"` // If omitted, the configuration is disabled. Resolved string `json:"resolved,omitempty"` // When the alert was closed. Only present if the status is CLOSED. Status string `json:"status,omitempty"` // The current state of the alert. Possible values are: TRACKING, OPEN, CLOSED, CANCELLED LastNotified string `json:"lastNotified,omitempty"` // When the last notification was sent for this alert. Only present if notifications have been sent. AcknowledgedUntil string `json:"acknowledgedUntil,omitempty"` // The date through which the alert has been acknowledged. Will not be present if the alert has never been acknowledged. AcknowledgementComment string `json:"acknowledgementComment,omitempty"` // The comment left by the user who acknowledged the alert. Will not be present if the alert has never been acknowledged. AcknowledgingUsername string `json:"acknowledgingUsername,omitempty"` // The username of the user who acknowledged the alert. Will not be present if the alert has never been acknowledged. HostnameAndPort string `json:"hostnameAndPort,omitempty"` // The hostname and port of each host to which the alert applies. Only present for alerts of type HOST, HOST_METRIC, and REPLICA_SET. MetricName string `json:"metricName,omitempty"` // The name of the measurement whose value went outside the threshold. Only present if eventTypeName is set to OUTSIDE_METRIC_THRESHOLD. CurrentValue *CurrentValue `json:"currentValue,omitempty"` // CurrentValue represents current value of the metric that triggered the alert. Only present for alerts of type HOST_METRIC. ReplicaSetName string `json:"replicaSetName,omitempty"` // Name of the replica set. Only present for alerts of type HOST, HOST_METRIC, BACKUP, and REPLICA_SET. ClusterName string `json:"clusterName,omitempty"` // The name the cluster to which this alert applies. Only present for alerts of type BACKUP, REPLICA_SET, and CLUSTER. Matchers []Matcher `json:"matchers,omitempty"` // You can filter using the matchers array only when the EventTypeName specifies an event for a host, replica set, or sharded cluster. MetricThreshold *MetricThreshold `json:"metricThreshold,omitempty"` // MetricThreshold causes an alert to be triggered. Notifications []Notification `json:"notifications,omitempty"` // Notifications are sending when an alert condition is detected. }
Alert represents MongoDB Alert.
type AlertConfiguration ¶
type AlertConfiguration struct { ID string `json:"id,omitempty"` // Unique identifier. GroupID string `json:"groupId,omitempty"` // Unique identifier of the project that owns this alert configuration. AlertConfigID string `json:"alertConfigId,omitempty"` // ID of the alert configuration that triggered this alert. EventTypeName string `json:"eventTypeName,omitempty"` // The type of event that will trigger an alert. Created string `json:"created,omitempty"` // Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created. Status string `json:"status,omitempty"` // The current state of the alert. Possible values are: TRACKING, OPEN, CLOSED, CANCELLED AcknowledgedUntil string `json:"acknowledgedUntil,omitempty"` // The date through which the alert has been acknowledged. Will not be present if the alert has never been acknowledged. AcknowledgementComment string `json:"acknowledgementComment,omitempty"` // The comment left by the user who acknowledged the alert. Will not be present if the alert has never been acknowledged. AcknowledgingUsername string `json:"acknowledgingUsername,omitempty"` // The username of the user who acknowledged the alert. Will not be present if the alert has never been acknowledged. Updated string `json:"updated,omitempty"` // Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated. Resolved string `json:"resolved,omitempty"` // When the alert was closed. Only present if the status is CLOSED. LastNotified string `json:"lastNotified,omitempty"` // When the last notification was sent for this alert. Only present if notifications have been sent. HostnameAndPort string `json:"hostnameAndPort,omitempty"` // The hostname and port of each host to which the alert applies. Only present for alerts of type HOST, HOST_METRIC, and REPLICA_SET. HostID string `json:"hostId,omitempty"` // ID of the host to which the metric pertains. Only present for alerts of type HOST, HOST_METRIC, and REPLICA_SET. ReplicaSetName string `json:"replicaSetName,omitempty"` // Name of the replica set. Only present for alerts of type HOST, HOST_METRIC, BACKUP, and REPLICA_SET. MetricName string `json:"metricName,omitempty"` // The name of the measurement whose value went outside the threshold. Only present if eventTypeName is set to OUTSIDE_METRIC_THRESHOLD. Enabled *bool `json:"enabled,omitempty"` // If omitted, the configuration is disabled. ClusterID string `json:"clusterId,omitempty"` // The ID of the cluster to which this alert applies. Only present for alerts of type BACKUP, REPLICA_SET, and CLUSTER. ClusterName string `json:"clusterName,omitempty"` // The name the cluster to which this alert applies. Only present for alerts of type BACKUP, REPLICA_SET, and CLUSTER. SourceTypeName string `json:"sourceTypeName,omitempty"` // For alerts of the type BACKUP, the type of server being backed up. CurrentValue *CurrentValue `json:"currentValue,omitempty"` // CurrentValue represents current value of the metric that triggered the alert. Only present for alerts of type HOST_METRIC. Matchers []Matcher `json:"matchers,omitempty"` // You can filter using the matchers array only when the EventTypeName specifies an event for a host, replica set, or sharded cluster. MetricThreshold *MetricThreshold `json:"metricThreshold,omitempty"` // MetricThreshold causes an alert to be triggered. Threshold *Threshold `json:"threshold,omitempty"` // Threshold causes an alert to be triggered. Notifications []Notification `json:"notifications,omitempty"` // Notifications are sending when an alert condition is detected. }
AlertConfiguration represents MongoDB Alert Configuration.
type AlertConfigurationsResponse ¶
type AlertConfigurationsResponse struct { Links []*Link `json:"links"` Results []AlertConfiguration `json:"results"` TotalCount int `json:"totalCount"` }
AlertConfigurationsResponse is the response from the AlertConfigurationsService.List.
type AlertConfigurationsService ¶
type AlertConfigurationsService interface { Create(context.Context, string, *AlertConfiguration) (*AlertConfiguration, *Response, error) EnableAnAlertConfig(context.Context, string, string, *bool) (*AlertConfiguration, *Response, error) GetAnAlertConfig(context.Context, string, string) (*AlertConfiguration, *Response, error) GetOpenAlertsConfig(context.Context, string, string) ([]AlertConfiguration, *Response, error) List(context.Context, string, *ListOptions) ([]AlertConfiguration, *Response, error) ListMatcherFields(ctx context.Context) ([]string, *Response, error) Update(context.Context, string, string, *AlertConfiguration) (*AlertConfiguration, *Response, error) Delete(context.Context, string, string) (*Response, error) }
AlertConfigurationsService provides access to the alert configuration related functions in the Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations
type AlertConfigurationsServiceOp ¶
type AlertConfigurationsServiceOp service
AlertConfigurationsServiceOp handles communication with the AlertConfiguration related methods of the MongoDB Atlas API.
func (*AlertConfigurationsServiceOp) Create ¶
func (s *AlertConfigurationsServiceOp) Create(ctx context.Context, groupID string, createReq *AlertConfiguration) (*AlertConfiguration, *Response, error)
Create creates an alert configuration for the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations-create-config/
func (*AlertConfigurationsServiceOp) Delete ¶
func (s *AlertConfigurationsServiceOp) Delete(ctx context.Context, groupID, alertConfigID string) (*Response, error)
Delete the alert configuration specified to {ALERT-CONFIG-ID} for the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations-delete-config/
func (*AlertConfigurationsServiceOp) EnableAnAlertConfig ¶
func (s *AlertConfigurationsServiceOp) EnableAnAlertConfig(ctx context.Context, groupID, alertConfigID string, enabled *bool) (*AlertConfiguration, *Response, error)
EnableAnAlertConfig Enables/disables the alert configuration specified to {ALERT-CONFIG-ID} for the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations-enable-disable-config/
func (*AlertConfigurationsServiceOp) GetAnAlertConfig ¶
func (s *AlertConfigurationsServiceOp) GetAnAlertConfig(ctx context.Context, groupID, alertConfigID string) (*AlertConfiguration, *Response, error)
GetAnAlertConfig gets the alert configuration specified to {ALERT-CONFIG-ID} for the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations-get-config/
func (*AlertConfigurationsServiceOp) GetOpenAlertsConfig ¶
func (s *AlertConfigurationsServiceOp) GetOpenAlertsConfig(ctx context.Context, groupID, alertConfigID string) ([]AlertConfiguration, *Response, error)
GetOpenAlertsConfig gets all open alerts for the alert configuration specified to {ALERT-CONFIG-ID} for the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations-get-open-alerts/
func (*AlertConfigurationsServiceOp) List ¶
func (s *AlertConfigurationsServiceOp) List(ctx context.Context, groupID string, listOptions *ListOptions) ([]AlertConfiguration, *Response, error)
List gets all alert configurations for the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations-get-all-configs/
func (*AlertConfigurationsServiceOp) ListMatcherFields ¶
func (s *AlertConfigurationsServiceOp) ListMatcherFields(ctx context.Context) ([]string, *Response, error)
ListMatcherFields gets all field names that the matchers.fieldName parameter accepts when you create or update an Alert Configuration.
See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations-get-matchers-field-names/
func (*AlertConfigurationsServiceOp) Update ¶
func (s *AlertConfigurationsServiceOp) Update(ctx context.Context, groupID, alertConfigID string, updateReq *AlertConfiguration) (*AlertConfiguration, *Response, error)
Update the alert configuration specified to {ALERT-CONFIG-ID} for the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/alert-configurations-update-config/
type AlertsListOptions ¶
type AlertsListOptions struct { Status string `url:"status,omitempty"` ListOptions }
AlertsListOptions contains the list of options for Alerts.
type AlertsResponse ¶
type AlertsResponse struct { Links []*Link `json:"links"` Results []Alert `json:"results"` TotalCount int `json:"totalCount"` }
AlertsResponse is the response from the AlertService.List.
type AlertsService ¶
type AlertsService interface { List(context.Context, string, *AlertsListOptions) (*AlertsResponse, *Response, error) Get(context.Context, string, string) (*Alert, *Response, error) Acknowledge(context.Context, string, string, *AcknowledgeRequest) (*Alert, *Response, error) }
AlertsService is an interface for interfacing with the Alerts endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/alerts/
type AlertsServiceOp ¶
type AlertsServiceOp service
AlertsServiceOp provides an implementation of AlertsService.
func (*AlertsServiceOp) Acknowledge ¶
func (s *AlertsServiceOp) Acknowledge(ctx context.Context, groupID, alertID string, params *AcknowledgeRequest) (*Alert, *Response, error)
Acknowledge allows to acknowledge an alert.
See more: https://docs.atlas.mongodb.com/reference/api/alerts-acknowledge-alert/
func (*AlertsServiceOp) Get ¶
func (s *AlertsServiceOp) Get(ctx context.Context, groupID, alertID string) (*Alert, *Response, error)
Get gets the alert specified to {ALERT-ID} for the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/alerts-get-alert/
func (*AlertsServiceOp) List ¶
func (s *AlertsServiceOp) List(ctx context.Context, groupID string, listOptions *AlertsListOptions) (*AlertsResponse, *Response, error)
List gets all alert for the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/alerts-get-all-alerts/
type ArgError ¶
type ArgError struct {
// contains filtered or unexported fields
}
ArgError is an error that represents an error with an input to godo. It identifies the argument and the cause (if possible).
func NewArgError ¶
NewArgError creates an InputError.
type AssignAPIKey ¶
type AssignAPIKey struct {
Roles []string `json:"roles"`
}
AssignAPIKey contains the roles to be assigned to an Organization API key into a Project.
type AssociatedOrgs ¶ added in v0.17.0
type AssociatedOrgs struct { DomainAllowList []string `json:"domainAllowList,omitempty"` DomainRestrictionEnabled *bool `json:"domainRestrictionEnabled,omitempty"` IdentityProviderID string `json:"identityProviderId,omitempty"` OrgID string `json:"orgId,omitempty"` PostAuthRoleGrants []string `json:"postAuthRoleGrants,omitempty"` RoleMappings []*RoleMappings `json:"roleMappings,omitempty"` UserConflicts *UserConflicts `json:"userConflicts,omitempty"` }
type AtlasRole ¶
type AtlasRole struct { GroupID string `json:"groupId,omitempty"` OrgID string `json:"orgId,omitempty"` RoleName string `json:"roleName,omitempty"` }
AtlasRole represents a role name of API key.
type AtlasUser ¶
type AtlasUser struct { EmailAddress string `json:"emailAddress"` FirstName string `json:"firstName"` ID string `json:"id,omitempty"` LastName string `json:"lastName"` Roles []AtlasRole `json:"roles"` TeamIds []string `json:"teamIds,omitempty"` Username string `json:"username"` MobileNumber string `json:"mobileNumber"` Password string `json:"password"` Country string `json:"country"` }
AtlasUser represents a user.
type AtlasUserAssigned ¶
type AtlasUserAssigned struct { Links []*Link `json:"links"` Results []AtlasUser `json:"results"` TotalCount int `json:"totalCount"` }
AtlasUserAssigned represents the user assigned to the project.
type AtlasUsersResponse ¶
type AtlasUsersResponse struct { Links []*Link `json:"links"` Results []AtlasUser `json:"results"` TotalCount int `json:"totalCount"` }
AtlasUsersResponse represents a array of users.
type AtlasUsersService ¶
type AtlasUsersService interface { List(context.Context, string, *ListOptions) ([]AtlasUser, *Response, error) Get(context.Context, string) (*AtlasUser, *Response, error) GetByName(context.Context, string) (*AtlasUser, *Response, error) Create(context.Context, *AtlasUser) (*AtlasUser, *Response, error) }
AtlasUsersService is an interface for interfacing with the AtlasUsers endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/users/
type AtlasUsersServiceOp ¶
type AtlasUsersServiceOp service
AtlasUsersServiceOp handles communication with the AtlasUsers related methods of the MongoDB Atlas API.
func (*AtlasUsersServiceOp) Create ¶
func (s *AtlasUsersServiceOp) Create(ctx context.Context, createRequest *AtlasUser) (*AtlasUser, *Response, error)
Create creates an Atlas User.
See more: https://docs.atlas.mongodb.com/reference/api/user-create/
func (*AtlasUsersServiceOp) Get ¶
func (s *AtlasUsersServiceOp) Get(ctx context.Context, userID string) (*AtlasUser, *Response, error)
Get gets a single atlas user.
See more: https://docs.atlas.mongodb.com/reference/api/user-get-by-id/
func (*AtlasUsersServiceOp) GetByName ¶
func (s *AtlasUsersServiceOp) GetByName(ctx context.Context, username string) (*AtlasUser, *Response, error)
GetByName gets a single atlas user by name.
See more: https://docs.atlas.mongodb.com/reference/api/user-get-one-by-name/
func (*AtlasUsersServiceOp) List ¶
func (s *AtlasUsersServiceOp) List(ctx context.Context, orgID string, listOptions *ListOptions) ([]AtlasUser, *Response, error)
List gets all users.
See more: https://docs.atlas.mongodb.com/reference/api/user-get-all/
type Auditing ¶
type Auditing struct { AuditAuthorizationSuccess *bool `json:"auditAuthorizationSuccess,omitempty"` // Indicates whether the auditing system captures successful authentication attempts for audit filters using the "atype" : "authCheck" auditing event. For more information, see auditAuthorizationSuccess AuditFilter string `json:"auditFilter,omitempty"` // JSON-formatted audit filter used by the project ConfigurationType string `json:"configurationType,omitempty"` // Denotes the configuration method for the audit filter. Possible values are: NONE - auditing not configured for the project.m FILTER_BUILDER - auditing configured via Atlas UI filter builderm FILTER_JSON - auditing configured via Atlas custom filter or API Enabled *bool `json:"enabled,omitempty"` // Denotes whether or not the project associated with the {GROUP-ID} has database auditing enabled. }
Auditing represents MongoDB Maintenance Windows.
type AuditingsService ¶
type AuditingsService interface { Get(context.Context, string) (*Auditing, *Response, error) Configure(context.Context, string, *Auditing) (*Auditing, *Response, error) }
AuditingsService is an interface for interfacing with the Auditing endpoints of the MongoDB Atlas API. See more: https://docs.atlas.mongodb.com/reference/api/auditing/
type AuditingsServiceOp ¶
type AuditingsServiceOp service
AuditingsServiceOp handles communication with the Auditings related methods of the MongoDB Atlas API.
func (*AuditingsServiceOp) Configure ¶
func (s *AuditingsServiceOp) Configure(ctx context.Context, groupID string, configRequest *Auditing) (*Auditing, *Response, error)
Configure the audit configuration for the project associated with {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/auditing-set-auditLog/
func (*AuditingsServiceOp) Get ¶
Get audit configuration for the project associated with {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/auditing-get-auditLog/
type AutoScaling ¶
type AutoScaling struct { AutoIndexingEnabled *bool `json:"autoIndexingEnabled,omitempty"` // Autopilot mode is only available if you are enrolled in the Auto Pilot Early Access program. Compute *Compute `json:"compute,omitempty"` DiskGBEnabled *bool `json:"diskGBEnabled,omitempty"` }
AutoScaling configures your cluster to automatically scale its storage.
type AvailableRegion ¶ added in v0.8.0
type AvailableRegion struct { Name string `json:"name,omitempty"` Default bool `json:"default,omitempty"` }
AvailableRegion represents an available region of the MongoDB Atlas API.
type AwsCloudProviderConfig ¶
type AwsCloudProviderConfig struct { ExternalID string `json:"externalId,omitempty"` IAMAssumedRoleARN string `json:"iamAssumedRoleARN,omitempty"` IAMUserARN string `json:"iamUserARN,omitempty"` RoleID string `json:"roleId,omitempty"` TestS3Bucket string `json:"testS3Bucket,omitempty"` }
AwsCloudProviderConfig is the data lake configuration for AWS.
type AwsKms ¶
type AwsKms struct { Enabled *bool `json:"enabled,omitempty"` // Specifies whether Encryption at Rest is enabled for an Atlas project, To disable Encryption at Rest, pass only this parameter with a value of false, When you disable Encryption at Rest, Atlas also removes the configuration details. AccessKeyID string `json:"accessKeyID,omitempty"` // The IAM access key ID with permissions to access the customer master key specified by customerMasterKeyID. SecretAccessKey string `json:"secretAccessKey,omitempty"` // The IAM secret access key with permissions to access the customer master key specified by customerMasterKeyID. CustomerMasterKeyID string `json:"customerMasterKeyID,omitempty"` // The AWS customer master key used to encrypt and decrypt the MongoDB master keys. Region string `json:"region,omitempty"` // The AWS region in which the AWS customer master key exists: CA_CENTRAL_1, US_EAST_1, US_EAST_2, US_WEST_1, US_WEST_2, SA_EAST_1 RoleID string `json:"roleId,omitempty"` // ID of an AWS IAM role authorized to manage an AWS customer master key. Valid *bool `json:"valid,omitempty"` // Specifies whether the encryption key set for the provider is valid and may be used to encrypt and decrypt data. }
AwsKms specifies AWS KMS configuration details and whether Encryption at Rest is enabled for an Atlas project.
type AzureKeyVault ¶
type AzureKeyVault struct { Enabled *bool `json:"enabled,omitempty"` // Specifies whether Encryption at Rest is enabled for an Atlas project. To disable Encryption at Rest, pass only this parameter with a value of false. When you disable Encryption at Rest, Atlas also removes the configuration details. ClientID string `json:"clientID,omitempty"` // The Client ID, also known as the application ID, for an Azure application associated with the Azure AD tenant. AzureEnvironment string `json:"azureEnvironment,omitempty"` // The Azure environment where the Azure account credentials reside. Valid values are the following: AZURE, AZURE_CHINA, AZURE_GERMANY SubscriptionID string `json:"subscriptionID,omitempty"` // The unique identifier associated with an Azure subscription. ResourceGroupName string `json:"resourceGroupName,omitempty"` // The name of the Azure Resource group that contains an Azure Key Vault. KeyVaultName string `json:"keyVaultName,omitempty"` // The name of an Azure Key Vault containing your key. KeyIdentifier string `json:"keyIdentifier,omitempty"` // The unique identifier of a key in an Azure Key Vault. Secret string `json:"secret,omitempty"` // The secret associated with the Azure Key Vault specified by azureKeyVault.tenantID. TenantID string `json:"tenantID,omitempty"` // The unique identifier for an Azure AD tenant within an Azure subscription. }
AzureKeyVault specifies Azure Key Vault configuration details and whether Encryption at Rest is enabled for an Atlas project.
type BackupCompliancePolicy ¶ added in v0.25.0
type BackupCompliancePolicy struct { AuthorizedEmail string `json:"authorizedEmail,omitempty"` AuthorizedUserFirstName string `json:"authorizedUserFirstName,omitempty"` AuthorizedUserLastName string `json:"authorizedUserLastName,omitempty"` CopyProtectionEnabled *bool `json:"copyProtectionEnabled,omitempty"` EncryptionAtRestEnabled *bool `json:"encryptionAtRestEnabled,omitempty"` OnDemandPolicyItem PolicyItem `json:"onDemandPolicyItem,omitempty"` PitEnabled *bool `json:"pitEnabled,omitempty"` ProjectID string `json:"projectId,omitempty"` RestoreWindowDays *int64 `json:"restoreWindowDays,omitempty"` ScheduledPolicyItems []ScheduledPolicyItem `json:"scheduledPolicyItems,omitempty"` State string `json:"state,omitempty"` UpdatedDate string `json:"updatedDate,omitempty"` UpdatedUser string `json:"updatedUser,omitempty"` }
BackupCompliancePolicy represents a backup compiance policy.
type BackupCompliancePolicyService ¶ added in v0.25.0
type BackupCompliancePolicyService interface { Get(context.Context, string) (*BackupCompliancePolicy, *Response, error) Update(context.Context, string, *BackupCompliancePolicy) (*BackupCompliancePolicy, *Response, error) }
BackupCompliancePolicyService is an interface for interfacing with the Backup Compliance Policy endpoints of the MongoDB Atlas API.
type BackupCompliancePolicyServiceOp ¶ added in v0.25.0
type BackupCompliancePolicyServiceOp service
CloudProviderSnapshotBackupPolicyServiceOp handles communication with the BackupCompliancePolicyService related methods of the MongoDB Atlas API.
func (*BackupCompliancePolicyServiceOp) Get ¶ added in v0.25.0
func (s *BackupCompliancePolicyServiceOp) Get(ctx context.Context, groupID string) (*BackupCompliancePolicy, *Response, error)
Get gets the current snapshot schedule and retention settings for the cluster with {CLUSTER-NAME}. See more: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Cloud-Backups/operation/getDataProtectionSettings
func (*BackupCompliancePolicyServiceOp) Update ¶ added in v0.25.0
func (s *BackupCompliancePolicyServiceOp) Update(ctx context.Context, groupID string, createRequest *BackupCompliancePolicy) (*BackupCompliancePolicy, *Response, error)
Update updates the snapshot schedule or retention settings for the cluster with {CLUSTER-NAME}. See more: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Cloud-Backups/operation/updateDataProtectionSettings
type BiConnector ¶
type BiConnector struct { Enabled *bool `json:"enabled,omitempty"` ReadPreference string `json:"readPreference,omitempty"` }
BiConnector specifies BI Connector for Atlas configuration on this cluster.
type Certificates ¶ added in v0.17.0
type ChangeStatus ¶ added in v0.8.0
type ChangeStatus string
const ( // ChangeStatusApplied signals when changes to the deployments have completed. ChangeStatusApplied ChangeStatus = "APPLIED" // ChangeStatusPending signals when changes to the deployments are still pending. ChangeStatusPending ChangeStatus = "PENDING" )
type Checkpoint ¶
type Checkpoint struct { ClusterID string `json:"clusterId"` Completed string `json:"completed,omitempty"` GroupID string `json:"groupId"` ID string `json:"id,omitempty"` // Unique identifier of the checkpoint. Links []*Link `json:"links,omitempty"` // One or more links to sub-resources and/or related resources. Parts []*Part `json:"parts,omitempty"` Restorable bool `json:"restorable"` Started string `json:"started"` Timestamp string `json:"timestamp"` }
Checkpoint represents MongoDB Checkpoint.
type CheckpointPart ¶
type CheckpointPart struct { ShardName string `json:"shardName"` TokenDiscovered bool `json:"tokenDiscovered"` TokenTimestamp SnapshotTimestamp `json:"tokenTimestamp"` }
CheckpointPart represents the individual parts that comprise the complete checkpoint.
type Checkpoints ¶
type Checkpoints struct { Results []*Checkpoint `json:"results,omitempty"` // Includes one Checkpoint object for each item detailed in the results array section. Links []*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. }
Checkpoints represents all the backup checkpoints related to a cluster.
type CheckpointsService ¶
type CheckpointsService interface { List(context.Context, string, string, *ListOptions) (*Checkpoints, *Response, error) Get(context.Context, string, string, string) (*Checkpoint, *Response, error) }
CheckpointsService is an interface for interfacing with the Checkpoint endpoints of the MongoDB Atlas API.
type CheckpointsServiceOp ¶
type CheckpointsServiceOp service
CheckpointsServiceOp handles communication with the checkpoint related methods of the MongoDB Atlas API.
func (CheckpointsServiceOp) Get ¶
func (s CheckpointsServiceOp) Get(ctx context.Context, groupID, clusterName, checkpointID string) (*Checkpoint, *Response, error)
Get one checkpoint for the specified sharded cluster.
See more: https://docs.atlas.mongodb.com/reference/api/checkpoints-get-one/
func (CheckpointsServiceOp) List ¶
func (s CheckpointsServiceOp) List(ctx context.Context, groupID, clusterName string, listOptions *ListOptions) (*Checkpoints, *Response, error)
List all checkpoints for the specified sharded cluster.
See more: https://docs.atlas.mongodb.com/reference/api/checkpoints-get-all/
type Client ¶
type Client struct { BaseURL *url.URL UserAgent string // Services used for communicating with the API CustomDBRoles CustomDBRolesService DatabaseUsers DatabaseUsersService ProjectIPAccessList ProjectIPAccessListService Organizations OrganizationsService Projects ProjectsService Clusters ClustersService CloudProviderSnapshots CloudProviderSnapshotsService APIKeys APIKeysService Root RootService ProjectAPIKeys ProjectAPIKeysService CloudProviderSnapshotRestoreJobs CloudProviderSnapshotRestoreJobsService Peers PeersService Containers ContainersService EncryptionsAtRest EncryptionsAtRestService AccessListAPIKeys AccessListAPIKeysService PrivateIPMode PrivateIPModeService MaintenanceWindows MaintenanceWindowsService Teams TeamsService AtlasUsers AtlasUsersService GlobalClusters GlobalClustersService Auditing AuditingsService AlertConfigurations AlertConfigurationsService PrivateEndpoints PrivateEndpointsService ServerlessPrivateEndpoints ServerlessPrivateEndpointsService PrivateEndpointsDeprecated PrivateEndpointsServiceDeprecated X509AuthDBUsers X509AuthDBUsersService ContinuousSnapshots ContinuousSnapshotsService ContinuousRestoreJobs ContinuousRestoreJobsService Checkpoints CheckpointsService Alerts AlertsService CloudProviderSnapshotBackupPolicies CloudProviderSnapshotBackupPoliciesService BackupCompliancePolicy BackupCompliancePolicyService Events EventsService Processes ProcessesService ProcessMeasurements ProcessMeasurementsService ProcessDisks ProcessDisksService ProcessDiskMeasurements ProcessDiskMeasurementsService ProcessDatabases ProcessDatabasesService ProcessDatabaseMeasurements ProcessDatabaseMeasurementsService Indexes IndexesService Logs LogsService DataLakes DataLakeService OnlineArchives OnlineArchiveService Search SearchService CustomAWSDNS AWSCustomDNSService Integrations IntegrationsService LDAPConfigurations LDAPConfigurationsService PerformanceAdvisor PerformanceAdvisorService CloudProviderAccess CloudProviderAccessService DefaultMongoDBMajorVersion DefaultMongoDBMajorVersionService IPInfo IPInfoService AdvancedClusters AdvancedClustersService ServerlessInstances ServerlessInstancesService LiveMigration LiveMigrationService AccessTracking AccessTrackingService ServiceVersion ServiceVersionService CloudProviderSnapshotExportBuckets CloudProviderSnapshotExportBucketsService CloudProviderSnapshotExportJobs CloudProviderSnapshotExportJobsService FederatedSettings FederatedSettingsService DataFederation DataFederationService ClusterOutageSimulation ClusterOutageSimulationService DataLakePipeline DataLakePipelineService // contains filtered or unexported fields }
Client manages communication with MongoDBAtlas v1.0 API.
func (*Client) Do ¶
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.
func (*Client) NewGZipRequest ¶
NewGZipRequest creates an API request that accepts gzip. A relative URL can be provided in urlStr, which will be resolved to the BaseURL of the Client. Relative URLS should always be specified without a preceding slash.
func (*Client) NewPlainRequest ¶ added in v0.7.1
NewPlainRequest creates an API request that accepts plain text. A relative URL can be provided in urlStr, which will be resolved to the BaseURL of the Client. Relative URLS should always be specified without a preceding slash.
func (*Client) NewRequest ¶
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, which will be resolved 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 in as the request body.
func (*Client) OnRequestCompleted ¶
func (c *Client) OnRequestCompleted(rc RequestCompletionCallback)
OnRequestCompleted sets the DO API request completion callback.
func (*Client) OnResponseProcessed ¶ added in v0.17.0
func (c *Client) OnResponseProcessed(rc ResponseProcessedCallback)
OnResponseProcessed sets the DO API request completion callback after it has been processed.
type ClientOpt ¶
ClientOpt configures a Client.
func SetBaseURL ¶
SetBaseURL is a client option for setting the base URL.
func SetUserAgent ¶
SetUserAgent is a client option for setting the user agent.
func SetWithRaw ¶ added in v0.17.0
func SetWithRaw() ClientOpt
SetWithRaw is a client option for getting raw atlas server response within Response structure.
type CloudProvider ¶ added in v0.8.0
type CloudProvider struct { Provider string `json:"provider,omitempty"` InstanceSizes []*InstanceSize `json:"instanceSizes,omitempty"` }
CloudProvider represents a cloud provider of the MongoDB Atlas API.
type CloudProviderAccessRole ¶ added in v0.32.0
type CloudProviderAccessRole struct { AtlasAWSAccountARN string `json:"atlasAWSAccountArn,omitempty"` // ARN associated with the Atlas AWS account used to assume IAM roles in your AWS account. AtlasAssumedRoleExternalID string `json:"atlasAssumedRoleExternalId,omitempty"` // Unique external ID Atlas uses when assuming the IAM role in your AWS account. AuthorizedDate string `json:"authorizedDate,omitempty"` // Date on which this role was authorized. CreatedDate string `json:"createdDate,omitempty"` // Date on which this role was created. FeatureUsages []*FeatureUsage `json:"featureUsages,omitempty"` // Atlas features this AWS IAM role is linked to. IAMAssumedRoleARN string `json:"iamAssumedRoleArn,omitempty"` // ARN of the IAM Role that Atlas assumes when accessing resources in your AWS account. ProviderName string `json:"providerName,omitempty"` // Name of the cloud provider. Currently limited to AWS. RoleID string `json:"roleId,omitempty"` // Unique 24-hexadecimal digit string that identifies the role. AzureID *string `json:"_id,omitempty"` // Unique 24-hexadecimal digit string that identifies the Azure Service Principal in Atlas. AtlasAzureAppID *string `json:"atlasAzureAppId,omitempty"` // Azure Active Directory Application ID of Atlas. LastUpdatedDate string `json:"lastUpdatedDate,omitempty"` // UUID string that identifies the Azure Service Principal. AzureServicePrincipalID *string `json:"servicePrincipalId,omitempty"` // Unique ID of this role. AzureTenantID *string `json:"tenantId,omitempty"` // UUID String that identifies the Azure Active Directory Tenant ID. }
CloudProviderAccessRole is the response from the CloudProviderAccessService.ListRoles.
type CloudProviderAccessRoleRequest ¶ added in v0.6.0
type CloudProviderAccessRoleRequest struct { ProviderName string `json:"providerName"` // Human-readable label that identifies the cloud provider of the role. IAMAssumedRoleARN *string `json:"iamAssumedRoleArn,omitempty"` // Amazon Resource Name (ARN) that identifies the Amazon Web Services (AWS) Identity and Access Management (IAM) role that MongoDB Cloud assumes when it accesses resources in your AWS account. AtlasAzureAppID *string `json:"atlasAzureAppId,omitempty"` // Date and time when this Azure Service Principal was last updated. This parameter expresses its value in the ISO 8601 timestamp format in UTC. AzureServicePrincipalID *string `json:"servicePrincipalId,omitempty"` // Unique AzureID of this role. AzureTenantID *string `json:"tenantId,omitempty"` // UUID String that identifies the Azure Active Directory Tenant AzureID. }
CloudProviderAccessRoleRequest represent a new role creation.
type CloudProviderAccessRoles ¶ added in v0.6.0
type CloudProviderAccessRoles struct { AWSIAMRoles []CloudProviderAccessRole `json:"awsIamRoles,omitempty"` // Unique identifier of AWS security group in this access list entry. AzureServicePrincipals []CloudProviderAccessRole `json:"azureServicePrincipals,omitempty"` // Unique identifier of Azure security group in this access list entry. }
CloudProviderAccessRoles an array of awsIamRoles objects.
type CloudProviderAccessService ¶ added in v0.6.0
type CloudProviderAccessService interface { ListRoles(context.Context, string) (*CloudProviderAccessRoles, *Response, error) GetRole(context.Context, string, string) (*CloudProviderAccessRole, *Response, error) CreateRole(context.Context, string, *CloudProviderAccessRoleRequest) (*CloudProviderAccessRole, *Response, error) AuthorizeRole(context.Context, string, string, *CloudProviderAccessRoleRequest) (*CloudProviderAccessRole, *Response, error) }
CloudProviderAccessService provides access to the cloud provider access functions in the Atlas API.
See more: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Provider-Access
type CloudProviderAccessServiceOp ¶ added in v0.6.0
type CloudProviderAccessServiceOp service
CloudProviderAccessServiceOp provides an implementation of the CloudProviderAccessService interface.
func (*CloudProviderAccessServiceOp) AuthorizeRole ¶ added in v0.6.0
func (s *CloudProviderAccessServiceOp) AuthorizeRole(ctx context.Context, groupID, roleID string, request *CloudProviderAccessRoleRequest) (*CloudProviderAccessRole, *Response, error)
AuthorizeRole authorizes and configure an AWS Assumed IAM role.
func (*CloudProviderAccessServiceOp) CreateRole ¶ added in v0.6.0
func (s *CloudProviderAccessServiceOp) CreateRole(ctx context.Context, groupID string, request *CloudProviderAccessRoleRequest) (*CloudProviderAccessRole, *Response, error)
CreateRole creates an AWS IAM role.
func (*CloudProviderAccessServiceOp) DeauthorizeRole ¶ added in v0.6.0
func (s *CloudProviderAccessServiceOp) DeauthorizeRole(ctx context.Context, request *CloudProviderDeauthorizationRequest) (*Response, error)
DeauthorizeRole deauthorizes an AWS Assumed IAM role.
func (*CloudProviderAccessServiceOp) GetRole ¶ added in v0.30.0
func (s *CloudProviderAccessServiceOp) GetRole(ctx context.Context, groupID, roleID string) (*CloudProviderAccessRole, *Response, error)
GetRole Returns the Amazon Web Services (AWS) Identity and Access Management (IAM) role with the specified id and with access to the specified project.
func (*CloudProviderAccessServiceOp) ListRoles ¶ added in v0.6.0
func (s *CloudProviderAccessServiceOp) ListRoles(ctx context.Context, groupID string) (*CloudProviderAccessRoles, *Response, error)
ListRoles retrieves existing AWS IAM roles.
type CloudProviderConfig ¶
type CloudProviderConfig struct {
AWSConfig AwsCloudProviderConfig `json:"aws,omitempty"`
}
CloudProviderConfig represents the configuration for all supported cloud providers.
type CloudProviderDeauthorizationRequest ¶ added in v0.6.0
type CloudProviderDeauthorizationRequest struct {}
CloudProviderDeauthorizationRequest represents a request to remove authorization.
type CloudProviderRegionsOptions ¶ added in v0.8.0
type CloudProviderRegionsOptions struct { Providers []*string `url:"providers,omitempty"` Tier string `url:"tier,omitempty"` }
CloudProviderRegionsOptions specifies the optional parameters to the CloudProviderRegions Get method.
type CloudProviderSnapshot ¶
type CloudProviderSnapshot struct { ID string `json:"id,omitempty"` // Unique identifier of the snapshot. RetentionInDays int `json:"retentionInDays,omitempty"` // The number of days that Atlas should retain the on-demand snapshot. Must be at least 1 . CreatedAt string `json:"createdAt,omitempty"` // UTC ISO 8601 formatted point in time when Atlas took the snapshot. ExpiresAt string `json:"expiresAt,omitempty"` // UTC ISO 8601 formatted point in time when Atlas will delete the snapshot. Description string `json:"description,omitempty"` // Description of the on-demand snapshot. Links []*Link `json:"links,omitempty"` // One or more links to sub-resources and/or related resources. MasterKeyUUID string `json:"masterKeyUUID,omitempty"` // Unique ID of the AWS KMS Customer Master Key used to encrypt the snapshot. Only visible for clusters using Encryption at Rest via Customer KMS. MongodVersion string `json:"mongodVersion,omitempty"` // Version of the MongoDB server. SnapshotType string `json:"snapshotType,omitempty"` // Specified the type of snapshot. Valid values are onDemand and scheduled. Status string `json:"status,omitempty"` // Current status of the snapshot. One of the following values: queued, inProgress, completed, failed StorageSizeBytes int `json:"storageSizeBytes,omitempty"` // Specifies the size of the snapshot in bytes. Type string `json:"type,omitempty"` // Specifies the type of cluster: replicaSet or shardedCluster. CloudProvider string `json:"cloudProvider,omitempty"` // Cloud provider that stores this snapshot. Atlas returns this parameter when "type": "replicaSet". Members []*Member `json:"members,omitempty"` // List of ReplicaSetName and the cloud provider where the snapshots are stored. Atlas returns this parameter when "type": "shardedCluster". ReplicaSetName string `json:"replicaSetName,omitempty"` // Label given to the replica set from which Atlas took this snapshot. Atlas returns this parameter when "type": "replicaSet". SnapshotsIds []string `json:"snapshotIds,omitempty"` // Unique identifiers of the snapshots created for the shards and config server for a sharded cluster. ServerlessInstanceName string `json:"serverlessInstanceName,omitempty"` // Human-readable label given to the serverless instance from which Atlas took this snapshot. }
CloudProviderSnapshot represents a cloud provider snapshot.
type CloudProviderSnapshotBackupPoliciesService ¶
type CloudProviderSnapshotBackupPoliciesService interface { Get(context.Context, string, string) (*CloudProviderSnapshotBackupPolicy, *Response, error) Update(context.Context, string, string, *CloudProviderSnapshotBackupPolicy) (*CloudProviderSnapshotBackupPolicy, *Response, error) Delete(context.Context, string, string) (*CloudProviderSnapshotBackupPolicy, *Response, error) }
CloudProviderSnapshotBackupPoliciesService is an interface for interfacing with the Cloud Provider Snapshots Backup Policy endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-schedule/
type CloudProviderSnapshotBackupPoliciesServiceOp ¶
type CloudProviderSnapshotBackupPoliciesServiceOp service
CloudProviderSnapshotBackupPoliciesServiceOp handles communication with the CloudProviderSnapshotBackupPoliciesService related methods of the MongoDB Atlas API.
func (*CloudProviderSnapshotBackupPoliciesServiceOp) Delete ¶ added in v0.9.0
func (s *CloudProviderSnapshotBackupPoliciesServiceOp) Delete(ctx context.Context, groupID, clusterName string) (*CloudProviderSnapshotBackupPolicy, *Response, error)
Delete deletes all cloud backup schedules.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-backup/schedule/delete-all-schedules/
func (*CloudProviderSnapshotBackupPoliciesServiceOp) Get ¶
func (s *CloudProviderSnapshotBackupPoliciesServiceOp) Get(ctx context.Context, groupID, clusterName string) (*CloudProviderSnapshotBackupPolicy, *Response, error)
Get gets the current snapshot schedule and retention settings for the cluster with {CLUSTER-NAME}. See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-schedule-get-all/
func (*CloudProviderSnapshotBackupPoliciesServiceOp) Update ¶
func (s *CloudProviderSnapshotBackupPoliciesServiceOp) Update(ctx context.Context, groupID, clusterName string, createRequest *CloudProviderSnapshotBackupPolicy) (*CloudProviderSnapshotBackupPolicy, *Response, error)
Update updates the snapshot schedule or retention settings for the cluster with {CLUSTER-NAME}. See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-schedule-modify-one/
type CloudProviderSnapshotBackupPolicy ¶
type CloudProviderSnapshotBackupPolicy struct { ClusterID string `json:"clusterId,omitempty"` // Unique identifier of the Atlas cluster. ClusterName string `json:"clusterName,omitempty"` // Name of the Atlas cluster. ReferenceHourOfDay *int64 `json:"referenceHourOfDay,omitempty"` // UTC Hour of day between 0 and 23, inclusive, representing which hour of the day that Atlas takes snapshots for backup policy items. ReferenceMinuteOfHour *int64 `json:"referenceMinuteOfHour,omitempty"` // UTC Minutes after referenceHourOfDay that Atlas takes snapshots for backup policy items. Must be between 0 and 59, inclusive. Number of days back in time you can restore to with point-in-time accuracy. RestoreWindowDays *int64 `json:"restoreWindowDays,omitempty"` // Number of days back in time you can restore to with point-in-time accuracy. Must be a positive, non-zero integer. UpdateSnapshots *bool `json:"updateSnapshots,omitempty"` // Specify true to apply the retention changes in the updated backup policy to snapshots that Atlas took previously. NextSnapshot string `json:"nextSnapshot,omitempty"` // UTC ISO 8601 formatted point in time when Atlas will take the next snapshot. Policies []Policy `json:"policies,omitempty"` // A list of policy definitions for the cluster. AutoExportEnabled *bool `json:"autoExportEnabled,omitempty"` // Specify true to enable automatic export of cloud backup snapshots to the AWS bucket. You must also define the export policy using export. Specify false to disable automatic export. Export *Export `json:"export,omitempty"` // Export struct that represents a policy for automatically exporting cloud backup snapshots to AWS bucket. UseOrgAndGroupNamesInExportPrefix *bool `json:"useOrgAndGroupNamesInExportPrefix,omitempty"` // Specifies whether to use organization and project names instead of organization and project UUIDs in the path to the metadata files that Atlas uploads to your S3 bucket after it finishes exporting the snapshots Links []*Link `json:"links,omitempty"` // One or more links to sub-resources and/or related resources. CopySettings []CopySetting `json:"copySettings"` // List that contains a document for each copy setting item in the desired backup policy. DeleteCopiedBackups []DeleteCopiedBackup `json:"deleteCopiedBackups,omitempty"` // List that contains a document for each deleted copy setting whose backup copies you want to delete. }
CloudProviderSnapshotBackupPolicy represents a cloud provider snapshot schedule.
type CloudProviderSnapshotExportBucket ¶ added in v0.15.0
type CloudProviderSnapshotExportBucket struct { ID string `json:"_id,omitempty"` // Unique identifier of the S3 bucket. BucketName string `json:"bucketName,omitempty"` // Name of the bucket that the role ID is authorized to access. CloudProvider string `json:"cloudProvider,omitempty"` // Name of the provider of the cloud service where Atlas can access the S3 bucket. Atlas only supports AWS. IAMRoleID string `json:"iamRoleId,omitempty"` // Unique identifier of the role that Atlas can use to access the bucket. If necessary, use the UI or API to retrieve the role ID. You must also specify the bucketName. }
CloudProviderSnapshotExportBucket represents one cloud provider snapshot export buckets.
type CloudProviderSnapshotExportBuckets ¶ added in v0.15.0
type CloudProviderSnapshotExportBuckets struct { Results []*CloudProviderSnapshotExportBucket `json:"results,omitempty"` // Includes one CloudProviderSnapshotExportBucket object for each item detailed in the results array section. Links []*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. }
CloudProviderSnapshotExportBuckets represents all cloud provider snapshot export buckets.
type CloudProviderSnapshotExportBucketsService ¶ added in v0.15.0
type CloudProviderSnapshotExportBucketsService interface { List(context.Context, string, *ListOptions) (*CloudProviderSnapshotExportBuckets, *Response, error) Get(context.Context, string, string) (*CloudProviderSnapshotExportBucket, *Response, error) Create(context.Context, string, *CloudProviderSnapshotExportBucket) (*CloudProviderSnapshotExportBucket, *Response, error) Delete(context.Context, string, string) (*Response, error) }
CloudProviderSnapshotExportBucketsService is an interface for interfacing with the Cloud Provider Snapshots Export Buckets endpoints of the MongoDB Atlas API.
type CloudProviderSnapshotExportBucketsServiceOp ¶ added in v0.15.0
type CloudProviderSnapshotExportBucketsServiceOp service
CloudProviderSnapshotExportBucketsServiceOp handles communication with the CloudProviderSnapshotExportBucketsService related methods of the MongoDB Atlas API.
func (CloudProviderSnapshotExportBucketsServiceOp) Create ¶ added in v0.15.0
func (c CloudProviderSnapshotExportBucketsServiceOp) Create(ctx context.Context, projectID string, bucket *CloudProviderSnapshotExportBucket) (*CloudProviderSnapshotExportBucket, *Response, error)
Create Allows you to grant Atlas access to the specified bucket for exporting backup snapshots.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-backup/export/create-one-export-bucket/
func (CloudProviderSnapshotExportBucketsServiceOp) Delete ¶ added in v0.15.0
func (c CloudProviderSnapshotExportBucketsServiceOp) Delete(ctx context.Context, projectID, bucketID string) (*Response, error)
Delete Allows you to remove one bucket specified by the bucket ID.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-backup/export/delete-one-export-bucket/
func (CloudProviderSnapshotExportBucketsServiceOp) Get ¶ added in v0.15.0
func (c CloudProviderSnapshotExportBucketsServiceOp) Get(ctx context.Context, projectID, bucketID string) (*CloudProviderSnapshotExportBucket, *Response, error)
Get Allows you to retrieve one bucket specified by the bucket ID.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-backup/export/get-one-export-bucket/
func (CloudProviderSnapshotExportBucketsServiceOp) List ¶ added in v0.15.0
func (c CloudProviderSnapshotExportBucketsServiceOp) List(ctx context.Context, projectID string, options *ListOptions) (*CloudProviderSnapshotExportBuckets, *Response, error)
List Retrieve all the buckets for the specified project.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-backup/export/get-all-export-buckets/
type CloudProviderSnapshotExportJob ¶ added in v0.16.0
type CloudProviderSnapshotExportJob struct { ID string `json:"id,omitempty"` // Unique identifier of the export job. Components []*CloudProviderSnapshotExportJobComponent `json:"components,omitempty"` // Returned for sharded clusters only. Export job details for each replica set in the sharded cluster. CreatedAt string `json:"createdAt,omitempty"` // Timestamp in ISO 8601 date and time format in UTC when the export job was created. CustomData []*CloudProviderSnapshotExportJobCustomData `json:"customData,omitempty"` // Custom data for the metadata file named .complete that Atlas uploads to the bucket when the export job finishes. ErrMsg string `json:"errMsg,omitempty"` // Error message, only if the export job failed. ExportBucketID string `json:"exportBucketId,omitempty"` // Unique identifier of the bucket. ExportStatus *CloudProviderSnapshotExportJobStatus `json:"exportStatus,omitempty"` // Returned for replica set only. Status of the export job. FinishedAt string `json:"finishedAt,omitempty"` // Timestamp in ISO 8601 date and time format in UTC when the export job completes. Prefix string `json:"prefix,omitempty"` // Full path on the cloud provider bucket to the folder where the snapshot is exported. The path is in the following format: /exported_snapshots/{ORG-NAME}/{PROJECT-NAME}/{CLUSTER-NAME}/{SNAPSHOT-INITIATION-DATE}/{TIMESTAMP} SnapshotID string `json:"snapshotId,omitempty"` // Unique identifier of the snapshot. State string `json:"state,omitempty"` // Status of the export job. }
CloudProviderSnapshotExportJob represents one cloud provider snapshot export jobs.
type CloudProviderSnapshotExportJobComponent ¶ added in v0.16.0
type CloudProviderSnapshotExportJobComponent struct { ExportID string `json:"exportId,omitempty"` // Returned for sharded clusters only. Unique identifier of the export job for the replica set. ReplicaSetName string `json:"replicaSetName,omitempty"` // Returned for sharded clusters only. Name of the replica set. }
type CloudProviderSnapshotExportJobCustomData ¶ added in v0.16.0
type CloudProviderSnapshotExportJobStatus ¶ added in v0.16.0
type CloudProviderSnapshotExportJobStatus struct { ExportedCollections int `json:"exportedCollections,omitempty"` // Returned for replica set only. Number of collections that have been exported. TotalCollections int `json:"totalCollections,omitempty"` // Returned for replica set only. Total number of collections to export. }
type CloudProviderSnapshotExportJobs ¶ added in v0.16.0
type CloudProviderSnapshotExportJobs struct { Results []*CloudProviderSnapshotExportJob `json:"results,omitempty"` // Includes one CloudProviderSnapshotExportJob object for each item detailed in the results array section. Links []*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. }
CloudProviderSnapshotExportJobs represents all cloud provider snapshot export jobs.
type CloudProviderSnapshotExportJobsService ¶ added in v0.16.0
type CloudProviderSnapshotExportJobsService interface { List(context.Context, string, string, *ListOptions) (*CloudProviderSnapshotExportJobs, *Response, error) Get(context.Context, string, string, string) (*CloudProviderSnapshotExportJob, *Response, error) Create(context.Context, string, string, *CloudProviderSnapshotExportJob) (*CloudProviderSnapshotExportJob, *Response, error) }
CloudProviderSnapshotExportJobsService is an interface for interfacing with the Cloud Provider Snapshots Export Jobs of the MongoDB Atlas API.
type CloudProviderSnapshotExportJobsServiceOp ¶ added in v0.16.0
type CloudProviderSnapshotExportJobsServiceOp service
CloudProviderSnapshotExportJobsServiceOp handles communication with the CloudProviderSnapshotExportJobsService related methods of the MongoDB Atlas API.
func (CloudProviderSnapshotExportJobsServiceOp) Create ¶ added in v0.16.0
func (c CloudProviderSnapshotExportJobsServiceOp) Create(ctx context.Context, projectID, clusterName string, bucket *CloudProviderSnapshotExportJob) (*CloudProviderSnapshotExportJob, *Response, error)
Create Allows you to grant Atlas access to the specified export job for exporting backup snapshots.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-backup/export/create-one-export-job/
func (CloudProviderSnapshotExportJobsServiceOp) Get ¶ added in v0.16.0
func (c CloudProviderSnapshotExportJobsServiceOp) Get(ctx context.Context, projectID, clusterName, exportID string) (*CloudProviderSnapshotExportJob, *Response, error)
Get Allows you to retrieve one export job specified by the export job ID.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-backup/export/get-one-export-job/
func (CloudProviderSnapshotExportJobsServiceOp) List ¶ added in v0.16.0
func (c CloudProviderSnapshotExportJobsServiceOp) List(ctx context.Context, projectID, clusterName string, options *ListOptions) (*CloudProviderSnapshotExportJobs, *Response, error)
List Retrieve all the export jobs for the specified project.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-backup/export/get-all-export-jobs/
type CloudProviderSnapshotRestoreJob ¶
type CloudProviderSnapshotRestoreJob struct { ID string `json:"id,omitempty"` // The unique identifier of the restore job. SnapshotID string `json:"snapshotId,omitempty"` // Unique identifier of the snapshot to restore. Components []*Component `json:"components,omitempty"` // Collection of clusters to be downloaded. Atlas returns this parameter when restoring a sharded cluster and "deliveryType" : "download". DeliveryType string `json:"deliveryType,omitempty"` // Type of restore job to create. Possible values are: automated or download or pointInTime DeliveryURL []string `json:"deliveryUrl,omitempty"` // One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download. TargetClusterName string `json:"targetClusterName,omitempty"` // Name of the target Atlas cluster to which the restore job restores the snapshot. Only required if deliveryType is automated. TargetGroupID string `json:"targetGroupId,omitempty"` // Unique ID of the target Atlas project for the specified targetClusterName. Only required if deliveryType is automated. Cancelled bool `json:"cancelled,omitempty"` // Indicates whether the restore job was canceled. CreatedAt string `json:"createdAt,omitempty"` // UTC ISO 8601 formatted point in time when Atlas created the restore job. Expired bool `json:"expired,omitempty"` // Indicates whether the restore job expired. ExpiresAt string `json:"expiresAt,omitempty"` // UTC ISO 8601 formatted point in time when the restore job expires. FinishedAt string `json:"finishedAt,omitempty"` // UTC ISO 8601 formatted point in time when the restore job completed. Links []*Link `json:"links,omitempty"` // One or more links to sub-resources and/or related resources. The relations between URLs are explained in the Web Linking Specification. Timestamp string `json:"timestamp,omitempty"` // Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken. OplogTs int64 `json:"oplogTs,omitempty"` //nolint:stylecheck // not changing this // Timestamp in the number of seconds that have elapsed since the UNIX epoch from which to you want to restore this snapshot. This is the first part of an Oplog timestamp. OplogInc int64 `json:"oplogInc,omitempty"` // Oplog operation number from which to you want to restore this snapshot. This is the second part of an Oplog timestamp. PointInTimeUTCSeconds int64 `json:"pointInTimeUTCSeconds,omitempty"` // Timestamp in the number of seconds that have elapsed since the UNIX epoch from which you want to restore this snapshot. SourceClusterName string `json:"sourceClusterName,omitempty"` Failed *bool `json:"failed,omitempty"` }
CloudProviderSnapshotRestoreJob represents the structure of a cloudProviderSnapshotRestoreJob.
type CloudProviderSnapshotRestoreJobs ¶
type CloudProviderSnapshotRestoreJobs struct { Links []*Link `json:"links"` Results []*CloudProviderSnapshotRestoreJob `json:"results"` TotalCount int `json:"totalCount"` }
CloudProviderSnapshotRestoreJobs represents an array of cloudProviderSnapshotRestoreJob.
type CloudProviderSnapshotRestoreJobsService ¶
type CloudProviderSnapshotRestoreJobsService interface { List(context.Context, *SnapshotReqPathParameters, *ListOptions) (*CloudProviderSnapshotRestoreJobs, *Response, error) Get(context.Context, *SnapshotReqPathParameters) (*CloudProviderSnapshotRestoreJob, *Response, error) Create(context.Context, *SnapshotReqPathParameters, *CloudProviderSnapshotRestoreJob) (*CloudProviderSnapshotRestoreJob, *Response, error) Delete(context.Context, *SnapshotReqPathParameters) (*Response, error) ListForServerlessBackupRestore(context.Context, string, string, *ListOptions) (*CloudProviderSnapshotRestoreJobs, *Response, error) GetForServerlessBackupRestore(context.Context, string, string, string) (*CloudProviderSnapshotRestoreJob, *Response, error) CreateForServerlessBackupRestore(context.Context, string, string, *CloudProviderSnapshotRestoreJob) (*CloudProviderSnapshotRestoreJob, *Response, error) }
CloudProviderSnapshotRestoreJobsService is an interface for interfacing with the CloudProviderSnapshotRestoreJobs endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-restore-jobs/
type CloudProviderSnapshotRestoreJobsServiceOp ¶
type CloudProviderSnapshotRestoreJobsServiceOp service
CloudProviderSnapshotRestoreJobsServiceOp handles communication with the CloudProviderSnapshotRestoreJobs related methods of the MongoDB Atlas API.
func (*CloudProviderSnapshotRestoreJobsServiceOp) Create ¶
func (s *CloudProviderSnapshotRestoreJobsServiceOp) Create(ctx context.Context, requestParameters *SnapshotReqPathParameters, createRequest *CloudProviderSnapshotRestoreJob) (*CloudProviderSnapshotRestoreJob, *Response, error)
Create creates a new restore job from a cloud provider snapshot associated to the specified cluster.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-restore-jobs-create-one/
func (*CloudProviderSnapshotRestoreJobsServiceOp) CreateForServerlessBackupRestore ¶ added in v0.15.0
func (s *CloudProviderSnapshotRestoreJobsServiceOp) CreateForServerlessBackupRestore(ctx context.Context, projectID, instanceName string, createRequest *CloudProviderSnapshotRestoreJob) (*CloudProviderSnapshotRestoreJob, *Response, error)
CreateForServerlessBackupRestore creates a new restore job from a serverless cloud provider snapshot associated to the specified cluster.
func (*CloudProviderSnapshotRestoreJobsServiceOp) Delete ¶
func (s *CloudProviderSnapshotRestoreJobsServiceOp) Delete(ctx context.Context, requestParameters *SnapshotReqPathParameters) (*Response, error)
Delete cancels the cloud provider snapshot manual download restore job associated to {JOB-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-restore-jobs-delete-one/
func (*CloudProviderSnapshotRestoreJobsServiceOp) Get ¶
func (s *CloudProviderSnapshotRestoreJobsServiceOp) Get(ctx context.Context, requestParameters *SnapshotReqPathParameters) (*CloudProviderSnapshotRestoreJob, *Response, error)
Get gets one cloud provider snapshot restore jobs for the specified cluster.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-restore-jobs-get-one/
func (*CloudProviderSnapshotRestoreJobsServiceOp) GetForServerlessBackupRestore ¶ added in v0.15.0
func (s *CloudProviderSnapshotRestoreJobsServiceOp) GetForServerlessBackupRestore(ctx context.Context, projectID, instanceName, jobID string) (*CloudProviderSnapshotRestoreJob, *Response, error)
GetForServerlessBackupRestore gets one cloud provider serverless snapshot restore jobs for the specified cluster.
func (*CloudProviderSnapshotRestoreJobsServiceOp) List ¶
func (s *CloudProviderSnapshotRestoreJobsServiceOp) List(ctx context.Context, requestParameters *SnapshotReqPathParameters, listOptions *ListOptions) (*CloudProviderSnapshotRestoreJobs, *Response, error)
List gets all cloud provider snapshot restore jobs for the specified cluster.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-restore-jobs-get-all/
func (*CloudProviderSnapshotRestoreJobsServiceOp) ListForServerlessBackupRestore ¶ added in v0.15.0
func (s *CloudProviderSnapshotRestoreJobsServiceOp) ListForServerlessBackupRestore(ctx context.Context, projectID, instanceName string, listOptions *ListOptions) (*CloudProviderSnapshotRestoreJobs, *Response, error)
ListForServerlessBackupRestore gets all cloud provider snapshot serverless restore jobs for the specified cluster.
type CloudProviderSnapshots ¶
type CloudProviderSnapshots struct { Results []*CloudProviderSnapshot `json:"results,omitempty"` // Includes one CloudProviderSnapshot object for each item detailed in the results array section. Links []*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. }
CloudProviderSnapshots represents all cloud provider snapshots.
type CloudProviderSnapshotsService ¶
type CloudProviderSnapshotsService interface { GetAllCloudProviderSnapshots(context.Context, *SnapshotReqPathParameters, *ListOptions) (*CloudProviderSnapshots, *Response, error) GetOneCloudProviderSnapshot(context.Context, *SnapshotReqPathParameters) (*CloudProviderSnapshot, *Response, error) Create(context.Context, *SnapshotReqPathParameters, *CloudProviderSnapshot) (*CloudProviderSnapshot, *Response, error) Delete(context.Context, *SnapshotReqPathParameters) (*Response, error) GetOneServerlessSnapshot(context.Context, *SnapshotReqPathParameters) (*CloudProviderSnapshot, *Response, error) GetAllServerlessSnapshots(context.Context, *SnapshotReqPathParameters, *ListOptions) (*CloudProviderSnapshots, *Response, error) }
CloudProviderSnapshotsService is an interface for interfacing with the Cloud Provider Snapshots endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot/
type CloudProviderSnapshotsServiceOp ¶
type CloudProviderSnapshotsServiceOp service
CloudProviderSnapshotsServiceOp handles communication with the CloudProviderSnapshotsService related methods of the MongoDB Atlas API.
func (*CloudProviderSnapshotsServiceOp) Create ¶
func (s *CloudProviderSnapshotsServiceOp) Create(ctx context.Context, requestParameters *SnapshotReqPathParameters, createRequest *CloudProviderSnapshot) (*CloudProviderSnapshot, *Response, error)
Create takes one on-demand snapshot. Atlas takes on-demand snapshots immediately, unlike scheduled snapshots which occur at regular intervals.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-take-one-ondemand/
func (*CloudProviderSnapshotsServiceOp) Delete ¶
func (s *CloudProviderSnapshotsServiceOp) Delete(ctx context.Context, requestParameters *SnapshotReqPathParameters) (*Response, error)
Delete deletes the snapshot associated to {SNAPSHOT-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-delete-one/
func (*CloudProviderSnapshotsServiceOp) GetAllCloudProviderSnapshots ¶
func (s *CloudProviderSnapshotsServiceOp) GetAllCloudProviderSnapshots(ctx context.Context, requestParameters *SnapshotReqPathParameters, listOptions *ListOptions) (*CloudProviderSnapshots, *Response, error)
GetAllCloudProviderSnapshots gets all cloud provider snapshots for the specified cluster.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-get-all/
func (*CloudProviderSnapshotsServiceOp) GetAllServerlessSnapshots ¶ added in v0.15.0
func (s *CloudProviderSnapshotsServiceOp) GetAllServerlessSnapshots(ctx context.Context, requestParameters *SnapshotReqPathParameters, listOptions *ListOptions) (*CloudProviderSnapshots, *Response, error)
GetAllServerlessSnapshots Return all snapshots of one serverless instance from the specified project.
func (*CloudProviderSnapshotsServiceOp) GetOneCloudProviderSnapshot ¶
func (s *CloudProviderSnapshotsServiceOp) GetOneCloudProviderSnapshot(ctx context.Context, requestParameters *SnapshotReqPathParameters) (*CloudProviderSnapshot, *Response, error)
GetOneCloudProviderSnapshot gets the snapshot associated to {SNAPSHOT-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-get-one/
func (*CloudProviderSnapshotsServiceOp) GetOneServerlessSnapshot ¶ added in v0.15.0
func (s *CloudProviderSnapshotsServiceOp) GetOneServerlessSnapshot(ctx context.Context, requestParameters *SnapshotReqPathParameters) (*CloudProviderSnapshot, *Response, error)
GetOneServerlessSnapshot Return one snapshot of one serverless instance from the specified project.
See more: // GetOneCloudProviderSnapshot https://docs.atlas.mongodb.com/reference/api/cloud-backup/backup/return-one-snapshot-of-one-serverless-instance/
type CloudProviders ¶ added in v0.8.0
type CloudProviders struct { Links []*Link `json:"links,omitempty"` Results []*CloudProvider `json:"results,omitempty"` TotalCount int `json:"totalCount,omitempty"` }
CloudProviders represents the response from CloudProviderRegionsService.Get.
type Cluster ¶
type Cluster struct { AcceptDataRisksAndForceReplicaSetReconfig string `json:"acceptDataRisksAndForceReplicaSetReconfig,omitempty"` AutoScaling *AutoScaling `json:"autoScaling,omitempty"` BackupEnabled *bool `json:"backupEnabled,omitempty"` // Deprecated: Use ProviderBackupEnabled instead BiConnector *BiConnector `json:"biConnector,omitempty"` ClusterType string `json:"clusterType,omitempty"` DiskSizeGB *float64 `json:"diskSizeGB,omitempty"` EncryptionAtRestProvider string `json:"encryptionAtRestProvider,omitempty"` Labels []Label `json:"labels,omitempty"` ID string `json:"id,omitempty"` GroupID string `json:"groupId,omitempty"` MongoDBVersion string `json:"mongoDBVersion,omitempty"` MongoDBMajorVersion string `json:"mongoDBMajorVersion,omitempty"` MongoURI string `json:"mongoURI,omitempty"` MongoURIUpdated string `json:"mongoURIUpdated,omitempty"` MongoURIWithOptions string `json:"mongoURIWithOptions,omitempty"` Name string `json:"name,omitempty"` CreateDate string `json:"createDate,omitempty"` NumShards *int64 `json:"numShards,omitempty"` Paused *bool `json:"paused,omitempty"` PitEnabled *bool `json:"pitEnabled,omitempty"` ProviderBackupEnabled *bool `json:"providerBackupEnabled,omitempty"` ProviderSettings *ProviderSettings `json:"providerSettings,omitempty"` ReplicationFactor *int64 `json:"replicationFactor,omitempty"` ReplicationSpec map[string]RegionsConfig `json:"replicationSpec,omitempty"` ReplicationSpecs []ReplicationSpec `json:"replicationSpecs,omitempty"` SrvAddress string `json:"srvAddress,omitempty"` StateName string `json:"stateName,omitempty"` ServerlessBackupOptions *ServerlessBackupOptions `json:"serverlessBackupOptions,omitempty"` ConnectionStrings *ConnectionStrings `json:"connectionStrings,omitempty"` Links []*Link `json:"links,omitempty"` VersionReleaseSystem string `json:"versionReleaseSystem,omitempty"` RootCertType string `json:"rootCertType,omitempty"` TerminationProtectionEnabled *bool `json:"terminationProtectionEnabled,omitempty"` Tags *[]*Tag `json:"tags,omitempty"` }
Cluster represents MongoDB cluster.
type ClusterOutageSimulation ¶ added in v0.22.0
type ClusterOutageSimulation struct { // Human-readable label that identifies the cluster that undergoes outage simulation. ClusterName *string `json:"clusterName,omitempty"` // Unique 24-hexadecimal character string that identifies the project that contains the cluster to undergo outage simulation. GroupID *string `json:"groupId,omitempty"` // Unique 24-hexadecimal character string that identifies the outage simulation. ID *string `json:"id,omitempty"` // List of settings that specify the type of cluster outage simulation. OutageFilters []ClusterOutageSimulationOutageFilter `json:"outageFilters,omitempty"` // Date and time when MongoDB Cloud started the regional outage simulation. StartRequestDate *string `json:"startRequestDate,omitempty"` // Phase of the outage simulation. | State | Indication | |-------------|------------| | `START_REQUESTED` | User has requested cluster outage simulation.| | `STARTING` | MongoDB Cloud is starting cluster outage simulation.| | `SIMULATING` | MongoDB Cloud is simulating cluster outage.| | `RECOVERY_REQUESTED` | User has requested recovery from the simulated outage.| | `RECOVERING` | MongoDB Cloud is recovering the cluster from the simulated outage.| | `COMPLETE` | MongoDB Cloud has completed the cluster outage simulation.| State *string `json:"state,omitempty"` }
type ClusterOutageSimulationOutageFilter ¶ added in v0.22.0
type ClusterOutageSimulationOutageFilter struct { // The cloud provider of the region that undergoes the outage simulation. CloudProvider *string `json:"cloudProvider,omitempty"` // The name of the region to undergo an outage simulation. RegionName *string `json:"regionName,omitempty"` // The type of cluster outage to simulate. | Type | Description | |------------|-------------| | `REGION` | Simulates a cluster outage for a region.| Type *string `json:"type,omitempty"` }
type ClusterOutageSimulationRequest ¶ added in v0.22.0
type ClusterOutageSimulationRequest struct {
OutageFilters []ClusterOutageSimulationOutageFilter `json:"outageFilters,omitempty"`
}
type ClusterOutageSimulationService ¶ added in v0.22.0
type ClusterOutageSimulationService interface { EndOutageSimulation(context.Context, string, string) (*ClusterOutageSimulation, *Response, error) GetOutageSimulation(context.Context, string, string) (*ClusterOutageSimulation, *Response, error) StartOutageSimulation(context.Context, string, string, *ClusterOutageSimulationRequest) (*ClusterOutageSimulation, *Response, error) }
ClusterOutageSimulationService is an interface for interfacing with the cluster outage endpoints of the MongoDB Atlas API.
See more: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Cluster-Outage-Simulation
type ClusterOutageSimulationServiceOp ¶ added in v0.22.0
type ClusterOutageSimulationServiceOp service
ClusterOutageSimulationServiceOp handles communication with the ClusterOutageSimulationService related methods of the MongoDB Atlas API.
func (ClusterOutageSimulationServiceOp) EndOutageSimulation ¶ added in v0.22.0
func (s ClusterOutageSimulationServiceOp) EndOutageSimulation(ctx context.Context, groupID, clusterName string) (*ClusterOutageSimulation, *Response, error)
EndOutageSimulation ends a cluster outage simulation.
func (ClusterOutageSimulationServiceOp) GetOutageSimulation ¶ added in v0.22.0
func (s ClusterOutageSimulationServiceOp) GetOutageSimulation(ctx context.Context, groupID, clusterName string) (*ClusterOutageSimulation, *Response, error)
GetOutageSimulation returns one outage simulation for one cluster.
func (ClusterOutageSimulationServiceOp) StartOutageSimulation ¶ added in v0.22.0
func (s ClusterOutageSimulationServiceOp) StartOutageSimulation(ctx context.Context, groupID, clusterName string, request *ClusterOutageSimulationRequest) (*ClusterOutageSimulation, *Response, error)
StartOutageSimulation starts a cluster outage simulation.
type ClusterStatus ¶ added in v0.8.0
type ClusterStatus struct {
ChangeStatus ChangeStatus `json:"changeStatus"`
}
ClusterStatus is the status of the operations on the cluster.
type ClustersResponse ¶ added in v0.11.0
type ClustersResponse struct { Links []*Link `json:"links,omitempty"` Results []*Cluster `json:"results,omitempty"` TotalCount int `json:"totalCount,omitempty"` }
ClustersResponse represents the response of ServerlessInstancesService.List.
type ClustersService ¶
type ClustersService interface { List(ctx context.Context, groupID string, options *ListOptions) ([]Cluster, *Response, error) Get(ctx context.Context, groupID, clusterName string) (*Cluster, *Response, error) Create(ctx context.Context, groupID string, cluster *Cluster) (*Cluster, *Response, error) Update(ctx context.Context, groupID, clusterName string, cluster *Cluster) (*Cluster, *Response, error) Delete(ctx context.Context, groupID, clusterName string, options *DeleteAdvanceClusterOptions) (*Response, error) UpdateProcessArgs(ctx context.Context, groupID, clusterName string, args *ProcessArgs) (*ProcessArgs, *Response, error) GetProcessArgs(ctx context.Context, groupID, clusterName string) (*ProcessArgs, *Response, error) Status(ctx context.Context, groupID, clusterName string) (ClusterStatus, *Response, error) LoadSampleDataset(ctx context.Context, groupID, clusterName string) (*SampleDatasetJob, *Response, error) GetSampleDatasetStatus(ctx context.Context, groupID, id string) (*SampleDatasetJob, *Response, error) ListCloudProviderRegions(context.Context, string, *CloudProviderRegionsOptions) (*CloudProviders, *Response, error) Upgrade(ctx context.Context, groupID string, cluster *Cluster) (*Cluster, *Response, error) }
ClustersService is an interface for interfacing with the Clusters endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/clusters/
type ClustersServiceOp ¶
type ClustersServiceOp service
ClustersServiceOp handles communication with the Cluster related methods of the MongoDB Atlas API.
func (*ClustersServiceOp) Create ¶
func (s *ClustersServiceOp) Create(ctx context.Context, groupID string, createRequest *Cluster) (*Cluster, *Response, error)
Create adds a cluster to the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/clusters-create-one/
func (*ClustersServiceOp) Delete ¶
func (s *ClustersServiceOp) Delete(ctx context.Context, groupID, clusterName string, options *DeleteAdvanceClusterOptions) (*Response, error)
Delete the cluster specified to {CLUSTER-NAME} from the project associated to {GROUP-ID}.
func (*ClustersServiceOp) Get ¶
func (s *ClustersServiceOp) Get(ctx context.Context, groupID, clusterName string) (*Cluster, *Response, error)
Get gets the cluster specified to {ClUSTER-NAME} from the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/clusters-get-one/
func (*ClustersServiceOp) GetProcessArgs ¶
func (s *ClustersServiceOp) GetProcessArgs(ctx context.Context, groupID, clusterName string) (*ProcessArgs, *Response, error)
GetProcessArgs gets the Advanced Configuration Options for One Cluster
func (*ClustersServiceOp) GetSampleDatasetStatus ¶ added in v0.8.0
func (s *ClustersServiceOp) GetSampleDatasetStatus(ctx context.Context, groupID, id string) (*SampleDatasetJob, *Response, error)
GetSampleDatasetStatus gets the Sample Dataset job
See more: https://docs.atlas.mongodb.com/reference/api/cluster/check-dataset-status/
func (*ClustersServiceOp) List ¶
func (s *ClustersServiceOp) List(ctx context.Context, groupID string, listOptions *ListOptions) ([]Cluster, *Response, error)
List all clusters in the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/clusters-get-all/
func (*ClustersServiceOp) ListCloudProviderRegions ¶ added in v0.8.0
func (s *ClustersServiceOp) ListCloudProviderRegions(ctx context.Context, groupID string, options *CloudProviderRegionsOptions) (*CloudProviders, *Response, error)
ListCloudProviderRegions gets the available regions for each cloud provider
See more: https://docs.atlas.mongodb.com/reference/api/cluster-get-regions/
func (*ClustersServiceOp) LoadSampleDataset ¶ added in v0.8.0
func (s *ClustersServiceOp) LoadSampleDataset(ctx context.Context, groupID, clusterName string) (*SampleDatasetJob, *Response, error)
LoadSampleDataset loads the sample dataset into your cluster.
See more: https://docs.atlas.mongodb.com/reference/api/cluster/load-dataset/
func (*ClustersServiceOp) Status ¶ added in v0.8.0
func (s *ClustersServiceOp) Status(ctx context.Context, groupID, clusterName string) (ClusterStatus, *Response, error)
Status gets the status of the operation on the Cluster.
See more: https://docs.atlas.mongodb.com/reference/api/clusters-check-operation-status/
func (*ClustersServiceOp) Update ¶
func (s *ClustersServiceOp) Update(ctx context.Context, groupID, clusterName string, updateRequest *Cluster) (*Cluster, *Response, error)
Update a cluster in the project associated to {GROUP-ID}
See more: https://docs.atlas.mongodb.com/reference/api/clusters-modify-one/
func (*ClustersServiceOp) UpdateProcessArgs ¶
func (s *ClustersServiceOp) UpdateProcessArgs(ctx context.Context, groupID, clusterName string, updateRequest *ProcessArgs) (*ProcessArgs, *Response, error)
UpdateProcessArgs Modifies Advanced Configuration Options for One Cluster
func (*ClustersServiceOp) Upgrade ¶ added in v0.17.0
func (s *ClustersServiceOp) Upgrade(ctx context.Context, groupID string, upgradeRequest *Cluster) (*Cluster, *Response, error)
Upgrade a cluster in the project associated to {GROUP-ID}
See more: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#operation/upgradeOneTenantCluster
type CollationOptions ¶
type CollationOptions struct { Locale string `json:"locale,omitempty"` CaseLevel bool `json:"caseLevel,omitempty"` CaseFirst string `json:"caseFirst,omitempty"` Strength int `json:"strength,omitempty"` NumericOrdering bool `json:"numericOrdering,omitempty"` Alternate string `json:"alternate,omitempty"` MaxVariable string `json:"maxVariable,omitempty"` Normalization bool `json:"normalization,omitempty"` Backwards bool `json:"backwards,omitempty"` }
CollationOptions represents options for collation indexes.
See: https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/#option-for-collation
type Completer ¶
type Completer interface {
OnRequestCompleted(RequestCompletionCallback)
}
Completer interface for clients with callback.
type Component ¶ added in v0.7.1
type Component struct { DownloadURL string `json:"downloadUrl"` // DownloadURL from which the snapshot of the components.replicaSetName should be downloaded. Atlas returns null for this parameter if the download URL has expired, has been used, or hasn't been created. ReplicaSetName string `json:"replicaSetName"` // ReplicaSetName of the shard or config server included in the snapshot. }
type Compute ¶
type Compute struct { Enabled *bool `json:"enabled,omitempty"` ScaleDownEnabled *bool `json:"scaleDownEnabled,omitempty"` MinInstanceSize string `json:"minInstanceSize,omitempty"` MaxInstanceSize string `json:"maxInstanceSize,omitempty"` }
Compute Specifies whether the cluster automatically scales its cluster tier and whether the cluster can scale down.
type ConnectionStrings ¶
type ConnectionStrings struct { Standard string `json:"standard,omitempty"` StandardSrv string `json:"standardSrv,omitempty"` PrivateEndpoint []PrivateEndpoint `json:"privateEndpoint,omitempty"` AwsPrivateLink map[string]string `json:"awsPrivateLink,omitempty"` // Deprecated: Use connectionStrings.PrivateEndpoint[n].ConnectionString AwsPrivateLinkSrv map[string]string `json:"awsPrivateLinkSrv,omitempty"` // Deprecated: Use ConnectionStrings.privateEndpoint[n].SRVConnectionString Private string `json:"private,omitempty"` PrivateSrv string `json:"privateSrv,omitempty"` }
ConnectionStrings configuration for applications use to connect to this cluster.
type Container ¶
type Container struct { AtlasCIDRBlock string `json:"atlasCidrBlock,omitempty"` AzureSubscriptionID string `json:"azureSubscriptionId,omitempty"` GCPProjectID string `json:"gcpProjectId,omitempty"` ID string `json:"id,omitempty"` NetworkName string `json:"networkName,omitempty"` ProviderName string `json:"providerName,omitempty"` Provisioned *bool `json:"provisioned,omitempty"` Region string `json:"region,omitempty"` // Region is available for AZURE Regions []string `json:"regions,omitempty"` // Regions are available for GCP RegionName string `json:"regionName,omitempty"` // RegionName is available for AWS VNetName string `json:"vnetName,omitempty"` VPCID string `json:"vpcId,omitempty"` }
Container represents MongoDB network peering containter.
type ContainersListOptions ¶
type ContainersListOptions struct { ProviderName string `url:"providerName,omitempty"` ListOptions }
ContainersListOptions filtering options for containers.
type ContainersService ¶
type ContainersService interface { List(context.Context, string, *ContainersListOptions) ([]Container, *Response, error) ListAll(context.Context, string, *ListOptions) ([]Container, *Response, error) Get(context.Context, string, string) (*Container, *Response, error) Create(context.Context, string, *Container) (*Container, *Response, error) Update(context.Context, string, string, *Container) (*Container, *Response, error) Delete(context.Context, string, string) (*Response, error) }
ContainersService provides access to the network peering containers related functions in the Atlas API.
type ContainersServiceOp ¶
type ContainersServiceOp service
ContainersServiceOp handles communication with the Network Peering Container related methods of the MongoDB Atlas API.
func (*ContainersServiceOp) Create ¶
func (s *ContainersServiceOp) Create(ctx context.Context, groupID string, createRequest *Container) (*Container, *Response, error)
Create adds a network peering container to the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/vpc-create-container/
func (*ContainersServiceOp) Delete ¶
func (s *ContainersServiceOp) Delete(ctx context.Context, groupID, containerID string) (*Response, error)
Delete the network peering container specified to {CONTAINER-ID} from the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/vpc-delete-one-container/
func (*ContainersServiceOp) Get ¶
func (s *ContainersServiceOp) Get(ctx context.Context, groupID, containerID string) (*Container, *Response, error)
Get gets details for one network peering container in an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/vpc-get-container/
func (*ContainersServiceOp) List ¶
func (s *ContainersServiceOp) List(ctx context.Context, groupID string, listOptions *ContainersListOptions) ([]Container, *Response, error)
List gets details for all network peering containers in an Atlas project for a single cloud provider.
See more: https://docs.atlas.mongodb.com/reference/api/vpc-get-containers-list/
func (*ContainersServiceOp) ListAll ¶
func (s *ContainersServiceOp) ListAll(ctx context.Context, groupID string, listOptions *ListOptions) ([]Container, *Response, error)
ListAll gets details for all network peering containers in an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/vpc-get-containers-list-all/
func (*ContainersServiceOp) Update ¶
func (s *ContainersServiceOp) Update(ctx context.Context, groupID, containerID string, updateRequest *Container) (*Container, *Response, error)
Update a network peering container in the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/vpc-update-container/
type ContinuousJob ¶
type ContinuousJob struct { BatchID string `json:"batchId,omitempty"` ClusterID string `json:"clusterId,omitempty"` Created string `json:"created"` ClusterName string `json:"clusterName,omitempty"` Delivery *Delivery `json:"delivery,omitempty"` EncryptionEnabled bool `json:"encryptionEnabled"` GroupID string `json:"groupId"` Hashes []*Hash `json:"hashes,omitempty"` ID string `json:"id"` Links []*Link `json:"links,omitempty"` MasterKeyUUID string `json:"masterKeyUUID,omitempty"` SnapshotID string `json:"snapshotId"` StatusName string `json:"statusName"` PointInTime *bool `json:"pointInTime,omitempty"` Timestamp SnapshotTimestamp `json:"timestamp"` }
type ContinuousJobRequest ¶
type ContinuousJobRequest struct { CheckPointID string `json:"checkPointId,omitempty"` Delivery Delivery `json:"delivery"` OplogTS string `json:"oplogTs,omitempty"` OplogInc int64 `json:"oplogInc,omitempty"` PointInTimeUTCMillis float64 `json:"pointInTimeUTCMillis,omitempty"` SnapshotID string `json:"snapshotId,omitempty"` }
type ContinuousJobs ¶
type ContinuousJobs struct { Results []*ContinuousJob `json:"results,omitempty"` Links []*Link `json:"links,omitempty"` TotalCount int64 `json:"totalCount,omitempty"` }
type ContinuousRestoreJobsService ¶
type ContinuousRestoreJobsService interface { List(context.Context, string, string, *ListOptions) (*ContinuousJobs, *Response, error) Get(context.Context, string, string, string) (*ContinuousJob, *Response, error) Create(context.Context, string, string, *ContinuousJobRequest) (*ContinuousJobs, *Response, error) }
ContinuousRestoreJobsService provides access to the restore jobs related functions in the Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/legacy-backup/restore/restores/
type ContinuousRestoreJobsServiceOp ¶
type ContinuousRestoreJobsServiceOp service
ContinuousRestoreJobsServiceOp handles communication with the Continuous Backup Restore Jobs related methods of the MongoDB Atlas API.
func (*ContinuousRestoreJobsServiceOp) Create ¶
func (s *ContinuousRestoreJobsServiceOp) Create(ctx context.Context, groupID, clusterID string, request *ContinuousJobRequest) (*ContinuousJobs, *Response, error)
Create creates a continuous backup job in Atlas
See more: https://docs.atlas.mongodb.com/reference/api/restore-jobs-create-one/
func (*ContinuousRestoreJobsServiceOp) Get ¶
func (s *ContinuousRestoreJobsServiceOp) Get(ctx context.Context, groupID, clusterID, jobID string) (*ContinuousJob, *Response, error)
Get gets a continuous backup job in Atlas
See more: https://docs.atlas.mongodb.com/reference/api/restore-jobs-get-one/
func (*ContinuousRestoreJobsServiceOp) List ¶
func (s *ContinuousRestoreJobsServiceOp) List(ctx context.Context, groupID, clusterID string, opts *ListOptions) (*ContinuousJobs, *Response, error)
List lists all continuous backup jobs in Atlas
See more: https://docs.atlas.mongodb.com/reference/api/restore-jobs-get-all/
type ContinuousSnapshot ¶
type ContinuousSnapshot struct { ClusterID string `json:"clusterId,omitempty"` Complete bool `json:"complete,omitempty"` Created *SnapshotTimestamp `json:"created,omitempty"` DoNotDelete *bool `json:"doNotDelete,omitempty"` Expires string `json:"expires,omitempty"` GroupID string `json:"groupId,omitempty"` ID string `json:"id,omitempty"` // Unique identifier of the snapshot. IsPossiblyInconsistent *bool `json:"isPossiblyInconsistent,omitempty"` LastOplogAppliedTimestamp *SnapshotTimestamp `json:"lastOplogAppliedTimestamp,omitempty"` Links []*Link `json:"links,omitempty"` // One or more links to sub-resources and/or related resources. NamespaceFilterList *NamespaceFilter `json:"namespaceFilterList,omitempty"` MissingShards []*MissingShard `json:"missingShards,omitempty"` Parts []*Part `json:"parts,omitempty"` }
ContinuousSnapshot represents a cloud provider snapshot.
type ContinuousSnapshots ¶
type ContinuousSnapshots struct { Results []*ContinuousSnapshot `json:"results,omitempty"` // Includes one ContinuousSnapshots object for each item detailed in the results array section. Links []*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. }
ContinuousSnapshots represents all cloud provider snapshots.
type ContinuousSnapshotsService ¶
type ContinuousSnapshotsService interface { List(context.Context, string, string, *ListOptions) (*ContinuousSnapshots, *Response, error) Get(context.Context, string, string, string) (*ContinuousSnapshot, *Response, error) ChangeExpiry(context.Context, string, string, string, *ContinuousSnapshot) (*ContinuousSnapshot, *Response, error) Delete(context.Context, string, string, string) (*Response, error) }
ContinuousSnapshotsService is an interface for interfacing with the Continuous Snapshots endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/snapshots/
type ContinuousSnapshotsServiceOp ¶
type ContinuousSnapshotsServiceOp service
ContinuousSnapshotsServiceOp handles communication with the Continuous Snapshots related methods of the MongoDB Atlas API.
func (*ContinuousSnapshotsServiceOp) ChangeExpiry ¶
func (s *ContinuousSnapshotsServiceOp) ChangeExpiry(ctx context.Context, groupID, clusterID, snapshotID string, updateRequest *ContinuousSnapshot) (*ContinuousSnapshot, *Response, error)
ChangeExpiry changes the expiry date for the given cluster and snapshot ID
See more: https://docs.atlas.mongodb.com/reference/api/snapshots-change-expiration/
func (*ContinuousSnapshotsServiceOp) Delete ¶
func (s *ContinuousSnapshotsServiceOp) Delete(ctx context.Context, groupID, clusterID, snapshotID string) (*Response, error)
Delete deletes the given continuous snapshot
See more: https://docs.atlas.mongodb.com/reference/api/snapshots-delete-one/
func (*ContinuousSnapshotsServiceOp) Get ¶
func (s *ContinuousSnapshotsServiceOp) Get(ctx context.Context, groupID, clusterID, snapshotID string) (*ContinuousSnapshot, *Response, error)
Get gets the continuous snapshot for the given cluster and snapshot ID
See more: https://docs.atlas.mongodb.com/reference/api/snapshots-get-one/
func (*ContinuousSnapshotsServiceOp) List ¶
func (s *ContinuousSnapshotsServiceOp) List(ctx context.Context, groupID, clusterID string, listOptions *ListOptions) (*ContinuousSnapshots, *Response, error)
List lists continuous snapshots for the given cluster
See more: https://docs.atlas.mongodb.com/reference/api/snapshots-get-all/
type CopySetting ¶ added in v0.20.0
type CopySetting struct { CloudProvider *string `json:"cloudProvider,omitempty"` // Identifies the cloud provider that stores the snapshot copy. RegionName *string `json:"regionName,omitempty"` // Target region to copy snapshots belonging to replicationSpecId to. ReplicationSpecID *string `json:"replicationSpecId,omitempty"` // Unique identifier that identifies the replication object for a zone in a cluster. ShouldCopyOplogs *bool `json:"shouldCopyOplogs,omitempty"` // Flag that indicates whether to copy the oplogs to the target region. Frequencies []string `json:"frequencies,omitempty"` // List that describes which types of snapshots to copy. }
CopySetting is autogenerated from the json schema.
type CreateOrganizationRequest ¶ added in v0.23.0
type CreateOrganizationRequest struct { APIKey *APIKeyInput `json:"apiKey,omitempty"` FederationSettingsID *string `json:"federationSettingsId,omitempty"` Name string `json:"name"` OrgOwnerID *string `json:"orgOwnerId,omitempty"` }
CreateOrganizationRequest struct for CreateOrganizationRequest.
type CreateOrganizationResponse ¶ added in v0.23.0
type CreateOrganizationResponse struct { APIKey *APIKey `json:"apiKey,omitempty"` FederationSettingsID *string `json:"federationSettingsId,omitempty"` OrgOwnerID *string `json:"orgOwnerId,omitempty"` Organization *Organization `json:"organization,omitempty"` }
CreateOrganizationResponse struct for CreateOrganizationResponse.
type CreateProjectOptions ¶ added in v0.13.0
type CreateProjectOptions struct {
ProjectOwnerID string `url:"projectOwnerId,omitempty"` // Unique 24-hexadecimal digit string that identifies the Atlas user account to be granted the Project Owner role on the specified project.
}
type CurrentValue ¶
type CurrentValue struct { Number *float64 `json:"number,omitempty"` // The value of the metric. Units string `json:"units,omitempty"` // The units for the value. Depends on the type of metric. }
CurrentValue represents current value of the metric that triggered the alert. Only present for alerts of type HOST_METRIC.
type CustomDBRole ¶
type CustomDBRole struct { Actions []Action `json:"actions,omitempty"` InheritedRoles []InheritedRole `json:"inheritedRoles"` RoleName string `json:"roleName,omitempty"` }
CustomDBRole represents a Custom MongoDB Role in your cluster.
type CustomDBRolesService ¶
type CustomDBRolesService interface { List(context.Context, string, *ListOptions) (*[]CustomDBRole, *Response, error) Get(context.Context, string, string) (*CustomDBRole, *Response, error) Create(context.Context, string, *CustomDBRole) (*CustomDBRole, *Response, error) Update(context.Context, string, string, *CustomDBRole) (*CustomDBRole, *Response, error) Delete(context.Context, string, string) (*Response, error) }
CustomDBRolesService is an interface for working wit the Custom MongoDB Roles endpoints of the MongoDB Atlas API. See more: https://docs.atlas.mongodb.com/reference/api/custom-roles/
type CustomDBRolesServiceOp ¶
type CustomDBRolesServiceOp service
CustomDBRolesServiceOp handles communication with the CustomDBRoles related methods of the MongoDB Atlas API.
func (*CustomDBRolesServiceOp) Create ¶
func (s *CustomDBRolesServiceOp) Create(ctx context.Context, groupID string, createRequest *CustomDBRole) (*CustomDBRole, *Response, error)
Create create a new Custom MongoDB Role in the project.
See more: https://docs.atlas.mongodb.com/reference/api/custom-roles-create-a-role/
func (*CustomDBRolesServiceOp) Delete ¶
func (s *CustomDBRolesServiceOp) Delete(ctx context.Context, groupID, roleName string) (*Response, error)
Delete deletes a single Custom MongoDB Role.
See more: https://docs.atlas.mongodb.com/reference/api/custom-roles-delete-a-role/
func (*CustomDBRolesServiceOp) Get ¶
func (s *CustomDBRolesServiceOp) Get(ctx context.Context, groupID, roleName string) (*CustomDBRole, *Response, error)
Get gets a single Custom MongoDB Role in the project.
See more: https://docs.atlas.mongodb.com/reference/api/custom-roles-get-single-role/
func (*CustomDBRolesServiceOp) List ¶
func (s *CustomDBRolesServiceOp) List(ctx context.Context, groupID string, listOptions *ListOptions) (*[]CustomDBRole, *Response, error)
List gets all custom db roles in the project.
See more: https://docs.atlas.mongodb.com/reference/api/custom-roles-get-all-roles/
func (*CustomDBRolesServiceOp) Update ¶
func (s *CustomDBRolesServiceOp) Update(ctx context.Context, groupID, roleName string, updateRequest *CustomDBRole) (*CustomDBRole, *Response, error)
Update updates a single Custom MongoDB Role.
See more: https://docs.atlas.mongodb.com/reference/api/custom-roles-update-a-role/
type CustomZoneMapping ¶
CustomZoneMapping represents the custom zone mapping.
type CustomZoneMappingsRequest ¶
type CustomZoneMappingsRequest struct {
CustomZoneMappings []CustomZoneMapping `json:"customZoneMappings"`
}
CustomZoneMappingsRequest represents the request related to add custom zone mappings to a global cluster.
type CustomerX509 ¶
type CustomerX509 struct {
Cas string `json:"cas,omitempty"` // PEM string containing one or more customer CAs for database user authentication.
}
CustomerX509 represents Customer-managed X.509 configuration for an Atlas project.
type DataFederationCollection ¶ added in v0.26.0
type DataFederationCollection struct { DataSources []*DataFederationDataSource `json:"dataSources,omitempty"` Name string `json:"name,omitempty"` }
DataFederationCollection represents queryable collections for this data federation.
type DataFederationDataSource ¶ added in v0.26.0
type DataFederationDataSource struct { AllowInsecure *bool `json:"allowInsecure,omitempty"` Collection string `json:"collection,omitempty"` CollectionRegex string `json:"collectionRegex,omitempty"` Database string `json:"database,omitempty"` DatabaseRegex string `json:"databaseRegex,omitempty"` DefaultFormat string `json:"defaultFormat,omitempty"` Path string `json:"path,omitempty"` ProvenanceFieldName string `json:"provenanceFieldName,omitempty"` StoreName string `json:"storeName,omitempty"` Urls []*string `json:"urls,omitempty"` }
DataFederationDataSource represents data stores that map to a collection for this data federation.
type DataFederationDatabase ¶ added in v0.26.0
type DataFederationDatabase struct { Collections []*DataFederationCollection `json:"collections,omitempty"` Views []*DataFederationDatabaseView `json:"views,omitempty"` MaxWildcardCollections int32 `json:"maxWildcardCollections,omitempty"` Name string `json:"name,omitempty"` }
DataFederationDatabase represents queryable databases and collections for this data federation.
type DataFederationDatabaseView ¶ added in v0.26.0
type DataFederationDatabaseView struct { Name string `json:"name,omitempty"` Source string `json:"source,omitempty"` Pipeline string `json:"pipeline,omitempty"` }
DataFederationDatabaseView represents any view under a DataFederationDatabase.
type DataFederationInstance ¶ added in v0.26.0
type DataFederationInstance struct { CloudProviderConfig *CloudProviderConfig `json:"cloudProviderConfig,omitempty"` DataProcessRegion *DataProcessRegion `json:"dataProcessRegion,omitempty"` Storage *DataFederationStorage `json:"storage,omitempty"` Name string `json:"name,omitempty"` State string `json:"state,omitempty"` Hostnames []string `json:"hostnames,omitempty"` }
DataFederationInstance is the data federation configuration.
type DataFederationQueryLimit ¶ added in v0.27.0
type DataFederationQueryLimit struct { CurrentUsage int64 `json:"currentUsage,omitempty"` DefaultLimit int64 `json:"defaultLimit,omitempty"` LastModifiedDate string `json:"lastModifiedDate,omitempty"` MaximumLimit int64 `json:"maximumLimit,omitempty"` Name string `json:"name,omitempty"` OverrunPolicy string `json:"overrunPolicy,omitempty"` TenantName string `json:"tenantName,omitempty"` Value int64 `json:"value,omitempty"` }
DataFederationQueryLimit Details of a tenant-level query limit for Data Federation.
type DataFederationService ¶ added in v0.26.0
type DataFederationService interface { List(context.Context, string) ([]*DataFederationInstance, *Response, error) Get(context.Context, string, string) (*DataFederationInstance, *Response, error) Create(context.Context, string, *DataFederationInstance) (*DataFederationInstance, *Response, error) Update(context.Context, string, string, *DataFederationInstance, *DataFederationUpdateOptions) (*DataFederationInstance, *Response, error) Delete(context.Context, string, string) (*Response, error) ListQueryLimits(context.Context, string, string) ([]*DataFederationQueryLimit, *Response, error) GetQueryLimit(context.Context, string, string, string) (*DataFederationQueryLimit, *Response, error) ConfigureQueryLimit(context.Context, string, string, string, *DataFederationQueryLimit) (*DataFederationQueryLimit, *Response, error) DeleteQueryLimit(context.Context, string, string, string) (*Response, error) }
DataFederationService is an interface for interfacing with the Data Federation endpoints of the MongoDB Atlas API.
See more: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Data-Federation
type DataFederationServiceOp ¶ added in v0.26.0
type DataFederationServiceOp service
DataFederationServiceOp handles communication with the DataFederationService related methods of the MongoDB Atlas API.
func (*DataFederationServiceOp) ConfigureQueryLimit ¶ added in v0.27.0
func (s *DataFederationServiceOp) ConfigureQueryLimit(ctx context.Context, groupID, name, limitName string, queryLimit *DataFederationQueryLimit) (*DataFederationQueryLimit, *Response, error)
ConfigureQueryLimit Creates or updates one query limit for one federated database instance.
func (*DataFederationServiceOp) Create ¶ added in v0.26.0
func (s *DataFederationServiceOp) Create(ctx context.Context, groupID string, createRequest *DataFederationInstance) (*DataFederationInstance, *Response, error)
Create creates one federated database instance in the specified project.
func (*DataFederationServiceOp) Delete ¶ added in v0.26.0
func (s *DataFederationServiceOp) Delete(ctx context.Context, groupID, name string) (*Response, error)
Delete removes one federated database instance from the specified project.
func (*DataFederationServiceOp) DeleteQueryLimit ¶ added in v0.27.0
func (*DataFederationServiceOp) Get ¶ added in v0.26.0
func (s *DataFederationServiceOp) Get(ctx context.Context, groupID, name string) (*DataFederationInstance, *Response, error)
Get gets the details of one federated database instance within the specified project.
func (*DataFederationServiceOp) GetQueryLimit ¶ added in v0.27.0
func (s *DataFederationServiceOp) GetQueryLimit(ctx context.Context, groupID, name, limitName string) (*DataFederationQueryLimit, *Response, error)
func (*DataFederationServiceOp) List ¶ added in v0.26.0
func (s *DataFederationServiceOp) List(ctx context.Context, groupID string) ([]*DataFederationInstance, *Response, error)
List gets the details of all federated database instances in the specified project.
func (*DataFederationServiceOp) ListQueryLimits ¶ added in v0.27.0
func (s *DataFederationServiceOp) ListQueryLimits(ctx context.Context, groupID, name string) ([]*DataFederationQueryLimit, *Response, error)
func (*DataFederationServiceOp) Update ¶ added in v0.26.0
func (s *DataFederationServiceOp) Update(ctx context.Context, groupID, name string, updateRequest *DataFederationInstance, option *DataFederationUpdateOptions) (*DataFederationInstance, *Response, error)
Update updates the details of one federated database instance in the specified project.
type DataFederationStorage ¶ added in v0.26.0
type DataFederationStorage struct { Databases []*DataFederationDatabase `json:"databases,omitempty"` Stores []*DataFederationStore `json:"stores,omitempty"` }
DataFederationStorage represents the storage configuration for a data lake.
type DataFederationStore ¶ added in v0.26.0
type DataFederationStore struct { ReadPreference *ReadPreference `json:"readPreference,omitempty"` AdditionalStorageClasses []*string `json:"additionalStorageClasses,omitempty"` Urls []*string `json:"urls,omitempty"` Name string `json:"name,omitempty"` Provider string `json:"provider,omitempty"` ClusterName string `json:"clusterName,omitempty"` ClusterID string `json:"clusterId,omitempty"` Region string `json:"region,omitempty"` Bucket string `json:"bucket,omitempty"` Prefix string `json:"prefix,omitempty"` Delimiter string `json:"delimiter,omitempty"` ProjectID string `json:"projectId,omitempty"` DefaultFormat string `json:"defaultFormat,omitempty"` IncludeTags *bool `json:"includeTags,omitempty"` Public *bool `json:"public,omitempty"` AllowInsecure *bool `json:"allowInsecure,omitempty"` }
DataFederationStore represents data stores for the data federation.
type DataFederationUpdateOptions ¶ added in v0.26.0
type DataFederationUpdateOptions struct { // Flag that indicates whether this request should check if the requesting IAM role can read from the S3 bucket. // AWS checks if the role can list the objects in the bucket before writing to it. // Some IAM roles only need write permissions. This flag allows you to skip that check. SkipRoleValidation bool `url:"skipRoleValidation"` }
DataFederationUpdateOptions specifies the optional parameters to Update method.
type DataLake ¶
type DataLake struct { CloudProviderConfig CloudProviderConfig `json:"cloudProviderConfig,omitempty"` // Configuration for the cloud service where Data Lake source data is stored. DataProcessRegion DataProcessRegion `json:"dataProcessRegion,omitempty"` // Cloud provider region which clients are routed to for data processing. GroupID string `json:"groupId,omitempty"` // Unique identifier for the project. Hostnames []string `json:"hostnames,omitempty"` // List of hostnames for the data lake. Name string `json:"name,omitempty"` // Name of the data lake. State string `json:"state,omitempty"` // Current state of the data lake. Storage Storage `json:"storage,omitempty"` // Configuration for each data store and its mapping to MongoDB collections / databases. }
DataLake represents a data lake.
type DataLakeCollection ¶
type DataLakeCollection struct { Name string `json:"name,omitempty"` DataSources []DataLakeDataSource `json:"dataSources,omitempty"` }
DataLakeCollection represents collections under a DataLakeDatabase.
type DataLakeCreateRequest ¶
type DataLakeCreateRequest struct { Name string `json:"name,omitempty"` CloudProviderConfig *CloudProviderConfig `json:"cloudProviderConfig,omitempty"` }
DataLakeCreateRequest represents the required fields to create a new data lake.
type DataLakeDataSource ¶
type DataLakeDataSource struct { StoreName string `json:"storeName,omitempty"` DefaultFormat string `json:"defaultFormat,omitempty"` Path string `json:"path,omitempty"` }
DataLakeDataSource represents the data source of a data lake.
type DataLakeDatabase ¶
type DataLakeDatabase struct { Name string `json:"name,omitempty"` Collections []DataLakeCollection `json:"collections,omitempty"` Views []DataLakeDatabaseView `json:"views,omitempty"` MaxWildcardCollections *int64 `json:"maxWildcardCollections,omitempty"` }
DataLakeDatabase represents the mapping of a data lake to a database. Docs: https://docs.mongodb.com/datalake/reference/format/data-lake-configuration/#databases
type DataLakeDatabaseView ¶
type DataLakeDatabaseView struct { Name string `json:"name,omitempty"` Source string `json:"source,omitempty"` Pipeline string `json:"pipeline,omitempty"` }
DataLakeDatabaseView represents any view under a DataLakeDatabase.
type DataLakePipeline ¶ added in v0.27.0
type DataLakePipeline struct { ID string `json:"_id,omitempty"` // Unique 24-hexadecimal digit string that identifies the Data Lake Pipeline. GroupID string `json:"groupId,omitempty"` // Unique identifier for the project. Name string `json:"name,omitempty"` // Name of this Data Lake Pipeline. CreatedDate string `json:"createdDate,omitempty"` // Timestamp that indicates when the Data Lake Pipeline was created. LastUpdatedDate string `json:"lastUpdatedDate,omitempty"` // Timestamp that indicates the last time that the Data Lake Pipeline was updated. State string `json:"state,omitempty"` // State of this Data Lake Pipeline. Sink *DataLakePipelineSink `json:"sink,omitempty"` // Ingestion destination of a Data Lake Pipeline. Source *DataLakePipelineSource `json:"source,omitempty"` // Ingestion Source of a Data Lake Pipeline. Transformations []*DataLakePipelineTransformation `json:"transformations,omitempty"` // Fields to be excluded for this Data Lake Pipeline. }
DataLakePipeline represents a store of data lake data. Docs: https://docs.mongodb.com/datalake/reference/format/data-lake-configuration/#stores
type DataLakePipelineIngestionSchedule ¶ added in v0.27.0
type DataLakePipelineIngestionSchedule struct { ID string `json:"id,omitempty"` // Unique 24-hexadecimal digit string that identifies this backup policy item. FrequencyType string `json:"frequencyType,omitempty"` // Human-readable label that identifies the frequency type associated with the backup policy. RetentionUnit string `json:"retentionUnit,omitempty"` // Unit of time in which MongoDB Cloud measures snapshot retention. FrequencyInterval int32 `json:"frequencyInterval,omitempty"` // Number that indicates the frequency interval for a set of snapshots. RetentionValue int32 `json:"retentionValue,omitempty"` // Duration in days, weeks, or months that MongoDB Cloud retains the snapshot. }
DataLakePipelineIngestionSchedule represents a backup schedule policy item that you can use as a Data Lake Pipeline source.
type DataLakePipelinePartitionField ¶ added in v0.27.0
type DataLakePipelinePartitionField struct { FieldName string `json:"fieldName,omitempty"` Order int32 `json:"order,omitempty"` }
DataLakePipelinePartitionField represents ordered fields used to physically organize data in the destination.
type DataLakePipelineRun ¶ added in v0.27.0
type DataLakePipelineRun struct { ID string `json:"_id,omitempty"` // Unique 24-hexadecimal character string that identifies a Data Lake Pipeline run. BackupFrequencyType string `json:"backupFrequencyType,omitempty"` // Backup schedule interval of the Data Lake Pipeline. CreatedDate string `json:"createdDate,omitempty"` // Timestamp that indicates when the pipeline run was created. DatasetName string `json:"datasetName,omitempty"` // Human-readable label that identifies the dataset that Atlas generates during this pipeline run. GroupID string `json:"groupId,omitempty"` // Unique 24-hexadecimal character string that identifies the project. LastUpdatedDate string `json:"lastUpdatedDate,omitempty"` // Timestamp that indicates the last time that the pipeline run was updated. Phase string `json:"phase,omitempty"` // Processing phase of the Data Lake Pipeline. PipelineID string `json:"pipelineId,omitempty"` // Unique 24-hexadecimal character string that identifies a Data Lake Pipeline. SnapshotID string `json:"snapshotId,omitempty"` // Unique 24-hexadecimal character string that identifies the snapshot of a cluster. State string `json:"state,omitempty"` // State of the pipeline run. Stats *DataLakePipelineRunStats `json:"stats,omitempty"` // Runtime statistics for this Data Lake Pipeline run. }
DataLakePipelineRun represents a DataLake Pipeline Run.
type DataLakePipelineRunStats ¶ added in v0.27.0
type DataLakePipelineRunStats struct { BytesExported int64 `json:"bytesExported,omitempty"` // Total data size in bytes exported for this pipeline run. NumDocs int64 `json:"numDocs,omitempty"` // Number of docs ingested for a this pipeline run. }
DataLakePipelineRunStats represents runtime statistics for this Data Lake Pipeline run.
type DataLakePipelineRunsResponse ¶ added in v0.27.0
type DataLakePipelineRunsResponse struct { Links []*Link `json:"links,omitempty"` // List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. Results []*DataLakePipelineRun `json:"results,omitempty"` // List of returned documents that MongoDB Cloud providers when completing this request. TotalCount int `json:"totalCount,omitempty"` // Number of documents returned in this response. }
DataLakePipelineRunsResponse represents the response of DataLakePipelineService.ListRuns.
type DataLakePipelineService ¶ added in v0.27.0
type DataLakePipelineService interface { List(context.Context, string) ([]*DataLakePipeline, *Response, error) ListSnapshots(context.Context, string, string, *ListDataLakePipelineSnapshotOptions) (*DataLakePipelineSnapshotsResponse, *Response, error) ListIngestionSchedules(context.Context, string, string) ([]*DataLakePipelineIngestionSchedule, *Response, error) ListRuns(context.Context, string, string) (*DataLakePipelineRunsResponse, *Response, error) Get(context.Context, string, string) (*DataLakePipeline, *Response, error) GetRun(context.Context, string, string, string) (*DataLakePipelineRun, *Response, error) Create(context.Context, string, *DataLakePipeline) (*DataLakePipeline, *Response, error) Update(context.Context, string, string, *DataLakePipeline) (*DataLakePipeline, *Response, error) Delete(context.Context, string, string) (*Response, error) }
DataLakePipelineService is an interface for interfacing with the Data Lake Pipeline endpoints of the MongoDB Atlas API.
See more: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Data-Lake-Pipelines
type DataLakePipelineServiceOp ¶ added in v0.27.0
type DataLakePipelineServiceOp service
DataLakePipelineServiceOp handles communication with the DataLakePipelineService related methods of the MongoDB Atlas API.
func (*DataLakePipelineServiceOp) Create ¶ added in v0.27.0
func (s *DataLakePipelineServiceOp) Create(ctx context.Context, groupID string, createRequest *DataLakePipeline) (*DataLakePipeline, *Response, error)
Create creates one Data Lake Pipeline.
func (*DataLakePipelineServiceOp) Delete ¶ added in v0.27.0
func (s *DataLakePipelineServiceOp) Delete(ctx context.Context, groupID, name string) (*Response, error)
Delete deletes one Data Lake Pipeline.
func (*DataLakePipelineServiceOp) Get ¶ added in v0.27.0
func (s *DataLakePipelineServiceOp) Get(ctx context.Context, groupID, name string) (*DataLakePipeline, *Response, error)
Get gets the details of one Data Lake Pipeline within the specified project.
func (*DataLakePipelineServiceOp) GetRun ¶ added in v0.27.0
func (s *DataLakePipelineServiceOp) GetRun(ctx context.Context, groupID, name, id string) (*DataLakePipelineRun, *Response, error)
GetRun gets the details of one Data Lake Pipeline run within the specified project.
func (*DataLakePipelineServiceOp) List ¶ added in v0.27.0
func (s *DataLakePipelineServiceOp) List(ctx context.Context, groupID string) ([]*DataLakePipeline, *Response, error)
List gets a list of Data Lake Pipelines.
func (*DataLakePipelineServiceOp) ListIngestionSchedules ¶ added in v0.27.0
func (s *DataLakePipelineServiceOp) ListIngestionSchedules(ctx context.Context, groupID, name string) ([]*DataLakePipelineIngestionSchedule, *Response, error)
ListIngestionSchedules gets a list of backup schedule policy items that you can use as a Data Lake Pipeline source.
func (*DataLakePipelineServiceOp) ListRuns ¶ added in v0.27.0
func (s *DataLakePipelineServiceOp) ListRuns(ctx context.Context, groupID, name string) (*DataLakePipelineRunsResponse, *Response, error)
ListRuns gets a list of past Data Lake Pipeline runs.
func (*DataLakePipelineServiceOp) ListSnapshots ¶ added in v0.27.0
func (s *DataLakePipelineServiceOp) ListSnapshots(ctx context.Context, groupID, name string, options *ListDataLakePipelineSnapshotOptions) (*DataLakePipelineSnapshotsResponse, *Response, error)
ListSnapshots gets a list of backup snapshots that you can use to trigger an on demand pipeline run.
func (*DataLakePipelineServiceOp) Update ¶ added in v0.27.0
func (s *DataLakePipelineServiceOp) Update(ctx context.Context, groupID, name string, updateRequest *DataLakePipeline) (*DataLakePipeline, *Response, error)
Update updates one Data Lake Pipeline.
type DataLakePipelineSink ¶ added in v0.27.0
type DataLakePipelineSink struct { Type string `json:"type,omitempty"` // Type of ingestion destination of this Data Lake Pipeline. MetadataProvider string `json:"metadataProvider,omitempty"` // Target cloud provider for this Data Lake Pipeline. MetadataRegion string `json:"metadataRegion,omitempty"` // Target cloud provider region for this Data Lake Pipeline. PartitionFields []*DataLakePipelinePartitionField `json:"partitionFields,omitempty"` // Ordered fields used to physically organize data in the destination. }
DataLakePipelineSink represents ingestion destination of a Data Lake Pipeline.
type DataLakePipelineSnapshot ¶ added in v0.27.0
type DataLakePipelineSnapshot struct { ID string `json:"id,omitempty"` // Unique 24-hexadecimal digit string that identifies the snapshot. CloudProvider string `json:"cloudProvider,omitempty"` // Human-readable label that identifies the cloud provider that stores this snapshot. CreatedAt string `json:"createdAt,omitempty"` // Date and time when MongoDB Cloud took the snapshot. Description string `json:"description,omitempty"` // Human-readable phrase or sentence that explains the purpose of the snapshot. ExpiresAt string `json:"expiresAt,omitempty"` // Date and time when MongoDB Cloud deletes the snapshot. FrequencyType string `json:"frequencyType,omitempty"` // Human-readable label that identifies how often this snapshot triggers. MasterKeyUUID string `json:"masterKeyUUID,omitempty"` // Unique string that identifies the Amazon Web Services (AWS) Key Management Service (KMS) Customer Master Key (CMK) used to encrypt the snapshot. MongodVersion string `json:"mongodVersion,omitempty"` // Version of the MongoDB host that this snapshot backs up. ReplicaSetName string `json:"replicaSetName,omitempty"` // Human-readable label that identifies the replica set from which MongoDB Cloud took this snapshot. SnapshotType string `json:"snapshotType,omitempty"` // Human-readable label that identifies when this snapshot triggers. Status string `json:"status,omitempty"` // Human-readable label that indicates the stage of the backup process for this snapshot. Type string `json:"type,omitempty"` // Human-readable label that categorizes the cluster as a replica set or sharded cluster. StorageSizeBytes int64 `json:"storageSizeBytes,omitempty"` // Number of bytes taken to store the backup snapshot. CopyRegions []string `json:"copyRegions,omitempty"` // List that identifies the regions to which MongoDB Cloud copies the snapshot. PolicyItems []string `json:"policyItems,omitempty"` // List that contains unique identifiers for the policy items. Links []*Link `json:"links,omitempty"` // List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. }
DataLakePipelineSnapshot represents a snapshot that you can use to trigger an on demand pipeline run.
type DataLakePipelineSnapshotsResponse ¶ added in v0.27.0
type DataLakePipelineSnapshotsResponse struct { Links []*Link `json:"links,omitempty"` // List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. Results []*DataLakePipelineSnapshot `json:"results,omitempty"` // List of returned documents that MongoDB Cloud providers when completing this request. TotalCount int `json:"totalCount,omitempty"` // Number of documents returned in this response. }
DataLakePipelineSnapshotsResponse represents the response of DataLakePipelineService.ListSnapshots.
type DataLakePipelineSource ¶ added in v0.27.0
type DataLakePipelineSource struct { Type string `json:"type,omitempty"` // Type of ingestion source of this Data Lake Pipeline. ClusterName string `json:"clusterName,omitempty"` // Human-readable name that identifies the cluster. CollectionName string `json:"collectionName,omitempty"` // Human-readable name that identifies the collection. DatabaseName string `json:"databaseName,omitempty"` // Human-readable name that identifies the database. PolicyItemID string `json:"policyItemId,omitempty"` // Unique 24-hexadecimal character string that identifies a policy item. GroupID string `json:"groupId,omitempty"` // Unique 24-hexadecimal character string that identifies the project. }
DataLakePipelineSource represents the storage configuration for a data lake.
type DataLakePipelineTransformation ¶ added in v0.27.0
type DataLakePipelineTransformation struct { Field string `json:"field,omitempty"` // Key in the document. Type string `json:"type,omitempty"` // Type of transformation applied during the export of the namespace in a Data Lake Pipeline. }
DataLakePipelineTransformation represents fields to be excluded for this Data Lake Pipeline.
type DataLakeService ¶
type DataLakeService interface { List(context.Context, string) ([]DataLake, *Response, error) Get(context.Context, string, string) (*DataLake, *Response, error) Create(context.Context, string, *DataLakeCreateRequest) (*DataLake, *Response, error) Update(context.Context, string, string, *DataLakeUpdateRequest) (*DataLake, *Response, error) Delete(context.Context, string, string) (*Response, error) CreatePrivateLinkEndpoint(context.Context, string, *PrivateLinkEndpointDataLake) (*PrivateLinkEndpointDataLakeResponse, *Response, error) GetPrivateLinkEndpoint(context.Context, string, string) (*PrivateLinkEndpointDataLake, *Response, error) ListPrivateLinkEndpoint(context.Context, string) (*PrivateLinkEndpointDataLakeResponse, *Response, error) DeletePrivateLinkEndpoint(context.Context, string, string) (*Response, error) }
DataLakeService is an interface for interfacing with the Data Lake endpoints of the MongoDB Atlas API.
See more: https://docs.mongodb.com/datalake/reference/api/datalakes-api
type DataLakeServiceOp ¶
type DataLakeServiceOp service
DataLakeServiceOp handles communication with the DataLakeService related methods of the MongoDB Atlas API.
func (*DataLakeServiceOp) Create ¶
func (s *DataLakeServiceOp) Create(ctx context.Context, groupID string, createRequest *DataLakeCreateRequest) (*DataLake, *Response, error)
Create creates a new Data Lake.
See more: https://docs.mongodb.com/datalake/reference/api/dataLakes-create-one-tenant/
func (*DataLakeServiceOp) CreatePrivateLinkEndpoint ¶ added in v0.15.0
func (s *DataLakeServiceOp) CreatePrivateLinkEndpoint(ctx context.Context, groupID string, createRequest *PrivateLinkEndpointDataLake) (*PrivateLinkEndpointDataLakeResponse, *Response, error)
CreatePrivateLinkEndpoint creates one private link endpoint in Data Lake Atlas project.
func (*DataLakeServiceOp) Delete ¶
Delete deletes the Data Lake with a given name.
See more: https://docs.mongodb.com/datalake/reference/api/dataLakes-delete-one-tenant/
func (*DataLakeServiceOp) DeletePrivateLinkEndpoint ¶ added in v0.15.0
func (s *DataLakeServiceOp) DeletePrivateLinkEndpoint(ctx context.Context, groupID, endpointID string) (*Response, error)
DeletePrivateLinkEndpoint deletes the Data Lake private link endpoint with a given endpoint id.
func (*DataLakeServiceOp) Get ¶
func (s *DataLakeServiceOp) Get(ctx context.Context, groupID, name string) (*DataLake, *Response, error)
Get gets the data laked associated with a specific name.
See more: https://docs.mongodb.com/datalake/reference/api/dataLakes-get-one-tenant/
func (*DataLakeServiceOp) GetPrivateLinkEndpoint ¶ added in v0.15.0
func (s *DataLakeServiceOp) GetPrivateLinkEndpoint(ctx context.Context, groupID, endpointID string) (*PrivateLinkEndpointDataLake, *Response, error)
GetPrivateLinkEndpoint gets the data lake private link endpoint associated with a specific group and endpointID.
func (*DataLakeServiceOp) List ¶
func (s *DataLakeServiceOp) List(ctx context.Context, groupID string) ([]DataLake, *Response, error)
List gets all data lakes for the specified group.
See more: https://docs.mongodb.com/datalake/reference/api/dataLakes-get-all-tenants
func (*DataLakeServiceOp) ListPrivateLinkEndpoint ¶ added in v0.15.0
func (s *DataLakeServiceOp) ListPrivateLinkEndpoint(ctx context.Context, groupID string) (*PrivateLinkEndpointDataLakeResponse, *Response, error)
ListPrivateLinkEndpoint gets all private link endpoints for data lake for the specified group.
func (*DataLakeServiceOp) Update ¶
func (s *DataLakeServiceOp) Update(ctx context.Context, groupID, name string, updateRequest *DataLakeUpdateRequest) (*DataLake, *Response, error)
Update updates an existing Data Lake.
See more: https://docs.mongodb.com/datalake/reference/api/dataLakes-update-one-tenant/
type DataLakeStore ¶
type DataLakeStore struct { Name string `json:"name,omitempty"` Provider string `json:"provider,omitempty"` Region string `json:"region,omitempty"` Bucket string `json:"bucket,omitempty"` Prefix string `json:"prefix,omitempty"` Delimiter string `json:"delimiter,omitempty"` IncludeTags *bool `json:"includeTags,omitempty"` AdditionalStorageClasses []string `json:"additionalStorageClasses,omitempty"` }
DataLakeStore represents a store of data lake data. Docs: https://docs.mongodb.com/datalake/reference/format/data-lake-configuration/#stores
type DataLakeUpdateRequest ¶
type DataLakeUpdateRequest struct { CloudProviderConfig *CloudProviderConfig `json:"cloudProviderConfig,omitempty"` DataProcessRegion *DataProcessRegion `json:"dataProcessRegion,omitempty"` }
DataLakeUpdateRequest represents all possible fields that can be updated in a data lake.
type DataPoints ¶
DataPoints represents a MongoDB DataPoints.
type DataProcessRegion ¶
type DataProcessRegion struct { CloudProvider string `json:"cloudProvider,omitempty"` Region string `json:"region,omitempty"` }
DataProcessRegion represents the region where a data lake is processed.
type DatabaseUser ¶
type DatabaseUser struct { DatabaseName string `json:"databaseName,omitempty"` DeleteAfterDate string `json:"deleteAfterDate,omitempty"` Labels []Label `json:"labels,omitempty"` LDAPAuthType string `json:"ldapAuthType,omitempty"` X509Type string `json:"x509Type,omitempty"` AWSIAMType string `json:"awsIAMType,omitempty"` GroupID string `json:"groupId,omitempty"` Roles []Role `json:"roles,omitempty"` Scopes []Scope `json:"scopes"` Password string `json:"password,omitempty"` Username string `json:"username,omitempty"` OIDCAuthType string `json:"oidcAuthType,omitempty"` }
DatabaseUser represents MongoDB users in your cluster.
func (*DatabaseUser) GetAuthDB ¶ added in v0.5.0
func (user *DatabaseUser) GetAuthDB() (name string)
GetAuthDB determines the authentication database based on the type of user. LDAP, X509 and AWSIAM should all use $external. SCRAM-SHA should use admin.
type DatabaseUsersService ¶
type DatabaseUsersService interface { List(context.Context, string, *ListOptions) ([]DatabaseUser, *Response, error) Get(context.Context, string, string, string) (*DatabaseUser, *Response, error) Create(context.Context, string, *DatabaseUser) (*DatabaseUser, *Response, error) Update(context.Context, string, string, *DatabaseUser) (*DatabaseUser, *Response, error) Delete(context.Context, string, string, string) (*Response, error) }
DatabaseUsersService is an interface for interfacing with the Database Users endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/database-users/index.html
type DatabaseUsersServiceOp ¶
type DatabaseUsersServiceOp service
DatabaseUsersServiceOp handles communication with the DatabaseUsers related methods of the MongoDB Atlas API.
func (*DatabaseUsersServiceOp) Create ¶
func (s *DatabaseUsersServiceOp) Create(ctx context.Context, groupID string, createRequest *DatabaseUser) (*DatabaseUser, *Response, error)
Create creates a user for the project.
See more: https://docs.atlas.mongodb.com/reference/api/database-users-create-a-user/
func (*DatabaseUsersServiceOp) Delete ¶
func (s *DatabaseUsersServiceOp) Delete(ctx context.Context, databaseName, groupID, username string) (*Response, error)
Delete deletes a user for the project.
See more: https://docs.atlas.mongodb.com/reference/api/database-users-delete-a-user/
func (*DatabaseUsersServiceOp) Get ¶
func (s *DatabaseUsersServiceOp) Get(ctx context.Context, databaseName, groupID, username string) (*DatabaseUser, *Response, error)
Get gets a single user in the project.
See more: https://docs.atlas.mongodb.com/reference/api/database-users-get-single-user/
func (*DatabaseUsersServiceOp) List ¶
func (s *DatabaseUsersServiceOp) List(ctx context.Context, groupID string, listOptions *ListOptions) ([]DatabaseUser, *Response, error)
List gets all users in the project.
See more: https://docs.atlas.mongodb.com/reference/api/database-users-get-all-users/
func (*DatabaseUsersServiceOp) Update ¶
func (s *DatabaseUsersServiceOp) Update(ctx context.Context, groupID, username string, updateRequest *DatabaseUser) (*DatabaseUser, *Response, error)
Update updates a user for the project.
See more: https://docs.atlas.mongodb.com/reference/api/database-users-update-a-user/
type DateRangetOptions ¶
type DateRangetOptions struct { StartDate string `url:"startDate,omitempty"` EndDate string `url:"endDate,omitempty"` }
DateRangetOptions specifies an optional date range query.
type DefaultMongoDBMajorVersionService ¶ added in v0.7.1
type DefaultMongoDBMajorVersionService interface {
Get(context.Context) (string, *Response, error)
}
DefaultMongoDBMajorVersionService this service is to be used by other MongoDB tools to determine the current default major version of MongoDB Server in Atlas.
We currently make no promise to support or document this service or endpoint beyond what can be seen here.
type DefaultMongoDBMajorVersionServiceOp ¶ added in v0.7.1
type DefaultMongoDBMajorVersionServiceOp struct {
Client PlainRequestDoer
}
DefaultMongoDBMajorVersionServiceOp is an implementation of DefaultMongoDBMajorVersionService.
type DeleteAdvanceClusterOptions ¶ added in v0.29.0
type DeleteAdvanceClusterOptions struct { // Flag that indicates whether to retain backup snapshots for the deleted dedicated cluster. RetainBackups *bool `url:"retainBackups,omitempty"` }
type DeleteCopiedBackup ¶ added in v0.20.0
type DeleteCopiedBackup struct { CloudProvider *string `json:"cloudProvider,omitempty"` // Identifies the cloud provider that stores the snapshot copy. RegionName *string `json:"regionName,omitempty"` // Target region to copy snapshots belonging to replicationSpecId to. ReplicationSpecID *string `json:"replicationSpecId,omitempty"` // Unique identifier that identifies the replication object for a zone in a cluster. }
DeleteCopiedBackup is autogenerated from the json schema.
type Delivery ¶
type Delivery struct { Expires string `json:"expires,omitempty"` ExpirationHours int64 `json:"expirationHours,omitempty"` MaxDownloads int64 `json:"maxDownloads,omitempty"` MethodName string `json:"methodName"` StatusName string `json:"statusName,omitempty"` URL string `json:"url,omitempty"` TargetClusterID string `json:"targetClusterId,omitempty"` TargetClusterName string `json:"targetClusterName,omitempty"` TargetGroupID string `json:"targetGroupId,omitempty"` }
type Destination ¶ added in v0.12.0
type Destination struct { ClusterName string `json:"clusterName,omitempty"` // Human-readable label that identifies the Atlas destination cluster. GroupID string `json:"groupId,omitempty"` // Unique 24-hexadecimal digit string that identifies the Atlas destination project. }
Destination represents settings of the Atlas destination.
type EncryptionAtRest ¶
type EncryptionAtRest struct { GroupID string `json:"groupId,omitempty"` // The unique identifier for the project. AwsKms `json:"awsKms,omitempty"` // AwsKms specifies AWS KMS configuration details and whether Encryption at Rest is enabled for an Atlas project. AzureKeyVault `json:"azureKeyVault,omitempty"` // AzureKeyVault specifies Azure Key Vault configuration details and whether Encryption at Rest is enabled for an Atlas project. GoogleCloudKms `json:"googleCloudKms,omitempty"` // Specifies GCP KMS configuration details and whether Encryption at Rest is enabled for an Atlas project. }
EncryptionAtRest represents a configuration Encryption at Rest for an Atlas project.
type EncryptionsAtRestService ¶
type EncryptionsAtRestService interface { Create(context.Context, *EncryptionAtRest) (*EncryptionAtRest, *Response, error) Get(context.Context, string) (*EncryptionAtRest, *Response, error) Delete(context.Context, string) (*Response, error) }
EncryptionsAtRestService is an interface for interfacing with the Encryption at Rest endpoints of the MongoDB Atlas API. See more: https://docs.atlas.mongodb.com/reference/api/encryption-at-rest/
type EncryptionsAtRestServiceOp ¶
type EncryptionsAtRestServiceOp service
EncryptionsAtRestServiceOp handles communication with the DatabaseUsers related methods of the MongoDB Atlas API.
func (*EncryptionsAtRestServiceOp) Create ¶
func (s *EncryptionsAtRestServiceOp) Create(ctx context.Context, createRequest *EncryptionAtRest) (*EncryptionAtRest, *Response, error)
Create takes one on-demand snapshot. Atlas takes on-demand snapshots immediately, unlike scheduled snapshots which occur at regular intervals.
See more: https://docs.atlas.mongodb.com/reference/api/enable-configure-encryptionatrest/
func (*EncryptionsAtRestServiceOp) Delete ¶
Delete disable the AWS, Azure and Google Encryption at Rest.
See more: https://docs.atlas.mongodb.com/reference/api/enable-configure-encryptionatrest/
func (*EncryptionsAtRestServiceOp) Get ¶
func (s *EncryptionsAtRestServiceOp) Get(ctx context.Context, groupID string) (*EncryptionAtRest, *Response, error)
Get retrieves the current configuration for Encryption at Rest for an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/get-configuration-encryptionatrest/
type Endpoint ¶ added in v0.7.1
type Endpoint struct { EndpointID string `json:"endpointId,omitempty"` ProviderName string `json:"providerName,omitempty"` Region string `json:"region,omitempty"` }
Endpoint through which you connect to Atlas.
type ErrorResponse ¶
type ErrorResponse struct { // Response that caused this error Response *http.Response // ErrorCode is the code as specified in https://docs.atlas.mongodb.com/reference/api/api-errors/ ErrorCode string `json:"errorCode"` // HTTPCode status code. HTTPCode int `json:"error"` // Reason is short description of the error, which is simply the HTTP status phrase. Reason string `json:"reason"` // Detail is more detailed description of the error. Detail string `json:"detail,omitempty"` }
ErrorResponse reports the error caused by an API request.
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
func (*ErrorResponse) Is ¶ added in v0.9.0
func (r *ErrorResponse) Is(target error) bool
type Event ¶
type Event struct { AlertID string `json:"alertId"` AlertConfigID string `json:"alertConfigId"` APIKeyID string `json:"apiKeyId,omitempty"` Collection string `json:"collection,omitempty"` Created string `json:"created"` CurrentValue *CurrentValue `json:"currentValue,omitempty"` Database string `json:"database,omitempty"` EventTypeName string `json:"eventTypeName"` GroupID string `json:"groupId,omitempty"` Hostname string `json:"hostname"` ID string `json:"id"` InvoiceID string `json:"invoiceId,omitempty"` IsGlobalAdmin bool `json:"isGlobalAdmin,omitempty"` Links []*Link `json:"links"` MetricName string `json:"metricName,omitempty"` OpType string `json:"opType,omitempty"` OrgID string `json:"orgId,omitempty"` PaymentID string `json:"paymentId,omitempty"` Port int `json:"Port,omitempty"` PublicKey string `json:"publicKey,omitempty"` RemoteAddress string `json:"remoteAddress,omitempty"` ReplicaSetName string `json:"replicaSetName,omitempty"` ShardName string `json:"shardName,omitempty"` TargetPublicKey string `json:"targetPublicKey,omitempty"` TargetUsername string `json:"targetUsername,omitempty"` TeamID string `json:"teamId,omitempty"` UserID string `json:"userId,omitempty"` Username string `json:"username,omitempty"` WhitelistEntry string `json:"whitelistEntry,omitempty"` }
Event represents an event of the MongoDB Atlas API.
type EventListOptions ¶
type EventListOptions struct { ListOptions EventType []string `url:"eventType,omitempty"` MinDate string `url:"minDate,omitempty"` MaxDate string `url:"maxDate,omitempty"` }
EventListOptions specifies the optional parameters to the Event List methods.
type EventResponse ¶
type EventResponse struct { Links []*Link `json:"links,omitempty"` Results []*Event `json:"results,omitempty"` TotalCount int `json:"totalCount,omitempty"` }
EventResponse is the response from the EventsService.List.
type EventsService ¶
type EventsService interface { ListOrganizationEvents(context.Context, string, *EventListOptions) (*EventResponse, *Response, error) GetOrganizationEvent(context.Context, string, string) (*Event, *Response, error) ListProjectEvents(context.Context, string, *EventListOptions) (*EventResponse, *Response, error) GetProjectEvent(context.Context, string, string) (*Event, *Response, error) }
EventsService is an interface for interfacing with the Events endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/events/
type EventsServiceOp ¶
type EventsServiceOp service
EventsServiceOp handles communication with the Event related methods of the MongoDB Atlas API.
func (*EventsServiceOp) GetOrganizationEvent ¶
func (s *EventsServiceOp) GetOrganizationEvent(ctx context.Context, orgID, eventID string) (*Event, *Response, error)
GetOrganizationEvent gets the alert specified to {EVENT-ID} from the organization associated to {ORG-ID}.
See more: https://docs.opsmanager.mongodb.com/current/reference/api/events/get-one-event-for-org/
func (*EventsServiceOp) GetProjectEvent ¶
func (s *EventsServiceOp) GetProjectEvent(ctx context.Context, groupID, eventID string) (*Event, *Response, error)
GetProjectEvent gets the alert specified to {EVENT-ID} from the project associated to {PROJECT-ID}.
See more: https://docs.opsmanager.mongodb.com/current/reference/api/events/get-one-event-for-project/
func (*EventsServiceOp) ListOrganizationEvents ¶
func (s *EventsServiceOp) ListOrganizationEvents(ctx context.Context, orgID string, listOptions *EventListOptions) (*EventResponse, *Response, error)
ListOrganizationEvents lists all events in the organization associated to {ORG-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/events-orgs-get-all/
func (*EventsServiceOp) ListProjectEvents ¶
func (s *EventsServiceOp) ListProjectEvents(ctx context.Context, groupID string, listOptions *EventListOptions) (*EventResponse, *Response, error)
ListProjectEvents lists all events in the project associated to {PROJECT-ID}.
See more: https://docs.opsmanager.mongodb.com/current/reference/api/events/get-all-events-for-project/
type Export ¶ added in v0.16.0
type Export struct { ExportBucketID string `json:"exportBucketId,omitempty"` // Unique identifier of the AWS bucket to export the cloud backup snapshot to. FrequencyType string `json:"frequencyType,omitempty"` // Frequency associated with the export policy. }
Export represents a policy for automatically exporting cloud backup snapshots to AWS bucket.
type FeatureUsage ¶ added in v0.6.0
type FeatureUsage struct { FeatureType string `json:"featureType,omitempty"` FeatureID interface{} `json:"featureId,omitempty"` }
FeatureUsage represents where the role sis being used.
type FederatedSettings ¶ added in v0.17.0
type FederatedSettings struct { FederatedDomains []string `json:"federatedDomains,omitempty"` HasRoleMappings *bool `json:"hasRoleMappings,omitempty"` ID string `json:"id,omitempty"` IdentityProviderID string `json:"identityProviderId,omitempty"` IdentityProviderStatus string `json:"identityProviderStatus,omitempty"` }
FederatedSettings represents a FederatedSettings List.
type FederatedSettingsConnectedOrganization ¶ added in v0.17.0
type FederatedSettingsConnectedOrganization struct { DomainAllowList []string `json:"domainAllowList,omitempty"` DomainRestrictionEnabled *bool `json:"domainRestrictionEnabled,omitempty"` IdentityProviderID string `json:"identityProviderId,omitempty"` OrgID string `json:"orgId,omitempty"` PostAuthRoleGrants []string `json:"postAuthRoleGrants,omitempty"` RoleMappings []*RoleMappings `json:"roleMappings,omitempty"` UserConflicts *UserConflicts `json:"userConflicts,omitempty"` }
type FederatedSettingsConnectedOrganizations ¶ added in v0.17.0
type FederatedSettingsConnectedOrganizations struct { Links []*Link `json:"links,omitempty"` Results []*FederatedSettingsConnectedOrganization `json:"results,omitempty"` TotalCount int `json:"totalCount,omitempty"` }
FederatedSettings represents a FederatedSettings Connected Organization.
type FederatedSettingsIdentityProvider ¶ added in v0.17.0
type FederatedSettingsIdentityProvider struct { AcsURL string `json:"acsUrl,omitempty"` AssociatedDomains []string `json:"associatedDomains,omitempty"` AssociatedOrgs []*AssociatedOrgs `json:"associatedOrgs,omitempty"` AudienceURI string `json:"audienceUri,omitempty"` DisplayName string `json:"displayName,omitempty"` IssuerURI string `json:"issuerUri,omitempty"` OktaIdpID string `json:"oktaIdpId,omitempty"` PemFileInfo *PemFileInfo `json:"pemFileInfo,omitempty"` RequestBinding string `json:"requestBinding,omitempty"` ResponseSignatureAlgorithm string `json:"responseSignatureAlgorithm,omitempty"` SsoDebugEnabled *bool `json:"ssoDebugEnabled,omitempty"` SsoURL string `json:"ssoUrl,omitempty"` Status string `json:"status,omitempty"` }
type FederatedSettingsIdentityProviders ¶ added in v0.17.0
type FederatedSettingsIdentityProviders struct { Links []*Link `json:"links,omitempty"` Results []FederatedSettingsIdentityProvider `json:"results,omitempty"` TotalCount int `json:"totalCount,omitempty"` }
FederatedSettings represents a FederatedSettings List.
type FederatedSettingsOrganizationRoleMapping ¶ added in v0.17.0
type FederatedSettingsOrganizationRoleMapping struct { ExternalGroupName string `json:"externalGroupName,omitempty"` ID string `json:"id,omitempty"` RoleAssignments []*RoleAssignments `json:"roleAssignments,omitempty"` }
type FederatedSettingsOrganizationRoleMappings ¶ added in v0.17.0
type FederatedSettingsOrganizationRoleMappings struct { Links []*Link `json:"links,omitempty"` Results []*FederatedSettingsOrganizationRoleMapping `json:"results,omitempty"` TotalCount int `json:"totalCount,omitempty"` }
FederatedSettings represents a FederatedSettings Organization Connection..
type FederatedSettingsService ¶ added in v0.17.0
type FederatedSettingsService interface { Get(context.Context, string) (*FederatedSettings, *Response, error) Delete(context.Context, string) (*Response, error) ListConnectedOrgs(context.Context, string, *ListOptions) (*FederatedSettingsConnectedOrganizations, *Response, error) GetConnectedOrg(context.Context, string, string) (*FederatedSettingsConnectedOrganization, *Response, error) UpdateConnectedOrg(context.Context, string, string, *FederatedSettingsConnectedOrganization) (*FederatedSettingsConnectedOrganization, *Response, error) DeleteConnectedOrg(context.Context, string, string) (*Response, error) ListRoleMappings(context.Context, string, string, *ListOptions) (*FederatedSettingsOrganizationRoleMappings, *Response, error) GetRoleMapping(context.Context, string, string, string) (*FederatedSettingsOrganizationRoleMapping, *Response, error) CreateRoleMapping(context.Context, string, string, *FederatedSettingsOrganizationRoleMapping) (*FederatedSettingsOrganizationRoleMapping, *Response, error) UpdateRoleMapping(context.Context, string, string, string, *FederatedSettingsOrganizationRoleMapping) (*FederatedSettingsOrganizationRoleMapping, *Response, error) DeleteRoleMapping(context.Context, string, string, string) (*Response, error) ListIdentityProviders(context.Context, string, *ListOptions) ([]FederatedSettingsIdentityProvider, *Response, error) GetIdentityProvider(context.Context, string, string) (*FederatedSettingsIdentityProvider, *Response, error) UpdateIdentityProvider(context.Context, string, string, *FederatedSettingsIdentityProvider) (*FederatedSettingsIdentityProvider, *Response, error) }
FederatedSettingsService is an interface for working with the Federation Settings endpoints of the MongoDB Atlas API.
See more: https://www.mongodb.com/docs/atlas/reference/api/federation-configuration/
type FederatedSettingsServiceOp ¶ added in v0.17.0
type FederatedSettingsServiceOp service
FederatedSettingsServiceOp handles communication with the FederatedSettings related methods of the MongoDB Atlas API.
func (*FederatedSettingsServiceOp) CreateRoleMapping ¶ added in v0.17.0
func (s *FederatedSettingsServiceOp) CreateRoleMapping(ctx context.Context, federationSettingsID, orgID string, body *FederatedSettingsOrganizationRoleMapping) (*FederatedSettingsOrganizationRoleMapping, *Response, error)
CreateRoleMapping creates one new Federated Settings Role Mapping for an organization.
See more: https://docs.atlas.mongodb.com/reference/api/live-migration/create-one-migration/
func (*FederatedSettingsServiceOp) Delete ¶ added in v0.17.0
func (s *FederatedSettingsServiceOp) Delete(ctx context.Context, federationSettingsID string) (*Response, error)
Delete deletes federation setting.
See more: https://www.mongodb.com/docs/atlas/reference/api/federation-delete-one/
func (*FederatedSettingsServiceOp) DeleteConnectedOrg ¶ added in v0.17.0
func (s *FederatedSettingsServiceOp) DeleteConnectedOrg(ctx context.Context, federationSettingsID, orgID string) (*Response, error)
DeleteConnectedOrg deletes federation setting for org mapping.
See more: https://www.mongodb.com/docs/atlas/reference/api/org-mapping-remove-one/
func (*FederatedSettingsServiceOp) DeleteRoleMapping ¶ added in v0.17.0
func (s *FederatedSettingsServiceOp) DeleteRoleMapping(ctx context.Context, federationSettingsID, orgID, roleMappingID string) (*Response, error)
DeleteRoleMapping deletes Federated Settings Role Mapping for an organization.
See more: https://www.mongodb.com/docs/atlas/reference/api/role-mapping-delete-one/
func (*FederatedSettingsServiceOp) Get ¶ added in v0.17.0
func (s *FederatedSettingsServiceOp) Get(ctx context.Context, orgID string) (*FederatedSettings, *Response, error)
func (*FederatedSettingsServiceOp) GetConnectedOrg ¶ added in v0.17.0
func (s *FederatedSettingsServiceOp) GetConnectedOrg(ctx context.Context, federationSettingsID, orgID string) (*FederatedSettingsConnectedOrganization, *Response, error)
GetConnectedOrg gets Federated Settings Connected Organization (Org-Mapping).
See more: https://www.mongodb.com/docs/atlas/reference/api/org-mapping-return-one/
func (*FederatedSettingsServiceOp) GetIdentityProvider ¶ added in v0.17.0
func (s *FederatedSettingsServiceOp) GetIdentityProvider(ctx context.Context, federationSettingsID, idpID string) (*FederatedSettingsIdentityProvider, *Response, error)
GetIdentityProvider gets Federated Settings Identity Providers for an organization.
See more: https://www.mongodb.com/docs/atlas/reference/api/identity-provider-return-one/
func (*FederatedSettingsServiceOp) GetRoleMapping ¶ added in v0.17.0
func (s *FederatedSettingsServiceOp) GetRoleMapping(ctx context.Context, federationSettingsID, orgID, roleMappingID string) (*FederatedSettingsOrganizationRoleMapping, *Response, error)
GetRoleMapping gets Federated Settings Role Mapping for an organization.
See more: https://www.mongodb.com/docs/atlas/reference/api/role-mapping-return-one/
func (*FederatedSettingsServiceOp) ListConnectedOrgs ¶ added in v0.17.0
func (s *FederatedSettingsServiceOp) ListConnectedOrgs(ctx context.Context, federationSettingsID string, opts *ListOptions) (*FederatedSettingsConnectedOrganizations, *Response, error)
ListConnectedOrgs gets all Federated Settings Connected Organization (Org-Mappings).
See more: https://www.mongodb.com/docs/atlas/reference/api/org-mappings-return-all/
func (*FederatedSettingsServiceOp) ListIdentityProviders ¶ added in v0.17.0
func (s *FederatedSettingsServiceOp) ListIdentityProviders(ctx context.Context, federationSettingsID string, opts *ListOptions) ([]FederatedSettingsIdentityProvider, *Response, error)
ListIdentityProviders gets all Federated Settings Identity Providers for an organization.
See more: https://www.mongodb.com/docs/atlas/reference/api/identity-provider-return-all/
func (*FederatedSettingsServiceOp) ListRoleMappings ¶ added in v0.17.0
func (s *FederatedSettingsServiceOp) ListRoleMappings(ctx context.Context, federationSettingsID, orgID string, opts *ListOptions) (*FederatedSettingsOrganizationRoleMappings, *Response, error)
ListRoleMappings gets all Federated Settings Role Mappings for an organization.
See more: https://www.mongodb.com/docs/atlas/reference/api/role-mapping-return-all/
func (*FederatedSettingsServiceOp) UpdateConnectedOrg ¶ added in v0.17.0
func (s *FederatedSettingsServiceOp) UpdateConnectedOrg(ctx context.Context, federationSettingsID, orgID string, updateRequest *FederatedSettingsConnectedOrganization) (*FederatedSettingsConnectedOrganization, *Response, error)
UpdateConnectedOrg updates Federated Settings Connected Organization (Org-Mapping).
See more: https://www.mongodb.com/docs/atlas/reference/api/org-mapping-update-one/
func (*FederatedSettingsServiceOp) UpdateIdentityProvider ¶ added in v0.17.0
func (s *FederatedSettingsServiceOp) UpdateIdentityProvider(ctx context.Context, federationSettingsID, idpID string, updateRequest *FederatedSettingsIdentityProvider) (*FederatedSettingsIdentityProvider, *Response, error)
UpdateIdentityProvider updates Federated Settings Identity Providers for an organization.
See more: https://www.mongodb.com/docs/atlas/reference/api/identity-provider-update-one/
func (*FederatedSettingsServiceOp) UpdateRoleMapping ¶ added in v0.17.0
func (s *FederatedSettingsServiceOp) UpdateRoleMapping(ctx context.Context, federationSettingsID, orgID, roleMappingID string, updateRequest *FederatedSettingsOrganizationRoleMapping) (*FederatedSettingsOrganizationRoleMapping, *Response, error)
UpdateRoleMapping updates Federated Settings Federated Settings Role Mapping for an organization
See more: https://www.mongodb.com/docs/atlas/reference/api/role-mapping-create-one/
type GCPEndpoint ¶ added in v0.14.0
type GCPEndpoint struct { IPAddress string `json:"ipAddress,omitempty"` // Private IP address of the endpoint you created in GCP. EndpointName string `json:"endpointName,omitempty"` // Forwarding rule that corresponds to the endpoint you created in GCP. Status string `json:"status,omitempty"` // Status of the endpoint. Atlas returns one of the values shown above. ServiceAttachmentName string `json:"serviceAttachmentName,omitempty"` // Unique alphanumeric and special character strings that identify the service attachment associated with the endpoint. }
GCPEndpoint represents MongoDB GCP endpoint group.
type GZipRequestDoer ¶
type GZipRequestDoer interface { Doer Completer NewGZipRequest(context.Context, string, string) (*http.Request, error) }
GZipRequestDoer minimum interface for any service of the client that should handle gzip downloads.
type GlobalCluster ¶
type GlobalCluster struct { CustomZoneMapping map[string]string `json:"customZoneMapping"` ManagedNamespaces []ManagedNamespace `json:"managedNamespaces"` }
GlobalCluster represents MongoDB Global Cluster Configuration in your Global Cluster.
type GlobalClustersService ¶
type GlobalClustersService interface { Get(context.Context, string, string) (*GlobalCluster, *Response, error) AddManagedNamespace(context.Context, string, string, *ManagedNamespace) (*GlobalCluster, *Response, error) DeleteManagedNamespace(context.Context, string, string, *ManagedNamespace) (*GlobalCluster, *Response, error) AddCustomZoneMappings(context.Context, string, string, *CustomZoneMappingsRequest) (*GlobalCluster, *Response, error) DeleteCustomZoneMappings(context.Context, string, string) (*GlobalCluster, *Response, error) }
GlobalClustersService is an interface for interfacing with the Global Clusters endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/global-clusters/
type GlobalClustersServiceOp ¶
type GlobalClustersServiceOp service
GlobalClustersServiceOp handles communication with the GlobalClusters related methods of the MongoDB Atlas API.
func (*GlobalClustersServiceOp) AddCustomZoneMappings ¶
func (s *GlobalClustersServiceOp) AddCustomZoneMappings(ctx context.Context, groupID, clusterName string, createRequest *CustomZoneMappingsRequest) (*GlobalCluster, *Response, error)
AddCustomZoneMappings adds an entry to the list of custom zone mappings for the specified Global Cluster.
See more: https://docs.atlas.mongodb.com/reference/api/global-clusters-add-customzonemapping/
func (*GlobalClustersServiceOp) AddManagedNamespace ¶
func (s *GlobalClustersServiceOp) AddManagedNamespace(ctx context.Context, groupID, clusterName string, createRequest *ManagedNamespace) (*GlobalCluster, *Response, error)
AddManagedNamespace adds a managed namespace to the specified Global Cluster.
See more: https://docs.atlas.mongodb.com/reference/api/database-users-create-a-user/
func (*GlobalClustersServiceOp) DeleteCustomZoneMappings ¶
func (s *GlobalClustersServiceOp) DeleteCustomZoneMappings(ctx context.Context, groupID, clusterName string) (*GlobalCluster, *Response, error)
DeleteCustomZoneMappings removes all custom zone mappings from the specified Global Cluster.
See more: https://docs.atlas.mongodb.com/reference/api/global-clusters-delete-namespace/
func (*GlobalClustersServiceOp) DeleteManagedNamespace ¶
func (s *GlobalClustersServiceOp) DeleteManagedNamespace(ctx context.Context, groupID, clusterName string, deleteRequest *ManagedNamespace) (*GlobalCluster, *Response, error)
DeleteManagedNamespace deletes the managed namespace configuration of the global cluster given.
See more: https://docs.atlas.mongodb.com/reference/api/global-clusters-delete-namespace/
func (*GlobalClustersServiceOp) Get ¶
func (s *GlobalClustersServiceOp) Get(ctx context.Context, groupID, clusterName string) (*GlobalCluster, *Response, error)
Get retrieves all managed namespaces and custom zone mappings associated with the specified Global Cluster.
See more: https://docs.atlas.mongodb.com/reference/api/global-clusters-retrieve-namespaces/
type GoogleCloudKms ¶
type GoogleCloudKms struct { Enabled *bool `json:"enabled,omitempty"` // Specifies whether Encryption at Rest is enabled for an Atlas project. To disable Encryption at Rest, pass only this parameter with a value of false. When you disable Encryption at Rest, Atlas also removes the configuration details. ServiceAccountKey string `json:"serviceAccountKey,omitempty"` // String-formatted JSON object containing GCP KMS credentials from your GCP account. KeyVersionResourceID string `json:"keyVersionResourceID,omitempty"` // The Key Version Resource ID from your GCP account. }
GoogleCloudKms specifies GCP KMS configuration details and whether Encryption at Rest is enabled for an Atlas project.
type IPInfo ¶ added in v0.8.0
type IPInfo struct {
CurrentIPv4Address string `json:"currentIpv4Address"`
}
type IPInfoService ¶ added in v0.8.0
IPInfoService is used to determine the public ip address of the client
We currently make no promise to support or document this service or endpoint beyond what can be seen here.
type IPInfoServiceOp ¶ added in v0.8.0
type IPInfoServiceOp service
IPInfoServiceOp is an implementation of IPInfoService.
type IndexConfiguration ¶
type IndexConfiguration struct { DB string `json:"db"` // DB the database of the index Collection string `json:"collection"` // Collection the collection of the index Keys []map[string]string `json:"keys"` // Keys array of keys to index and their type, sorting of keys is important for an index Options *IndexOptions `json:"options,omitempty"` // Options MongoDB index options Collation *CollationOptions `json:"collation,omitempty"` // Collation Mongo collation index options }
IndexConfiguration represents a new index requests for a given database and collection.
type IndexMapping ¶
type IndexMapping struct { Dynamic bool `json:"dynamic"` Fields *map[string]interface{} `json:"fields,omitempty"` }
IndexMapping containing index specifications for the collection fields.
type IndexOptions ¶
type IndexOptions struct { Background bool `json:"background,omitempty"` PartialFilterExpression *map[string]interface{} `json:"partialFilterExpression,omitempty"` StorageEngine *map[string]interface{} `json:"storageEngine,omitempty"` Weights *map[string]int `json:"weights,omitempty"` DefaultLanguage string `json:"default_language,omitempty"` LanguageOverride string `json:"language_override,omitempty"` TextIndexVersion int `json:"textIndexVersion,omitempty"` TwodsphereIndexVersion int `json:"2dsphereIndexVersion,omitempty"` Bits int `json:"bits,omitempty"` Unique bool `json:"unique,omitempty"` Sparse bool `json:"sparse,omitempty"` GeoMin int `json:"min,omitempty"` GeoMax int `json:"max,omitempty"` BucketSize int `json:"bucketSize,omitempty"` Name string `json:"name,omitempty"` ExpireAfterSeconds int `json:"expireAfterSeconds,omitempty"` }
IndexOptions represents mongodb index options.
See: https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/#options
type IndexesService ¶
type IndexesService interface {
Create(context.Context, string, string, *IndexConfiguration) (*Response, error)
}
IndexesService is an interface for interfacing with the clusters indexes endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/indexes/
type IndexesServiceOp ¶
type IndexesServiceOp service
IndexesServiceOp handles communication with the Cluster related methods of the MongoDB Atlas API.
func (*IndexesServiceOp) Create ¶
func (s *IndexesServiceOp) Create(ctx context.Context, groupID, clusterName string, createReq *IndexConfiguration) (*Response, error)
Create creates a request for a rolling index creation for the project associated to {GROUP-ID} and the {CLUSTER-NAME}.
See more: https://docs.atlas.mongodb.com/reference/api/rolling-index-create-one/
type InheritedRole ¶
type InheritedRole struct { Db string `json:"db,omitempty"` //nolint:stylecheck // not changing this as is a breaking change Role string `json:"role,omitempty"` }
An InheritedRole describes the role that this Role inherits from.
type InstanceSize ¶ added in v0.8.0
type InstanceSize struct { Name string `json:"name,omitempty"` AvailableRegions []*AvailableRegion `json:"availableRegions,omitempty"` }
InstanceSize represents an instance size of the MongoDB Atlas API.
type IntegrationsService ¶ added in v0.5.0
type IntegrationsService interface { Create(context.Context, string, string, *ThirdPartyIntegration) (*ThirdPartyIntegrations, *Response, error) Replace(context.Context, string, string, *ThirdPartyIntegration) (*ThirdPartyIntegrations, *Response, error) Delete(context.Context, string, string) (*Response, error) Get(context.Context, string, string) (*ThirdPartyIntegration, *Response, error) List(context.Context, string) (*ThirdPartyIntegrations, *Response, error) }
IntegrationsService is an interface for interfacing with the Third-Party Integrations endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/third-party-integration-settings/
type IntegrationsServiceOp ¶ added in v0.5.0
type IntegrationsServiceOp service
IntegrationsServiceOp handles communication with the third-party integrations related methods of the MongoDB Atlas API.
func (*IntegrationsServiceOp) Create ¶ added in v0.5.0
func (s *IntegrationsServiceOp) Create(ctx context.Context, projectID, integrationType string, body *ThirdPartyIntegration) (*ThirdPartyIntegrations, *Response, error)
Create adds a new third-party integration configuration.
See more: https://docs.atlas.mongodb.com/reference/api/third-party-integration-settings-create/index.html
func (*IntegrationsServiceOp) Delete ¶ added in v0.5.0
func (s *IntegrationsServiceOp) Delete(ctx context.Context, projectID, integrationType string) (*Response, error)
Delete removes the third-party integration configuration
https://docs.atlas.mongodb.com/reference/api/third-party-integration-settings-delete/
func (*IntegrationsServiceOp) Get ¶ added in v0.5.0
func (s *IntegrationsServiceOp) Get(ctx context.Context, projectID, integrationType string) (*ThirdPartyIntegration, *Response, error)
Get retrieves a specific third-party integration configuration
https://docs.atlas.mongodb.com/reference/api/third-party-integration-settings-get-one/
func (*IntegrationsServiceOp) List ¶ added in v0.5.0
func (s *IntegrationsServiceOp) List(ctx context.Context, projectID string) (*ThirdPartyIntegrations, *Response, error)
List retrieves all third-party integration configurations.
See more: https://docs.atlas.mongodb.com/reference/api/third-party-integration-settings-get-all/
func (*IntegrationsServiceOp) Replace ¶ added in v0.5.0
func (s *IntegrationsServiceOp) Replace(ctx context.Context, projectID, integrationType string, body *ThirdPartyIntegration) (*ThirdPartyIntegrations, *Response, error)
Replace replaces the third-party integration configuration with a new configuration, or add a new configuration if there is no configuration.
https://docs.atlas.mongodb.com/reference/api/third-party-integration-settings-update/
type InterfaceEndpointConnection ¶
type InterfaceEndpointConnection struct { ID string `json:"id,omitempty"` // Unique identifier of the private endpoint you created in your AWS VPC or Azure VNet. InterfaceEndpointID string `json:"interfaceEndpointId,omitempty"` // Unique identifier of the interface endpoint. PrivateEndpointConnectionName string `json:"privateEndpointConnectionName,omitempty"` // Name of the connection for this private endpoint that Atlas generates. PrivateEndpointIPAddress string `json:"privateEndpointIPAddress,omitempty"` // Private IP address of the private endpoint network interface. PrivateEndpointResourceID string `json:"privateEndpointResourceId,omitempty"` // Unique identifier of the private endpoint. DeleteRequested *bool `json:"deleteRequested,omitempty"` // Indicates if Atlas received a request to remove the interface endpoint from the private endpoint connection. ErrorMessage string `json:"errorMessage,omitempty"` // Error message pertaining to the interface endpoint. Returns null if there are no errors. AWSConnectionStatus string `json:"connectionStatus,omitempty"` // Status of the interface endpoint: NONE, PENDING_ACCEPTANCE, PENDING, AVAILABLE, REJECTED, DELETING. Status string `json:"status,omitempty"` // Status of the interface endpoint AZURE: INITIATING, AVAILABLE, FAILED, DELETING. GCP: INITIATING, AVAILABLE, FAILED, DELETING, VERIFIED EndpointGroupName string `json:"endpointGroupName,omitempty"` // Unique identifier of the endpoint group. The endpoint group encompasses all of the endpoints that you created in GCP. GCPProjectID string `json:"gcpProjectId,omitempty"` // Unique identifier of the GCP project in which you created your endpoints. Endpoints []*GCPEndpoint `json:"endpoints,omitempty"` // Collection of individual private endpoints that comprise your endpoint group. }
InterfaceEndpointConnection represents MongoDB Interface Endpoint Connection.
type InterfaceEndpointConnectionDeprecated ¶ added in v0.6.0
type InterfaceEndpointConnectionDeprecated struct { ID string `json:"interfaceEndpointId,omitempty"` // Unique identifier of the interface endpoint. DeleteRequested *bool `json:"deleteRequested,omitempty"` // Indicates if Atlas received a request to remove the interface endpoint from the private endpoint connection. ErrorMessage string `json:"errorMessage,omitempty"` // Error message pertaining to the interface endpoint. Returns null if there are no errors. ConnectionStatus string `json:"connectionStatus,omitempty"` // Status of the interface endpoint: NONE, PENDING_ACCEPTANCE, PENDING, AVAILABLE, REJECTED, DELETING. }
InterfaceEndpointConnectionDeprecated represents MongoDB Interface Endpoint Connection.
type Invitation ¶ added in v0.9.0
type Invitation struct { ID string `json:"id,omitempty"` OrgID string `json:"orgId,omitempty"` OrgName string `json:"orgName,omitempty"` GroupID string `json:"groupId,omitempty"` GroupName string `json:"groupName,omitempty"` CreatedAt string `json:"createdAt,omitempty"` ExpiresAt string `json:"expiresAt,omitempty"` InviterUsername string `json:"inviterUsername,omitempty"` Username string `json:"username,omitempty"` Roles []string `json:"roles,omitempty"` TeamIDs []string `json:"teamIds,omitempty"` }
Invitation represents the structure of an Invitation.
type InvitationOptions ¶ added in v0.9.0
type InvitationOptions struct {
Username string `url:"username,omitempty"`
}
InvitationOptions filtering options for invitations.
type LDAP ¶ added in v0.5.0
type LDAP struct { AuthenticationEnabled *bool `json:"authenticationEnabled,omitempty"` // Specifies whether user authentication with LDAP is enabled. AuthorizationEnabled *bool `json:"authorizationEnabled,omitempty"` // The current status of the LDAP over TLS/SSL configuration. Hostname *string `json:"hostname,omitempty"` // The hostname or IP address of the LDAP server Port *int `json:"port,omitempty"` // The port to which the LDAP server listens for client connections. BindUsername *string `json:"bindUsername,omitempty"` // The user DN that Atlas uses to connect to the LDAP server. UserToDNMapping []*UserToDNMapping `json:"userToDNMapping,omitempty"` // Maps an LDAP username for authentication to an LDAP Distinguished Name (DN). BindPassword *string `json:"bindPassword,omitempty"` // The password used to authenticate the bindUsername. CaCertificate *string `json:"caCertificate,omitempty"` // CA certificate used to verify the identity of the LDAP server. AuthzQueryTemplate *string `json:"authzQueryTemplate,omitempty"` // An LDAP query template that Atlas executes to obtain the LDAP groups to which the authenticated user belongs. }
LDAP specifies an LDAP configuration for a Atlas project.
type LDAPConfiguration ¶ added in v0.5.0
type LDAPConfiguration struct { RequestID string `json:"requestId,omitempty"` // Identifier for the Atlas project associated with the request to verify an LDAP over TLS/SSL configuration. GroupID string `json:"groupId,omitempty"` // Unique identifier of the project that owns this alert configuration. Request *LDAPRequest `json:"request,omitempty"` // Contains the details of the request to verify an LDAP over TLS/SSL configuration. Status string `json:"status,omitempty"` // The current status of the LDAP over TLS/SSL configuration. Validations []*LDAPValidation `json:"validations,omitempty"` // Array of validation messages related to the verification of the provided LDAP over TLS/SSL configuration details. Links []*Link `json:"links,omitempty"` LDAP *LDAP `json:"ldap,omitempty"` // Specifies the LDAP over TLS/SSL configuration details for an Atlas group. }
LDAPConfiguration represents MongoDB LDAP Configuration.
type LDAPConfigurationsService ¶ added in v0.5.0
type LDAPConfigurationsService interface { Verify(context.Context, string, *LDAP) (*LDAPConfiguration, *Response, error) Get(context.Context, string) (*LDAPConfiguration, *Response, error) GetStatus(context.Context, string, string) (*LDAPConfiguration, *Response, error) Save(context.Context, string, *LDAPConfiguration) (*LDAPConfiguration, *Response, error) Delete(context.Context, string) (*LDAPConfiguration, *Response, error) }
LDAPConfigurationsService is an interface of the LDAP Configuration endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/ldaps-configuration/
type LDAPConfigurationsServiceOp ¶ added in v0.5.0
type LDAPConfigurationsServiceOp service
LDAPConfigurationsServiceOp handles communication with the LDAP Configuration related methods of the MongoDB Atlas API.
func (*LDAPConfigurationsServiceOp) Delete ¶ added in v0.5.0
func (s *LDAPConfigurationsServiceOp) Delete(ctx context.Context, groupID string) (*LDAPConfiguration, *Response, error)
Delete removes the current userToDNMapping from the LDAP configuration for an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/ldaps-configuration-remove-usertodnmapping/
func (*LDAPConfigurationsServiceOp) Get ¶ added in v0.5.0
func (s *LDAPConfigurationsServiceOp) Get(ctx context.Context, groupID string) (*LDAPConfiguration, *Response, error)
Get retrieves the current LDAP configuration for an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/ldaps-configuration-get-current/
func (*LDAPConfigurationsServiceOp) GetStatus ¶ added in v0.5.0
func (s *LDAPConfigurationsServiceOp) GetStatus(ctx context.Context, groupID, requestID string) (*LDAPConfiguration, *Response, error)
GetStatus retrieves the status of a request for verification of an LDAP configuration.
See more: https://docs.atlas.mongodb.com/reference/api/ldaps-configuration-verification-status/
func (*LDAPConfigurationsServiceOp) Save ¶ added in v0.5.0
func (s *LDAPConfigurationsServiceOp) Save(ctx context.Context, groupID string, configuration *LDAPConfiguration) (*LDAPConfiguration, *Response, error)
Save saves an LDAP configuration for a Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/ldaps-configuration-save/
func (*LDAPConfigurationsServiceOp) Verify ¶ added in v0.5.0
func (s *LDAPConfigurationsServiceOp) Verify(ctx context.Context, groupID string, configuration *LDAP) (*LDAPConfiguration, *Response, error)
Verify requests verification of an LDAP configuration. Use this endpoint to test your LDAP configuration details before saving them.
See more: https://docs.atlas.mongodb.com/reference/api/ldaps-configuration-request-verification/
type LDAPRequest ¶ added in v0.5.0
type LDAPRequest struct { Hostname string `json:"hostname,omitempty"` // The hostname or IP address of the LDAP server. Port int `json:"port,omitempty"` // The port to which the LDAP server listens for client connections from Atlas. BindUsername string `json:"bindUsername,omitempty"` // The user DN that Atlas uses to connect to the LDAP server. }
LDAPRequest contains the details of the request to verify an LDAP over TLS/SSL configuration.
type LDAPValidation ¶ added in v0.5.0
type LDAPValidation struct { Status string `json:"status,omitempty"` // The status of the validation. ValidationType string `json:"validationType,omitempty"` // The type of the validation. }
LDAPValidation contains an array of validation messages related to the verification of the provided LDAP over TLS/SSL configuration details.
type LinkToken ¶ added in v0.12.0
type LinkToken struct {
LinkToken string `json:"linkToken,omitempty"` // Atlas-generated token that links the source (Cloud Manager or Ops Manager) and destination (Atlas) clusters for migration.
}
type ListDataLakePipelineSnapshotOptions ¶ added in v0.27.0
type ListDataLakePipelineSnapshotOptions struct { *ListOptions CompletedAfter string `url:"completedAfter,omitempty"` // Date and time after which MongoDB Cloud created the snapshot. }
ListDataLakePipelineSnapshotOptions specifies the optional parameters to ListSnapshots method.
type ListOptions ¶
type ListOptions struct { // For paginated result sets, page of results to retrieve. PageNum int `url:"pageNum,omitempty"` // For paginated result sets, the number of results to include per page. ItemsPerPage int `url:"itemsPerPage,omitempty"` // Flag that indicates whether Atlas returns the totalCount parameter in the response body. IncludeCount bool `url:"includeCount,omitempty"` }
ListOptions specifies the optional parameters to List methods that support pagination.
type LiveMigration ¶ added in v0.12.0
type LiveMigration struct { Source *Source `json:"source,omitempty"` // Source describes the Cloud Manager or Ops Manager source of the migrating cluster. Destination *Destination `json:"destination,omitempty"` // Destination describes the Atlas destination of the migrating Cloud Manager or Ops Manager cluster. MigrationHosts []string `json:"migrationHosts,omitempty"` // MigrationHosts is a list of hosts running the MongoDB Agent that can transfer your MongoDB data from the source (Cloud Manager or Ops Manager) to destination (Atlas) deployments. DropEnabled *bool `json:"dropEnabled,omitempty"` // DropEnabled indicates whether this process should drop existing collections from the destination (Atlas) cluster given in destination.clusterName before starting the migration of data from the source cluster. ID string `json:"_id,omitempty"` // ID Unique 24-hexadecimal digit string that identifies the migration. Status string `json:"status,omitempty"` // Status of the migration when you submitted this request. ReadyForCutover *bool `json:"readyForCutover,omitempty"` // ReadyForCutover indicates whether the live migration process is ready to start the cutover process. }
LiveMigration represents a live migration.
type LiveMigrationService ¶ added in v0.12.0
type LiveMigrationService interface { CreateLinkToken(context.Context, string, *TokenCreateRequest) (*LinkToken, *Response, error) DeleteLinkToken(context.Context, string) (*Response, error) CreateValidation(context.Context, string, *LiveMigration) (*Validation, *Response, error) GetValidationStatus(context.Context, string, string) (*Validation, *Response, error) Create(context.Context, string, *LiveMigration) (*LiveMigration, *Response, error) Get(context.Context, string, string) (*LiveMigration, *Response, error) Start(context.Context, string, string) (*Validation, *Response, error) }
LiveMigrationService is an interface for interfacing with the Live Migration endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/live-migration/
type LiveMigrationServiceOp ¶ added in v0.12.0
type LiveMigrationServiceOp service
LiveMigrationServiceOp provides an implementation of AlertsService.
func (*LiveMigrationServiceOp) Create ¶ added in v0.12.0
func (s *LiveMigrationServiceOp) Create(ctx context.Context, groupID string, body *LiveMigration) (*LiveMigration, *Response, error)
Create creates one new live migration.
See more: https://docs.atlas.mongodb.com/reference/api/live-migration/create-one-migration/
func (*LiveMigrationServiceOp) CreateLinkToken ¶ added in v0.12.0
func (s *LiveMigrationServiceOp) CreateLinkToken(ctx context.Context, orgID string, body *TokenCreateRequest) (*LinkToken, *Response, error)
CreateLinkToken create one new link-token.
See more: https://docs.atlas.mongodb.com/reference/api/live-migration/create-one-link-token/
func (*LiveMigrationServiceOp) CreateValidation ¶ added in v0.12.0
func (s *LiveMigrationServiceOp) CreateValidation(ctx context.Context, groupID string, body *LiveMigration) (*Validation, *Response, error)
CreateValidation creates one new validation request.
See more: https://docs.atlas.mongodb.com/reference/api/live-migration/validate-one-migration-request/
func (*LiveMigrationServiceOp) DeleteLinkToken ¶ added in v0.12.0
func (s *LiveMigrationServiceOp) DeleteLinkToken(ctx context.Context, orgID string) (*Response, error)
DeleteLinkToken deletes one link-token.
See more: https://docs.atlas.mongodb.com/reference/api/live-migration/delete-one-link-token/
func (*LiveMigrationServiceOp) Get ¶ added in v0.12.0
func (s *LiveMigrationServiceOp) Get(ctx context.Context, groupID, id string) (*LiveMigration, *Response, error)
Get returns one migration job.
See more: https://docs.atlas.mongodb.com/reference/api/live-migration/return-one-specific-migration/
func (*LiveMigrationServiceOp) GetValidationStatus ¶ added in v0.12.0
func (s *LiveMigrationServiceOp) GetValidationStatus(ctx context.Context, groupID, id string) (*Validation, *Response, error)
GetValidationStatus returns one validation job.
See more: https://docs.atlas.mongodb.com/reference/api/live-migration/return-one-specific-validation-job/
func (*LiveMigrationServiceOp) Start ¶ added in v0.12.0
func (s *LiveMigrationServiceOp) Start(ctx context.Context, groupID, id string) (*Validation, *Response, error)
Start starts the migration of one deployment.
See more: https://docs.atlas.mongodb.com/reference/api/live-migration/start-the-migration-cutover/
type LogsService ¶
type LogsService interface {
Get(context.Context, string, string, string, io.Writer, *DateRangetOptions) (*Response, error)
}
LogsService is an interface for interfacing with the Logs endpoints of the MongoDB Atlas API. See more: https://docs.atlas.mongodb.com/reference/api/logs/
type LogsServiceOp ¶
type LogsServiceOp struct {
Client GZipRequestDoer
}
LogsServiceOp handles communication with the Logs related methods of the MongoDB Atlas API.
func (*LogsServiceOp) Get ¶
func (s *LogsServiceOp) Get(ctx context.Context, groupID, hostName, logName string, out io.Writer, opts *DateRangetOptions) (*Response, error)
Get gets a compressed (.gz) log file that contains a range of log messages for a particular host. Note: The input parameter out (io.Writer) is not closed by this function.
See more: https://docs.atlas.mongodb.com/reference/api/logs/
type MaintenanceWindow ¶
type MaintenanceWindow struct { DayOfWeek int `json:"dayOfWeek,omitempty"` // Day of the week when you would like the maintenance window to start as a 1-based integer.Sunday 1, Monday 2, Tuesday 3, Wednesday 4, Thursday 5, Friday 6, Saturday 7 HourOfDay *int `json:"hourOfDay,omitempty"` // Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12. StartASAP *bool `json:"startASAP,omitempty"` // Flag indicating whether project maintenance has been directed to start immediately. NumberOfDeferrals int `json:"numberOfDeferrals,omitempty"` // Number of times the current maintenance event for this project has been deferred. AutoDeferOnceEnabled *bool `json:"autoDeferOnceEnabled,omitempty"` // Flag that indicates whether you want to defer all maintenance windows one week they would be triggered. }
MaintenanceWindow represents MongoDB Maintenance Windows.
type MaintenanceWindowsService ¶
type MaintenanceWindowsService interface { Get(context.Context, string) (*MaintenanceWindow, *Response, error) Update(context.Context, string, *MaintenanceWindow) (*Response, error) Defer(context.Context, string) (*Response, error) AutoDefer(context.Context, string) (*Response, error) Reset(context.Context, string) (*Response, error) }
MaintenanceWindowsService is an interface for interfacing with the Maintenance Windows endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/maintenance-windows/
type MaintenanceWindowsServiceOp ¶
type MaintenanceWindowsServiceOp service
MaintenanceWindowsServiceOp handles communication with the MaintenanceWindows related methods of the MongoDB Atlas API.
func (*MaintenanceWindowsServiceOp) AutoDefer ¶ added in v0.11.0
func (s *MaintenanceWindowsServiceOp) AutoDefer(ctx context.Context, groupID string) (*Response, error)
AutoDefer any scheduled maintenance for the given project for one week.
See more: https://docs.atlas.mongodb.com/reference/api/maintenance-window-auto-defer/
func (*MaintenanceWindowsServiceOp) Defer ¶
Defer maintenance for the given project for one week.
See more: https://docs.atlas.mongodb.com/reference/api/maintenance-window-defer/
func (*MaintenanceWindowsServiceOp) Get ¶
func (s *MaintenanceWindowsServiceOp) Get(ctx context.Context, groupID string) (*MaintenanceWindow, *Response, error)
Get gets the current user-defined maintenance window for the given project.
See more: https://docs.atlas.mongodb.com/reference/api/maintenance-windows-view-in-one-project/
func (*MaintenanceWindowsServiceOp) Reset ¶
Reset clears the current maintenance window for the given project.
See more: https://docs.atlas.mongodb.com/reference/api/maintenance-window-clear/
func (*MaintenanceWindowsServiceOp) Update ¶
func (s *MaintenanceWindowsServiceOp) Update(ctx context.Context, groupID string, updateRequest *MaintenanceWindow) (*Response, error)
Update the current maintenance window for the given project.
See more: https://docs.atlas.mongodb.com/reference/api/maintenance-window-update/
type ManagedNamespace ¶
type ManagedNamespace struct { Db string `json:"db"` //nolint:stylecheck // not changing this as is a breaking change Collection string `json:"collection"` CustomShardKey string `json:"customShardKey,omitempty"` IsCustomShardKeyHashed *bool `json:"isCustomShardKeyHashed,omitempty"` // Flag that specifies whether the custom shard key for the collection is hashed. IsShardKeyUnique *bool `json:"isShardKeyUnique,omitempty"` // Flag that specifies whether the underlying index enforces a unique constraint. NumInitialChunks int `json:"numInitialChunks,omitempty"` PresplitHashedZones *bool `json:"presplitHashedZones,omitempty"` }
ManagedNamespace represents the information about managed namespace configuration.
type Matcher ¶
type Matcher struct { FieldName string `json:"fieldName,omitempty"` // Name of the field in the target object to match on. Operator string `json:"operator,omitempty"` // The operator to test the field’s value. Value string `json:"value,omitempty"` // Value to test with the specified operator. }
Matcher represents the Rules to apply when matching an object against this alert configuration. Only entities that match all these rules are checked for an alert condition.
type Measurements ¶
type Measurements struct { DataPoints []*DataPoints `json:"dataPoints,omitempty"` Name string `json:"name"` Units string `json:"units"` }
Measurements represents a MongoDB Measurement.
type Member ¶ added in v0.14.0
type Member struct { ID string `json:"id,omitempty"` // Cloud provider that stores this snapshot. CloudProvider string `json:"cloudProvider,omitempty"` // Unique identifier for the sharded cluster snapshot. ReplicaSetName string `json:"replicaSetName,omitempty"` // Label given to a shard or config server from which Atlas took this snapshot. }
Member represents all member of cloud provider snapshot.
type MetricThreshold ¶
type MetricThreshold struct { MetricName string `json:"metricName,omitempty"` // Name of the metric to check. Operator string `json:"operator,omitempty"` // Operator to apply when checking the current metric value against the threshold value. Threshold float64 `json:"threshold"` // Threshold value outside of which an alert will be triggered. Units string `json:"units,omitempty"` // The units for the threshold value. Mode string `json:"mode,omitempty"` // This must be set to AVERAGE. Atlas computes the current metric value as an average. }
MetricThreshold causes an alert to be triggered. Required if "eventTypeName" : "OUTSIDE_METRIC_THRESHOLD".
type MissingShard ¶
type MissingShard struct { ID string `json:"id"` GroupID string `json:"groupId"` TypeName string `json:"typeName"` ClusterName string `json:"clusterName,omitempty"` ShardName string `json:"shardName,omitempty"` ReplicaSetName string `json:"replicaSetName"` LastHeartbeat string `json:"lastHeartbeat"` }
type Namespace ¶ added in v0.5.0
type Namespace struct { Namespace string `json:"namespace,omitempty"` // A namespace on the specified host. Type string `json:"type,omitempty"` // The type of namespace. }
Namespace represents a Namespace.
type NamespaceFilter ¶
type NamespaceOptions ¶ added in v0.5.0
type NamespaceOptions struct { Since int64 `url:"since,omitempty"` // Point in time, specified as milliseconds since the Unix Epoch, from which you want to receive results. Duration int64 `url:"duration,omitempty"` // Length of time from the since parameter, in milliseconds, for which you want to receive results. }
NamespaceOptions contains the request query parameters for the API request.
type Namespaces ¶ added in v0.5.0
type Namespaces struct {
Namespaces []*Namespace `json:"namespaces,omitempty"`
}
Namespaces represents a list of Namespace.
type Notification ¶
type Notification struct { APIToken string `json:"apiToken,omitempty"` // Slack API token or Bot token. Populated for the SLACK notifications type. If the token later becomes invalid, Atlas sends an email to the project owner and eventually removes the token. ChannelName string `json:"channelName,omitempty"` // Slack channel name. Populated for the SLACK notifications type. DatadogAPIKey string `json:"datadogApiKey,omitempty"` // Datadog API Key. Found in the Datadog dashboard. Populated for the DATADOG notifications type. DatadogRegion string `json:"datadogRegion,omitempty"` // Region that indicates which API URL to use DelayMin *int `json:"delayMin,omitempty"` // Number of minutes to wait after an alert condition is detected before sending out the first notification. EmailAddress string `json:"emailAddress,omitempty"` // Email address to which alert notifications are sent. Populated for the EMAIL notifications type. EmailEnabled *bool `json:"emailEnabled,omitempty"` // Flag indicating if email notifications should be sent. Populated for ORG, GROUP, and USER notifications types. FlowdockAPIToken string `json:"flowdockApiToken,omitempty"` // The Flowdock personal API token. Populated for the FLOWDOCK notifications type. If the token later becomes invalid, Atlas sends an email to the project owner and eventually removes the token. FlowName string `json:"flowName,omitempty"` // Flowdock flow namse in lower-case letters. IntervalMin int `json:"intervalMin,omitempty"` // Number of minutes to wait between successive notifications for unacknowledged alerts that are not resolved. MobileNumber string `json:"mobileNumber,omitempty"` // Mobile number to which alert notifications are sent. Populated for the SMS notifications type. OpsGenieAPIKey string `json:"opsGenieApiKey,omitempty"` // Opsgenie API Key. Populated for the OPS_GENIE notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the token. OpsGenieRegion string `json:"opsGenieRegion,omitempty"` // Region that indicates which API URL to use. OrgName string `json:"orgName,omitempty"` // Flowdock organization name in lower-case letters. This is the name that appears after www.flowdock.com/app/ in the URL string. Populated for the FLOWDOCK notifications type. ServiceKey string `json:"serviceKey,omitempty"` // PagerDuty service key. Populated for the PAGER_DUTY notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key. SMSEnabled *bool `json:"smsEnabled,omitempty"` // Flag indicating if text message notifications should be sent. Populated for ORG, GROUP, and USER notifications types. TeamID string `json:"teamId,omitempty"` // Unique identifier of a team. TeamName string `json:"teamName,omitempty"` // Label for the team that receives this notification. NotifierID string `json:"notifierId,omitempty"` // The notifierId is a system-generated unique identifier assigned to each notification method. TypeName string `json:"typeName,omitempty"` // Type of alert notification. Username string `json:"username,omitempty"` // Name of the Atlas user to which to send notifications. Only a user in the project that owns the alert configuration is allowed here. Populated for the USER notifications type. VictorOpsAPIKey string `json:"victorOpsApiKey,omitempty"` // VictorOps API key. Populated for the VICTOR_OPS notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key. VictorOpsRoutingKey string `json:"victorOpsRoutingKey,omitempty"` // VictorOps routing key. Populated for the VICTOR_OPS notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key. Roles []string `json:"roles,omitempty"` // The following roles grant privileges within a project. MicrosoftTeamsWebhookURL string `json:"microsoftTeamsWebhookUrl,omitempty"` // Microsoft Teams Wewbhook URL WebhookSecret string `json:"webhookSecret,omitempty"` // Webhook Secret WebhookURL string `json:"webhookUrl,omitempty"` // Webhook URL }
Notification sends when an alert condition is detected.
type OnlineArchive ¶
type OnlineArchive struct { ID string `json:"_id,omitempty"` ClusterName string `json:"clusterName,omitempty"` CollName string `json:"collName,omitempty"` CollectionType string `json:"collectionType,omitempty"` Criteria *OnlineArchiveCriteria `json:"criteria,omitempty"` DBName string `json:"dbName,omitempty"` GroupID string `json:"groupId,omitempty"` PartitionFields []*PartitionFields `json:"partitionFields,omitempty"` Paused *bool `json:"paused,omitempty"` Schedule *OnlineArchiveSchedule `json:"schedule,omitempty"` State string `json:"state,omitempty"` }
OnlineArchive represents the structure of an online archive.
type OnlineArchiveCriteria ¶
type OnlineArchiveCriteria struct { DateField string `json:"dateField,omitempty"` // DateField is mandatory when Type is DATE DateFormat string `json:"dateFormat,omitempty"` ExpireAfterDays *float64 `json:"expireAfterDays,omitempty"` Query string `json:"query,omitempty"` // Query is mandatory when Type is CUSTOM Type string `json:"type,omitempty"` }
OnlineArchiveCriteria criteria to use for archiving data.
type OnlineArchiveSchedule ¶ added in v0.30.0
type OnlineArchiveSchedule struct { Type string `json:"type,omitempty"` DayOfMonth int32 `json:"dayOfMonth,omitempty"` DayOfWeek int32 `json:"dayOfWeek,omitempty"` EndHour *int32 `json:"endHour,omitempty"` EndMinute *int32 `json:"endMinute,omitempty"` StartHour *int32 `json:"startHour,omitempty"` StartMinute *int32 `json:"startMinute,omitempty"` }
OnlineArchiveSchedule represents the frequency and duration when archiving process occurs.
type OnlineArchiveService ¶
type OnlineArchiveService interface { List(context.Context, string, string, *ListOptions) (*OnlineArchives, *Response, error) Get(context.Context, string, string, string) (*OnlineArchive, *Response, error) Create(context.Context, string, string, *OnlineArchive) (*OnlineArchive, *Response, error) Update(context.Context, string, string, string, *OnlineArchive) (*OnlineArchive, *Response, error) Delete(context.Context, string, string, string) (*Response, error) CreatePrivateLinkEndpoint(context.Context, string, *PrivateLinkEndpointOnlineArchive) (*PrivateLinkEndpointOnlineArchiveResponse, *Response, error) GetPrivateLinkEndpoint(context.Context, string, string) (*PrivateLinkEndpointOnlineArchive, *Response, error) ListPrivateLinkEndpoint(context.Context, string) (*PrivateLinkEndpointOnlineArchiveResponse, *Response, error) DeletePrivateLinkEndpoint(context.Context, string, string) (*Response, error) }
OnlineArchiveService provides access to the online archive related functions in the Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/online-archive/
type OnlineArchiveServiceOp ¶
type OnlineArchiveServiceOp service
OnlineArchiveServiceOp provides an implementation of the OnlineArchiveService interface.
func (*OnlineArchiveServiceOp) Create ¶
func (s *OnlineArchiveServiceOp) Create(ctx context.Context, projectID, clusterName string, r *OnlineArchive) (*OnlineArchive, *Response, error)
Create creates a new online archive.
See more: https://docs.atlas.mongodb.com/reference/api/online-archive-create-one/
func (*OnlineArchiveServiceOp) CreatePrivateLinkEndpoint ¶ added in v0.15.0
func (s *OnlineArchiveServiceOp) CreatePrivateLinkEndpoint(ctx context.Context, groupID string, createRequest *PrivateLinkEndpointOnlineArchive) (*PrivateLinkEndpointOnlineArchiveResponse, *Response, error)
CreatePrivateLinkEndpoint creates one private link endpoint in Online Archive project.
func (*OnlineArchiveServiceOp) Delete ¶
func (s *OnlineArchiveServiceOp) Delete(ctx context.Context, projectID, clusterName, archiveID string) (*Response, error)
Delete deletes an online archive.
See more: https://docs.atlas.mongodb.com/reference/api/online-archive-delete-one/
func (*OnlineArchiveServiceOp) DeletePrivateLinkEndpoint ¶ added in v0.15.0
func (s *OnlineArchiveServiceOp) DeletePrivateLinkEndpoint(ctx context.Context, groupID, endpointID string) (*Response, error)
DeletePrivateLinkEndpoint deletes the Online Archive private link endpoint with a given endpoint id.
func (*OnlineArchiveServiceOp) Get ¶
func (s *OnlineArchiveServiceOp) Get(ctx context.Context, projectID, clusterName, archiveID string) (*OnlineArchive, *Response, error)
Get gets a single online archive.
See more: https://docs.atlas.mongodb.com/reference/api/online-archive-get-one/
func (*OnlineArchiveServiceOp) GetPrivateLinkEndpoint ¶ added in v0.15.0
func (s *OnlineArchiveServiceOp) GetPrivateLinkEndpoint(ctx context.Context, groupID, endpointID string) (*PrivateLinkEndpointOnlineArchive, *Response, error)
GetPrivateLinkEndpoint gets the Online Archive private link endpoint associated with a specific group and endpointID.
func (*OnlineArchiveServiceOp) List ¶
func (s *OnlineArchiveServiceOp) List(ctx context.Context, projectID, clusterName string, listOptions *ListOptions) (*OnlineArchives, *Response, error)
List gets all online archives.
func (*OnlineArchiveServiceOp) ListPrivateLinkEndpoint ¶ added in v0.15.0
func (s *OnlineArchiveServiceOp) ListPrivateLinkEndpoint(ctx context.Context, groupID string) (*PrivateLinkEndpointOnlineArchiveResponse, *Response, error)
ListPrivateLinkEndpoint gets all private link endpoints for Online Archive for the specified group.
func (*OnlineArchiveServiceOp) Update ¶
func (s *OnlineArchiveServiceOp) Update(ctx context.Context, projectID, clusterName, archiveID string, r *OnlineArchive) (*OnlineArchive, *Response, error)
Update let's you pause or resume archiving for an online archive or modify the archiving criteria.
See more: https://docs.atlas.mongodb.com/reference/api/online-archive-update-one/
type OnlineArchives ¶ added in v0.6.0
type OnlineArchives struct { Links []*Link `json:"links,omitempty"` Results []*OnlineArchive `json:"results,omitempty"` TotalCount int `json:"totalCount,omitempty"` }
OnlineArchives is a collection of OnlineArchive.
type Operation ¶ added in v0.5.0
type Operation struct { Raw string `json:"raw,omitempty"` // Raw log line produced by the query. Stats Stats `json:"stats,omitempty"` // Query statistics. Predicates []map[string]interface{} `json:"predicates,omitempty"` // Documents containing the search criteria used by the query. }
Operation represents a document with specific information and log lines for individual queries.
type Organization ¶
type Organization struct { ID string `json:"id,omitempty"` IsDeleted *bool `json:"isDeleted,omitempty"` Links []*Link `json:"links,omitempty"` Name string `json:"name,omitempty"` }
Organization represents the structure of an organization.
type Organizations ¶
type Organizations struct { Links []*Link `json:"links"` Results []*Organization `json:"results"` TotalCount int `json:"totalCount"` }
Organizations represents an array of organization.
type OrganizationsListOptions ¶ added in v0.6.0
type OrganizationsListOptions struct { Name string `url:"name,omitempty"` IncludeDeletedOrgs *bool `url:"includeDeletedOrgs,omitempty"` ListOptions }
OrganizationsListOptions filtering options for organizations.
type OrganizationsService ¶
type OrganizationsService interface { List(context.Context, *OrganizationsListOptions) (*Organizations, *Response, error) Invitations(context.Context, string, *InvitationOptions) ([]*Invitation, *Response, error) Get(context.Context, string) (*Organization, *Response, error) Update(context.Context, string, *Organization) (*Organization, *Response, error) Create(context.Context, *CreateOrganizationRequest) (*CreateOrganizationResponse, *Response, error) Invitation(context.Context, string, string) (*Invitation, *Response, error) Projects(context.Context, string, *ProjectsListOptions) (*Projects, *Response, error) Users(context.Context, string, *ListOptions) (*AtlasUsersResponse, *Response, error) Delete(context.Context, string) (*Response, error) InviteUser(context.Context, string, *Invitation) (*Invitation, *Response, error) UpdateInvitation(context.Context, string, *Invitation) (*Invitation, *Response, error) UpdateInvitationByID(context.Context, string, string, *Invitation) (*Invitation, *Response, error) DeleteInvitation(context.Context, string, string) (*Response, error) }
OrganizationsService provides access to the organization related functions in the Atlas API.
See more: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Organizations
type OrganizationsServiceOp ¶
type OrganizationsServiceOp service
OrganizationsServiceOp provides an implementation of the OrganizationsService interface.
func (*OrganizationsServiceOp) Create ¶ added in v0.23.0
func (s *OrganizationsServiceOp) Create(ctx context.Context, request *CreateOrganizationRequest) (*CreateOrganizationResponse, *Response, error)
Create creates an organization.
func (*OrganizationsServiceOp) Delete ¶
Delete deletes an organization.
See more: https://docs.atlas.mongodb.com/reference/api/organization-delete-one/
func (*OrganizationsServiceOp) DeleteInvitation ¶ added in v0.9.0
func (s *OrganizationsServiceOp) DeleteInvitation(ctx context.Context, orgID, invitationID string) (*Response, error)
DeleteInvitation deletes one unaccepted invitation to the specified Atlas organization. You can't delete an invitation that a user has accepted.
See more: https://docs.atlas.mongodb.com/reference/api/organization-delete-invitation/
func (*OrganizationsServiceOp) Get ¶
func (s *OrganizationsServiceOp) Get(ctx context.Context, orgID string) (*Organization, *Response, error)
Get gets a single organization.
See more: https://docs.atlas.mongodb.com/reference/api/organization-get-one/
func (*OrganizationsServiceOp) Invitation ¶ added in v0.9.0
func (s *OrganizationsServiceOp) Invitation(ctx context.Context, orgID, invitationID string) (*Invitation, *Response, error)
Invitation gets details for one unaccepted invitation to the specified Atlas organization.
See more: https://docs.atlas.mongodb.com/reference/api/organization-get-one-invitation/
func (*OrganizationsServiceOp) Invitations ¶ added in v0.9.0
func (s *OrganizationsServiceOp) Invitations(ctx context.Context, orgID string, opts *InvitationOptions) ([]*Invitation, *Response, error)
Invitations gets all unaccepted invitations to the specified Atlas organization.
See more: https://docs.atlas.mongodb.com/reference/api/organization-get-invitations/
func (*OrganizationsServiceOp) InviteUser ¶ added in v0.9.0
func (s *OrganizationsServiceOp) InviteUser(ctx context.Context, orgID string, invitation *Invitation) (*Invitation, *Response, error)
InviteUser invites one user to the Atlas organization that you specify.
See more: https://docs.atlas.mongodb.com/reference/api/organization-create-one-invitation/
func (*OrganizationsServiceOp) List ¶
func (s *OrganizationsServiceOp) List(ctx context.Context, opts *OrganizationsListOptions) (*Organizations, *Response, error)
List gets all organizations.
See more: https://docs.atlas.mongodb.com/reference/api/organization-get-all/
func (*OrganizationsServiceOp) Projects ¶
func (s *OrganizationsServiceOp) Projects(ctx context.Context, orgID string, opts *ProjectsListOptions) (*Projects, *Response, error)
Projects gets all projects for the given organization ID.
See more: https://docs.atlas.mongodb.com/reference/api/organization-get-all-projects/
func (*OrganizationsServiceOp) Update ¶ added in v0.29.0
func (s *OrganizationsServiceOp) Update(ctx context.Context, orgID string, org *Organization) (*Organization, *Response, error)
Update updates a single organization.
func (*OrganizationsServiceOp) UpdateInvitation ¶ added in v0.9.0
func (s *OrganizationsServiceOp) UpdateInvitation(ctx context.Context, orgID string, invitation *Invitation) (*Invitation, *Response, error)
UpdateInvitation updates one pending invitation to the Atlas organization that you specify.
See more: https://docs.atlas.mongodb.com/reference/api/organization-update-one-invitation/
func (*OrganizationsServiceOp) UpdateInvitationByID ¶ added in v0.9.0
func (s *OrganizationsServiceOp) UpdateInvitationByID(ctx context.Context, orgID, invitationID string, invitation *Invitation) (*Invitation, *Response, error)
UpdateInvitationByID updates one invitation to the Atlas organization.
See more: https://docs.atlas.mongodb.com/reference/api/organization-update-one-invitation-by-id/
func (*OrganizationsServiceOp) Users ¶
func (s *OrganizationsServiceOp) Users(ctx context.Context, orgID string, opts *ListOptions) (*AtlasUsersResponse, *Response, error)
Users gets all users for the given organization ID.
See more: https://docs.atlas.mongodb.com/reference/api/organization-users-get-all-users/
type Part ¶
type Part struct { ReplicaSetName string `json:"replicaSetName"` TypeName string `json:"typeName"` SnapshotPart CheckpointPart }
type PartitionFields ¶
type PartitionFields struct { FieldName string `json:"fieldName,omitempty"` FieldType string `json:"fieldType,omitempty"` Order *float64 `json:"order,omitempty"` }
PartitionFields fields to use to partition data.
type Peer ¶
type Peer struct { AccepterRegionName string `json:"accepterRegionName,omitempty"` AWSAccountID string `json:"awsAccountId,omitempty"` ConnectionID string `json:"connectionId,omitempty"` ContainerID string `json:"containerId,omitempty"` ErrorStateName string `json:"errorStateName,omitempty"` ID string `json:"id,omitempty"` ProviderName string `json:"providerName,omitempty"` RouteTableCIDRBlock string `json:"routeTableCidrBlock,omitempty"` StatusName string `json:"statusName,omitempty"` VpcID string `json:"vpcId,omitempty"` AtlasCIDRBlock string `json:"atlasCidrBlock,omitempty"` AzureDirectoryID string `json:"azureDirectoryId,omitempty"` AzureSubscriptionID string `json:"azureSubscriptionId,omitempty"` ResourceGroupName string `json:"resourceGroupName,omitempty"` VNetName string `json:"vnetName,omitempty"` ErrorState string `json:"errorState,omitempty"` Status string `json:"status,omitempty"` GCPProjectID string `json:"gcpProjectId,omitempty"` NetworkName string `json:"networkName,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` }
Peer represents MongoDB peer connection.
type PeersService ¶
type PeersService interface { List(context.Context, string, *ContainersListOptions) ([]Peer, *Response, error) Get(context.Context, string, string) (*Peer, *Response, error) Create(context.Context, string, *Peer) (*Peer, *Response, error) Update(context.Context, string, string, *Peer) (*Peer, *Response, error) Delete(context.Context, string, string) (*Response, error) }
PeersService is an interface for interfacing with the Peers endpoints of the MongoDB Atlas API.
type PeersServiceOp ¶
type PeersServiceOp service
PeersServiceOp handles communication with the Network Peering Connection related methods of the MongoDB Atlas API.
func (*PeersServiceOp) Create ¶
func (s *PeersServiceOp) Create(ctx context.Context, groupID string, createRequest *Peer) (*Peer, *Response, error)
Create a peer connection to the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/vpc-create-peering-connection/
func (*PeersServiceOp) Delete ¶
Delete the peer connection specified to {PEER-ID} from the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/vpc-delete-peering-connection/
func (*PeersServiceOp) Get ¶
Get gets the netwprk peering connection specified to {PEER-ID} from the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/vpc-get-connection/
func (*PeersServiceOp) List ¶
func (s *PeersServiceOp) List(ctx context.Context, groupID string, listOptions *ContainersListOptions) ([]Peer, *Response, error)
List all peers in the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/vpc-get-connections-list/
func (*PeersServiceOp) Update ¶
func (s *PeersServiceOp) Update(ctx context.Context, groupID, peerID string, updateRequest *Peer) (*Peer, *Response, error)
Update a peer connection in the project associated to {GROUP-ID}
See more: https://docs.atlas.mongodb.com/reference/api/vpc-update-peering-connection/
type PemFileInfo ¶ added in v0.17.0
type PemFileInfo struct { Certificates []*Certificates `json:"certificates,omitempty"` FileName string `json:"fileName,omitempty"` }
type PerformanceAdvisorService ¶ added in v0.5.0
type PerformanceAdvisorService interface { GetNamespaces(context.Context, string, string, *NamespaceOptions) (*Namespaces, *Response, error) GetSlowQueries(context.Context, string, string, *SlowQueryOptions) (*SlowQueries, *Response, error) GetSuggestedIndexes(context.Context, string, string, *SuggestedIndexOptions) (*SuggestedIndexes, *Response, error) EnableManagedSlowOperationThreshold(context.Context, string) (*Response, error) DisableManagedSlowOperationThreshold(context.Context, string) (*Response, error) }
PerformanceAdvisorService is an interface of the Performance Advisor endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/performance-advisor/
type PerformanceAdvisorServiceOp ¶ added in v0.5.0
type PerformanceAdvisorServiceOp service
PerformanceAdvisorServiceOp handles communication with the Performance Advisor related methods of the MongoDB Atlas API.
func (*PerformanceAdvisorServiceOp) DisableManagedSlowOperationThreshold ¶ added in v0.13.0
func (s *PerformanceAdvisorServiceOp) DisableManagedSlowOperationThreshold(ctx context.Context, groupID string) (*Response, error)
DisableManagedSlowOperationThreshold disables the Atlas managed slow operation threshold for your project.
See more: https://docs.atlas.mongodb.com/reference/api/pa-managed-slow-ms-disable/
func (*PerformanceAdvisorServiceOp) EnableManagedSlowOperationThreshold ¶ added in v0.13.0
func (s *PerformanceAdvisorServiceOp) EnableManagedSlowOperationThreshold(ctx context.Context, groupID string) (*Response, error)
EnableManagedSlowOperationThreshold enables the Atlas managed slow operation threshold for your project.
See more: https://docs.atlas.mongodb.com/reference/api/pa-managed-slow-ms-enable/
func (*PerformanceAdvisorServiceOp) GetNamespaces ¶ added in v0.5.0
func (s *PerformanceAdvisorServiceOp) GetNamespaces(ctx context.Context, groupID, processName string, opts *NamespaceOptions) (*Namespaces, *Response, error)
GetNamespaces retrieves the namespaces for collections experiencing slow queries for a specified host.
See more: https://docs.atlas.mongodb.com/reference/api/pa-namespaces-get-all/
func (*PerformanceAdvisorServiceOp) GetSlowQueries ¶ added in v0.5.0
func (s *PerformanceAdvisorServiceOp) GetSlowQueries(ctx context.Context, groupID, processName string, opts *SlowQueryOptions) (*SlowQueries, *Response, error)
GetSlowQueries gets log lines for slow queries as determined by the Performance Advisor.
See more: https://docs.atlas.mongodb.com/reference/api/pa-get-slow-query-logs/
func (*PerformanceAdvisorServiceOp) GetSuggestedIndexes ¶ added in v0.5.0
func (s *PerformanceAdvisorServiceOp) GetSuggestedIndexes(ctx context.Context, groupID, processName string, opts *SuggestedIndexOptions) (*SuggestedIndexes, *Response, error)
GetSuggestedIndexes gets suggested indexes as determined by the Performance Advisor.
See more: https://docs.atlas.mongodb.com/reference/api/pa-suggested-indexes-get-all/
type PlainRequestDoer ¶ added in v0.7.1
type PlainRequestDoer interface { Doer Completer NewPlainRequest(context.Context, string, string) (*http.Request, error) }
PlainRequestDoer minimum interface for any service of the client that should handle plain text.
type Policy ¶
type Policy struct { ID string `json:"id,omitempty"` // Unique identifier of the backup policy. PolicyItems []PolicyItem `json:"policyItems,omitempty"` // A list of specifications for a policy. }
Policy represents for the snapshot and an array of backup policy items.
type PolicyItem ¶
type PolicyItem struct { ID string `json:"id,omitempty"` // Unique identifier of the backup policy item. FrequencyInterval int `json:"frequencyInterval,omitempty"` // Desired frequency of the new backup policy item specified by frequencyType. FrequencyType string `json:"frequencyType,omitempty"` // Frequency associated with the backup policy item. One of the following values: hourly, daily, weekly or monthly. RetentionUnit string `json:"retentionUnit,omitempty"` // Metric of duration of the backup policy item: days, weeks, or months. RetentionValue int `json:"retentionValue,omitempty"` // Duration for which the backup is kept. Associated with retentionUnit. }
PolicyItem represents a specifications for a backup policy.
type PrivateEndpoint ¶ added in v0.7.1
type PrivateEndpoint struct { ConnectionString string `json:"connectionString,omitempty"` Endpoints []Endpoint `json:"endpoints,omitempty"` SRVConnectionString string `json:"srvConnectionString,omitempty"` SRVShardOptimizedConnectionString string `json:"srvShardOptimizedConnectionString,omitempty"` Type string `json:"type,omitempty"` }
PrivateEndpoint connection strings. Each object describes the connection strings you can use to connect to this cluster through a private endpoint. Atlas returns this parameter only if you deployed a private endpoint to all regions to which you deployed this cluster's nodes.
type PrivateEndpointConnection ¶
type PrivateEndpointConnection struct { ID string `json:"id,omitempty"` // Unique identifier of the AWS PrivateLink connection or Azure Private Link Service. ProviderName string `json:"providerName,omitempty"` // Name of the cloud provider for which you want to create the private endpoint service. Atlas accepts AWS, AZURE or GCP. Region string `json:"region,omitempty"` // Cloud provider region for which you want to create the private endpoint service. EndpointServiceName string `json:"endpointServiceName,omitempty"` // Name of the PrivateLink endpoint service in AWS. Returns null while the endpoint service is being created. ErrorMessage string `json:"errorMessage,omitempty"` // Error message pertaining to the AWS PrivateLink connection or Azure Private Link Service or GCP Private Service Connect. Returns null if there are no errors. InterfaceEndpoints []string `json:"interfaceEndpoints,omitempty"` // Unique identifiers of the interface endpoints in your VPC that you added to the AWS PrivateLink connection. PrivateEndpoints []string `json:"privateEndpoints,omitempty"` // All private endpoints that you have added to this Azure Private Link Service. PrivateLinkServiceName string `json:"privateLinkServiceName,omitempty"` // Name of the Azure Private Link Service that Atlas manages. PrivateLinkServiceResourceID string `json:"privateLinkServiceResourceId,omitempty"` // Resource ID of the Azure Private Link Service that Atlas manages. Status string `json:"status,omitempty"` // Status of the AWS, Azure OR GCP PrivateLink connection: INITIATING, WAITING_FOR_USER, FAILED, DELETING, AVAILABLE. EndpointGroupNames []string `json:"endpointGroupNames,omitempty"` // GCP network endpoint groups corresponding to the Private Service Connect endpoint service. RegionName string `json:"regionName,omitempty"` // GCP region name for the Private Service Connect endpoint service. ServiceAttachmentNames []string `json:"serviceAttachmentNames,omitempty"` // Unique alphanumeric and special character strings that identify the service attachments associated with the GCP Private Service Connect endpoint service. Returns an empty list while Atlas creates the service attachments. }
PrivateEndpointConnection represents MongoDB Private Endpoint Connection.
type PrivateEndpointConnectionDeprecated ¶ added in v0.6.0
type PrivateEndpointConnectionDeprecated struct { ID string `json:"id,omitempty"` // Unique identifier of the AWS PrivateLink connection. ProviderName string `json:"providerName,omitempty"` // Name of the cloud provider you want to create the private endpoint connection for. Must be AWS. Region string `json:"region,omitempty"` // Cloud provider region in which you want to create the private endpoint connection. EndpointServiceName string `json:"endpointServiceName,omitempty"` // Name of the PrivateLink endpoint service in AWS. Returns null while the endpoint service is being created. ErrorMessage string `json:"errorMessage,omitempty"` // Error message pertaining to the AWS PrivateLink connection. Returns null if there are no errors. InterfaceEndpoints []string `json:"interfaceEndpoints,omitempty"` // Unique identifiers of the interface endpoints in your VPC that you added to the AWS PrivateLink connection. Status string `json:"status,omitempty"` // Status of the AWS PrivateLink connection: INITIATING, WAITING_FOR_USER, FAILED, DELETING. }
PrivateEndpointConnectionDeprecated represents MongoDB Private Endpoint Connection.
type PrivateEndpointsService ¶
type PrivateEndpointsService interface { Create(context.Context, string, *PrivateEndpointConnection) (*PrivateEndpointConnection, *Response, error) Get(context.Context, string, string, string) (*PrivateEndpointConnection, *Response, error) List(context.Context, string, string, *ListOptions) ([]PrivateEndpointConnection, *Response, error) Delete(context.Context, string, string, string) (*Response, error) AddOnePrivateEndpoint(context.Context, string, string, string, *InterfaceEndpointConnection) (*InterfaceEndpointConnection, *Response, error) GetOnePrivateEndpoint(context.Context, string, string, string, string) (*InterfaceEndpointConnection, *Response, error) DeleteOnePrivateEndpoint(context.Context, string, string, string, string) (*Response, error) UpdateRegionalizedPrivateEndpointSetting(context.Context, string, bool) (*RegionalizedPrivateEndpointSetting, *Response, error) GetRegionalizedPrivateEndpointSetting(context.Context, string) (*RegionalizedPrivateEndpointSetting, *Response, error) }
PrivateEndpointsService is an interface for interfacing with the Private Endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/private-endpoints/
type PrivateEndpointsServiceDeprecated ¶ added in v0.6.0
type PrivateEndpointsServiceDeprecated interface { Create(context.Context, string, *PrivateEndpointConnectionDeprecated) (*PrivateEndpointConnectionDeprecated, *Response, error) Get(context.Context, string, string) (*PrivateEndpointConnectionDeprecated, *Response, error) List(context.Context, string, *ListOptions) ([]PrivateEndpointConnectionDeprecated, *Response, error) Delete(context.Context, string, string) (*Response, error) AddOneInterfaceEndpoint(context.Context, string, string, string) (*InterfaceEndpointConnectionDeprecated, *Response, error) GetOneInterfaceEndpoint(context.Context, string, string, string) (*InterfaceEndpointConnectionDeprecated, *Response, error) DeleteOneInterfaceEndpoint(context.Context, string, string, string) (*Response, error) }
PrivateEndpointsServiceDeprecated is an interface for interfacing with the Private Endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/private-endpoint/
type PrivateEndpointsServiceOp ¶
type PrivateEndpointsServiceOp service
PrivateEndpointsServiceOp handles communication with the PrivateEndpoints related methods of the MongoDB Atlas API.
func (*PrivateEndpointsServiceOp) AddOnePrivateEndpoint ¶ added in v0.6.0
func (s *PrivateEndpointsServiceOp) AddOnePrivateEndpoint(ctx context.Context, groupID, cloudProvider, endpointServiceID string, createRequest *InterfaceEndpointConnection) (*InterfaceEndpointConnection, *Response, error)
AddOnePrivateEndpoint Adds one private endpoint for AWS or Azure in an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/private-endpoints-endpoint-create-one/
func (*PrivateEndpointsServiceOp) Create ¶
func (s *PrivateEndpointsServiceOp) Create(ctx context.Context, groupID string, createRequest *PrivateEndpointConnection) (*PrivateEndpointConnection, *Response, error)
Create one private endpoint service for AWS or Azure in an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/private-endpoints-service-create-one/
func (*PrivateEndpointsServiceOp) Delete ¶
func (s *PrivateEndpointsServiceOp) Delete(ctx context.Context, groupID, cloudProvider, endpointServiceID string) (*Response, error)
Delete one private endpoint service for AWS or Azure in an Atlas project.
See more https://docs.atlas.mongodb.com/reference/api/private-endpoints-service-delete-one/
func (*PrivateEndpointsServiceOp) DeleteOnePrivateEndpoint ¶ added in v0.6.0
func (s *PrivateEndpointsServiceOp) DeleteOnePrivateEndpoint(ctx context.Context, groupID, cloudProvider, endpointServiceID, privateEndpointID string) (*Response, error)
DeleteOnePrivateEndpoint remove one private endpoint for AWS or Azure from an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/private-endpoints-endpoint-delete-one/
func (*PrivateEndpointsServiceOp) Get ¶
func (s *PrivateEndpointsServiceOp) Get(ctx context.Context, groupID, cloudProvider, endpointServiceID string) (*PrivateEndpointConnection, *Response, error)
Get retrieve details for one private endpoint service for AWS or Azure in an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/private-endpoints-service-get-one/
func (*PrivateEndpointsServiceOp) GetOnePrivateEndpoint ¶ added in v0.6.0
func (s *PrivateEndpointsServiceOp) GetOnePrivateEndpoint(ctx context.Context, groupID, cloudProvider, endpointServiceID, privateEndpointID string) (*InterfaceEndpointConnection, *Response, error)
GetOnePrivateEndpoint retrieve details for one private endpoint for AWS or Azure in an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/private-endpoints-endpoint-get-one/
func (*PrivateEndpointsServiceOp) GetRegionalizedPrivateEndpointSetting ¶ added in v0.7.1
func (s *PrivateEndpointsServiceOp) GetRegionalizedPrivateEndpointSetting(ctx context.Context, groupID string) (*RegionalizedPrivateEndpointSetting, *Response, error)
GetRegionalizedPrivateEndpointSetting updates the regionalized private endpoint setting for one Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/private-endpoints-get-regional-mode
func (*PrivateEndpointsServiceOp) List ¶
func (s *PrivateEndpointsServiceOp) List(ctx context.Context, groupID, cloudProvider string, listOptions *ListOptions) ([]PrivateEndpointConnection, *Response, error)
List retrieve details for all private endpoint services for AWS or Azure in one Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/private-endpoints-service-get-all/
func (*PrivateEndpointsServiceOp) UpdateRegionalizedPrivateEndpointSetting ¶ added in v0.7.1
func (s *PrivateEndpointsServiceOp) UpdateRegionalizedPrivateEndpointSetting(ctx context.Context, groupID string, enabled bool) (*RegionalizedPrivateEndpointSetting, *Response, error)
UpdateRegionalizedPrivateEndpointSetting updates the regionalized private endpoint setting for one Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/private-endpoints-update-regional-mode
type PrivateEndpointsServiceOpDeprecated ¶ added in v0.6.0
type PrivateEndpointsServiceOpDeprecated service
PrivateEndpointsServiceOpDeprecated handles communication with the PrivateEndpoints related methods of the MongoDB Atlas API.
func (*PrivateEndpointsServiceOpDeprecated) AddOneInterfaceEndpoint ¶ added in v0.6.0
func (s *PrivateEndpointsServiceOpDeprecated) AddOneInterfaceEndpoint(ctx context.Context, groupID, privateLinkID, interfaceEndpointID string) (*InterfaceEndpointConnectionDeprecated, *Response, error)
AddOneInterfaceEndpoint adds one interface endpoint to a private endpoint connection in an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/private-endpoint-create-one-interface-endpoint/
func (*PrivateEndpointsServiceOpDeprecated) Create ¶ added in v0.6.0
func (s *PrivateEndpointsServiceOpDeprecated) Create(ctx context.Context, groupID string, createRequest *PrivateEndpointConnectionDeprecated) (*PrivateEndpointConnectionDeprecated, *Response, error)
Create one private endpoint connection in an Atlas project.
func (*PrivateEndpointsServiceOpDeprecated) Delete ¶ added in v0.6.0
func (s *PrivateEndpointsServiceOpDeprecated) Delete(ctx context.Context, groupID, privateLinkID string) (*Response, error)
Delete removes one private endpoint connection in an Atlas project.
func (*PrivateEndpointsServiceOpDeprecated) DeleteOneInterfaceEndpoint ¶ added in v0.6.0
func (s *PrivateEndpointsServiceOpDeprecated) DeleteOneInterfaceEndpoint(ctx context.Context, groupID, privateLinkID, interfaceEndpointID string) (*Response, error)
DeleteOneInterfaceEndpoint removes one interface endpoint from a private endpoint connection in an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/private-endpoint-delete-one-interface-endpoint/
func (*PrivateEndpointsServiceOpDeprecated) Get ¶ added in v0.6.0
func (s *PrivateEndpointsServiceOpDeprecated) Get(ctx context.Context, groupID, privateLinkID string) (*PrivateEndpointConnectionDeprecated, *Response, error)
Get retrieves details for one private endpoint connection by ID in an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/private-endpoint-get-one-private-endpoint-connection/
func (*PrivateEndpointsServiceOpDeprecated) GetOneInterfaceEndpoint ¶ added in v0.6.0
func (s *PrivateEndpointsServiceOpDeprecated) GetOneInterfaceEndpoint(ctx context.Context, groupID, privateLinkID, interfaceEndpointID string) (*InterfaceEndpointConnectionDeprecated, *Response, error)
GetOneInterfaceEndpoint retrieves one interface endpoint in a private endpoint connection in an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/private-endpoint-get-one-interface-endpoint/
func (*PrivateEndpointsServiceOpDeprecated) List ¶ added in v0.6.0
func (s *PrivateEndpointsServiceOpDeprecated) List(ctx context.Context, groupID string, listOptions *ListOptions) ([]PrivateEndpointConnectionDeprecated, *Response, error)
List retrieves details for all private endpoint connections in an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/private-endpoint-get-all-private-endpoint-connections/
type PrivateIPMode ¶
type PrivateIPMode struct {
Enabled *bool `json:"enabled,omitempty"`
}
PrivateIPMode represents MongoDB Private IP Mode Configutation.
type PrivateIPModeService ¶
type PrivateIPModeService interface { Get(context.Context, string) (*PrivateIPMode, *Response, error) Update(context.Context, string, *PrivateIPMode) (*PrivateIPMode, *Response, error) }
PrivateIPModeService is an interface for interfacing with the PrivateIpMode endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/get-private-ip-mode-for-project/
type PrivateIPModeServiceOp ¶
type PrivateIPModeServiceOp service
PrivateIPModeServiceOp handles communication with the Private IP Mode related methods of the MongoDB Atlas API.
func (*PrivateIPModeServiceOp) Get ¶
func (s *PrivateIPModeServiceOp) Get(ctx context.Context, groupID string) (*PrivateIPMode, *Response, error)
Get Verify Connect via Peering Only Mode from the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/get-private-ip-mode-for-project/
func (*PrivateIPModeServiceOp) Update ¶
func (s *PrivateIPModeServiceOp) Update(ctx context.Context, groupID string, updateRequest *PrivateIPMode) (*PrivateIPMode, *Response, error)
Update connection via Peering Only Mode in the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/set-private-ip-mode-for-project/
type PrivateLinkEndpointDataLake ¶ added in v0.15.0
type PrivateLinkEndpointDataLake struct { Comment string `json:"comment,omitempty"` EndpointID string `json:"endpointId,omitempty"` Provider string `json:"provider,omitempty"` Type string `json:"type,omitempty"` }
PrivateLinkEndpointDataLake represents the private link result for data lake.
type PrivateLinkEndpointDataLakeResponse ¶ added in v0.15.0
type PrivateLinkEndpointDataLakeResponse struct { Links []*Link `json:"links,omitempty"` Results []*PrivateLinkEndpointDataLake `json:"results"` TotalCount int `json:"totalCount"` }
PrivateLinkEndpointDataLakeResponse represents MongoDB Private Endpoint Connection to DataLake.
type PrivateLinkEndpointOnlineArchive ¶ added in v0.15.0
type PrivateLinkEndpointOnlineArchive struct { Comment string `json:"comment,omitempty"` EndpointID string `json:"endpointId,omitempty"` Provider string `json:"provider,omitempty"` Type string `json:"type,omitempty"` }
PrivateLinkEndpointOnlineArchive represents the private link result for Online Archive.
type PrivateLinkEndpointOnlineArchiveResponse ¶ added in v0.15.0
type PrivateLinkEndpointOnlineArchiveResponse struct { Links []*Link `json:"links,omitempty"` Results []*PrivateLinkEndpointOnlineArchive `json:"results"` TotalCount int `json:"totalCount"` }
PrivateLinkEndpointOnlineArchiveResponse represents MongoDB Private Endpoint Connection to Online Archive.
type Process ¶
type Process struct { Created string `json:"created"` GroupID string `json:"groupId"` Hostname string `json:"hostname"` ID string `json:"id"` LastPing string `json:"lastPing"` Links []*Link `json:"links"` Port int `json:"port"` ShardName string `json:"shardName"` ReplicaSetName string `json:"replicaSetName"` TypeName string `json:"typeName"` Version string `json:"version"` UserAlias string `json:"userAlias"` }
Process represents a MongoDB process.
type ProcessArgs ¶
type ProcessArgs struct { DefaultReadConcern string `json:"defaultReadConcern,omitempty"` DefaultWriteConcern string `json:"defaultWriteConcern,omitempty"` MinimumEnabledTLSProtocol string `json:"minimumEnabledTlsProtocol,omitempty"` FailIndexKeyTooLong *bool `json:"failIndexKeyTooLong,omitempty"` JavascriptEnabled *bool `json:"javascriptEnabled,omitempty"` NoTableScan *bool `json:"noTableScan,omitempty"` OplogSizeMB *int64 `json:"oplogSizeMB,omitempty"` SampleSizeBIConnector *int64 `json:"sampleSizeBIConnector,omitempty"` SampleRefreshIntervalBIConnector *int64 `json:"sampleRefreshIntervalBIConnector,omitempty"` TransactionLifetimeLimitSeconds *int64 `json:"transactionLifetimeLimitSeconds,omitempty"` OplogMinRetentionHours *float64 `json:"oplogMinRetentionHours,omitempty"` ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds *int64 `json:"changeStreamOptionsPreAndPostImagesExpireAfterSeconds,omitempty"` }
ProcessArgs represents the advanced configuration options for the cluster.
type ProcessDatabase ¶
type ProcessDatabase struct { Links []*Link `json:"links"` DatabaseName string `json:"databaseName"` }
ProcessDatabase is the database information of a process.
type ProcessDatabaseMeasurements ¶
type ProcessDatabaseMeasurements struct { *ProcessMeasurements DatabaseName string `json:"databaseName"` }
ProcessDatabaseMeasurements represents a MongoDB process database measurements.
type ProcessDatabaseMeasurementsService ¶
type ProcessDatabaseMeasurementsService interface {
List(context.Context, string, string, int, string, *ProcessMeasurementListOptions) (*ProcessDatabaseMeasurements, *Response, error)
}
ProcessDatabaseMeasurementsService is an interface for interfacing with the process database measurements endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/process-databases-measurements/
type ProcessDatabaseMeasurementsServiceOp ¶
type ProcessDatabaseMeasurementsServiceOp service
ProcessDatabaseMeasurementsServiceOp handles communication with the process database measurements related methods of the MongoDB Atlas API.
func (*ProcessDatabaseMeasurementsServiceOp) List ¶
func (s *ProcessDatabaseMeasurementsServiceOp) List(ctx context.Context, groupID, hostName string, port int, databaseName string, opts *ProcessMeasurementListOptions) (*ProcessDatabaseMeasurements, *Response, error)
List list measurements for a specific Atlas MongoDB database.
See more: https://docs.atlas.mongodb.com/reference/api/process-databases-measurements/
type ProcessDatabasesResponse ¶
type ProcessDatabasesResponse struct { Links []*Link `json:"links"` Results []*ProcessDatabase `json:"results"` TotalCount int `json:"totalCount"` }
ProcessDatabasesResponse is the response from the ProcessDatabasesService.List.
type ProcessDatabasesService ¶
type ProcessDatabasesService interface {
List(context.Context, string, string, int, *ListOptions) (*ProcessDatabasesResponse, *Response, error)
}
ProcessDatabasesService is an interface for interfacing with the Process Measurements endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/process-databases/
type ProcessDatabasesServiceOp ¶
type ProcessDatabasesServiceOp service
ProcessDatabasesServiceOp handles communication with the process disks related methods of the MongoDB Atlas API.
func (*ProcessDatabasesServiceOp) List ¶
func (s *ProcessDatabasesServiceOp) List(ctx context.Context, groupID, host string, port int, opts *ListOptions) (*ProcessDatabasesResponse, *Response, error)
List gets databases for a specific Atlas MongoDB process.
See more: https://docs.atlas.mongodb.com/reference/api/process-databases/
type ProcessDisk ¶
type ProcessDisk struct { Links []*Link `json:"links"` PartitionName string `json:"partitionName"` }
ProcessDisk is the partition information of a process.
type ProcessDiskMeasurements ¶
type ProcessDiskMeasurements struct { *ProcessMeasurements PartitionName string `json:"partitionName"` }
ProcessDiskMeasurements represents a MongoDB Process Disk Measurements.
type ProcessDiskMeasurementsService ¶
type ProcessDiskMeasurementsService interface {
List(context.Context, string, string, int, string, *ProcessMeasurementListOptions) (*ProcessDiskMeasurements, *Response, error)
}
ProcessDiskMeasurementsService is an interface for interfacing with the Process Disk Measurements endpoints of the MongoDB Atlas API. See more: https://docs.atlas.mongodb.com/reference/api/process-disks-measurements/#get-measurements-of-a-disk-for-a-mongodb-process
type ProcessDiskMeasurementsServiceOp ¶
type ProcessDiskMeasurementsServiceOp service
ProcessDiskMeasurementsServiceOp handles communication with the Process Disk Measurements related methods of the MongoDB Atlas API.
func (*ProcessDiskMeasurementsServiceOp) List ¶
func (s *ProcessDiskMeasurementsServiceOp) List(ctx context.Context, groupID, hostName string, port int, diskName string, opts *ProcessMeasurementListOptions) (*ProcessDiskMeasurements, *Response, error)
List lists measurements for a specific Atlas MongoDB disk.
type ProcessDisksResponse ¶
type ProcessDisksResponse struct { Links []*Link `json:"links"` Results []*ProcessDisk `json:"results"` TotalCount int `json:"totalCount"` }
ProcessDisksResponse is the response from the ProcessDisksService.List.
type ProcessDisksService ¶
type ProcessDisksService interface {
List(context.Context, string, string, int, *ListOptions) (*ProcessDisksResponse, *Response, error)
}
ProcessDisksService is an interface for interfacing with the Process Measurements endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/process-disks/
type ProcessDisksServiceOp ¶
type ProcessDisksServiceOp service
ProcessDisksServiceOp handles communication with the process disks related methods of the MongoDB Atlas API.
func (*ProcessDisksServiceOp) List ¶
func (s *ProcessDisksServiceOp) List(ctx context.Context, groupID, host string, port int, opts *ListOptions) (*ProcessDisksResponse, *Response, error)
List gets partitions for a specific Atlas MongoDB process.
See more: https://docs.atlas.mongodb.com/reference/api/process-disks/
type ProcessMeasurementListOptions ¶
type ProcessMeasurementListOptions struct { *ListOptions Granularity string `url:"granularity"` Period string `url:"period,omitempty"` Start string `url:"start,omitempty"` End string `url:"end,omitempty"` M []string `url:"m,omitempty"` }
ProcessMeasurementListOptions contains the list of options for Process Measurements.
type ProcessMeasurements ¶
type ProcessMeasurements struct { End string `json:"end"` Granularity string `json:"granularity"` GroupID string `json:"groupId"` HostID string `json:"hostId"` Links []*Link `json:"links,omitempty"` Measurements []*Measurements `json:"measurements"` ProcessID string `json:"processId"` Start string `json:"start"` }
ProcessMeasurements represents a MongoDB Process Measurements.
type ProcessMeasurementsService ¶
type ProcessMeasurementsService interface {
List(context.Context, string, string, int, *ProcessMeasurementListOptions) (*ProcessMeasurements, *Response, error)
}
ProcessMeasurementsService is an interface for interfacing with the Process Measurements endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/process-measurements/
type ProcessMeasurementsServiceOp ¶
type ProcessMeasurementsServiceOp service
ProcessMeasurementsServiceOp handles communication with the Process Measurements related methods of the MongoDB Atlas API.
func (*ProcessMeasurementsServiceOp) List ¶
func (s *ProcessMeasurementsServiceOp) List(ctx context.Context, groupID, host string, port int, opts *ProcessMeasurementListOptions) (*ProcessMeasurements, *Response, error)
List lists measurements for a specific Atlas MongoDB process.
See more: https://docs.atlas.mongodb.com/reference/api/process-measurements/
type ProcessesListOptions ¶
type ProcessesListOptions struct { ListOptions ClusterID string `url:"clusterId,omitempty"` // ClusterID is only available for Ops Manager and CLoud Manager. }
ProcessesListOptions filter options for the processes API.
type ProcessesService ¶
type ProcessesService interface { Get(context.Context, string, string, int) (*Process, *Response, error) List(context.Context, string, *ProcessesListOptions) ([]*Process, *Response, error) }
ProcessesService provides access to the alert processes related functions in the Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/monitoring-and-logs/
type ProcessesServiceOp ¶
type ProcessesServiceOp service
ProcessesServiceOp handles communication with the Process related methods of the MongoDB Atlas API.
func (*ProcessesServiceOp) Get ¶ added in v0.17.0
func (s *ProcessesServiceOp) Get(ctx context.Context, groupID, hostname string, port int) (*Process, *Response, error)
Get information for the specified Atlas MongoDB process in the specified project. An Atlas MongoDB process can be either a mongod or a mongos.
See more: https://www.mongodb.com/docs/atlas/reference/api/processes-get-one/
func (*ProcessesServiceOp) List ¶
func (s *ProcessesServiceOp) List(ctx context.Context, groupID string, listOptions *ProcessesListOptions) ([]*Process, *Response, error)
List lists all processes in the project associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/processes-get-all/
type Project ¶
type Project struct { ID string `json:"id,omitempty"` OrgID string `json:"orgId,omitempty"` Name string `json:"name,omitempty"` ClusterCount int `json:"clusterCount,omitempty"` Created string `json:"created,omitempty"` RegionUsageRestrictions string `json:"regionUsageRestrictions,omitempty"` // RegionUsageRestrictions for cloud.mongodbgov.com, valid values are GOV_REGIONS_ONLY, COMMERCIAL_FEDRAMP_REGIONS_ONLY, NONE Links []*Link `json:"links,omitempty"` WithDefaultAlertsSettings *bool `json:"withDefaultAlertsSettings,omitempty"` }
Project represents the structure of a project.
type ProjectAPIKeysOp ¶
type ProjectAPIKeysOp service
ProjectAPIKeysOp handles communication with the APIKey related methods of the MongoDB Atlas API.
func (*ProjectAPIKeysOp) Assign ¶
func (s *ProjectAPIKeysOp) Assign(ctx context.Context, groupID, keyID string, assignAPIKeyRequest *AssignAPIKey) (*Response, error)
Assign an API-KEY related to {GROUP-ID} to a the project with {API-KEY-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/projectApiKeys/assign-one-org-apiKey-to-one-project/
func (*ProjectAPIKeysOp) Create ¶
func (s *ProjectAPIKeysOp) Create(ctx context.Context, groupID string, createRequest *APIKeyInput) (*APIKey, *Response, error)
Create an API Key by the {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/projectApiKeys/create-one-apiKey-in-one-project/
func (*ProjectAPIKeysOp) List ¶
func (s *ProjectAPIKeysOp) List(ctx context.Context, groupID string, listOptions *ListOptions) ([]APIKey, *Response, error)
List all API-KEY in the organization associated to {GROUP-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/projectApiKeys/get-all-apiKeys-in-one-project/
func (*ProjectAPIKeysOp) Unassign ¶
Unassign an API-KEY related to {GROUP-ID} to a the project with {API-KEY-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/projectApiKeys/delete-one-apiKey-in-one-project/
type ProjectAPIKeysService ¶
type ProjectAPIKeysService interface { List(context.Context, string, *ListOptions) ([]APIKey, *Response, error) Create(context.Context, string, *APIKeyInput) (*APIKey, *Response, error) Assign(context.Context, string, string, *AssignAPIKey) (*Response, error) Unassign(context.Context, string, string) (*Response, error) }
ProjectAPIKeysService is an interface for interfacing with the APIKeys endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/apiKeys/#organization-api-keys-on-projects-endpoints
type ProjectIPAccessList ¶ added in v0.5.0
type ProjectIPAccessList struct { AwsSecurityGroup string `json:"awsSecurityGroup,omitempty"` // Unique identifier of AWS security group in this access list entry. CIDRBlock string `json:"cidrBlock,omitempty"` // Range of IP addresses in CIDR notation in this access list entry. Comment string `json:"comment,omitempty"` // Comment associated with this access list entry. DeleteAfterDate string `json:"deleteAfterDate,omitempty"` // Timestamp in ISO 8601 date and time format in UTC after which Atlas deletes the temporary access list entry. Atlas returns this field if you specified an expiration date when creating this access list entry. GroupID string `json:"groupId,omitempty"` // Unique identifier of the project to which this access list entry applies. IPAddress string `json:"ipAddress,omitempty"` // Entry using an IP address in this access list entry. }
ProjectIPAccessList represents MongoDB project's IP access list.
type ProjectIPAccessListService ¶ added in v0.5.0
type ProjectIPAccessListService interface { List(context.Context, string, *ListOptions) (*ProjectIPAccessLists, *Response, error) Get(context.Context, string, string) (*ProjectIPAccessList, *Response, error) Create(context.Context, string, []*ProjectIPAccessList) (*ProjectIPAccessLists, *Response, error) Delete(context.Context, string, string) (*Response, error) }
ProjectIPAccessListService provides access to the project access list related functions in the Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/organizations/
type ProjectIPAccessListServiceOp ¶ added in v0.5.0
type ProjectIPAccessListServiceOp service
ProjectIPAccessListServiceOp provides an implementation of the ProjectIPAccessListService interface.
func (*ProjectIPAccessListServiceOp) Create ¶ added in v0.5.0
func (s *ProjectIPAccessListServiceOp) Create(ctx context.Context, groupID string, createRequest []*ProjectIPAccessList) (*ProjectIPAccessLists, *Response, error)
Create adds one or more access list entries to the project associated to {PROJECT-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/ip-access-list/add-entries-to-access-list/
func (*ProjectIPAccessListServiceOp) Delete ¶ added in v0.5.0
func (s *ProjectIPAccessListServiceOp) Delete(ctx context.Context, groupID, entry string) (*Response, error)
Delete the access list entry specified to {ACCESS-LIST-ENTRY} from the project associated to {PROJECT-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/ip-access-list/delete-one-access-list-entry/
func (*ProjectIPAccessListServiceOp) Get ¶ added in v0.5.0
func (s *ProjectIPAccessListServiceOp) Get(ctx context.Context, groupID, entry string) (*ProjectIPAccessList, *Response, error)
Get the access list entry specified to {ACCESS-LIST-ENTRY} from the project associated to {PROJECT-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/ip-access-list/get-one-access-list-entry/
func (*ProjectIPAccessListServiceOp) List ¶ added in v0.5.0
func (s *ProjectIPAccessListServiceOp) List(ctx context.Context, groupID string, listOptions *ListOptions) (*ProjectIPAccessLists, *Response, error)
List all access list entries in the project associated to {PROJECT-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/ip-access-list/get-all-access-list-entries/
type ProjectIPAccessLists ¶ added in v0.5.0
type ProjectIPAccessLists struct { Links []*Link `json:"links"` Results []ProjectIPAccessList `json:"results"` TotalCount int `json:"totalCount"` }
ProjectIPAccessLists is the response from the ProjectIPAccessListService.List.
type ProjectSettings ¶ added in v0.16.0
type ProjectSettings struct { IsCollectDatabaseSpecificsStatisticsEnabled *bool `json:"isCollectDatabaseSpecificsStatisticsEnabled,omitempty"` IsDataExplorerEnabled *bool `json:"isDataExplorerEnabled,omitempty"` IsExtendedStorageSizesEnabled *bool `json:"isExtendedStorageSizesEnabled,omitempty"` IsPerformanceAdvisorEnabled *bool `json:"isPerformanceAdvisorEnabled,omitempty"` IsRealtimePerformancePanelEnabled *bool `json:"isRealtimePerformancePanelEnabled,omitempty"` IsSchemaAdvisorEnabled *bool `json:"isSchemaAdvisorEnabled,omitempty"` }
type ProjectTeam ¶
type ProjectTeam struct { TeamID string `json:"teamId,omitempty"` RoleNames []string `json:"roleNames,omitempty"` }
ProjectTeam represents the kind of role that has the team.
type ProjectUpdateRequest ¶ added in v0.31.0
type ProjectUpdateRequest struct {
Name string `json:"name"`
}
ProjectUpdateRequest represents an update request used in ProjectsService.Update.
type Projects ¶
type Projects struct { Links []*Link `json:"links"` Results []*Project `json:"results"` TotalCount int `json:"totalCount"` }
Projects represents an array of project.
type ProjectsListOptions ¶ added in v0.17.0
type ProjectsListOptions struct { Name string `url:"name,omitempty"` ListOptions }
ProjectsListOptions filtering options for projects.
type ProjectsService ¶
type ProjectsService interface { GetAllProjects(context.Context, *ListOptions) (*Projects, *Response, error) GetOneProject(context.Context, string) (*Project, *Response, error) GetOneProjectByName(context.Context, string) (*Project, *Response, error) Create(context.Context, *Project, *CreateProjectOptions) (*Project, *Response, error) Update(context.Context, string, *ProjectUpdateRequest) (*Project, *Response, error) Delete(context.Context, string) (*Response, error) GetProjectTeamsAssigned(context.Context, string) (*TeamsAssigned, *Response, error) AddTeamsToProject(context.Context, string, []*ProjectTeam) (*TeamsAssigned, *Response, error) RemoveUserFromProject(context.Context, string, string) (*Response, error) Invitations(context.Context, string, *InvitationOptions) ([]*Invitation, *Response, error) Invitation(context.Context, string, string) (*Invitation, *Response, error) InviteUser(context.Context, string, *Invitation) (*Invitation, *Response, error) UpdateInvitation(context.Context, string, *Invitation) (*Invitation, *Response, error) UpdateInvitationByID(context.Context, string, string, *Invitation) (*Invitation, *Response, error) DeleteInvitation(context.Context, string, string) (*Response, error) GetProjectSettings(context.Context, string) (*ProjectSettings, *Response, error) UpdateProjectSettings(context.Context, string, *ProjectSettings) (*ProjectSettings, *Response, error) }
ProjectsService is an interface for interfacing with the Projects endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/projects/
type ProjectsServiceOp ¶
type ProjectsServiceOp service
ProjectsServiceOp handles communication with the Projects related methods of the MongoDB Atlas API.
func (*ProjectsServiceOp) AddTeamsToProject ¶
func (s *ProjectsServiceOp) AddTeamsToProject(ctx context.Context, projectID string, createRequest []*ProjectTeam) (*TeamsAssigned, *Response, error)
AddTeamsToProject adds teams to a project
See more: https://docs.atlas.mongodb.com/reference/api/project-add-team/
func (*ProjectsServiceOp) Create ¶
func (s *ProjectsServiceOp) Create(ctx context.Context, createRequest *Project, opts *CreateProjectOptions) (*Project, *Response, error)
Create creates a project.
See more: https://docs.atlas.mongodb.com/reference/api/project-create-one/
func (*ProjectsServiceOp) Delete ¶
Delete deletes a project.
See more: https://docs.atlas.mongodb.com/reference/api/project-delete-one/
func (*ProjectsServiceOp) DeleteInvitation ¶ added in v0.9.0
func (s *ProjectsServiceOp) DeleteInvitation(ctx context.Context, groupID, invitationID string) (*Response, error)
DeleteInvitation deletes one unaccepted invitation to the specified Atlas project. You can't delete an invitation that a user has accepted.
See more: https://docs.atlas.mongodb.com/reference/api/project-delete-invitation/
func (*ProjectsServiceOp) GetAllProjects ¶
func (s *ProjectsServiceOp) GetAllProjects(ctx context.Context, listOptions *ListOptions) (*Projects, *Response, error)
GetAllProjects gets all project.
See more: https://docs.atlas.mongodb.com/reference/api/project-get-all/
func (*ProjectsServiceOp) GetOneProject ¶
func (s *ProjectsServiceOp) GetOneProject(ctx context.Context, projectID string) (*Project, *Response, error)
GetOneProject gets a single project.
See more: https://docs.atlas.mongodb.com/reference/api/project-get-one/
func (*ProjectsServiceOp) GetOneProjectByName ¶
func (s *ProjectsServiceOp) GetOneProjectByName(ctx context.Context, projectName string) (*Project, *Response, error)
GetOneProjectByName gets a single project by its name.
See more: https://docs.atlas.mongodb.com/reference/api/project-get-one-by-name/
func (*ProjectsServiceOp) GetProjectSettings ¶ added in v0.16.0
func (s *ProjectsServiceOp) GetProjectSettings(ctx context.Context, groupID string) (*ProjectSettings, *Response, error)
GetProjectSettings gets details about the settings for specified project.
See more: https://www.mongodb.com/docs/atlas/reference/api/project-settings-get-one/
func (*ProjectsServiceOp) GetProjectTeamsAssigned ¶
func (s *ProjectsServiceOp) GetProjectTeamsAssigned(ctx context.Context, projectID string) (*TeamsAssigned, *Response, error)
GetProjectTeamsAssigned gets all the teams assigned to a project.
See more: https://docs.atlas.mongodb.com/reference/api/project-get-teams/
func (*ProjectsServiceOp) Invitation ¶ added in v0.9.0
func (s *ProjectsServiceOp) Invitation(ctx context.Context, groupID, invitationID string) (*Invitation, *Response, error)
Invitation gets details for one unaccepted invitation to the specified Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/project-get-one-invitation/
func (*ProjectsServiceOp) Invitations ¶ added in v0.9.0
func (s *ProjectsServiceOp) Invitations(ctx context.Context, groupID string, opts *InvitationOptions) ([]*Invitation, *Response, error)
Invitations gets all unaccepted invitations to the specified Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/project-get-invitations/
func (*ProjectsServiceOp) InviteUser ¶ added in v0.9.0
func (s *ProjectsServiceOp) InviteUser(ctx context.Context, groupID string, invitation *Invitation) (*Invitation, *Response, error)
InviteUser invites one user to the Atlas project that you specify.
func (*ProjectsServiceOp) RemoveUserFromProject ¶ added in v0.5.0
func (s *ProjectsServiceOp) RemoveUserFromProject(ctx context.Context, projectID, userID string) (*Response, error)
RemoveUserFromProject removes user from a project
See more: https://docs.atlas.mongodb.com/reference/api/project-remove-user/
func (*ProjectsServiceOp) Update ¶ added in v0.31.0
func (s *ProjectsServiceOp) Update(ctx context.Context, projectID string, updateRequest *ProjectUpdateRequest) (*Project, *Response, error)
Update updates a project.
func (*ProjectsServiceOp) UpdateInvitation ¶ added in v0.9.0
func (s *ProjectsServiceOp) UpdateInvitation(ctx context.Context, groupID string, invitation *Invitation) (*Invitation, *Response, error)
UpdateInvitation updates one pending invitation to the Atlas project that you specify.
See more: https://docs.atlas.mongodb.com/reference/api/project-update-one-invitation/
func (*ProjectsServiceOp) UpdateInvitationByID ¶ added in v0.9.0
func (s *ProjectsServiceOp) UpdateInvitationByID(ctx context.Context, groupID, invitationID string, invitation *Invitation) (*Invitation, *Response, error)
UpdateInvitationByID updates one invitation to the Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/project-update-one-invitation-by-id/
func (*ProjectsServiceOp) UpdateProjectSettings ¶ added in v0.16.0
func (s *ProjectsServiceOp) UpdateProjectSettings(ctx context.Context, groupID string, projectSettings *ProjectSettings) (*ProjectSettings, *Response, error)
UpdateProjectSettings updates the settings for the specified project.
See more: https://www.mongodb.com/docs/atlas/reference/api/project-settings-update-one/
type ProviderSettings ¶
type ProviderSettings struct { BackingProviderName string `json:"backingProviderName,omitempty"` DiskIOPS *int64 `json:"diskIOPS,omitempty"` DiskTypeName string `json:"diskTypeName,omitempty"` EncryptEBSVolume *bool `json:"encryptEBSVolume,omitempty"` InstanceSizeName string `json:"instanceSizeName,omitempty"` ProviderName string `json:"providerName,omitempty"` RegionName string `json:"regionName,omitempty"` VolumeType string `json:"volumeType,omitempty"` AutoScaling *AutoScaling `json:"autoScaling,omitempty"` }
ProviderSettings configuration for the provisioned servers on which MongoDB runs. The available options are specific to the cloud service provider.
type ReadPreference ¶ added in v0.26.0
type ReadPreference struct { MaxStalenessSeconds int32 `json:"maxStalenessSeconds,omitempty"` Mode string `json:"mode,omitempty"` TagSets []*TagSet `json:"tagSets,omitempty"` }
ReadPreference describes how to route read requests to the cluster.
type RegionalizedPrivateEndpointSetting ¶ added in v0.7.1
type RegionalizedPrivateEndpointSetting struct {
Enabled bool `json:"enabled"` // Flag that indicates whether the regionalized private endpoint setting is enabled for one Atlas project.
}
RegionalizedPrivateEndpointSetting represents MongoDB Regionalized private Endpoint Setting.
type RegionsConfig ¶
type RegionsConfig struct { AnalyticsNodes *int64 `json:"analyticsNodes,omitempty"` ElectableNodes *int64 `json:"electableNodes,omitempty"` Priority *int64 `json:"priority,omitempty"` ReadOnlyNodes *int64 `json:"readOnlyNodes,omitempty"` }
RegionsConfig describes the region’s priority in elections and the number and type of MongoDB nodes Atlas deploys to the region.
type ReplicationSpec ¶
type ReplicationSpec struct { ID string `json:"id,omitempty"` NumShards *int64 `json:"numShards,omitempty"` ZoneName string `json:"zoneName,omitempty"` RegionsConfig map[string]RegionsConfig `json:"regionsConfig,omitempty"` }
ReplicationSpec represents a configuration for cluster regions.
type RequestCompletionCallback ¶
RequestCompletionCallback defines the type of the request callback function.
type RequestDoer ¶
type RequestDoer interface { Doer Completer NewRequest(context.Context, string, string, interface{}) (*http.Request, error) }
RequestDoer minimum interface for any service of the client.
type Resource ¶
type Resource struct { Collection *string `json:"collection,omitempty"` DB *string `json:"db,omitempty"` Cluster *bool `json:"cluster,omitempty"` }
A Resource describes a specific resource the Role will allow operating on.
type Response ¶
type Response struct { *http.Response // Links that were returned with the response. Links []*Link `json:"links"` // Raw data from server response Raw []byte `json:"-"` }
Response is a MongoDBAtlas response. This wraps the standard http.Response returned from MongoDBAtlas API.
func (*Response) CheckResponse ¶ added in v0.17.0
func (resp *Response) CheckResponse(body io.ReadCloser) error
CheckResponse checks the API response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range. API error responses are expected to have either no response body, or a JSON response body that maps to ErrorResponse. Any other response body will be silently ignored.
func (*Response) CurrentPage ¶
CurrentPage gets the current page for list pagination request.
func (*Response) IsLastPage ¶
IsLastPage returns true if the current page is the last page.
func (*Response) ServiceVersion ¶ added in v0.13.0
func (resp *Response) ServiceVersion() *ServiceVersion
ServiceVersion parses version information returned in the response.
type ResponseProcessedCallback ¶ added in v0.17.0
type ResponseProcessedCallback func(*Response)
ResponseProcessedCallback defines the type of the after request completion callback function.
type ResponseProcessor ¶ added in v0.17.0
type ResponseProcessor interface {
OnResponseProcessed(ResponseProcessedCallback)
}
ResponseProcessor interface for clients with callback.
type Result ¶
type Result struct { Links []*Link `json:"links"` RoleNames []string `json:"roleNames"` TeamID string `json:"teamId"` }
Result is part og TeamsAssigned structure.
type Role ¶
type Role struct { RoleName string `json:"roleName,omitempty"` DatabaseName string `json:"databaseName,omitempty"` CollectionName string `json:"collectionName,omitempty"` }
Role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well.
type RoleAssignments ¶ added in v0.17.0
type RoleMappings ¶ added in v0.17.0
type RoleMappings struct { ExternalGroupName string `json:"externalGroupName,omitempty"` ID string `json:"id,omitempty"` RoleAssignments []*RoleAssignments `json:"roleAssignments,omitempty"` }
type Root ¶ added in v0.21.0
type Root struct { APIKey struct { AccessList []struct { CIDRBlock string `json:"cidrBlock"` IPAddress string `json:"ipAddress"` } `json:"accessList"` ID string `json:"id"` PublicKey string `json:"publicKey"` Roles []AtlasRole `json:"roles,omitempty"` } `json:"apiKey"` AppName string `json:"appName"` Build string `json:"build"` Links []*Link `json:"links"` Throttling bool `json:"throttling"` }
type RootService ¶ added in v0.21.0
RootService is an interface for interfacing with the Root endpoints of the MongoDB Atlas API.
See more: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Root/operation/getSystemStatus
type RootServiceOp ¶ added in v0.21.0
type RootServiceOp service
RootServiceOp handles communication with the APIKey related methods of the MongoDB Atlas API.
func (*RootServiceOp) List ¶ added in v0.21.0
func (s *RootServiceOp) List(ctx context.Context, listOptions *ListOptions) (*Root, *Response, error)
List all API-KEY related data
See more: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Root/operation/getSystemStatus
type SampleDatasetJob ¶ added in v0.8.0
type SampleDatasetJob struct { ClusterName string `json:"clusterName"` CompleteDate string `json:"completeDate,omitempty"` CreateDate string `json:"createDate,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` ID string `json:"_id"` State string `json:"state"` }
SampleDatasetJob represents a sample dataset job.
type ScheduledPolicyItem ¶ added in v0.25.0
type ScheduledPolicyItem struct { ID string `json:"id,omitempty"` // Unique identifier of the backup policy item. FrequencyInterval int `json:"frequencyInterval,omitempty"` // Desired frequency of the new backup policy item specified by frequencyType. FrequencyType string `json:"frequencyType,omitempty"` // Frequency associated with the backup policy item. One of the following values: hourly, daily, weekly or monthly. RetentionUnit string `json:"retentionUnit,omitempty"` // Metric of duration of the backup policy item: days, weeks, or months. RetentionValue int `json:"retentionValue,omitempty"` // Duration for which the backup is kept. Associated with retentionUnit. }
PolicyItem represents a specifications for a scheduled backup policy and on demand policy.
type Scope ¶ added in v0.5.0
Scope if presents a database user only have access to the indicated resource if none is given then it has access to all.
type SearchAnalyzer ¶
type SearchAnalyzer struct { BaseAnalyzer string `json:"baseAnalyzer"` MaxTokenLength *int `json:"maxTokenLength,omitempty"` IgnoreCase *bool `json:"ignoreCase,omitempty"` Name string `json:"name"` StemExclusionSet []string `json:"stemExclusionSet,omitempty"` Stopwords []string `json:"stopwords,omitempty"` }
SearchAnalyzer search analyzer definition.
type SearchIndex ¶
type SearchIndex struct { Analyzer string `json:"analyzer,omitempty"` Analyzers []map[string]interface{} `json:"analyzers,omitempty"` // Custom analyzers CollectionName string `json:"collectionName"` Database string `json:"database"` IndexID string `json:"indexID,omitempty"` Mappings *IndexMapping `json:"mappings,omitempty"` Name string `json:"name"` SearchAnalyzer string `json:"searchAnalyzer,omitempty"` Status string `json:"status,omitempty"` Synonyms []map[string]interface{} `json:"synonyms,omitempty"` }
SearchIndex index definition.
type SearchService ¶
type SearchService interface { ListIndexes(ctx context.Context, groupID string, clusterName string, databaseName string, collectionName string, opts *ListOptions) ([]*SearchIndex, *Response, error) GetIndex(ctx context.Context, groupID, clusterName, indexID string) (*SearchIndex, *Response, error) CreateIndex(ctx context.Context, projectID, clusterName string, r *SearchIndex) (*SearchIndex, *Response, error) UpdateIndex(ctx context.Context, projectID, clusterName, indexID string, r *SearchIndex) (*SearchIndex, *Response, error) DeleteIndex(ctx context.Context, projectID, clusterName, indexID string) (*Response, error) ListAnalyzers(ctx context.Context, groupID, clusterName string, listOptions *ListOptions) ([]*SearchAnalyzer, *Response, error) UpdateAllAnalyzers(ctx context.Context, groupID, clusterName string, analyzers []*SearchAnalyzer) ([]*SearchAnalyzer, *Response, error) }
SearchService provides access to the search related functions in the Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/atlas-search/
type SearchServiceOp ¶
type SearchServiceOp service
SearchServiceOp provides an implementation of the SearchService interface.
func (*SearchServiceOp) CreateIndex ¶
func (s *SearchServiceOp) CreateIndex(ctx context.Context, projectID, clusterName string, r *SearchIndex) (*SearchIndex, *Response, error)
CreateIndex creates an Atlas Search index.
See more: https://docs.atlas.mongodb.com/reference/api/fts-indexes-create-one/
func (*SearchServiceOp) DeleteIndex ¶
func (s *SearchServiceOp) DeleteIndex(ctx context.Context, projectID, clusterName, indexID string) (*Response, error)
DeleteIndex deletes one Atlas Search index by its indexId.
See more: https://docs.atlas.mongodb.com/reference/api/fts-indexes-delete-one/
func (*SearchServiceOp) GetIndex ¶
func (s *SearchServiceOp) GetIndex(ctx context.Context, groupID, clusterName, indexID string) (*SearchIndex, *Response, error)
GetIndex gets one Atlas Search index by its indexId.
See more: https://docs.atlas.mongodb.com/reference/api/fts-indexes-get-one/
func (*SearchServiceOp) ListAnalyzers ¶
func (s *SearchServiceOp) ListAnalyzers(ctx context.Context, groupID, clusterName string, listOptions *ListOptions) ([]*SearchAnalyzer, *Response, error)
ListAnalyzers gets all Atlas Search user-defined analyzers for a specified cluster.
See more: https://docs.atlas.mongodb.com/reference/api/fts-analyzers-get-all/
func (*SearchServiceOp) ListIndexes ¶
func (s *SearchServiceOp) ListIndexes(ctx context.Context, groupID, clusterName, databaseName, collectionName string, opts *ListOptions) ([]*SearchIndex, *Response, error)
ListIndexes Get all Atlas Search indexes for a specified collection.
See more: https://docs.atlas.mongodb.com/reference/api/fts-indexes-get-all/
func (*SearchServiceOp) UpdateAllAnalyzers ¶ added in v0.9.0
func (s *SearchServiceOp) UpdateAllAnalyzers(ctx context.Context, groupID, clusterName string, analyzers []*SearchAnalyzer) ([]*SearchAnalyzer, *Response, error)
UpdateAllAnalyzers Update All User-Defined Analyzers for a specific Cluster.
See more: https://docs.atlas.mongodb.com/reference/api/fts-analyzers-update-all//
func (*SearchServiceOp) UpdateIndex ¶
func (s *SearchServiceOp) UpdateIndex(ctx context.Context, projectID, clusterName, indexID string, r *SearchIndex) (*SearchIndex, *Response, error)
UpdateIndex updates an Atlas Search index by its indexId.
See more: https://docs.atlas.mongodb.com/reference/api/fts-indexes-update-one/
type ServerlessBackupOptions ¶ added in v0.17.0
type ServerlessBackupOptions struct {
ServerlessContinuousBackupEnabled *bool `json:"serverlessContinuousBackupEnabled,omitempty"`
}
ServerlessBackupOptions Serverless Continuous Backup.
type ServerlessCreateRequestParams ¶ added in v0.11.0
type ServerlessCreateRequestParams struct { Name string `json:"name,omitempty"` ProviderSettings *ServerlessProviderSettings `json:"providerSettings,omitempty"` ServerlessBackupOptions *ServerlessBackupOptions `json:"serverlessBackupOptions,omitempty"` TerminationProtectionEnabled *bool `json:"terminationProtectionEnabled,omitempty"` Tag *[]*Tag `json:"tags,omitempty"` }
ServerlessCreateRequestParams represents the Request Body Parameters of ServerlessInstancesService.Create.
type ServerlessInstancesService ¶ added in v0.11.0
type ServerlessInstancesService interface { List(context.Context, string, *ListOptions) (*ClustersResponse, *Response, error) Get(context.Context, string, string) (*Cluster, *Response, error) Create(context.Context, string, *ServerlessCreateRequestParams) (*Cluster, *Response, error) Update(context.Context, string, string, *ServerlessUpdateRequestParams) (*Cluster, *Response, error) Delete(context.Context, string, string) (*Response, error) }
ServerlessInstancesService is an interface for interfacing with the Serverless Instances endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/serverless/return-one-serverless-instance/
type ServerlessInstancesServiceOp ¶ added in v0.11.0
type ServerlessInstancesServiceOp service
ServerlessInstancesServiceOp handles communication with the Serverless Instances related methods of the MongoDB Atlas API.
func (*ServerlessInstancesServiceOp) Create ¶ added in v0.11.0
func (s *ServerlessInstancesServiceOp) Create(ctx context.Context, projectID string, bodyParams *ServerlessCreateRequestParams) (*Cluster, *Response, error)
Create creates one serverless instance in the specified project.
See more: https://docs.atlas.mongodb.com/reference/api/serverless/create-one-serverless-instance/
func (*ServerlessInstancesServiceOp) Delete ¶ added in v0.11.0
func (s *ServerlessInstancesServiceOp) Delete(ctx context.Context, projectID, instanceName string) (*Response, error)
Delete deletes one serverless instance in the specified project.
See more: https://docs.atlas.mongodb.com/reference/api/serverless/remove-one-serverless-instance/
func (*ServerlessInstancesServiceOp) Get ¶ added in v0.11.0
func (s *ServerlessInstancesServiceOp) Get(ctx context.Context, projectID, instanceName string) (*Cluster, *Response, error)
Get retrieves one serverless instance in the specified project.
See more: https://docs.atlas.mongodb.com/reference/api/serverless/return-one-serverless-instance/
func (*ServerlessInstancesServiceOp) List ¶ added in v0.11.0
func (s *ServerlessInstancesServiceOp) List(ctx context.Context, projectID string, listOptions *ListOptions) (*ClustersResponse, *Response, error)
List gets all serverless instances in the specified project.
See more: https://docs.atlas.mongodb.com/reference/api/serverless/return-all-serverless-instances/
func (*ServerlessInstancesServiceOp) Update ¶ added in v0.17.0
func (s *ServerlessInstancesServiceOp) Update(ctx context.Context, projectID, instanceName string, bodyParams *ServerlessUpdateRequestParams) (*Cluster, *Response, error)
Update one serverless instance in the specified project..
See more: https://www.mongodb.com/docs/atlas/reference/api/serverless/update-one-serverless-instance/
type ServerlessPrivateEndpointConnection ¶ added in v0.18.0
type ServerlessPrivateEndpointConnection struct { ID string `json:"_id,omitempty"` // Unique identifier of the Serverless PrivateLink Service. CloudProviderEndpointID string `json:"cloudProviderEndpointId,omitempty"` Comment string `json:"comment,omitempty"` EndpointServiceName string `json:"endpointServiceName,omitempty"` // Name of the PrivateLink endpoint service in AWS. Returns null while the endpoint service is being created. ErrorMessage string `json:"errorMessage,omitempty"` // Error message pertaining to the AWS Service Connect. Returns null if there are no errors. Status string `json:"status,omitempty"` // Status of the AWS Serverless PrivateLink connection: INITIATING, WAITING_FOR_USER, FAILED, DELETING, AVAILABLE. ProviderName string `json:"providerName,omitempty"` // Human-readable label that identifies the cloud provider. Values include AWS or AZURE. PrivateEndpointIPAddress string `json:"privateEndpointIpAddress,omitempty"` // IPv4 address of the private endpoint in your Azure VNet that someone added to this private endpoint service. PrivateLinkServiceResourceID string `json:"privateLinkServiceResourceId,omitempty"` // Root-relative path that identifies the Azure Private Link Service that MongoDB Cloud manages. MongoDB Cloud returns null while it creates the endpoint service. }
PrivateEndpointServerlessConnection represents MongoDB Private Endpoint Connection.
type ServerlessPrivateEndpointsService ¶ added in v0.18.0
type ServerlessPrivateEndpointsService interface { List(context.Context, string, string, *ListOptions) ([]ServerlessPrivateEndpointConnection, *Response, error) Create(context.Context, string, string, *ServerlessPrivateEndpointConnection) (*ServerlessPrivateEndpointConnection, *Response, error) Get(context.Context, string, string, string) (*ServerlessPrivateEndpointConnection, *Response, error) Delete(context.Context, string, string, string) (*Response, error) Update(context.Context, string, string, string, *ServerlessPrivateEndpointConnection) (*ServerlessPrivateEndpointConnection, *Response, error) }
ServerlessPrivateEndpointsService is an interface for interfacing with the Private Endpoints of the MongoDB Atlas API.
See more: See more: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Serverless-Private-Endpoints
type ServerlessPrivateEndpointsServiceOp ¶ added in v0.18.0
type ServerlessPrivateEndpointsServiceOp service
PrivateServerlessEndpointsServiceOp handles communication with the PrivateServerlessEndpoints related methods of the MongoDB Atlas API.
func (*ServerlessPrivateEndpointsServiceOp) Create ¶ added in v0.18.0
func (s *ServerlessPrivateEndpointsServiceOp) Create(ctx context.Context, groupID, instanceName string, createRequest *ServerlessPrivateEndpointConnection) (*ServerlessPrivateEndpointConnection, *Response, error)
Create Adds one serverless private endpoint in an Atlas project.
func (*ServerlessPrivateEndpointsServiceOp) Delete ¶ added in v0.18.0
func (s *ServerlessPrivateEndpointsServiceOp) Delete(ctx context.Context, groupID, instanceName, privateEndpointID string) (*Response, error)
Delete one private serverless endpoint service in an Atlas project.
func (*ServerlessPrivateEndpointsServiceOp) Get ¶ added in v0.18.0
func (s *ServerlessPrivateEndpointsServiceOp) Get(ctx context.Context, groupID, instanceName, privateEndpointID string) (*ServerlessPrivateEndpointConnection, *Response, error)
Get retrieve details for one private serverless endpoint in an Atlas project.
func (*ServerlessPrivateEndpointsServiceOp) List ¶ added in v0.18.0
func (s *ServerlessPrivateEndpointsServiceOp) List(ctx context.Context, groupID, instanceName string, listOptions *ListOptions) ([]ServerlessPrivateEndpointConnection, *Response, error)
List retrieve details for all private Serverless endpoint services in one Atlas project.
func (*ServerlessPrivateEndpointsServiceOp) Update ¶ added in v0.18.0
func (s *ServerlessPrivateEndpointsServiceOp) Update(ctx context.Context, groupID, instanceName, privateEndpointID string, updateRequest *ServerlessPrivateEndpointConnection) (*ServerlessPrivateEndpointConnection, *Response, error)
Update updates the private serverless endpoint setting for one Atlas project.
type ServerlessProviderSettings ¶ added in v0.11.0
type ServerlessProviderSettings struct { BackingProviderName string `json:"backingProviderName,omitempty"` ProviderName string `json:"providerName,omitempty"` RegionName string `json:"regionName,omitempty"` }
ServerlessProviderSettings represents the Provider Settings of serverless instances.
type ServerlessUpdateRequestParams ¶ added in v0.17.0
type ServerlessUpdateRequestParams struct { ServerlessBackupOptions *ServerlessBackupOptions `json:"serverlessBackupOptions"` TerminationProtectionEnabled *bool `json:"terminationProtectionEnabled,omitempty"` Tag *[]*Tag `json:"tags"` }
type ServiceVersion ¶ added in v0.13.0
ServiceVersion represents version information.
func (*ServiceVersion) String ¶ added in v0.13.0
func (v *ServiceVersion) String() string
String serializes VersionInfo into string.
type ServiceVersionService ¶ added in v0.13.0
type ServiceVersionService interface {
Get(context.Context) (*ServiceVersion, *Response, error)
}
ServiceVersionService is an interface for the version private endpoint of the MongoDB Atlas API.
We currently make no promise to support or document this service or endpoint beyond what can be seen here.
type ServiceVersionServiceOp ¶ added in v0.13.0
type ServiceVersionServiceOp struct {
Client PlainRequestDoer
}
func (*ServiceVersionServiceOp) Get ¶ added in v0.13.0
func (s *ServiceVersionServiceOp) Get(ctx context.Context) (*ServiceVersion, *Response, error)
Get gets the version information and parses it.
type Shape ¶ added in v0.5.0
type Shape struct { AvgMs float64 `json:"avgMs,omitempty"` // Average duration in milliseconds for the queries examined that match this shape. Count int64 `json:"count,omitempty"` // Number of queries examined that match this shape. ID string `json:"id,omitempty"` // Unique id for this shape. Exists only for the duration of the API request. InefficiencyScore int64 `json:"inefficiencyScore,omitempty"` // Average number of documents read for every document returned by the query. Namespace string `json:"namespace,omitempty"` // The namespace in which the slow query ran. Operations []*Operation `json:"operations,omitempty"` // It represents documents with specific information and log lines for individual queries. }
Shape represents a document with information about the query shapes that are served by the suggested indexes.
type SlowQueries ¶ added in v0.5.0
type SlowQueries struct {
SlowQuery []*SlowQuery `json:"slowQueries,omitempty"` // A list of documents with information about slow queries as detected by the Performance Advisor.
}
SlowQueries represents a list of SlowQuery.
type SlowQuery ¶ added in v0.5.0
type SlowQuery struct { Namespace string `json:"namespace,omitempty"` // The namespace in which the slow query ran. Line string `json:"line,omitempty"` // The raw log line pertaining to the slow query. }
SlowQuery represents a slow query.
type SlowQueryOptions ¶ added in v0.5.0
type SlowQueryOptions struct { Namespaces string `url:"namespaces,omitempty"` // Namespaces from which to retrieve slow query logs. A namespace consists of the database and collection resource separated by a ., such as <database>.<collection>. NLogs int64 `url:"nLogs,omitempty"` // Maximum number of log lines to return. Defaults to 20000. NamespaceOptions }
SlowQueryOptions contains the request query parameters for the API request.
type SnapshotPart ¶
type SnapshotPart struct { ClusterID string `json:"clusterId"` CompressionSetting string `json:"compressionSetting"` DataSizeBytes int64 `json:"dataSizeBytes"` EncryptionEnabled bool `json:"encryptionEnabled"` FileSizeBytes int64 `json:"fileSizeBytes"` MasterKeyUUID string `json:"masterKeyUUID,omitempty"` MongodVersion string `json:"mongodVersion"` StorageSizeBytes int64 `json:"storageSizeBytes"` }
type SnapshotReqPathParameters ¶
type SnapshotReqPathParameters struct { GroupID string `json:"groupId,omitempty"` // The unique identifier of the project for the Atlas cluster. SnapshotID string `json:"snapshotId,omitempty"` // The unique identifier of the snapshot you want to retrieve. ClusterName string `json:"clusterName,omitempty"` // The name of the Atlas cluster that contains the snapshots you want to retrieve. InstanceName string `json:"instanceName,omitempty"` // Human-readable label that identifies your serverless instance. JobID string `json:"jobId,omitempty"` // The unique identifier of the restore job to retrieve. RestoreJobID string `json:"restore_job_id,omitempty"` // The unique identifier of the restore job id to retrieve. }
SnapshotReqPathParameters represents all the pissible parameters to make the request.
type SnapshotTimestamp ¶
type Source ¶ added in v0.12.0
type Source struct { ClusterName string `json:"clusterName,omitempty"` // Human-readable label that identifies the source Cloud Manager or Ops Manager cluster. GroupID string `json:"groupId,omitempty"` // Unique 24-hexadecimal digit string that identifies the source project. Username string `json:"username,omitempty"` // Human-readable label that identifies the SCRAM-SHA user that connects to the source Cloud Manager or Ops Manager cluster. Password string `json:"password,omitempty"` // Password that authenticates the username to the source Cloud Manager or Ops Manager cluster. SSL *bool `json:"ssl,omitempty"` // Flag that indicates whether you have TLS enabled. CACertificatePath string `json:"caCertificatePath,omitempty"` // Path to the CA certificate that signed TLS certificates use to authenticate to the source Cloud Manager or Ops Manager cluster. ManagedAuthentication *bool `json:"managedAuthentication,omitempty"` // Flag that indicates whether MongoDB Automation manages authentication to the source Cloud Manager or Ops Manager cluster. }
Source represents the Cloud Manager or Ops Manager source of the migrating cluster.
type Stats ¶ added in v0.5.0
type Stats struct { MS float64 `json:"ms,omitempty"` // Duration in milliseconds of the query. NReturned int64 `json:"nReturned,omitempty"` // Number of results returned by the query. NScanned int64 `json:"nScanned,omitempty"` // Number of documents read by the query. TS int64 `json:"ts,omitempty"` // Query timestamp, in seconds since epoch. }
Stats represents query statistics.
type Storage ¶
type Storage struct { Databases []DataLakeDatabase `json:"databases,omitempty"` Stores []DataLakeStore `json:"stores,omitempty"` }
Storage represents the storage configuration for a data lake.
type SuggestedIndex ¶ added in v0.5.0
type SuggestedIndex struct { ID string `json:"id,omitempty"` // Unique id for this suggested index. Impact []string `json:"impact,omitempty"` // List of unique identifiers which correspond the query shapes in this response which pertain to this suggested index. Namespace string `json:"namespace,omitempty"` // Namespace of the suggested index. Weight float64 `json:"weight,omitempty"` // Estimated percentage performance improvement that the suggested index would provide. Index []map[string]int `json:"index,omitempty"` // Array of documents that specifies a key in the index and its sort order, ascending or descending. }
SuggestedIndex represents a suggested index.
type SuggestedIndexOptions ¶ added in v0.5.0
type SuggestedIndexOptions struct { Namespaces string `url:"namespaces,omitempty"` // Namespaces from which to retrieve slow query logs. A namespace consists of the database and collection resource separated by a ., such as <database>.<collection>. NIndexes int64 `url:"nIndexes,omitempty"` // Maximum number of indexes to suggest. Defaults to unlimited. NExamples int64 `url:"NExamples,omitempty"` // Maximum number of examples queries to provide that will be improved by a suggested index. Defaults to 5. NamespaceOptions }
SuggestedIndexOptions contains the request query parameters for the API request.
type SuggestedIndexes ¶ added in v0.5.0
type SuggestedIndexes struct { SuggestedIndexes []*SuggestedIndex `json:"suggestedIndexes,omitempty"` // Documents with information about the indexes suggested by the Performance Advisor. Shapes []*Shape `json:"shapes,omitempty"` // Documents with information about the query shapes that are served by the suggested indexes. }
SuggestedIndexes represents an array of suggested indexes.
type Team ¶
type Team struct { ID string `json:"id,omitempty"` Name string `json:"name"` Usernames []string `json:"usernames,omitempty"` }
Team defines an Atlas team structure.
type TeamRoles ¶
type TeamRoles struct { Links []*Link `json:"links"` RoleNames []string `json:"roleNames"` TeamID string `json:"teamId"` }
TeamRoles List of roles for a team.
type TeamUpdateRoles ¶
type TeamUpdateRoles struct {
RoleNames []string `json:"roleNames"`
}
TeamUpdateRoles update request body.
type TeamUpdateRolesResponse ¶
type TeamUpdateRolesResponse struct { Links []*Link `json:"links"` Results []TeamRoles `json:"results"` TotalCount int `json:"totalCount"` }
TeamUpdateRolesResponse update roles response.
type TeamsAssigned ¶
type TeamsAssigned struct { Links []*Link `json:"links"` Results []*Result `json:"results"` TotalCount int `json:"totalCount"` }
TeamsAssigned represents the one team assigned to the project.
type TeamsResponse ¶
type TeamsResponse struct { Links []*Link `json:"links"` Results []Team `json:"results"` TotalCount int `json:"totalCount"` }
TeamsResponse represents a array of project.
type TeamsService ¶
type TeamsService interface { List(context.Context, string, *ListOptions) ([]Team, *Response, error) Get(context.Context, string, string) (*Team, *Response, error) GetOneTeamByName(context.Context, string, string) (*Team, *Response, error) GetTeamUsersAssigned(context.Context, string, string) ([]AtlasUser, *Response, error) Create(context.Context, string, *Team) (*Team, *Response, error) Rename(context.Context, string, string, string) (*Team, *Response, error) UpdateTeamRoles(context.Context, string, string, *TeamUpdateRoles) ([]TeamRoles, *Response, error) AddUsersToTeam(context.Context, string, string, []string) ([]AtlasUser, *Response, error) RemoveUserToTeam(context.Context, string, string, string) (*Response, error) RemoveTeamFromOrganization(context.Context, string, string) (*Response, error) RemoveTeamFromProject(context.Context, string, string) (*Response, error) }
TeamsService is an interface for interfacing with the Teams endpoints of the MongoDB Atlas API.
See more: https://docs.atlas.mongodb.com/reference/api/teams/
type TeamsServiceOp ¶
type TeamsServiceOp service
TeamsServiceOp handles communication with the Teams related methods of the MongoDB Atlas API.
func (*TeamsServiceOp) AddUsersToTeam ¶
func (s *TeamsServiceOp) AddUsersToTeam(ctx context.Context, orgID, teamID string, usersID []string) ([]AtlasUser, *Response, error)
AddUsersToTeam adds a users from the organization associated with {ORG-ID} to the team with ID {TEAM-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/teams-add-user/
func (*TeamsServiceOp) Create ¶
func (s *TeamsServiceOp) Create(ctx context.Context, orgID string, createRequest *Team) (*Team, *Response, error)
Create creates a team.
See more: https://docs.atlas.mongodb.com/reference/api/teams-create-one/
func (*TeamsServiceOp) Get ¶
Get gets a single team in the organization by team ID.
See more: https://docs.atlas.mongodb.com/reference/api/teams-get-one-by-id/
func (*TeamsServiceOp) GetOneTeamByName ¶
func (s *TeamsServiceOp) GetOneTeamByName(ctx context.Context, orgID, teamName string) (*Team, *Response, error)
GetOneTeamByName gets a single project by its name.
See more: https://docs.atlas.mongodb.com/reference/api/project-get-one-by-name/
func (*TeamsServiceOp) GetTeamUsersAssigned ¶
func (s *TeamsServiceOp) GetTeamUsersAssigned(ctx context.Context, orgID, teamID string) ([]AtlasUser, *Response, error)
GetTeamUsersAssigned gets all the users assigned to a team.
See more: https://docs.atlas.mongodb.com/reference/api/teams-get-all-users/
func (*TeamsServiceOp) List ¶
func (s *TeamsServiceOp) List(ctx context.Context, orgID string, listOptions *ListOptions) ([]Team, *Response, error)
List gets all teams.
See more: https://docs.atlas.mongodb.com/reference/api/project-get-all/
func (*TeamsServiceOp) RemoveTeamFromOrganization ¶
func (s *TeamsServiceOp) RemoveTeamFromOrganization(ctx context.Context, orgID, teamID string) (*Response, error)
RemoveTeamFromOrganization deletes the team with ID {TEAM-ID} from the organization specified to {ORG-ID}.
See more: https://docs.atlas.mongodb.com/reference/api/teams-delete-one/
func (*TeamsServiceOp) RemoveTeamFromProject ¶
func (s *TeamsServiceOp) RemoveTeamFromProject(ctx context.Context, groupID, teamID string) (*Response, error)
RemoveTeamFromProject removes the specified team from the specified project.
See more: https://docs.atlas.mongodb.com/reference/api/teams-remove-from-project/
func (*TeamsServiceOp) RemoveUserToTeam ¶
func (s *TeamsServiceOp) RemoveUserToTeam(ctx context.Context, orgID, teamID, userID string) (*Response, error)
RemoveUserToTeam removes the specified user from the specified team.
See more: https://docs.atlas.mongodb.com/reference/api/teams-remove-user/
func (*TeamsServiceOp) Rename ¶
func (s *TeamsServiceOp) Rename(ctx context.Context, orgID, teamID, teamName string) (*Team, *Response, error)
Rename renames a team.
See more: https://docs.atlas.mongodb.com/reference/api/teams-rename-one/
func (*TeamsServiceOp) UpdateTeamRoles ¶
func (s *TeamsServiceOp) UpdateTeamRoles(ctx context.Context, groupID, teamID string, updateTeamRolesRequest *TeamUpdateRoles) ([]TeamRoles, *Response, error)
UpdateTeamRoles Update the roles of a team in an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/teams-update-roles/
type ThirdPartyIntegration ¶ added in v0.5.0
type ThirdPartyIntegration struct { Type string `json:"type,omitempty"` LicenseKey string `json:"licenseKey,omitempty"` AccountID string `json:"accountId,omitempty"` WriteToken string `json:"writeToken,omitempty"` ReadToken string `json:"readToken,omitempty"` APIKey string `json:"apiKey,omitempty"` Region string `json:"region,omitempty"` ServiceKey string `json:"serviceKey,omitempty"` APIToken string `json:"apiToken,omitempty"` TeamName string `json:"teamName,omitempty"` ChannelName string `json:"channelName,omitempty"` RoutingKey string `json:"routingKey,omitempty"` FlowName string `json:"flowName,omitempty"` OrgName string `json:"orgName,omitempty"` URL string `json:"url,omitempty"` Secret string `json:"secret,omitempty"` Name string `json:"name,omitempty"` MicrosoftTeamsWebhookURL string `json:"microsoftTeamsWebhookUrl,omitempty"` UserName string `json:"username,omitempty"` Password string `json:"password,omitempty"` ServiceDiscovery string `json:"serviceDiscovery,omitempty"` Scheme string `json:"scheme,omitempty"` Enabled bool `json:"enabled,omitempty"` }
ThirdPartyIntegration contains parameters for different third-party services.
type ThirdPartyIntegrations ¶ added in v0.5.0
type ThirdPartyIntegrations struct { Links []*Link `json:"links"` Results []*ThirdPartyIntegration `json:"results"` TotalCount int `json:"totalCount"` }
ThirdPartyIntegrations contains the response from the endpoint.
type Threshold ¶ added in v0.5.0
type Threshold struct { Operator string `json:"operator,omitempty"` // Operator to apply when checking the current metric value against the threshold value. it accepts the following values: GREATER_THAN, LESS_THAN Units string `json:"units,omitempty"` // The units for the threshold value. Threshold float64 `json:"threshold,omitempty"` // Threshold value outside of which an alert will be triggered. }
Threshold that triggers an alert. Don’t include if "eventTypeName" : "OUTSIDE_METRIC_THRESHOLD".
type TokenCreateRequest ¶ added in v0.12.0
type TokenCreateRequest struct {
AccessListIPs []string `json:"accessListIps"` // One IP address access list entry associated with the API key.
}
TokenCreateRequest represents the Request Body Parameters of LiveMigrationService.CreateLinkToken.
type UserCertificate ¶
type UserCertificate struct { Username string `json:"username,omitempty"` // Username of the database user to create a certificate for. MonthsUntilExpiration int `json:"monthsUntilExpiration,omitempty"` // A number of months that the created certificate is valid for before expiry, up to 24 months.default 3. Certificate string `json:"certificate,omitempty"` ID *int64 `json:"_id,omitempty"` // Serial number of this certificate. CreatedAt string `json:"createdAt,omitempty"` // Timestamp in ISO 8601 date and time format in UTC when Atlas created this X.509 certificate. GroupID string `json:"groupId,omitempty"` // Unique identifier of the Atlas project to which this certificate belongs. NotAfter string `json:"notAfter,omitempty"` // Timestamp in ISO 8601 date and time format in UTC when this certificate expires. Subject string `json:"subject,omitempty"` // Fully distinguished name of the database user to which this certificate belongs. To learn more, see RFC 2253. }
UserCertificate represents an X.509 Certificate for a User.
type UserCertificates ¶
type UserCertificates struct { Links []*Link `json:"links"` // One or more links to sub-resources and/or related resources. Results []UserCertificate `json:"results"` // Array of objects where each details one unexpired database user certificate. TotalCount int `json:"totalCount"` // Total number of unexpired certificates returned in this response. }
UserCertificates is Array of objects where each details one unexpired database user certificate.
type UserConflicts ¶ added in v0.17.0
type UserSecurity ¶
type UserSecurity struct {
CustomerX509 CustomerX509 `json:"customerX509,omitempty"` // CustomerX509 represents Customer-managed X.509 configuration for an Atlas project.
}
UserSecurity represents the wrapper CustomerX509 struct.
type UserToDNMapping ¶ added in v0.5.0
type UserToDNMapping struct { Match string `json:"match,omitempty"` // A regular expression to match against a provided LDAP username. Substitution string `json:"substitution,omitempty"` // An LDAP Distinguished Name (DN) formatting template that converts the LDAP name matched by the match regular expression into an LDAP Distinguished Name. LDAPQuery string `json:"ldapQuery,omitempty"` // An LDAP query formatting template that inserts the LDAP name matched by the match regular expression into an LDAP query URI as specified by RFC 4515 and RFC 4516. }
UserToDNMapping maps an LDAP username for authentication to an LDAP Distinguished Name (DN). Each document contains a match regular expression and either a substitution or ldapQuery template used to transform the LDAP username extracted from the regular expression.
type Validation ¶ added in v0.12.0
type Validation struct { ID string `json:"_id,omitempty"` // Unique 24-hexadecimal digit string that identifies this process validating the live migration. GroupID string `json:"groupId,omitempty"` // Unique 24-hexadecimal digit string that identifies the Atlas project to validate. Status string `json:"status,omitempty"` // State of the validation job when you submitted this request. SourceGroupID string `json:"sourceGroupId,omitempty"` // Unique 24-hexadecimal digit string that identifies the source (Cloud Manager or Ops Manager) project. ErrorMessage string `json:"errorMessage,omitempty"` // Reason why the validation job failed. }
type X509AuthDBUsersService ¶
type X509AuthDBUsersService interface { CreateUserCertificate(context.Context, string, string, int) (*UserCertificate, *Response, error) GetUserCertificates(context.Context, string, string, *ListOptions) ([]UserCertificate, *Response, error) SaveConfiguration(context.Context, string, *CustomerX509) (*CustomerX509, *Response, error) GetCurrentX509Conf(context.Context, string) (*CustomerX509, *Response, error) DisableCustomerX509(context.Context, string) (*Response, error) }
X509AuthDBUsersService is an interface for interfacing with the x509 Authentication Database Users.
See more: https://docs.atlas.mongodb.com/reference/api/x509-configuration/
type X509AuthDBUsersServiceOp ¶
type X509AuthDBUsersServiceOp service
X509AuthDBUsersServiceOp handles communication with the X509AuthDBUsers related methods of the MongoDB Atlas API.
func (*X509AuthDBUsersServiceOp) CreateUserCertificate ¶
func (s *X509AuthDBUsersServiceOp) CreateUserCertificate(ctx context.Context, groupID, username string, monthsUntilExpiration int) (*UserCertificate, *Response, error)
CreateUserCertificate generates an Atlas-managed X.509 certificate for a MongoDB user that authenticates using X.509 certificates.
See more: https://docs.atlas.mongodb.com/reference/api/x509-configuration-create-certificate/
func (*X509AuthDBUsersServiceOp) DisableCustomerX509 ¶
func (s *X509AuthDBUsersServiceOp) DisableCustomerX509(ctx context.Context, groupID string) (*Response, error)
DisableCustomerX509 clears customer-managed X.509 settings on a project. This disables customer-managed X.509.
See more: https://docs.atlas.mongodb.com/reference/api/x509-configuration-disable-advanced/
func (*X509AuthDBUsersServiceOp) GetCurrentX509Conf ¶
func (s *X509AuthDBUsersServiceOp) GetCurrentX509Conf(ctx context.Context, groupID string) (*CustomerX509, *Response, error)
GetCurrentX509Conf gets the current customer-managed X.509 configuration details for an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/x509-configuration-get-current/
func (*X509AuthDBUsersServiceOp) GetUserCertificates ¶
func (s *X509AuthDBUsersServiceOp) GetUserCertificates(ctx context.Context, groupID, username string, listOptions *ListOptions) ([]UserCertificate, *Response, error)
GetUserCertificates gets a list of all Atlas-managed, unexpired certificates for a user.
See more: https://docs.atlas.mongodb.com/reference/api/x509-configuration-get-certificates/
func (*X509AuthDBUsersServiceOp) SaveConfiguration ¶
func (s *X509AuthDBUsersServiceOp) SaveConfiguration(ctx context.Context, groupID string, customerX509 *CustomerX509) (*CustomerX509, *Response, error)
SaveConfiguration saves a customer-managed X.509 configuration for an Atlas project.
See more: https://docs.atlas.mongodb.com/reference/api/x509-configuration-save/
Source Files ¶
- access_tracking.go
- accesslist_api_keys.go
- advanced_clusters.go
- alert_configurations.go
- alerts.go
- api_keys.go
- atlas_users.go
- auditing.go
- aws_custom_dns.go
- backup_compliance_policy.go
- checkpoints.go
- cloud_provider_access.go
- cloud_provider_snapshot_backup_policies.go
- cloud_provider_snapshot_export_buckets.go
- cloud_provider_snapshot_export_jobs.go
- cloud_provider_snapshot_restore_jobs.go
- cloud_provider_snapshots.go
- cluster_outage_simulation.go
- clusters.go
- containers.go
- continuous_restore_jobs.go
- continuous_snapshots.go
- custom_db_roles.go
- data_federation.go
- data_lakes.go
- data_lakes_pipeline.go
- database_users.go
- default_mongodb_major_version.go
- doc.go
- encryptions_at_rest.go
- errors.go
- events.go
- federation_settings.go
- federation_settings_connected_org_config.go
- federation_settings_identity_provider.go
- federation_settings_organization_role_mapping.go
- global_clusters.go
- indexes.go
- ip_info.go
- ldap_configurations.go
- link.go
- live_migration.go
- logs.go
- maintenance.go
- mongodbatlas.go
- online_archives.go
- organization_invitations.go
- organizations.go
- peers.go
- performance_advisor.go
- private_endpoints.go
- private_endpoints_deprecated.go
- private_ip_mode.go
- process_database_measurements.go
- process_databases.go
- process_disk_measurements.go
- process_disks.go
- process_measurements.go
- processes.go
- project_api_key.go
- project_invitations.go
- project_ip_access_list.go
- project_settings.go
- projects.go
- root.go
- search.go
- serverless_instances.go
- serverless_private_endpoints.go
- service_version.go
- teams.go
- third_party_integration.go
- x509_authentication_database_users.go