Skip to content

Commit 30b9a14

Browse files
APIBot: SDK update based on recent changes in Atlas API (#226)
1 parent 7da9d45 commit 30b9a14

File tree

103 files changed

+6223
-2304
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+6223
-2304
lines changed

.github/workflows/autoupdate-prod.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ jobs:
4545
GIT_BASE_REF: ${{ github.sha }}
4646
run: |
4747
make new-release
48+
- name: Ensure all markdown code is formatted
49+
if: steps.verify-changed-files.outputs.files_changed == 'true'
50+
working-directory: ./tools
51+
run: |
52+
npm run format
4853
- uses: peter-evans/create-pull-request@v5
4954
if: steps.verify-changed-files.outputs.files_changed == 'true'
5055
env:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Note that `atlas-sdk-go` only supports the two most recent major versions of Go.
1111
### Adding Dependency
1212

1313
```terminal
14-
go get go.mongodb.org/atlas-sdk/v20231001001
14+
go get go.mongodb.org/atlas-sdk/v20231001002
1515
```
1616

1717
### Using in the code
@@ -20,7 +20,7 @@ Construct a new Atlas SDK client, then use the various services on the client to
2020
access different parts of the Atlas API. For example:
2121

2222
```go
23-
import "go.mongodb.org/atlas-sdk/v20231001001/admin"
23+
import "go.mongodb.org/atlas-sdk/v20231001002/admin"
2424

2525
func example() {
2626
ctx := context.Background()

admin/api_cloud_migration_service.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ type CloudMigrationServiceApi interface {
4545
4646
You can use this API endpoint for push live migrations only. Your API Key must have the Organization Owner role to successfully call this resource.
4747
48+
**NOTE**: Migrating time-series collections is not yet supported on MongoDB v6.0 or higher. Migrations on MongoDB v6.0 or higher will skip any time-series collections on the source cluster.
49+
4850
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
4951
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
5052
@return CreatePushMigrationApiRequest
@@ -381,6 +383,8 @@ Migrate one cluster that Cloud or Ops Manager manages to MongoDB Atlas.
381383
382384
You can use this API endpoint for push live migrations only. Your API Key must have the Organization Owner role to successfully call this resource.
383385
386+
**NOTE**: Migrating time-series collections is not yet supported on MongoDB v6.0 or higher. Migrations on MongoDB v6.0 or higher will skip any time-series collections on the source cluster.
387+
384388
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
385389
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
386390
@return CreatePushMigrationApiRequest

admin/api_clusters.go

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ type ClustersApi interface {
330330
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
331331
@return UpgradeSharedClusterApiRequest
332332
*/
333-
UpgradeSharedCluster(ctx context.Context, groupId string, legacyAtlasCluster *LegacyAtlasCluster) UpgradeSharedClusterApiRequest
333+
UpgradeSharedCluster(ctx context.Context, groupId string, legacyAtlasTenantClusterUpgradeRequest *LegacyAtlasTenantClusterUpgradeRequest) UpgradeSharedClusterApiRequest
334334
/*
335335
UpgradeSharedCluster Upgrade One Shared-tier Cluster
336336
@@ -2361,23 +2361,23 @@ func (a *ClustersApiService) updateClusterAdvancedConfigurationExecute(r UpdateC
23612361
}
23622362

23632363
type UpgradeSharedClusterApiRequest struct {
2364-
ctx context.Context
2365-
ApiService ClustersApi
2366-
groupId string
2367-
legacyAtlasCluster *LegacyAtlasCluster
2364+
ctx context.Context
2365+
ApiService ClustersApi
2366+
groupId string
2367+
legacyAtlasTenantClusterUpgradeRequest *LegacyAtlasTenantClusterUpgradeRequest
23682368
}
23692369

23702370
type UpgradeSharedClusterApiParams struct {
2371-
GroupId string
2372-
LegacyAtlasCluster *LegacyAtlasCluster
2371+
GroupId string
2372+
LegacyAtlasTenantClusterUpgradeRequest *LegacyAtlasTenantClusterUpgradeRequest
23732373
}
23742374

23752375
func (a *ClustersApiService) UpgradeSharedClusterWithParams(ctx context.Context, args *UpgradeSharedClusterApiParams) UpgradeSharedClusterApiRequest {
23762376
return UpgradeSharedClusterApiRequest{
2377-
ApiService: a,
2378-
ctx: ctx,
2379-
groupId: args.GroupId,
2380-
legacyAtlasCluster: args.LegacyAtlasCluster,
2377+
ApiService: a,
2378+
ctx: ctx,
2379+
groupId: args.GroupId,
2380+
legacyAtlasTenantClusterUpgradeRequest: args.LegacyAtlasTenantClusterUpgradeRequest,
23812381
}
23822382
}
23832383

@@ -2394,12 +2394,12 @@ UpgradeSharedCluster Upgrade One Shared-tier Cluster
23942394
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
23952395
@return UpgradeSharedClusterApiRequest
23962396
*/
2397-
func (a *ClustersApiService) UpgradeSharedCluster(ctx context.Context, groupId string, legacyAtlasCluster *LegacyAtlasCluster) UpgradeSharedClusterApiRequest {
2397+
func (a *ClustersApiService) UpgradeSharedCluster(ctx context.Context, groupId string, legacyAtlasTenantClusterUpgradeRequest *LegacyAtlasTenantClusterUpgradeRequest) UpgradeSharedClusterApiRequest {
23982398
return UpgradeSharedClusterApiRequest{
2399-
ApiService: a,
2400-
ctx: ctx,
2401-
groupId: groupId,
2402-
legacyAtlasCluster: legacyAtlasCluster,
2399+
ApiService: a,
2400+
ctx: ctx,
2401+
groupId: groupId,
2402+
legacyAtlasTenantClusterUpgradeRequest: legacyAtlasTenantClusterUpgradeRequest,
24032403
}
24042404
}
24052405

@@ -2431,8 +2431,8 @@ func (a *ClustersApiService) upgradeSharedClusterExecute(r UpgradeSharedClusterA
24312431
if strlen(r.groupId) > 24 {
24322432
return localVarReturnValue, nil, reportError("groupId must have less than 24 elements")
24332433
}
2434-
if r.legacyAtlasCluster == nil {
2435-
return localVarReturnValue, nil, reportError("legacyAtlasCluster is required and must be specified")
2434+
if r.legacyAtlasTenantClusterUpgradeRequest == nil {
2435+
return localVarReturnValue, nil, reportError("legacyAtlasTenantClusterUpgradeRequest is required and must be specified")
24362436
}
24372437

24382438
// to determine the Content-Type header
@@ -2453,7 +2453,7 @@ func (a *ClustersApiService) upgradeSharedClusterExecute(r UpgradeSharedClusterA
24532453
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
24542454
}
24552455
// body params
2456-
localVarPostBody = r.legacyAtlasCluster
2456+
localVarPostBody = r.legacyAtlasTenantClusterUpgradeRequest
24572457
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
24582458
if err != nil {
24592459
return localVarReturnValue, nil, err

admin/api_federated_authentication.go

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ type FederatedAuthenticationApi interface {
133133
getFederationSettingsExecute(r GetFederationSettingsApiRequest) (*OrgFederationSettings, *http.Response, error)
134134

135135
/*
136-
GetIdentityProvider Return one identity provider from the specified federation.
136+
GetIdentityProvider Return one SAML identity provider from the specified federation.
137137
138-
[experimental] Returns one identity provider from the specified federation. To use this resource, the requesting API Key must have the Organization Owner role in one of the connected organizations.
138+
[experimental] Returns one SAML identity provider from the specified federation. To use this resource, the requesting API Key must have the Organization Owner role in one of the connected organizations.
139139
140140
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
141141
@param federationSettingsId Unique 24-hexadecimal digit string that identifies your federation.
@@ -144,7 +144,7 @@ type FederatedAuthenticationApi interface {
144144
*/
145145
GetIdentityProvider(ctx context.Context, federationSettingsId string, identityProviderId string) GetIdentityProviderApiRequest
146146
/*
147-
GetIdentityProvider Return one identity provider from the specified federation.
147+
GetIdentityProvider Return one SAML identity provider from the specified federation.
148148
149149
150150
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -154,7 +154,7 @@ type FederatedAuthenticationApi interface {
154154
GetIdentityProviderWithParams(ctx context.Context, args *GetIdentityProviderApiParams) GetIdentityProviderApiRequest
155155

156156
// Interface only available internally
157-
getIdentityProviderExecute(r GetIdentityProviderApiRequest) (*FederationIdentityProvider, *http.Response, error)
157+
getIdentityProviderExecute(r GetIdentityProviderApiRequest) (*FederationSamlIdentityProvider, *http.Response, error)
158158

159159
/*
160160
GetIdentityProviderMetadata Return the metadata of one identity provider in the specified federation.
@@ -231,7 +231,7 @@ type FederatedAuthenticationApi interface {
231231
/*
232232
ListIdentityProviders Return all identity providers from the specified federation.
233233
234-
[experimental] Returns all identity providers in the specified federation. To use this resource, the requesting API Key must have the Organization Owner role in one of the connected organizations.
234+
[experimental] Returns all identity providers with the provided protocol in the specified federation. If no protocol is specified, only SAML identity providers will be returned. To use this resource, the requesting API Key must have the Organization Owner role in one of the connected organizations.
235235
236236
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
237237
@param federationSettingsId Unique 24-hexadecimal digit string that identifies your federation.
@@ -330,9 +330,9 @@ type FederatedAuthenticationApi interface {
330330
updateConnectedOrgConfigExecute(r UpdateConnectedOrgConfigApiRequest) (*ConnectedOrgConfig, *http.Response, error)
331331

332332
/*
333-
UpdateIdentityProvider Update the identity provider.
333+
UpdateIdentityProvider Update the SAML identity provider.
334334
335-
[experimental] Updates one identity provider in the specified federation. To use this resource, the requesting API Key must have the Organization Owner role in one of the connected organizations.
335+
[experimental] Updates one SAML identity provider in the specified federation. To use this resource, the requesting API Key must have the Organization Owner role in one of the connected organizations.
336336
337337
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
338338
@param federationSettingsId Unique 24-hexadecimal digit string that identifies your federation.
@@ -341,7 +341,7 @@ type FederatedAuthenticationApi interface {
341341
*/
342342
UpdateIdentityProvider(ctx context.Context, federationSettingsId string, identityProviderId string, samlIdentityProviderUpdate *SamlIdentityProviderUpdate) UpdateIdentityProviderApiRequest
343343
/*
344-
UpdateIdentityProvider Update the identity provider.
344+
UpdateIdentityProvider Update the SAML identity provider.
345345
346346
347347
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -351,7 +351,7 @@ type FederatedAuthenticationApi interface {
351351
UpdateIdentityProviderWithParams(ctx context.Context, args *UpdateIdentityProviderApiParams) UpdateIdentityProviderApiRequest
352352

353353
// Interface only available internally
354-
updateIdentityProviderExecute(r UpdateIdentityProviderApiRequest) (*FederationIdentityProvider, *http.Response, error)
354+
updateIdentityProviderExecute(r UpdateIdentityProviderApiRequest) (*FederationSamlIdentityProvider, *http.Response, error)
355355

356356
/*
357357
UpdateRoleMapping Update One Role Mapping in One Organization
@@ -1086,14 +1086,14 @@ func (a *FederatedAuthenticationApiService) GetIdentityProviderWithParams(ctx co
10861086
}
10871087
}
10881088

1089-
func (r GetIdentityProviderApiRequest) Execute() (*FederationIdentityProvider, *http.Response, error) {
1089+
func (r GetIdentityProviderApiRequest) Execute() (*FederationSamlIdentityProvider, *http.Response, error) {
10901090
return r.ApiService.getIdentityProviderExecute(r)
10911091
}
10921092

10931093
/*
1094-
GetIdentityProvider Return one identity provider from the specified federation.
1094+
GetIdentityProvider Return one SAML identity provider from the specified federation.
10951095
1096-
[experimental] Returns one identity provider from the specified federation. To use this resource, the requesting API Key must have the Organization Owner role in one of the connected organizations.
1096+
[experimental] Returns one SAML identity provider from the specified federation. To use this resource, the requesting API Key must have the Organization Owner role in one of the connected organizations.
10971097
10981098
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
10991099
@param federationSettingsId Unique 24-hexadecimal digit string that identifies your federation.
@@ -1111,13 +1111,13 @@ func (a *FederatedAuthenticationApiService) GetIdentityProvider(ctx context.Cont
11111111

11121112
// Execute executes the request
11131113
//
1114-
// @return FederationIdentityProvider
1115-
func (a *FederatedAuthenticationApiService) getIdentityProviderExecute(r GetIdentityProviderApiRequest) (*FederationIdentityProvider, *http.Response, error) {
1114+
// @return FederationSamlIdentityProvider
1115+
func (a *FederatedAuthenticationApiService) getIdentityProviderExecute(r GetIdentityProviderApiRequest) (*FederationSamlIdentityProvider, *http.Response, error) {
11161116
var (
11171117
localVarHTTPMethod = http.MethodGet
11181118
localVarPostBody interface{}
11191119
formFiles []formFile
1120-
localVarReturnValue *FederationIdentityProvider
1120+
localVarReturnValue *FederationSamlIdentityProvider
11211121
)
11221122

11231123
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FederatedAuthenticationApiService.GetIdentityProvider")
@@ -1637,28 +1637,37 @@ type ListIdentityProvidersApiRequest struct {
16371637
ctx context.Context
16381638
ApiService FederatedAuthenticationApi
16391639
federationSettingsId string
1640+
protocol *string
16401641
}
16411642

16421643
type ListIdentityProvidersApiParams struct {
16431644
FederationSettingsId string
1645+
Protocol *string
16441646
}
16451647

16461648
func (a *FederatedAuthenticationApiService) ListIdentityProvidersWithParams(ctx context.Context, args *ListIdentityProvidersApiParams) ListIdentityProvidersApiRequest {
16471649
return ListIdentityProvidersApiRequest{
16481650
ApiService: a,
16491651
ctx: ctx,
16501652
federationSettingsId: args.FederationSettingsId,
1653+
protocol: args.Protocol,
16511654
}
16521655
}
16531656

1657+
// The protocols of the target identity providers.
1658+
func (r ListIdentityProvidersApiRequest) Protocol(protocol string) ListIdentityProvidersApiRequest {
1659+
r.protocol = &protocol
1660+
return r
1661+
}
1662+
16541663
func (r ListIdentityProvidersApiRequest) Execute() ([]FederationIdentityProvider, *http.Response, error) {
16551664
return r.ApiService.listIdentityProvidersExecute(r)
16561665
}
16571666

16581667
/*
16591668
ListIdentityProviders Return all identity providers from the specified federation.
16601669
1661-
[experimental] Returns all identity providers in the specified federation. To use this resource, the requesting API Key must have the Organization Owner role in one of the connected organizations.
1670+
[experimental] Returns all identity providers with the provided protocol in the specified federation. If no protocol is specified, only SAML identity providers will be returned. To use this resource, the requesting API Key must have the Organization Owner role in one of the connected organizations.
16621671
16631672
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
16641673
@param federationSettingsId Unique 24-hexadecimal digit string that identifies your federation.
@@ -1701,6 +1710,9 @@ func (a *FederatedAuthenticationApiService) listIdentityProvidersExecute(r ListI
17011710
return localVarReturnValue, nil, reportError("federationSettingsId must have less than 24 elements")
17021711
}
17031712

1713+
if r.protocol != nil {
1714+
parameterAddToHeaderOrQuery(localVarQueryParams, "protocol", r.protocol, "")
1715+
}
17041716
// to determine the Content-Type header
17051717
localVarHTTPContentTypes := []string{}
17061718

@@ -2228,14 +2240,14 @@ func (a *FederatedAuthenticationApiService) UpdateIdentityProviderWithParams(ctx
22282240
}
22292241
}
22302242

2231-
func (r UpdateIdentityProviderApiRequest) Execute() (*FederationIdentityProvider, *http.Response, error) {
2243+
func (r UpdateIdentityProviderApiRequest) Execute() (*FederationSamlIdentityProvider, *http.Response, error) {
22322244
return r.ApiService.updateIdentityProviderExecute(r)
22332245
}
22342246

22352247
/*
2236-
UpdateIdentityProvider Update the identity provider.
2248+
UpdateIdentityProvider Update the SAML identity provider.
22372249
2238-
[experimental] Updates one identity provider in the specified federation. To use this resource, the requesting API Key must have the Organization Owner role in one of the connected organizations.
2250+
[experimental] Updates one SAML identity provider in the specified federation. To use this resource, the requesting API Key must have the Organization Owner role in one of the connected organizations.
22392251
22402252
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
22412253
@param federationSettingsId Unique 24-hexadecimal digit string that identifies your federation.
@@ -2254,13 +2266,13 @@ func (a *FederatedAuthenticationApiService) UpdateIdentityProvider(ctx context.C
22542266

22552267
// Execute executes the request
22562268
//
2257-
// @return FederationIdentityProvider
2258-
func (a *FederatedAuthenticationApiService) updateIdentityProviderExecute(r UpdateIdentityProviderApiRequest) (*FederationIdentityProvider, *http.Response, error) {
2269+
// @return FederationSamlIdentityProvider
2270+
func (a *FederatedAuthenticationApiService) updateIdentityProviderExecute(r UpdateIdentityProviderApiRequest) (*FederationSamlIdentityProvider, *http.Response, error) {
22592271
var (
22602272
localVarHTTPMethod = http.MethodPatch
22612273
localVarPostBody interface{}
22622274
formFiles []formFile
2263-
localVarReturnValue *FederationIdentityProvider
2275+
localVarReturnValue *FederationSamlIdentityProvider
22642276
)
22652277

22662278
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FederatedAuthenticationApiService.UpdateIdentityProvider")

0 commit comments

Comments
 (0)