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.36.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.