@@ -26,7 +26,6 @@ import (
26
26
"github.com/mongodb/mongodb-atlas-cli/atlascli/internal/store"
27
27
"github.com/mongodb/mongodb-atlas-cli/atlascli/internal/usage"
28
28
"github.com/spf13/cobra"
29
- atlasClustersPinned "go.mongodb.org/atlas-sdk/v20240530005/admin"
30
29
atlasv2 "go.mongodb.org/atlas-sdk/v20250312003/admin"
31
30
)
32
31
@@ -42,7 +41,7 @@ const (
42
41
type RestoreJobsCreator interface {
43
42
CreateRestoreJobs (string , string , * atlasv2.DiskBackupSnapshotRestoreJob ) (* atlasv2.DiskBackupSnapshotRestoreJob , error )
44
43
CreateRestoreFlexClusterJobs (string , string , * atlasv2.FlexBackupRestoreJobCreate20241113 ) (* atlasv2.FlexBackupRestoreJob20241113 , error )
45
- AtlasCluster (string , string ) (* atlasClustersPinned. AdvancedClusterDescription , error )
44
+ LatestAtlasCluster (string , string ) (* atlasv2. ClusterDescription20240805 , error )
46
45
}
47
46
48
47
type StartOpts struct {
@@ -168,13 +167,13 @@ func markRequiredPointInTimeRestoreFlags(cmd *cobra.Command) error {
168
167
169
168
// checkIsFlexCluster sets the opts.isFlexCluster that indicates if the cluster is a FlexCluster.
170
169
func (opts * StartOpts ) checkIsFlexCluster () error {
171
- _ , err := opts .store .AtlasCluster (opts .ConfigProjectID (), opts .clusterName )
170
+ _ , err := opts .store .LatestAtlasCluster (opts .ConfigProjectID (), opts .clusterName )
172
171
if err == nil {
173
172
opts .isFlexCluster = false
174
173
return nil
175
174
}
176
175
177
- if ! atlasClustersPinned . IsErrorCode (err , cannotUseFlexWithClusterApisErrorCode ) {
176
+ if ! commonerrors . IsCannotUseFlexWithClusterApis (err ) {
178
177
return err
179
178
}
180
179
0 commit comments