Skip to content

Commit

Permalink
APIBot: SDK update based on recent changes in Atlas API (#390)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: wtrocki <[email protected]>
  • Loading branch information
3 people authored Sep 25, 2024
1 parent 1691b70 commit 31b560f
Show file tree
Hide file tree
Showing 9 changed files with 1,280 additions and 1,271 deletions.

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions admin/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ type APIClient struct {

AlertsApi AlertsApi

AtlasResourcePoliciesApi AtlasResourcePoliciesApi

AtlasSearchApi AtlasSearchApi

AuditingApi AuditingApi
Expand Down Expand Up @@ -111,6 +109,8 @@ type APIClient struct {

PushBasedLogExportApi PushBasedLogExportApi

ResourcePoliciesApi ResourcePoliciesApi

RollingIndexApi RollingIndexApi

RootApi RootApi
Expand Down Expand Up @@ -152,7 +152,6 @@ func NewAPIClient(cfg *Configuration) *APIClient {
c.AccessTrackingApi = (*AccessTrackingApiService)(&c.common)
c.AlertConfigurationsApi = (*AlertConfigurationsApiService)(&c.common)
c.AlertsApi = (*AlertsApiService)(&c.common)
c.AtlasResourcePoliciesApi = (*AtlasResourcePoliciesApiService)(&c.common)
c.AtlasSearchApi = (*AtlasSearchApiService)(&c.common)
c.AuditingApi = (*AuditingApiService)(&c.common)
c.CloudBackupsApi = (*CloudBackupsApiService)(&c.common)
Expand Down Expand Up @@ -184,6 +183,7 @@ func NewAPIClient(cfg *Configuration) *APIClient {
c.ProjectIPAccessListApi = (*ProjectIPAccessListApiService)(&c.common)
c.ProjectsApi = (*ProjectsApiService)(&c.common)
c.PushBasedLogExportApi = (*PushBasedLogExportApiService)(&c.common)
c.ResourcePoliciesApi = (*ResourcePoliciesApiService)(&c.common)
c.RollingIndexApi = (*RollingIndexApiService)(&c.common)
c.RootApi = (*RootApiService)(&c.common)
c.ServerlessInstancesApi = (*ServerlessInstancesApiService)(&c.common)
Expand Down
14 changes: 7 additions & 7 deletions docs/doc_last_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ Class | Method | HTTP request | Description |
*AlertsApi* | [GetAlert](./docs/AlertsApi.md#getalert) | **Get** /api/atlas/v2/groups/{groupId}/alerts/{alertId} | Return One Alert from One Project |
*AlertsApi* | [ListAlerts](./docs/AlertsApi.md#listalerts) | **Get** /api/atlas/v2/groups/{groupId}/alerts | Return All Alerts from One Project |
*AlertsApi* | [ListAlertsByAlertConfigurationId](./docs/AlertsApi.md#listalertsbyalertconfigurationid) | **Get** /api/atlas/v2/groups/{groupId}/alertConfigs/{alertConfigId}/alerts | Return All Open Alerts for Alert Configuration |
*AtlasResourcePoliciesApi* | [CreateAtlasResourcePolicy](./docs/AtlasResourcePoliciesApi.md#createatlasresourcepolicy) | **Post** /api/atlas/v2/orgs/{orgId}/resourcePolicies | Create one Atlas Resource Policy |
*AtlasResourcePoliciesApi* | [DeleteAtlasResourcePolicy](./docs/AtlasResourcePoliciesApi.md#deleteatlasresourcepolicy) | **Delete** /api/atlas/v2/orgs/{orgId}/resourcePolicies/{resourcePolicyId} | Delete one Atlas Resource Policy |
*AtlasResourcePoliciesApi* | [GetAtlasResourcePolicies](./docs/AtlasResourcePoliciesApi.md#getatlasresourcepolicies) | **Get** /api/atlas/v2/orgs/{orgId}/resourcePolicies | Return all Atlas Resource Policies |
*AtlasResourcePoliciesApi* | [GetAtlasResourcePolicy](./docs/AtlasResourcePoliciesApi.md#getatlasresourcepolicy) | **Get** /api/atlas/v2/orgs/{orgId}/resourcePolicies/{resourcePolicyId} | Return one Atlas Resource Policy |
*AtlasResourcePoliciesApi* | [GetResourcesNonCompliant](./docs/AtlasResourcePoliciesApi.md#getresourcesnoncompliant) | **Get** /api/atlas/v2/orgs/{orgId}/nonCompliantResources | Return all non-compliant resources |
*AtlasResourcePoliciesApi* | [UpdateAtlasResourcePolicy](./docs/AtlasResourcePoliciesApi.md#updateatlasresourcepolicy) | **Patch** /api/atlas/v2/orgs/{orgId}/resourcePolicies/{resourcePolicyId} | Update one Atlas Resource Policy |
*AtlasResourcePoliciesApi* | [ValidateAtlasResourcePolicy](./docs/AtlasResourcePoliciesApi.md#validateatlasresourcepolicy) | **Post** /api/atlas/v2/orgs/{orgId}/resourcePolicies:validate | Validate one Atlas Resource Policy |
*AtlasSearchApi* | [CreateAtlasSearchDeployment](./docs/AtlasSearchApi.md#createatlassearchdeployment) | **Post** /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/deployment | Create Search Nodes |
*AtlasSearchApi* | [CreateAtlasSearchIndex](./docs/AtlasSearchApi.md#createatlassearchindex) | **Post** /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/indexes | Create One Atlas Search Index |
*AtlasSearchApi* | [CreateAtlasSearchIndexDeprecated](./docs/AtlasSearchApi.md#createatlassearchindexdeprecated) | **Post** /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes | Create One Atlas Search Index |
Expand Down Expand Up @@ -339,6 +332,13 @@ Class | Method | HTTP request | Description |
*PushBasedLogExportApi* | [DeletePushBasedLogConfiguration](./docs/PushBasedLogExportApi.md#deletepushbasedlogconfiguration) | **Delete** /api/atlas/v2/groups/{groupId}/pushBasedLogExport | Disable the push-based log export feature for a project |
*PushBasedLogExportApi* | [GetPushBasedLogConfiguration](./docs/PushBasedLogExportApi.md#getpushbasedlogconfiguration) | **Get** /api/atlas/v2/groups/{groupId}/pushBasedLogExport | Get the push-based log export configuration for a project |
*PushBasedLogExportApi* | [UpdatePushBasedLogConfiguration](./docs/PushBasedLogExportApi.md#updatepushbasedlogconfiguration) | **Patch** /api/atlas/v2/groups/{groupId}/pushBasedLogExport | Update the push-based log export feature for a project |
*ResourcePoliciesApi* | [CreateAtlasResourcePolicy](./docs/ResourcePoliciesApi.md#createatlasresourcepolicy) | **Post** /api/atlas/v2/orgs/{orgId}/resourcePolicies | Create one Atlas Resource Policy |
*ResourcePoliciesApi* | [DeleteAtlasResourcePolicy](./docs/ResourcePoliciesApi.md#deleteatlasresourcepolicy) | **Delete** /api/atlas/v2/orgs/{orgId}/resourcePolicies/{resourcePolicyId} | Delete one Atlas Resource Policy |
*ResourcePoliciesApi* | [GetAtlasResourcePolicies](./docs/ResourcePoliciesApi.md#getatlasresourcepolicies) | **Get** /api/atlas/v2/orgs/{orgId}/resourcePolicies | Return all Atlas Resource Policies |
*ResourcePoliciesApi* | [GetAtlasResourcePolicy](./docs/ResourcePoliciesApi.md#getatlasresourcepolicy) | **Get** /api/atlas/v2/orgs/{orgId}/resourcePolicies/{resourcePolicyId} | Return one Atlas Resource Policy |
*ResourcePoliciesApi* | [GetResourcesNonCompliant](./docs/ResourcePoliciesApi.md#getresourcesnoncompliant) | **Get** /api/atlas/v2/orgs/{orgId}/nonCompliantResources | Return all non-compliant resources |
*ResourcePoliciesApi* | [UpdateAtlasResourcePolicy](./docs/ResourcePoliciesApi.md#updateatlasresourcepolicy) | **Patch** /api/atlas/v2/orgs/{orgId}/resourcePolicies/{resourcePolicyId} | Update one Atlas Resource Policy |
*ResourcePoliciesApi* | [ValidateAtlasResourcePolicy](./docs/ResourcePoliciesApi.md#validateatlasresourcepolicy) | **Post** /api/atlas/v2/orgs/{orgId}/resourcePolicies:validate | Validate one Atlas Resource Policy |
*RollingIndexApi* | [CreateRollingIndex](./docs/RollingIndexApi.md#createrollingindex) | **Post** /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/index | Create One Rolling Index |
*RootApi* | [GetSystemStatus](./docs/RootApi.md#getsystemstatus) | **Get** /api/atlas/v2 | Return the status of this MongoDB application |
*RootApi* | [ReturnAllControlPlaneIPAddresses](./docs/RootApi.md#returnallcontrolplaneipaddresses) | **Get** /api/atlas/v2/unauth/controlPlaneIPAddresses | Return All Control Plane IP Addresses |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# \AtlasResourcePoliciesApi
# \ResourcePoliciesApi

All URIs are relative to *https://cloud.mongodb.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**CreateAtlasResourcePolicy**](AtlasResourcePoliciesApi.md#CreateAtlasResourcePolicy) | **Post** /api/atlas/v2/orgs/{orgId}/resourcePolicies | Create one Atlas Resource Policy
[**DeleteAtlasResourcePolicy**](AtlasResourcePoliciesApi.md#DeleteAtlasResourcePolicy) | **Delete** /api/atlas/v2/orgs/{orgId}/resourcePolicies/{resourcePolicyId} | Delete one Atlas Resource Policy
[**GetAtlasResourcePolicies**](AtlasResourcePoliciesApi.md#GetAtlasResourcePolicies) | **Get** /api/atlas/v2/orgs/{orgId}/resourcePolicies | Return all Atlas Resource Policies
[**GetAtlasResourcePolicy**](AtlasResourcePoliciesApi.md#GetAtlasResourcePolicy) | **Get** /api/atlas/v2/orgs/{orgId}/resourcePolicies/{resourcePolicyId} | Return one Atlas Resource Policy
[**GetResourcesNonCompliant**](AtlasResourcePoliciesApi.md#GetResourcesNonCompliant) | **Get** /api/atlas/v2/orgs/{orgId}/nonCompliantResources | Return all non-compliant resources
[**UpdateAtlasResourcePolicy**](AtlasResourcePoliciesApi.md#UpdateAtlasResourcePolicy) | **Patch** /api/atlas/v2/orgs/{orgId}/resourcePolicies/{resourcePolicyId} | Update one Atlas Resource Policy
[**ValidateAtlasResourcePolicy**](AtlasResourcePoliciesApi.md#ValidateAtlasResourcePolicy) | **Post** /api/atlas/v2/orgs/{orgId}/resourcePolicies:validate | Validate one Atlas Resource Policy
[**CreateAtlasResourcePolicy**](ResourcePoliciesApi.md#CreateAtlasResourcePolicy) | **Post** /api/atlas/v2/orgs/{orgId}/resourcePolicies | Create one Atlas Resource Policy
[**DeleteAtlasResourcePolicy**](ResourcePoliciesApi.md#DeleteAtlasResourcePolicy) | **Delete** /api/atlas/v2/orgs/{orgId}/resourcePolicies/{resourcePolicyId} | Delete one Atlas Resource Policy
[**GetAtlasResourcePolicies**](ResourcePoliciesApi.md#GetAtlasResourcePolicies) | **Get** /api/atlas/v2/orgs/{orgId}/resourcePolicies | Return all Atlas Resource Policies
[**GetAtlasResourcePolicy**](ResourcePoliciesApi.md#GetAtlasResourcePolicy) | **Get** /api/atlas/v2/orgs/{orgId}/resourcePolicies/{resourcePolicyId} | Return one Atlas Resource Policy
[**GetResourcesNonCompliant**](ResourcePoliciesApi.md#GetResourcesNonCompliant) | **Get** /api/atlas/v2/orgs/{orgId}/nonCompliantResources | Return all non-compliant resources
[**UpdateAtlasResourcePolicy**](ResourcePoliciesApi.md#UpdateAtlasResourcePolicy) | **Patch** /api/atlas/v2/orgs/{orgId}/resourcePolicies/{resourcePolicyId} | Update one Atlas Resource Policy
[**ValidateAtlasResourcePolicy**](ResourcePoliciesApi.md#ValidateAtlasResourcePolicy) | **Post** /api/atlas/v2/orgs/{orgId}/resourcePolicies:validate | Validate one Atlas Resource Policy



Expand Down Expand Up @@ -54,17 +54,17 @@ func main() {
};
")}) // ApiAtlasResourcePolicyCreate |

resp, r, err := sdk.AtlasResourcePoliciesApi.CreateAtlasResourcePolicy(context.Background(), orgId, &apiAtlasResourcePolicyCreate).Execute()
resp, r, err := sdk.ResourcePoliciesApi.CreateAtlasResourcePolicy(context.Background(), orgId, &apiAtlasResourcePolicyCreate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AtlasResourcePoliciesApi.CreateAtlasResourcePolicy`: %v (%v)\n", err, r)
fmt.Fprintf(os.Stderr, "Error when calling `ResourcePoliciesApi.CreateAtlasResourcePolicy`: %v (%v)\n", err, r)
apiError, ok := admin.AsError(err)
if ok {
fmt.Fprintf(os.Stderr, "API error obj: %v\n", apiError)
}
return
}
// response from `CreateAtlasResourcePolicy`: ApiAtlasResourcePolicy
fmt.Fprintf(os.Stdout, "Response from `AtlasResourcePoliciesApi.CreateAtlasResourcePolicy`: %v (%v)\n", resp, r)
fmt.Fprintf(os.Stdout, "Response from `ResourcePoliciesApi.CreateAtlasResourcePolicy`: %v (%v)\n", resp, r)
}
```

Expand Down Expand Up @@ -136,17 +136,17 @@ func main() {
orgId := "4888442a3354817a7320eb61" // string |
resourcePolicyId := "32b6e34b3d91647abb20e7b8" // string |

resp, r, err := sdk.AtlasResourcePoliciesApi.DeleteAtlasResourcePolicy(context.Background(), orgId, resourcePolicyId).Execute()
resp, r, err := sdk.ResourcePoliciesApi.DeleteAtlasResourcePolicy(context.Background(), orgId, resourcePolicyId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AtlasResourcePoliciesApi.DeleteAtlasResourcePolicy`: %v (%v)\n", err, r)
fmt.Fprintf(os.Stderr, "Error when calling `ResourcePoliciesApi.DeleteAtlasResourcePolicy`: %v (%v)\n", err, r)
apiError, ok := admin.AsError(err)
if ok {
fmt.Fprintf(os.Stderr, "API error obj: %v\n", apiError)
}
return
}
// response from `DeleteAtlasResourcePolicy`: interface{}
fmt.Fprintf(os.Stdout, "Response from `AtlasResourcePoliciesApi.DeleteAtlasResourcePolicy`: %v (%v)\n", resp, r)
fmt.Fprintf(os.Stdout, "Response from `ResourcePoliciesApi.DeleteAtlasResourcePolicy`: %v (%v)\n", resp, r)
}
```

Expand Down Expand Up @@ -218,17 +218,17 @@ func main() {

orgId := "4888442a3354817a7320eb61" // string |

resp, r, err := sdk.AtlasResourcePoliciesApi.GetAtlasResourcePolicies(context.Background(), orgId).Execute()
resp, r, err := sdk.ResourcePoliciesApi.GetAtlasResourcePolicies(context.Background(), orgId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AtlasResourcePoliciesApi.GetAtlasResourcePolicies`: %v (%v)\n", err, r)
fmt.Fprintf(os.Stderr, "Error when calling `ResourcePoliciesApi.GetAtlasResourcePolicies`: %v (%v)\n", err, r)
apiError, ok := admin.AsError(err)
if ok {
fmt.Fprintf(os.Stderr, "API error obj: %v\n", apiError)
}
return
}
// response from `GetAtlasResourcePolicies`: []ApiAtlasResourcePolicy
fmt.Fprintf(os.Stdout, "Response from `AtlasResourcePoliciesApi.GetAtlasResourcePolicies`: %v (%v)\n", resp, r)
fmt.Fprintf(os.Stdout, "Response from `ResourcePoliciesApi.GetAtlasResourcePolicies`: %v (%v)\n", resp, r)
}
```

Expand Down Expand Up @@ -299,17 +299,17 @@ func main() {
orgId := "4888442a3354817a7320eb61" // string |
resourcePolicyId := "32b6e34b3d91647abb20e7b8" // string |

resp, r, err := sdk.AtlasResourcePoliciesApi.GetAtlasResourcePolicy(context.Background(), orgId, resourcePolicyId).Execute()
resp, r, err := sdk.ResourcePoliciesApi.GetAtlasResourcePolicy(context.Background(), orgId, resourcePolicyId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AtlasResourcePoliciesApi.GetAtlasResourcePolicy`: %v (%v)\n", err, r)
fmt.Fprintf(os.Stderr, "Error when calling `ResourcePoliciesApi.GetAtlasResourcePolicy`: %v (%v)\n", err, r)
apiError, ok := admin.AsError(err)
if ok {
fmt.Fprintf(os.Stderr, "API error obj: %v\n", apiError)
}
return
}
// response from `GetAtlasResourcePolicy`: ApiAtlasResourcePolicy
fmt.Fprintf(os.Stdout, "Response from `AtlasResourcePoliciesApi.GetAtlasResourcePolicy`: %v (%v)\n", resp, r)
fmt.Fprintf(os.Stdout, "Response from `ResourcePoliciesApi.GetAtlasResourcePolicy`: %v (%v)\n", resp, r)
}
```

Expand Down Expand Up @@ -381,17 +381,17 @@ func main() {

orgId := "4888442a3354817a7320eb61" // string |

resp, r, err := sdk.AtlasResourcePoliciesApi.GetResourcesNonCompliant(context.Background(), orgId).Execute()
resp, r, err := sdk.ResourcePoliciesApi.GetResourcesNonCompliant(context.Background(), orgId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AtlasResourcePoliciesApi.GetResourcesNonCompliant`: %v (%v)\n", err, r)
fmt.Fprintf(os.Stderr, "Error when calling `ResourcePoliciesApi.GetResourcesNonCompliant`: %v (%v)\n", err, r)
apiError, ok := admin.AsError(err)
if ok {
fmt.Fprintf(os.Stderr, "API error obj: %v\n", apiError)
}
return
}
// response from `GetResourcesNonCompliant`: []ApiAtlasNonCompliantResource
fmt.Fprintf(os.Stdout, "Response from `AtlasResourcePoliciesApi.GetResourcesNonCompliant`: %v (%v)\n", resp, r)
fmt.Fprintf(os.Stdout, "Response from `ResourcePoliciesApi.GetResourcesNonCompliant`: %v (%v)\n", resp, r)
}
```

Expand Down Expand Up @@ -463,17 +463,17 @@ func main() {
resourcePolicyId := "32b6e34b3d91647abb20e7b8" // string |
apiAtlasResourcePolicyEdit := *openapiclient.NewApiAtlasResourcePolicyEdit() // ApiAtlasResourcePolicyEdit |

resp, r, err := sdk.AtlasResourcePoliciesApi.UpdateAtlasResourcePolicy(context.Background(), orgId, resourcePolicyId, &apiAtlasResourcePolicyEdit).Execute()
resp, r, err := sdk.ResourcePoliciesApi.UpdateAtlasResourcePolicy(context.Background(), orgId, resourcePolicyId, &apiAtlasResourcePolicyEdit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AtlasResourcePoliciesApi.UpdateAtlasResourcePolicy`: %v (%v)\n", err, r)
fmt.Fprintf(os.Stderr, "Error when calling `ResourcePoliciesApi.UpdateAtlasResourcePolicy`: %v (%v)\n", err, r)
apiError, ok := admin.AsError(err)
if ok {
fmt.Fprintf(os.Stderr, "API error obj: %v\n", apiError)
}
return
}
// response from `UpdateAtlasResourcePolicy`: ApiAtlasResourcePolicy
fmt.Fprintf(os.Stdout, "Response from `AtlasResourcePoliciesApi.UpdateAtlasResourcePolicy`: %v (%v)\n", resp, r)
fmt.Fprintf(os.Stdout, "Response from `ResourcePoliciesApi.UpdateAtlasResourcePolicy`: %v (%v)\n", resp, r)
}
```

Expand Down Expand Up @@ -554,17 +554,17 @@ func main() {
};
")}) // ApiAtlasResourcePolicyCreate |

resp, r, err := sdk.AtlasResourcePoliciesApi.ValidateAtlasResourcePolicy(context.Background(), orgId, &apiAtlasResourcePolicyCreate).Execute()
resp, r, err := sdk.ResourcePoliciesApi.ValidateAtlasResourcePolicy(context.Background(), orgId, &apiAtlasResourcePolicyCreate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AtlasResourcePoliciesApi.ValidateAtlasResourcePolicy`: %v (%v)\n", err, r)
fmt.Fprintf(os.Stderr, "Error when calling `ResourcePoliciesApi.ValidateAtlasResourcePolicy`: %v (%v)\n", err, r)
apiError, ok := admin.AsError(err)
if ok {
fmt.Fprintf(os.Stderr, "API error obj: %v\n", apiError)
}
return
}
// response from `ValidateAtlasResourcePolicy`: ApiAtlasResourcePolicy
fmt.Fprintf(os.Stdout, "Response from `AtlasResourcePoliciesApi.ValidateAtlasResourcePolicy`: %v (%v)\n", resp, r)
fmt.Fprintf(os.Stdout, "Response from `ResourcePoliciesApi.ValidateAtlasResourcePolicy`: %v (%v)\n", resp, r)
}
```

Expand Down
2 changes: 1 addition & 1 deletion internal/core/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package core
// For more information please see: https://github.com/mongodb/atlas-sdk-go/blob/main/docs/doc_1_concepts.md
const (
// SDK release tag version.
Version = "v20240805004.2.0"
Version = "v20240805004.3.0"
// Resource Version.
Resource = "20240805"
)
Loading

0 comments on commit 31b560f

Please sign in to comment.