Skip to content

Commit 3b4166c

Browse files
CLOUDP-139997: added OplogMinRetentionHours to ProcessArgs (#316)
1 parent d82e1c9 commit 3b4166c

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

mongodbatlas/clusters.go

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,16 @@ type Cluster struct {
173173

174174
// ProcessArgs represents the advanced configuration options for the cluster.
175175
type ProcessArgs struct {
176-
DefaultReadConcern string `json:"defaultReadConcern,omitempty"`
177-
DefaultWriteConcern string `json:"defaultWriteConcern,omitempty"`
178-
FailIndexKeyTooLong *bool `json:"failIndexKeyTooLong,omitempty"`
179-
JavascriptEnabled *bool `json:"javascriptEnabled,omitempty"`
180-
MinimumEnabledTLSProtocol string `json:"minimumEnabledTlsProtocol,omitempty"`
181-
NoTableScan *bool `json:"noTableScan,omitempty"`
182-
OplogSizeMB *int64 `json:"oplogSizeMB,omitempty"`
183-
SampleSizeBIConnector *int64 `json:"sampleSizeBIConnector,omitempty"`
184-
SampleRefreshIntervalBIConnector *int64 `json:"sampleRefreshIntervalBIConnector,omitempty"`
176+
DefaultReadConcern string `json:"defaultReadConcern,omitempty"`
177+
DefaultWriteConcern string `json:"defaultWriteConcern,omitempty"`
178+
MinimumEnabledTLSProtocol string `json:"minimumEnabledTlsProtocol,omitempty"`
179+
FailIndexKeyTooLong *bool `json:"failIndexKeyTooLong,omitempty"`
180+
JavascriptEnabled *bool `json:"javascriptEnabled,omitempty"`
181+
NoTableScan *bool `json:"noTableScan,omitempty"`
182+
OplogSizeMB *int64 `json:"oplogSizeMB,omitempty"`
183+
SampleSizeBIConnector *int64 `json:"sampleSizeBIConnector,omitempty"`
184+
SampleRefreshIntervalBIConnector *int64 `json:"sampleRefreshIntervalBIConnector,omitempty"`
185+
OplogMinRetentionHours *float64 `json:"oplogMinRetentionHours,omitempty"`
185186
}
186187

187188
// ClusterStatus is the status of the operations on the cluster.
@@ -436,7 +437,7 @@ func (s *ClustersServiceOp) Delete(ctx context.Context, groupID, clusterName str
436437

437438
// UpdateProcessArgs Modifies Advanced Configuration Options for One Cluster
438439
//
439-
// See more: https://docs.atlas.mongodb.com/reference/api/clusters-modify-advanced-configuration-options/
440+
// See more: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#operation/updateAdvancedConfigurationOptionsForOneCluster
440441
func (s *ClustersServiceOp) UpdateProcessArgs(ctx context.Context, groupID, clusterName string, updateRequest *ProcessArgs) (*ProcessArgs, *Response, error) {
441442
if groupID == "" {
442443
return nil, nil, NewArgError("groupId", "must be set")
@@ -464,7 +465,7 @@ func (s *ClustersServiceOp) UpdateProcessArgs(ctx context.Context, groupID, clus
464465

465466
// GetProcessArgs gets the Advanced Configuration Options for One Cluster
466467
//
467-
// See more: https://docs.atlas.mongodb.com/reference/api/clusters-get-advanced-configuration-options/#get-advanced-configuration-options-for-one-cluster
468+
// See more: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#operation/returnOneAdvancedConfigurationOptionsForOneCluster
468469
func (s *ClustersServiceOp) GetProcessArgs(ctx context.Context, groupID, clusterName string) (*ProcessArgs, *Response, error) {
469470
if groupID == "" {
470471
return nil, nil, NewArgError("groupId", "must be set")

mongodbatlas/clusters_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,7 @@ func TestClusters_UpdateProcessArgs(t *testing.T) {
743743
MinimumEnabledTLSProtocol: tlsProtocol,
744744
NoTableScan: pointy.Bool(true),
745745
OplogSizeMB: pointy.Int64(2000),
746+
OplogMinRetentionHours: pointy.Float64(100),
746747
SampleSizeBIConnector: pointy.Int64(5000),
747748
SampleRefreshIntervalBIConnector: pointy.Int64(300),
748749
}
@@ -756,6 +757,7 @@ func TestClusters_UpdateProcessArgs(t *testing.T) {
756757
"minimumEnabledTlsProtocol": tlsProtocol,
757758
"noTableScan": true,
758759
"oplogSizeMB": float64(2000),
760+
"oplogMinRetentionHours": float64(100),
759761
"sampleSizeBIConnector": float64(5000),
760762
"sampleRefreshIntervalBIConnector": float64(300),
761763
}
@@ -769,6 +771,7 @@ func TestClusters_UpdateProcessArgs(t *testing.T) {
769771
"minimumEnabledTlsProtocol": "TLS1_2",
770772
"noTableScan": true,
771773
"oplogSizeMB": 2000,
774+
"oplogMinRetentionHours": 100,
772775
"sampleSizeBIConnector": 5000,
773776
"sampleRefreshIntervalBIConnector": 300
774777
}

0 commit comments

Comments
 (0)