9
9
"strings"
10
10
"time"
11
11
12
- adminpreview "github.com/mongodb/atlas-sdk-go/admin"
13
12
admin20240530 "go.mongodb.org/atlas-sdk/v20240530005/admin"
14
13
"go.mongodb.org/atlas-sdk/v20240805005/admin"
15
14
matlasClient "go.mongodb.org/atlas/mongodbatlas"
@@ -33,7 +32,6 @@ type MongoDBClient struct {
33
32
Atlas * matlasClient.Client
34
33
AtlasV2 * admin.APIClient
35
34
AtlasV220240530 * admin20240530.APIClient // used in advanced_cluster and cloud_backup_schedule for avoiding breaking changes
36
- AtlasPreview * adminpreview.APIClient // used for preview features, don't use in resources exposed in the provider list
37
35
Config * Config
38
36
}
39
37
@@ -112,16 +110,10 @@ func (c *Config) NewClient(ctx context.Context) (any, error) {
112
110
return nil , err
113
111
}
114
112
115
- sdkPreviewClient , err := c .newSDKPreviewClient (client )
116
- if err != nil {
117
- return nil , err
118
- }
119
-
120
113
clients := & MongoDBClient {
121
114
Atlas : atlasClient ,
122
115
AtlasV2 : sdkV2Client ,
123
116
AtlasV220240530 : sdkV220240530Client ,
124
- AtlasPreview : sdkPreviewClient ,
125
117
Config : c ,
126
118
}
127
119
return clients , nil
@@ -155,20 +147,6 @@ func (c *Config) newSDKV220240530Client(client *http.Client) (*admin20240530.API
155
147
return sdk , nil
156
148
}
157
149
158
- func (c * Config ) newSDKPreviewClient (client * http.Client ) (* adminpreview.APIClient , error ) {
159
- opts := []adminpreview.ClientModifier {
160
- adminpreview .UseHTTPClient (client ),
161
- adminpreview .UseUserAgent (userAgent (c )),
162
- adminpreview .UseBaseURL (c .BaseURL ),
163
- adminpreview .UseDebug (false )}
164
-
165
- sdk , err := adminpreview .NewClient (opts ... )
166
- if err != nil {
167
- return nil , err
168
- }
169
- return sdk , nil
170
- }
171
-
172
150
func (c * MongoDBClient ) GetRealmClient (ctx context.Context ) (* realm.Client , error ) {
173
151
// Realm
174
152
if c .Config .PublicKey == "" && c .Config .PrivateKey == "" {
0 commit comments