From c2bab6bc3bad366b0b093d971d964387dcb17663 Mon Sep 17 00:00:00 2001 From: filipcirtog <173696323+filipcirtog@users.noreply.github.com> Date: Fri, 5 Dec 2025 15:41:50 +0000 Subject: [PATCH] temp: client update --- .mockery.yaml | 2 +- admin/api_cloud_backups.go | 40 + admin/api_open_api.go | 314 +++ admin/api_performance_advisor.go | 15 + admin/api_push_based_log_export.go | 812 ++++++- admin/api_query_shape_insights.go | 535 +++++ admin/api_serverless_instances.go | 40 + admin/api_serverless_private_endpoints.go | 39 + admin/atlas_client.go | 8 +- admin/client.go | 3 + ...odel_alerts_notification_root_for_group.go | 4 +- admin/model_api_version.go | 59 + admin/model_azure_key_vault.go | 35 + ..._search_index_create_request_definition.go | 2 +- ...search_index_response_latest_definition.go | 2 +- admin/model_cluster_search_index.go | 72 +- admin/model_info.go | 198 ++ admin/model_license.go | 94 + admin/model_log_integration_request.go | 226 ++ admin/model_log_integration_response.go | 253 ++ admin/model_open_api_info.go | 58 + admin/model_paginated_api_versions.go | 132 + ...odel_paginated_log_integration_response.go | 132 + admin/model_paginated_query_shapes.go | 132 + admin/model_query_shape_response.go | 187 ++ admin/model_query_shape_update_request.go | 51 + admin/model_s3_log_integration_request.go | 194 ++ ...model_s3_log_integration_request_all_of.go | 234 ++ ..._search_index_update_request_definition.go | 2 +- admin/model_streams_matcher.go | 2 +- admin/model_vector_search_index_definition.go | 36 + auth/clientcredentials/clientcredentials.go | 4 +- .../clientcredentials_test.go | 2 +- auth/code/device_flow.go | 2 +- auth/code/oauth.go | 2 +- auth/code/oauth_test.go | 2 +- examples/aws_cluster/aws.go | 4 +- examples/basic/basic.go | 4 +- examples/db_users/db_users.go | 4 +- examples/download/downloadLogs.go | 4 +- examples/errors.go | 2 +- examples/go.mod | 7 +- examples/invoice/invoice.go | 4 +- examples/mock/cluster_test.go | 4 +- examples/regions/regions.go | 4 +- examples/retry/retry.go | 2 +- .../sa_management.go | 2 +- .../cached_token.go | 7 +- go.mod | 2 +- mockadmin/access_tracking_api.go | 2 +- mockadmin/alert_configurations_api.go | 2 +- mockadmin/alerts_api.go | 2 +- mockadmin/atlas_search_api.go | 2 +- mockadmin/auditing_api.go | 2 +- mockadmin/aws_clusters_dns_api.go | 2 +- mockadmin/cloud_backups_api.go | 2 +- mockadmin/cloud_migration_service_api.go | 2 +- mockadmin/cloud_provider_access_api.go | 2 +- mockadmin/cluster_outage_simulation_api.go | 2 +- mockadmin/clusters_api.go | 2 +- mockadmin/collection_level_metrics_api.go | 2 +- mockadmin/custom_database_roles_api.go | 2 +- mockadmin/data_federation_api.go | 2 +- mockadmin/data_lake_pipelines_api.go | 2 +- mockadmin/database_users_api.go | 2 +- ..._rest_using_customer_key_management_api.go | 2 +- mockadmin/events_api.go | 2 +- mockadmin/federated_authentication_api.go | 2 +- mockadmin/flex_clusters_api.go | 2 +- mockadmin/flex_restore_jobs_api.go | 2 +- mockadmin/flex_snapshots_api.go | 2 +- mockadmin/global_clusters_api.go | 2 +- mockadmin/invoices_api.go | 2 +- mockadmin/ldap_configuration_api.go | 2 +- mockadmin/legacy_backup_api.go | 2 +- mockadmin/maintenance_windows_api.go | 2 +- mockadmin/mongo_db_cloud_users_api.go | 2 +- mockadmin/monitoring_and_logs_api.go | 2 +- mockadmin/network_peering_api.go | 2 +- mockadmin/online_archive_api.go | 2 +- mockadmin/open_api_api.go | 360 +++ mockadmin/organizations_api.go | 2 +- mockadmin/performance_advisor_api.go | 2 +- mockadmin/private_endpoint_services_api.go | 2 +- mockadmin/programmatic_api_keys_api.go | 2 +- mockadmin/project_ip_access_list_api.go | 2 +- mockadmin/projects_api.go | 2 +- mockadmin/push_based_log_export_api.go | 891 ++++++- mockadmin/query_shape_insights_api.go | 491 +++- mockadmin/resource_policies_api.go | 2 +- mockadmin/rolling_index_api.go | 2 +- mockadmin/root_api.go | 2 +- mockadmin/serverless_instances_api.go | 2 +- mockadmin/serverless_private_endpoints_api.go | 2 +- mockadmin/service_accounts_api.go | 2 +- mockadmin/shared_tier_restore_jobs_api.go | 2 +- mockadmin/shared_tier_snapshots_api.go | 2 +- mockadmin/streams_api.go | 2 +- mockadmin/teams_api.go | 2 +- mockadmin/third_party_integrations_api.go | 2 +- mockadmin/x509_authentication_api.go | 2 +- openapi/atlas-api-transformed.yaml | 1299 +++++++++- openapi/atlas-api.yaml | 2116 ++++++++++++++--- test/example_client_test.go | 2 +- test/utils_test.go | 2 +- tools/config/go-templates/api_doc.mustache | 2 +- .../config/go-templates/atlas_client.mustache | 8 +- 107 files changed, 8683 insertions(+), 561 deletions(-) create mode 100644 admin/api_open_api.go create mode 100644 admin/model_api_version.go create mode 100644 admin/model_info.go create mode 100644 admin/model_license.go create mode 100644 admin/model_log_integration_request.go create mode 100644 admin/model_log_integration_response.go create mode 100644 admin/model_open_api_info.go create mode 100644 admin/model_paginated_api_versions.go create mode 100644 admin/model_paginated_log_integration_response.go create mode 100644 admin/model_paginated_query_shapes.go create mode 100644 admin/model_query_shape_response.go create mode 100644 admin/model_query_shape_update_request.go create mode 100644 admin/model_s3_log_integration_request.go create mode 100644 admin/model_s3_log_integration_request_all_of.go create mode 100644 mockadmin/open_api_api.go diff --git a/.mockery.yaml b/.mockery.yaml index 415a20fe4..02cb53dca 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -6,6 +6,6 @@ filename: "{{ .InterfaceName | snakecase }}.go" mockname: "{{.InterfaceName}}" packages: - go.mongodb.org/atlas-sdk/v20250312010/admin: + github.com/mongodb/atlas-sdk-go/admin: config: include-regex: ".*Api" diff --git a/admin/api_cloud_backups.go b/admin/api_cloud_backups.go index 25303dc07..ad41f1813 100644 --- a/admin/api_cloud_backups.go +++ b/admin/api_cloud_backups.go @@ -125,6 +125,8 @@ type CloudBackupsApi interface { @param clusterName Human-readable label that identifies the serverless instance whose snapshot you want to restore. @param serverlessBackupRestoreJob Restores one snapshot of one serverless instance from the specified project. @return CreateServerlessRestoreJobApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for CloudBackupsApi */ CreateServerlessRestoreJob(ctx context.Context, groupId string, clusterName string, serverlessBackupRestoreJob *ServerlessBackupRestoreJob) CreateServerlessRestoreJobApiRequest /* @@ -134,6 +136,8 @@ type CloudBackupsApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param CreateServerlessRestoreJobApiParams - Parameters for the request @return CreateServerlessRestoreJobApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for CloudBackupsApi */ CreateServerlessRestoreJobWithParams(ctx context.Context, args *CreateServerlessRestoreJobApiParams) CreateServerlessRestoreJobApiRequest @@ -444,6 +448,8 @@ type CloudBackupsApi interface { @param clusterName Human-readable label that identifies the serverless instance. @param snapshotId Unique 24-hexadecimal digit string that identifies the desired snapshot. @return GetServerlessBackupSnapshotApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for CloudBackupsApi */ GetServerlessBackupSnapshot(ctx context.Context, groupId string, clusterName string, snapshotId string) GetServerlessBackupSnapshotApiRequest /* @@ -453,6 +459,8 @@ type CloudBackupsApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param GetServerlessBackupSnapshotApiParams - Parameters for the request @return GetServerlessBackupSnapshotApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for CloudBackupsApi */ GetServerlessBackupSnapshotWithParams(ctx context.Context, args *GetServerlessBackupSnapshotApiParams) GetServerlessBackupSnapshotApiRequest @@ -471,6 +479,8 @@ type CloudBackupsApi interface { @param clusterName Human-readable label that identifies the serverless instance. @param restoreJobId Unique 24-hexadecimal digit string that identifies the restore job to return. @return GetServerlessRestoreJobApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for CloudBackupsApi */ GetServerlessRestoreJob(ctx context.Context, groupId string, clusterName string, restoreJobId string) GetServerlessRestoreJobApiRequest /* @@ -480,6 +490,8 @@ type CloudBackupsApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param GetServerlessRestoreJobApiParams - Parameters for the request @return GetServerlessRestoreJobApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for CloudBackupsApi */ GetServerlessRestoreJobWithParams(ctx context.Context, args *GetServerlessRestoreJobApiParams) GetServerlessRestoreJobApiRequest @@ -616,6 +628,8 @@ type CloudBackupsApi interface { @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. @param clusterName Human-readable label that identifies the serverless instance. @return ListServerlessBackupSnapshotsApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for CloudBackupsApi */ ListServerlessBackupSnapshots(ctx context.Context, groupId string, clusterName string) ListServerlessBackupSnapshotsApiRequest /* @@ -625,6 +639,8 @@ type CloudBackupsApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ListServerlessBackupSnapshotsApiParams - Parameters for the request @return ListServerlessBackupSnapshotsApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for CloudBackupsApi */ ListServerlessBackupSnapshotsWithParams(ctx context.Context, args *ListServerlessBackupSnapshotsApiParams) ListServerlessBackupSnapshotsApiRequest @@ -642,6 +658,8 @@ type CloudBackupsApi interface { @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. @param clusterName Human-readable label that identifies the serverless instance. @return ListServerlessRestoreJobsApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for CloudBackupsApi */ ListServerlessRestoreJobs(ctx context.Context, groupId string, clusterName string) ListServerlessRestoreJobsApiRequest /* @@ -651,6 +669,8 @@ type CloudBackupsApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ListServerlessRestoreJobsApiParams - Parameters for the request @return ListServerlessRestoreJobsApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for CloudBackupsApi */ ListServerlessRestoreJobsWithParams(ctx context.Context, args *ListServerlessRestoreJobsApiParams) ListServerlessRestoreJobsApiRequest @@ -1306,6 +1326,8 @@ This API can also be used on Flex clusters that were created with the [createSer @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. @param clusterName Human-readable label that identifies the serverless instance whose snapshot you want to restore. @return CreateServerlessRestoreJobApiRequest + +Deprecated */ func (a *CloudBackupsApiService) CreateServerlessRestoreJob(ctx context.Context, groupId string, clusterName string, serverlessBackupRestoreJob *ServerlessBackupRestoreJob) CreateServerlessRestoreJobApiRequest { return CreateServerlessRestoreJobApiRequest{ @@ -1320,6 +1342,8 @@ func (a *CloudBackupsApiService) CreateServerlessRestoreJob(ctx context.Context, // CreateServerlessRestoreJobExecute executes the request // // @return ServerlessBackupRestoreJob +// +// Deprecated func (a *CloudBackupsApiService) CreateServerlessRestoreJobExecute(r CreateServerlessRestoreJobApiRequest) (*ServerlessBackupRestoreJob, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -2885,6 +2909,8 @@ This endpoint can also be used on Flex clusters that were created with the [crea @param clusterName Human-readable label that identifies the serverless instance. @param snapshotId Unique 24-hexadecimal digit string that identifies the desired snapshot. @return GetServerlessBackupSnapshotApiRequest + +Deprecated */ func (a *CloudBackupsApiService) GetServerlessBackupSnapshot(ctx context.Context, groupId string, clusterName string, snapshotId string) GetServerlessBackupSnapshotApiRequest { return GetServerlessBackupSnapshotApiRequest{ @@ -2899,6 +2925,8 @@ func (a *CloudBackupsApiService) GetServerlessBackupSnapshot(ctx context.Context // GetServerlessBackupSnapshotExecute executes the request // // @return ServerlessBackupSnapshot +// +// Deprecated func (a *CloudBackupsApiService) GetServerlessBackupSnapshotExecute(r GetServerlessBackupSnapshotApiRequest) (*ServerlessBackupSnapshot, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -3019,6 +3047,8 @@ This API can also be used on Flex clusters that were created with the [createSer @param clusterName Human-readable label that identifies the serverless instance. @param restoreJobId Unique 24-hexadecimal digit string that identifies the restore job to return. @return GetServerlessRestoreJobApiRequest + +Deprecated */ func (a *CloudBackupsApiService) GetServerlessRestoreJob(ctx context.Context, groupId string, clusterName string, restoreJobId string) GetServerlessRestoreJobApiRequest { return GetServerlessRestoreJobApiRequest{ @@ -3033,6 +3063,8 @@ func (a *CloudBackupsApiService) GetServerlessRestoreJob(ctx context.Context, gr // GetServerlessRestoreJobExecute executes the request // // @return ServerlessBackupRestoreJob +// +// Deprecated func (a *CloudBackupsApiService) GetServerlessRestoreJobExecute(r GetServerlessRestoreJobApiRequest) (*ServerlessBackupRestoreJob, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -3974,6 +4006,8 @@ This API can also be used on Flex clusters that were created with the [createSer @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. @param clusterName Human-readable label that identifies the serverless instance. @return ListServerlessBackupSnapshotsApiRequest + +Deprecated */ func (a *CloudBackupsApiService) ListServerlessBackupSnapshots(ctx context.Context, groupId string, clusterName string) ListServerlessBackupSnapshotsApiRequest { return ListServerlessBackupSnapshotsApiRequest{ @@ -3987,6 +4021,8 @@ func (a *CloudBackupsApiService) ListServerlessBackupSnapshots(ctx context.Conte // ListServerlessBackupSnapshotsExecute executes the request // // @return PaginatedApiAtlasServerlessBackupSnapshot +// +// Deprecated func (a *CloudBackupsApiService) ListServerlessBackupSnapshotsExecute(r ListServerlessBackupSnapshotsApiRequest) (*PaginatedApiAtlasServerlessBackupSnapshot, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -4147,6 +4183,8 @@ This API can also be used on Flex clusters that were created with the [createSer @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. @param clusterName Human-readable label that identifies the serverless instance. @return ListServerlessRestoreJobsApiRequest + +Deprecated */ func (a *CloudBackupsApiService) ListServerlessRestoreJobs(ctx context.Context, groupId string, clusterName string) ListServerlessRestoreJobsApiRequest { return ListServerlessRestoreJobsApiRequest{ @@ -4160,6 +4198,8 @@ func (a *CloudBackupsApiService) ListServerlessRestoreJobs(ctx context.Context, // ListServerlessRestoreJobsExecute executes the request // // @return PaginatedApiAtlasServerlessBackupRestoreJob +// +// Deprecated func (a *CloudBackupsApiService) ListServerlessRestoreJobsExecute(r ListServerlessRestoreJobsApiRequest) (*PaginatedApiAtlasServerlessBackupRestoreJob, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet diff --git a/admin/api_open_api.go b/admin/api_open_api.go new file mode 100644 index 000000000..941a9da2a --- /dev/null +++ b/admin/api_open_api.go @@ -0,0 +1,314 @@ +// Code based on the AtlasAPI V2 OpenAPI file + +package admin + +import ( + "context" + "io" + "net/http" + "net/url" +) + +type OpenAPIApi interface { + + /* + GetOpenapiInfo Return General Information on MongoDB Atlas Administration API OpenAPI Specification + + This resource returns general information about the MongoDB Atlas Administration API OpenAPI Specification. Deprecated versions: v2-{2024-05-30} + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return GetOpenapiInfoApiRequest + */ + GetOpenapiInfo(ctx context.Context) GetOpenapiInfoApiRequest + /* + GetOpenapiInfo Return General Information on MongoDB Atlas Administration API OpenAPI Specification + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param GetOpenapiInfoApiParams - Parameters for the request + @return GetOpenapiInfoApiRequest + */ + GetOpenapiInfoWithParams(ctx context.Context, args *GetOpenapiInfoApiParams) GetOpenapiInfoApiRequest + + // Method available only for mocking purposes + GetOpenapiInfoExecute(r GetOpenapiInfoApiRequest) (*OpenApiInfo, *http.Response, error) + + /* + ListOpenapiVersions Return All Versions for One Environment + + API that provides a list of available versionsfor a given environment. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ListOpenapiVersionsApiRequest + */ + ListOpenapiVersions(ctx context.Context) ListOpenapiVersionsApiRequest + /* + ListOpenapiVersions Return All Versions for One Environment + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ListOpenapiVersionsApiParams - Parameters for the request + @return ListOpenapiVersionsApiRequest + */ + ListOpenapiVersionsWithParams(ctx context.Context, args *ListOpenapiVersionsApiParams) ListOpenapiVersionsApiRequest + + // Method available only for mocking purposes + ListOpenapiVersionsExecute(r ListOpenapiVersionsApiRequest) (*PaginatedApiVersions, *http.Response, error) +} + +// OpenAPIApiService OpenAPIApi service +type OpenAPIApiService service + +type GetOpenapiInfoApiRequest struct { + ctx context.Context + ApiService OpenAPIApi +} + +type GetOpenapiInfoApiParams struct { +} + +func (a *OpenAPIApiService) GetOpenapiInfoWithParams(ctx context.Context, args *GetOpenapiInfoApiParams) GetOpenapiInfoApiRequest { + return GetOpenapiInfoApiRequest{ + ApiService: a, + ctx: ctx, + } +} + +func (r GetOpenapiInfoApiRequest) Execute() (*OpenApiInfo, *http.Response, error) { + return r.ApiService.GetOpenapiInfoExecute(r) +} + +/* +GetOpenapiInfo Return General Information on MongoDB Atlas Administration API OpenAPI Specification + +This resource returns general information about the MongoDB Atlas Administration API OpenAPI Specification. Deprecated versions: v2-{2024-05-30} + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return GetOpenapiInfoApiRequest +*/ +func (a *OpenAPIApiService) GetOpenapiInfo(ctx context.Context) GetOpenapiInfoApiRequest { + return GetOpenapiInfoApiRequest{ + ApiService: a, + ctx: ctx, + } +} + +// GetOpenapiInfoExecute executes the request +// +// @return OpenApiInfo +func (a *OpenAPIApiService) GetOpenapiInfoExecute(r GetOpenapiInfoApiRequest) (*OpenApiInfo, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody any + formFiles []formFile + localVarReturnValue *OpenApiInfo + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OpenAPIApiService.GetOpenapiInfo") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/atlas/v2/openapi/info" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header (only first one) + localVarHTTPHeaderAccepts := []string{"application/vnd.atlas.2024-08-05+json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := a.client.makeApiError(localVarHTTPResponse, localVarHTTPMethod, localVarPath) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarHTTPResponse.Body, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + defer localVarHTTPResponse.Body.Close() + buf, readErr := io.ReadAll(localVarHTTPResponse.Body) + if readErr != nil { + err = readErr + } + newErr := &GenericOpenAPIError{ + body: buf, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ListOpenapiVersionsApiRequest struct { + ctx context.Context + ApiService OpenAPIApi + itemsPerPage *int + pageNum *int + env *string +} + +type ListOpenapiVersionsApiParams struct { + ItemsPerPage *int + PageNum *int + Env *string +} + +func (a *OpenAPIApiService) ListOpenapiVersionsWithParams(ctx context.Context, args *ListOpenapiVersionsApiParams) ListOpenapiVersionsApiRequest { + return ListOpenapiVersionsApiRequest{ + ApiService: a, + ctx: ctx, + itemsPerPage: args.ItemsPerPage, + pageNum: args.PageNum, + env: args.Env, + } +} + +// Number of items that the response returns per page. +func (r ListOpenapiVersionsApiRequest) ItemsPerPage(itemsPerPage int) ListOpenapiVersionsApiRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +// Number of the page that displays the current set of the total objects that the response returns. +func (r ListOpenapiVersionsApiRequest) PageNum(pageNum int) ListOpenapiVersionsApiRequest { + r.pageNum = &pageNum + return r +} + +// The environment to get the versions from. If not provided, it returnsthe versions for the given MongoDB URL. (E.g. prod for cloud.mongodb.com). +func (r ListOpenapiVersionsApiRequest) Env(env string) ListOpenapiVersionsApiRequest { + r.env = &env + return r +} + +func (r ListOpenapiVersionsApiRequest) Execute() (*PaginatedApiVersions, *http.Response, error) { + return r.ApiService.ListOpenapiVersionsExecute(r) +} + +/* +ListOpenapiVersions Return All Versions for One Environment + +API that provides a list of available versionsfor a given environment. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ListOpenapiVersionsApiRequest +*/ +func (a *OpenAPIApiService) ListOpenapiVersions(ctx context.Context) ListOpenapiVersionsApiRequest { + return ListOpenapiVersionsApiRequest{ + ApiService: a, + ctx: ctx, + } +} + +// ListOpenapiVersionsExecute executes the request +// +// @return PaginatedApiVersions +func (a *OpenAPIApiService) ListOpenapiVersionsExecute(r ListOpenapiVersionsApiRequest) (*PaginatedApiVersions, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody any + formFiles []formFile + localVarReturnValue *PaginatedApiVersions + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OpenAPIApiService.ListOpenapiVersions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/atlas/v2/unauth/openapi/versions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int = 100 + r.itemsPerPage = &defaultValue + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } + if r.pageNum != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pageNum", r.pageNum, "") + } else { + var defaultValue int = 1 + r.pageNum = &defaultValue + parameterAddToHeaderOrQuery(localVarQueryParams, "pageNum", r.pageNum, "") + } + if r.env != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "env", r.env, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header (only first one) + localVarHTTPHeaderAccepts := []string{"application/vnd.atlas.2024-08-05+json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := a.client.makeApiError(localVarHTTPResponse, localVarHTTPMethod, localVarPath) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarHTTPResponse.Body, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + defer localVarHTTPResponse.Body.Close() + buf, readErr := io.ReadAll(localVarHTTPResponse.Body) + if readErr != nil { + err = readErr + } + newErr := &GenericOpenAPIError{ + body: buf, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/admin/api_performance_advisor.go b/admin/api_performance_advisor.go index 90ab70b95..58b227900 100644 --- a/admin/api_performance_advisor.go +++ b/admin/api_performance_advisor.go @@ -91,6 +91,8 @@ type PerformanceAdvisorApi interface { @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. @param clusterName Human-readable label that identifies the cluster. @return GetServerlessAutoIndexingApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for PerformanceAdvisorApi */ GetServerlessAutoIndexing(ctx context.Context, groupId string, clusterName string) GetServerlessAutoIndexingApiRequest /* @@ -100,6 +102,8 @@ type PerformanceAdvisorApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param GetServerlessAutoIndexingApiParams - Parameters for the request @return GetServerlessAutoIndexingApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for PerformanceAdvisorApi */ GetServerlessAutoIndexingWithParams(ctx context.Context, args *GetServerlessAutoIndexingApiParams) GetServerlessAutoIndexingApiRequest @@ -259,6 +263,8 @@ type PerformanceAdvisorApi interface { @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. @param clusterName Human-readable label that identifies the cluster. @return SetServerlessAutoIndexingApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for PerformanceAdvisorApi */ SetServerlessAutoIndexing(ctx context.Context, groupId string, clusterName string) SetServerlessAutoIndexingApiRequest /* @@ -268,6 +274,8 @@ type PerformanceAdvisorApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param SetServerlessAutoIndexingApiParams - Parameters for the request @return SetServerlessAutoIndexingApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for PerformanceAdvisorApi */ SetServerlessAutoIndexingWithParams(ctx context.Context, args *SetServerlessAutoIndexingApiParams) SetServerlessAutoIndexingApiRequest @@ -620,6 +628,8 @@ Get whether the Serverless Auto Indexing feature is enabled. This endpoint retur @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. @param clusterName Human-readable label that identifies the cluster. @return GetServerlessAutoIndexingApiRequest + +Deprecated */ func (a *PerformanceAdvisorApiService) GetServerlessAutoIndexing(ctx context.Context, groupId string, clusterName string) GetServerlessAutoIndexingApiRequest { return GetServerlessAutoIndexingApiRequest{ @@ -633,6 +643,8 @@ func (a *PerformanceAdvisorApiService) GetServerlessAutoIndexing(ctx context.Con // GetServerlessAutoIndexingExecute executes the request // // @return bool +// +// Deprecated func (a *PerformanceAdvisorApiService) GetServerlessAutoIndexingExecute(r GetServerlessAutoIndexingApiRequest) (bool, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1790,6 +1802,8 @@ Set whether the Serverless Auto Indexing feature is enabled. This endpoint sets @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. @param clusterName Human-readable label that identifies the cluster. @return SetServerlessAutoIndexingApiRequest + +Deprecated */ func (a *PerformanceAdvisorApiService) SetServerlessAutoIndexing(ctx context.Context, groupId string, clusterName string) SetServerlessAutoIndexingApiRequest { return SetServerlessAutoIndexingApiRequest{ @@ -1801,6 +1815,7 @@ func (a *PerformanceAdvisorApiService) SetServerlessAutoIndexing(ctx context.Con } // SetServerlessAutoIndexingExecute executes the request +// Deprecated func (a *PerformanceAdvisorApiService) SetServerlessAutoIndexingExecute(r SetServerlessAutoIndexingApiRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost diff --git a/admin/api_push_based_log_export.go b/admin/api_push_based_log_export.go index 6682514d6..5a9a91553 100644 --- a/admin/api_push_based_log_export.go +++ b/admin/api_push_based_log_export.go @@ -12,6 +12,30 @@ import ( type PushBasedLogExportApi interface { + /* + CreateGroupLogIntegration Create One Log Integration + + Creates a new log integration configuration identified by a unique ID. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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. + @param s3LogIntegrationRequest Log integration configuration to create. + @return CreateGroupLogIntegrationApiRequest + */ + CreateGroupLogIntegration(ctx context.Context, groupId string, s3LogIntegrationRequest *S3LogIntegrationRequest) CreateGroupLogIntegrationApiRequest + /* + CreateGroupLogIntegration Create One Log Integration + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param CreateGroupLogIntegrationApiParams - Parameters for the request + @return CreateGroupLogIntegrationApiRequest + */ + CreateGroupLogIntegrationWithParams(ctx context.Context, args *CreateGroupLogIntegrationApiParams) CreateGroupLogIntegrationApiRequest + + // Method available only for mocking purposes + CreateGroupLogIntegrationExecute(r CreateGroupLogIntegrationApiRequest) (*LogIntegrationResponse, *http.Response, error) + /* CreateLogExport Create One Push-Based Log Export Configuration in One Project @@ -36,6 +60,30 @@ type PushBasedLogExportApi interface { // Method available only for mocking purposes CreateLogExportExecute(r CreateLogExportApiRequest) (*http.Response, error) + /* + DeleteGroupLogIntegration Remove One Log Integration + + Removes the configuration for one log integration identified by its unique ID. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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. + @param id Unique identifier of the log integration configuration. + @return DeleteGroupLogIntegrationApiRequest + */ + DeleteGroupLogIntegration(ctx context.Context, groupId string, id string) DeleteGroupLogIntegrationApiRequest + /* + DeleteGroupLogIntegration Remove One Log Integration + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param DeleteGroupLogIntegrationApiParams - Parameters for the request + @return DeleteGroupLogIntegrationApiRequest + */ + DeleteGroupLogIntegrationWithParams(ctx context.Context, args *DeleteGroupLogIntegrationApiParams) DeleteGroupLogIntegrationApiRequest + + // Method available only for mocking purposes + DeleteGroupLogIntegrationExecute(r DeleteGroupLogIntegrationApiRequest) (*http.Response, error) + /* DeleteLogExport Disable Push-Based Log Export for One Project @@ -59,6 +107,30 @@ type PushBasedLogExportApi interface { // Method available only for mocking purposes DeleteLogExportExecute(r DeleteLogExportApiRequest) (*http.Response, error) + /* + GetGroupLogIntegration Return One Log Integration + + Returns the configuration for one log integration identified by its unique ID. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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. + @param id Unique identifier of the log integration configuration. + @return GetGroupLogIntegrationApiRequest + */ + GetGroupLogIntegration(ctx context.Context, groupId string, id string) GetGroupLogIntegrationApiRequest + /* + GetGroupLogIntegration Return One Log Integration + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param GetGroupLogIntegrationApiParams - Parameters for the request + @return GetGroupLogIntegrationApiRequest + */ + GetGroupLogIntegrationWithParams(ctx context.Context, args *GetGroupLogIntegrationApiParams) GetGroupLogIntegrationApiRequest + + // Method available only for mocking purposes + GetGroupLogIntegrationExecute(r GetGroupLogIntegrationApiRequest) (*LogIntegrationResponse, *http.Response, error) + /* GetLogExport Return One Push-Based Log Export Configuration in One Project @@ -82,6 +154,54 @@ type PushBasedLogExportApi interface { // Method available only for mocking purposes GetLogExportExecute(r GetLogExportApiRequest) (*PushBasedLogExportProject, *http.Response, error) + /* + ListGroupLogIntegrations Return All Active Log Integrations + + Returns all log integration configurations for the project. Optionally filter by integration type. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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. + @return ListGroupLogIntegrationsApiRequest + */ + ListGroupLogIntegrations(ctx context.Context, groupId string) ListGroupLogIntegrationsApiRequest + /* + ListGroupLogIntegrations Return All Active Log Integrations + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ListGroupLogIntegrationsApiParams - Parameters for the request + @return ListGroupLogIntegrationsApiRequest + */ + ListGroupLogIntegrationsWithParams(ctx context.Context, args *ListGroupLogIntegrationsApiParams) ListGroupLogIntegrationsApiRequest + + // Method available only for mocking purposes + ListGroupLogIntegrationsExecute(r ListGroupLogIntegrationsApiRequest) (*PaginatedLogIntegrationResponse, *http.Response, error) + + /* + UpdateGroupLogIntegration Update One Log Integration + + Updates the configuration for one log integration identified by its unique ID. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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. + @param id Unique identifier of the log integration configuration. + @param logIntegrationRequest Updated log integration configuration. + @return UpdateGroupLogIntegrationApiRequest + */ + UpdateGroupLogIntegration(ctx context.Context, groupId string, id string, logIntegrationRequest *LogIntegrationRequest) UpdateGroupLogIntegrationApiRequest + /* + UpdateGroupLogIntegration Update One Log Integration + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param UpdateGroupLogIntegrationApiParams - Parameters for the request + @return UpdateGroupLogIntegrationApiRequest + */ + UpdateGroupLogIntegrationWithParams(ctx context.Context, args *UpdateGroupLogIntegrationApiParams) UpdateGroupLogIntegrationApiRequest + + // Method available only for mocking purposes + UpdateGroupLogIntegrationExecute(r UpdateGroupLogIntegrationApiRequest) (*LogIntegrationResponse, *http.Response, error) + /* UpdateLogExport Update One Push-Based Log Export Configuration in One Project @@ -110,6 +230,129 @@ type PushBasedLogExportApi interface { // PushBasedLogExportApiService PushBasedLogExportApi service type PushBasedLogExportApiService service +type CreateGroupLogIntegrationApiRequest struct { + ctx context.Context + ApiService PushBasedLogExportApi + groupId string + s3LogIntegrationRequest *S3LogIntegrationRequest +} + +type CreateGroupLogIntegrationApiParams struct { + GroupId string + S3LogIntegrationRequest *S3LogIntegrationRequest +} + +func (a *PushBasedLogExportApiService) CreateGroupLogIntegrationWithParams(ctx context.Context, args *CreateGroupLogIntegrationApiParams) CreateGroupLogIntegrationApiRequest { + return CreateGroupLogIntegrationApiRequest{ + ApiService: a, + ctx: ctx, + groupId: args.GroupId, + s3LogIntegrationRequest: args.S3LogIntegrationRequest, + } +} + +func (r CreateGroupLogIntegrationApiRequest) Execute() (*LogIntegrationResponse, *http.Response, error) { + return r.ApiService.CreateGroupLogIntegrationExecute(r) +} + +/* +CreateGroupLogIntegration Create One Log Integration + +Creates a new log integration configuration identified by a unique ID. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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. + @return CreateGroupLogIntegrationApiRequest +*/ +func (a *PushBasedLogExportApiService) CreateGroupLogIntegration(ctx context.Context, groupId string, s3LogIntegrationRequest *S3LogIntegrationRequest) CreateGroupLogIntegrationApiRequest { + return CreateGroupLogIntegrationApiRequest{ + ApiService: a, + ctx: ctx, + groupId: groupId, + s3LogIntegrationRequest: s3LogIntegrationRequest, + } +} + +// CreateGroupLogIntegrationExecute executes the request +// +// @return LogIntegrationResponse +func (a *PushBasedLogExportApiService) CreateGroupLogIntegrationExecute(r CreateGroupLogIntegrationApiRequest) (*LogIntegrationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody any + formFiles []formFile + localVarReturnValue *LogIntegrationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PushBasedLogExportApiService.CreateGroupLogIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/atlas/v2/groups/{groupId}/logIntegrations" + if r.groupId == "" { + return localVarReturnValue, nil, reportError("groupId is empty and must be specified") + } + localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", url.PathEscape(r.groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.s3LogIntegrationRequest == nil { + return localVarReturnValue, nil, reportError("s3LogIntegrationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/vnd.atlas.2025-03-12+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header (only first one) + localVarHTTPHeaderAccepts := []string{"application/vnd.atlas.2025-03-12+json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.s3LogIntegrationRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := a.client.makeApiError(localVarHTTPResponse, localVarHTTPMethod, localVarPath) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarHTTPResponse.Body, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + defer localVarHTTPResponse.Body.Close() + buf, readErr := io.ReadAll(localVarHTTPResponse.Body) + if readErr != nil { + err = readErr + } + newErr := &GenericOpenAPIError{ + body: buf, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type CreateLogExportApiRequest struct { ctx context.Context ApiService PushBasedLogExportApi @@ -216,6 +459,112 @@ func (a *PushBasedLogExportApiService) CreateLogExportExecute(r CreateLogExportA return localVarHTTPResponse, nil } +type DeleteGroupLogIntegrationApiRequest struct { + ctx context.Context + ApiService PushBasedLogExportApi + groupId string + id string +} + +type DeleteGroupLogIntegrationApiParams struct { + GroupId string + Id string +} + +func (a *PushBasedLogExportApiService) DeleteGroupLogIntegrationWithParams(ctx context.Context, args *DeleteGroupLogIntegrationApiParams) DeleteGroupLogIntegrationApiRequest { + return DeleteGroupLogIntegrationApiRequest{ + ApiService: a, + ctx: ctx, + groupId: args.GroupId, + id: args.Id, + } +} + +func (r DeleteGroupLogIntegrationApiRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteGroupLogIntegrationExecute(r) +} + +/* +DeleteGroupLogIntegration Remove One Log Integration + +Removes the configuration for one log integration identified by its unique ID. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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. + @param id Unique identifier of the log integration configuration. + @return DeleteGroupLogIntegrationApiRequest +*/ +func (a *PushBasedLogExportApiService) DeleteGroupLogIntegration(ctx context.Context, groupId string, id string) DeleteGroupLogIntegrationApiRequest { + return DeleteGroupLogIntegrationApiRequest{ + ApiService: a, + ctx: ctx, + groupId: groupId, + id: id, + } +} + +// DeleteGroupLogIntegrationExecute executes the request +func (a *PushBasedLogExportApiService) DeleteGroupLogIntegrationExecute(r DeleteGroupLogIntegrationApiRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody any + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PushBasedLogExportApiService.DeleteGroupLogIntegration") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/atlas/v2/groups/{groupId}/logIntegrations/{id}" + if r.groupId == "" { + return nil, reportError("groupId is empty and must be specified") + } + localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", url.PathEscape(r.groupId), -1) + if r.id == "" { + return nil, reportError("id is empty and must be specified") + } + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(r.id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header (only first one) + localVarHTTPHeaderAccepts := []string{"application/vnd.atlas.2025-03-12+json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := a.client.makeApiError(localVarHTTPResponse, localVarHTTPMethod, localVarPath) + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + type DeleteLogExportApiRequest struct { ctx context.Context ApiService PushBasedLogExportApi @@ -313,62 +662,185 @@ func (a *PushBasedLogExportApiService) DeleteLogExportExecute(r DeleteLogExportA return localVarHTTPResponse, nil } -type GetLogExportApiRequest struct { +type GetGroupLogIntegrationApiRequest struct { ctx context.Context ApiService PushBasedLogExportApi groupId string + id string } -type GetLogExportApiParams struct { +type GetGroupLogIntegrationApiParams struct { GroupId string + Id string } -func (a *PushBasedLogExportApiService) GetLogExportWithParams(ctx context.Context, args *GetLogExportApiParams) GetLogExportApiRequest { - return GetLogExportApiRequest{ +func (a *PushBasedLogExportApiService) GetGroupLogIntegrationWithParams(ctx context.Context, args *GetGroupLogIntegrationApiParams) GetGroupLogIntegrationApiRequest { + return GetGroupLogIntegrationApiRequest{ ApiService: a, ctx: ctx, groupId: args.GroupId, + id: args.Id, } } -func (r GetLogExportApiRequest) Execute() (*PushBasedLogExportProject, *http.Response, error) { - return r.ApiService.GetLogExportExecute(r) +func (r GetGroupLogIntegrationApiRequest) Execute() (*LogIntegrationResponse, *http.Response, error) { + return r.ApiService.GetGroupLogIntegrationExecute(r) } /* -GetLogExport Return One Push-Based Log Export Configuration in One Project +GetGroupLogIntegration Return One Log Integration -Fetches the current project level settings for the push-based log export feature. +Returns the configuration for one log integration identified by its unique ID. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @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. - @return GetLogExportApiRequest + @param id Unique identifier of the log integration configuration. + @return GetGroupLogIntegrationApiRequest */ -func (a *PushBasedLogExportApiService) GetLogExport(ctx context.Context, groupId string) GetLogExportApiRequest { - return GetLogExportApiRequest{ +func (a *PushBasedLogExportApiService) GetGroupLogIntegration(ctx context.Context, groupId string, id string) GetGroupLogIntegrationApiRequest { + return GetGroupLogIntegrationApiRequest{ ApiService: a, ctx: ctx, groupId: groupId, + id: id, } } -// GetLogExportExecute executes the request +// GetGroupLogIntegrationExecute executes the request // -// @return PushBasedLogExportProject -func (a *PushBasedLogExportApiService) GetLogExportExecute(r GetLogExportApiRequest) (*PushBasedLogExportProject, *http.Response, error) { +// @return LogIntegrationResponse +func (a *PushBasedLogExportApiService) GetGroupLogIntegrationExecute(r GetGroupLogIntegrationApiRequest) (*LogIntegrationResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody any formFiles []formFile - localVarReturnValue *PushBasedLogExportProject + localVarReturnValue *LogIntegrationResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PushBasedLogExportApiService.GetLogExport") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PushBasedLogExportApiService.GetGroupLogIntegration") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/atlas/v2/groups/{groupId}/pushBasedLogExport" + localVarPath := localBasePath + "/api/atlas/v2/groups/{groupId}/logIntegrations/{id}" + if r.groupId == "" { + return localVarReturnValue, nil, reportError("groupId is empty and must be specified") + } + localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", url.PathEscape(r.groupId), -1) + if r.id == "" { + return localVarReturnValue, nil, reportError("id is empty and must be specified") + } + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(r.id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header (only first one) + localVarHTTPHeaderAccepts := []string{"application/vnd.atlas.2025-03-12+json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := a.client.makeApiError(localVarHTTPResponse, localVarHTTPMethod, localVarPath) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarHTTPResponse.Body, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + defer localVarHTTPResponse.Body.Close() + buf, readErr := io.ReadAll(localVarHTTPResponse.Body) + if readErr != nil { + err = readErr + } + newErr := &GenericOpenAPIError{ + body: buf, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GetLogExportApiRequest struct { + ctx context.Context + ApiService PushBasedLogExportApi + groupId string +} + +type GetLogExportApiParams struct { + GroupId string +} + +func (a *PushBasedLogExportApiService) GetLogExportWithParams(ctx context.Context, args *GetLogExportApiParams) GetLogExportApiRequest { + return GetLogExportApiRequest{ + ApiService: a, + ctx: ctx, + groupId: args.GroupId, + } +} + +func (r GetLogExportApiRequest) Execute() (*PushBasedLogExportProject, *http.Response, error) { + return r.ApiService.GetLogExportExecute(r) +} + +/* +GetLogExport Return One Push-Based Log Export Configuration in One Project + +Fetches the current project level settings for the push-based log export feature. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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. + @return GetLogExportApiRequest +*/ +func (a *PushBasedLogExportApiService) GetLogExport(ctx context.Context, groupId string) GetLogExportApiRequest { + return GetLogExportApiRequest{ + ApiService: a, + ctx: ctx, + groupId: groupId, + } +} + +// GetLogExportExecute executes the request +// +// @return PushBasedLogExportProject +func (a *PushBasedLogExportApiService) GetLogExportExecute(r GetLogExportApiRequest) (*PushBasedLogExportProject, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody any + formFiles []formFile + localVarReturnValue *PushBasedLogExportProject + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PushBasedLogExportApiService.GetLogExport") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/atlas/v2/groups/{groupId}/pushBasedLogExport" if r.groupId == "" { return localVarReturnValue, nil, reportError("groupId is empty and must be specified") } @@ -427,6 +899,312 @@ func (a *PushBasedLogExportApiService) GetLogExportExecute(r GetLogExportApiRequ return localVarReturnValue, localVarHTTPResponse, nil } +type ListGroupLogIntegrationsApiRequest struct { + ctx context.Context + ApiService PushBasedLogExportApi + groupId string + includeCount *bool + itemsPerPage *int + pageNum *int + integrationType *string +} + +type ListGroupLogIntegrationsApiParams struct { + GroupId string + IncludeCount *bool + ItemsPerPage *int + PageNum *int + IntegrationType *string +} + +func (a *PushBasedLogExportApiService) ListGroupLogIntegrationsWithParams(ctx context.Context, args *ListGroupLogIntegrationsApiParams) ListGroupLogIntegrationsApiRequest { + return ListGroupLogIntegrationsApiRequest{ + ApiService: a, + ctx: ctx, + groupId: args.GroupId, + includeCount: args.IncludeCount, + itemsPerPage: args.ItemsPerPage, + pageNum: args.PageNum, + integrationType: args.IntegrationType, + } +} + +// Flag that indicates whether the response returns the total number of items (**totalCount**) in the response. +func (r ListGroupLogIntegrationsApiRequest) IncludeCount(includeCount bool) ListGroupLogIntegrationsApiRequest { + r.includeCount = &includeCount + return r +} + +// Number of items that the response returns per page. +func (r ListGroupLogIntegrationsApiRequest) ItemsPerPage(itemsPerPage int) ListGroupLogIntegrationsApiRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +// Number of the page that displays the current set of the total objects that the response returns. +func (r ListGroupLogIntegrationsApiRequest) PageNum(pageNum int) ListGroupLogIntegrationsApiRequest { + r.pageNum = &pageNum + return r +} + +// Optional filter by integration type (e.g., 'S3_LOG_EXPORT'). +func (r ListGroupLogIntegrationsApiRequest) IntegrationType(integrationType string) ListGroupLogIntegrationsApiRequest { + r.integrationType = &integrationType + return r +} + +func (r ListGroupLogIntegrationsApiRequest) Execute() (*PaginatedLogIntegrationResponse, *http.Response, error) { + return r.ApiService.ListGroupLogIntegrationsExecute(r) +} + +/* +ListGroupLogIntegrations Return All Active Log Integrations + +Returns all log integration configurations for the project. Optionally filter by integration type. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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. + @return ListGroupLogIntegrationsApiRequest +*/ +func (a *PushBasedLogExportApiService) ListGroupLogIntegrations(ctx context.Context, groupId string) ListGroupLogIntegrationsApiRequest { + return ListGroupLogIntegrationsApiRequest{ + ApiService: a, + ctx: ctx, + groupId: groupId, + } +} + +// ListGroupLogIntegrationsExecute executes the request +// +// @return PaginatedLogIntegrationResponse +func (a *PushBasedLogExportApiService) ListGroupLogIntegrationsExecute(r ListGroupLogIntegrationsApiRequest) (*PaginatedLogIntegrationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody any + formFiles []formFile + localVarReturnValue *PaginatedLogIntegrationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PushBasedLogExportApiService.ListGroupLogIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/atlas/v2/groups/{groupId}/logIntegrations" + if r.groupId == "" { + return localVarReturnValue, nil, reportError("groupId is empty and must be specified") + } + localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", url.PathEscape(r.groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.includeCount != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "includeCount", r.includeCount, "") + } else { + var defaultValue bool = true + r.includeCount = &defaultValue + parameterAddToHeaderOrQuery(localVarQueryParams, "includeCount", r.includeCount, "") + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int = 100 + r.itemsPerPage = &defaultValue + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } + if r.pageNum != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pageNum", r.pageNum, "") + } else { + var defaultValue int = 1 + r.pageNum = &defaultValue + parameterAddToHeaderOrQuery(localVarQueryParams, "pageNum", r.pageNum, "") + } + if r.integrationType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "integrationType", r.integrationType, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header (only first one) + localVarHTTPHeaderAccepts := []string{"application/vnd.atlas.2025-03-12+json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := a.client.makeApiError(localVarHTTPResponse, localVarHTTPMethod, localVarPath) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarHTTPResponse.Body, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + defer localVarHTTPResponse.Body.Close() + buf, readErr := io.ReadAll(localVarHTTPResponse.Body) + if readErr != nil { + err = readErr + } + newErr := &GenericOpenAPIError{ + body: buf, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UpdateGroupLogIntegrationApiRequest struct { + ctx context.Context + ApiService PushBasedLogExportApi + groupId string + id string + logIntegrationRequest *LogIntegrationRequest +} + +type UpdateGroupLogIntegrationApiParams struct { + GroupId string + Id string + LogIntegrationRequest *LogIntegrationRequest +} + +func (a *PushBasedLogExportApiService) UpdateGroupLogIntegrationWithParams(ctx context.Context, args *UpdateGroupLogIntegrationApiParams) UpdateGroupLogIntegrationApiRequest { + return UpdateGroupLogIntegrationApiRequest{ + ApiService: a, + ctx: ctx, + groupId: args.GroupId, + id: args.Id, + logIntegrationRequest: args.LogIntegrationRequest, + } +} + +func (r UpdateGroupLogIntegrationApiRequest) Execute() (*LogIntegrationResponse, *http.Response, error) { + return r.ApiService.UpdateGroupLogIntegrationExecute(r) +} + +/* +UpdateGroupLogIntegration Update One Log Integration + +Updates the configuration for one log integration identified by its unique ID. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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. + @param id Unique identifier of the log integration configuration. + @return UpdateGroupLogIntegrationApiRequest +*/ +func (a *PushBasedLogExportApiService) UpdateGroupLogIntegration(ctx context.Context, groupId string, id string, logIntegrationRequest *LogIntegrationRequest) UpdateGroupLogIntegrationApiRequest { + return UpdateGroupLogIntegrationApiRequest{ + ApiService: a, + ctx: ctx, + groupId: groupId, + id: id, + logIntegrationRequest: logIntegrationRequest, + } +} + +// UpdateGroupLogIntegrationExecute executes the request +// +// @return LogIntegrationResponse +func (a *PushBasedLogExportApiService) UpdateGroupLogIntegrationExecute(r UpdateGroupLogIntegrationApiRequest) (*LogIntegrationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody any + formFiles []formFile + localVarReturnValue *LogIntegrationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PushBasedLogExportApiService.UpdateGroupLogIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/atlas/v2/groups/{groupId}/logIntegrations/{id}" + if r.groupId == "" { + return localVarReturnValue, nil, reportError("groupId is empty and must be specified") + } + localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", url.PathEscape(r.groupId), -1) + if r.id == "" { + return localVarReturnValue, nil, reportError("id is empty and must be specified") + } + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(r.id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.logIntegrationRequest == nil { + return localVarReturnValue, nil, reportError("logIntegrationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/vnd.atlas.2025-03-12+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header (only first one) + localVarHTTPHeaderAccepts := []string{"application/vnd.atlas.2025-03-12+json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.logIntegrationRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := a.client.makeApiError(localVarHTTPResponse, localVarHTTPMethod, localVarPath) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarHTTPResponse.Body, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + defer localVarHTTPResponse.Body.Close() + buf, readErr := io.ReadAll(localVarHTTPResponse.Body) + if readErr != nil { + err = readErr + } + newErr := &GenericOpenAPIError{ + body: buf, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type UpdateLogExportApiRequest struct { ctx context.Context ApiService PushBasedLogExportApi diff --git a/admin/api_query_shape_insights.go b/admin/api_query_shape_insights.go index 107e9799b..da99567bd 100644 --- a/admin/api_query_shape_insights.go +++ b/admin/api_query_shape_insights.go @@ -13,6 +13,31 @@ import ( type QueryShapeInsightsApi interface { + /* + GetClusterQueryShape Return One Query Shape + + Returns the details for a single query shape. This endpoint only returns query shapes with REJECTED status. If the specified query shape hash does not correspond to a rejected query shape, a 404 Not Found error is returned. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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. + @param clusterName Human-readable label that identifies the cluster. + @param queryShapeHash A SHA256 hash of a query shape, output by MongoDB commands like $queryStats and $explain or slow query logs. + @return GetClusterQueryShapeApiRequest + */ + GetClusterQueryShape(ctx context.Context, groupId string, clusterName string, queryShapeHash string) GetClusterQueryShapeApiRequest + /* + GetClusterQueryShape Return One Query Shape + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param GetClusterQueryShapeApiParams - Parameters for the request + @return GetClusterQueryShapeApiRequest + */ + GetClusterQueryShapeWithParams(ctx context.Context, args *GetClusterQueryShapeApiParams) GetClusterQueryShapeApiRequest + + // Method available only for mocking purposes + GetClusterQueryShapeExecute(r GetClusterQueryShapeApiRequest) (*QueryShapeResponse, *http.Response, error) + /* GetQueryShapeDetails Return Query Shape Details @@ -38,6 +63,30 @@ type QueryShapeInsightsApi interface { // Method available only for mocking purposes GetQueryShapeDetailsExecute(r GetQueryShapeDetailsApiRequest) (*QueryStatsDetailsResponse, *http.Response, error) + /* + ListClusterQueryShapes Return All Query Shapes + + Returns a list of query shapes for one cluster. Query shapes may be filtered by their status; at present, this endpoint supports only the REJECTED status. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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. + @param clusterName Human-readable label that identifies the cluster. + @return ListClusterQueryShapesApiRequest + */ + ListClusterQueryShapes(ctx context.Context, groupId string, clusterName string) ListClusterQueryShapesApiRequest + /* + ListClusterQueryShapes Return All Query Shapes + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ListClusterQueryShapesApiParams - Parameters for the request + @return ListClusterQueryShapesApiRequest + */ + ListClusterQueryShapesWithParams(ctx context.Context, args *ListClusterQueryShapesApiParams) ListClusterQueryShapesApiRequest + + // Method available only for mocking purposes + ListClusterQueryShapesExecute(r ListClusterQueryShapesApiRequest) (*PaginatedQueryShapes, *http.Response, error) + /* ListQueryShapeSummaries Return Query Statistic Summaries @@ -61,11 +110,169 @@ type QueryShapeInsightsApi interface { // Method available only for mocking purposes ListQueryShapeSummariesExecute(r ListQueryShapeSummariesApiRequest) (*QueryStatsSummaryListResponse, *http.Response, error) + + /* + UpdateClusterQueryShape Update Query Shape Rejection Status + + Updates the rejection status of a query shape. Use this endpoint to reject a query shape (preventing it from executing on the cluster) or to unreject a previously rejected query shape (allowing it to execute again). This operation is idempotent: rejecting an already rejected query shape or unrejecting an already unrejected query shape will return 200 OK. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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. + @param clusterName Human-readable label that identifies the cluster. + @param queryShapeHash A SHA256 hash of a query shape, output by MongoDB commands like $queryStats and $explain or slow query logs. + @param queryShapeUpdateRequest The desired rejection status for the query shape. Provide REJECTED to block the query shape from executing, or UNREJECTED to allow it to execute. + @return UpdateClusterQueryShapeApiRequest + */ + UpdateClusterQueryShape(ctx context.Context, groupId string, clusterName string, queryShapeHash string, queryShapeUpdateRequest *QueryShapeUpdateRequest) UpdateClusterQueryShapeApiRequest + /* + UpdateClusterQueryShape Update Query Shape Rejection Status + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param UpdateClusterQueryShapeApiParams - Parameters for the request + @return UpdateClusterQueryShapeApiRequest + */ + UpdateClusterQueryShapeWithParams(ctx context.Context, args *UpdateClusterQueryShapeApiParams) UpdateClusterQueryShapeApiRequest + + // Method available only for mocking purposes + UpdateClusterQueryShapeExecute(r UpdateClusterQueryShapeApiRequest) (*QueryShapeResponse, *http.Response, error) } // QueryShapeInsightsApiService QueryShapeInsightsApi service type QueryShapeInsightsApiService service +type GetClusterQueryShapeApiRequest struct { + ctx context.Context + ApiService QueryShapeInsightsApi + groupId string + clusterName string + queryShapeHash string +} + +type GetClusterQueryShapeApiParams struct { + GroupId string + ClusterName string + QueryShapeHash string +} + +func (a *QueryShapeInsightsApiService) GetClusterQueryShapeWithParams(ctx context.Context, args *GetClusterQueryShapeApiParams) GetClusterQueryShapeApiRequest { + return GetClusterQueryShapeApiRequest{ + ApiService: a, + ctx: ctx, + groupId: args.GroupId, + clusterName: args.ClusterName, + queryShapeHash: args.QueryShapeHash, + } +} + +func (r GetClusterQueryShapeApiRequest) Execute() (*QueryShapeResponse, *http.Response, error) { + return r.ApiService.GetClusterQueryShapeExecute(r) +} + +/* +GetClusterQueryShape Return One Query Shape + +Returns the details for a single query shape. This endpoint only returns query shapes with REJECTED status. If the specified query shape hash does not correspond to a rejected query shape, a 404 Not Found error is returned. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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. + @param clusterName Human-readable label that identifies the cluster. + @param queryShapeHash A SHA256 hash of a query shape, output by MongoDB commands like $queryStats and $explain or slow query logs. + @return GetClusterQueryShapeApiRequest +*/ +func (a *QueryShapeInsightsApiService) GetClusterQueryShape(ctx context.Context, groupId string, clusterName string, queryShapeHash string) GetClusterQueryShapeApiRequest { + return GetClusterQueryShapeApiRequest{ + ApiService: a, + ctx: ctx, + groupId: groupId, + clusterName: clusterName, + queryShapeHash: queryShapeHash, + } +} + +// GetClusterQueryShapeExecute executes the request +// +// @return QueryShapeResponse +func (a *QueryShapeInsightsApiService) GetClusterQueryShapeExecute(r GetClusterQueryShapeApiRequest) (*QueryShapeResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody any + formFiles []formFile + localVarReturnValue *QueryShapeResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QueryShapeInsightsApiService.GetClusterQueryShape") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes/{queryShapeHash}" + if r.groupId == "" { + return localVarReturnValue, nil, reportError("groupId is empty and must be specified") + } + localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", url.PathEscape(r.groupId), -1) + if r.clusterName == "" { + return localVarReturnValue, nil, reportError("clusterName is empty and must be specified") + } + localVarPath = strings.Replace(localVarPath, "{"+"clusterName"+"}", url.PathEscape(r.clusterName), -1) + if r.queryShapeHash == "" { + return localVarReturnValue, nil, reportError("queryShapeHash is empty and must be specified") + } + localVarPath = strings.Replace(localVarPath, "{"+"queryShapeHash"+"}", url.PathEscape(r.queryShapeHash), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header (only first one) + localVarHTTPHeaderAccepts := []string{"application/vnd.atlas.2025-03-12+json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := a.client.makeApiError(localVarHTTPResponse, localVarHTTPMethod, localVarPath) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarHTTPResponse.Body, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + defer localVarHTTPResponse.Body.Close() + buf, readErr := io.ReadAll(localVarHTTPResponse.Body) + if readErr != nil { + err = readErr + } + newErr := &GenericOpenAPIError{ + body: buf, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type GetQueryShapeDetailsApiRequest struct { ctx context.Context ApiService QueryShapeInsightsApi @@ -238,6 +445,193 @@ func (a *QueryShapeInsightsApiService) GetQueryShapeDetailsExecute(r GetQuerySha return localVarReturnValue, localVarHTTPResponse, nil } +type ListClusterQueryShapesApiRequest struct { + ctx context.Context + ApiService QueryShapeInsightsApi + groupId string + clusterName string + status *string + includeCount *bool + itemsPerPage *int + pageNum *int +} + +type ListClusterQueryShapesApiParams struct { + GroupId string + ClusterName string + Status *string + IncludeCount *bool + ItemsPerPage *int + PageNum *int +} + +func (a *QueryShapeInsightsApiService) ListClusterQueryShapesWithParams(ctx context.Context, args *ListClusterQueryShapesApiParams) ListClusterQueryShapesApiRequest { + return ListClusterQueryShapesApiRequest{ + ApiService: a, + ctx: ctx, + groupId: args.GroupId, + clusterName: args.ClusterName, + status: args.Status, + includeCount: args.IncludeCount, + itemsPerPage: args.ItemsPerPage, + pageNum: args.PageNum, + } +} + +// The status of query shapes to retrieve. Only REJECTED status is supported. If omitted, defaults to REJECTED. +func (r ListClusterQueryShapesApiRequest) Status(status string) ListClusterQueryShapesApiRequest { + r.status = &status + return r +} + +// Flag that indicates whether the response returns the total number of items (**totalCount**) in the response. +func (r ListClusterQueryShapesApiRequest) IncludeCount(includeCount bool) ListClusterQueryShapesApiRequest { + r.includeCount = &includeCount + return r +} + +// Number of items that the response returns per page. +func (r ListClusterQueryShapesApiRequest) ItemsPerPage(itemsPerPage int) ListClusterQueryShapesApiRequest { + r.itemsPerPage = &itemsPerPage + return r +} + +// Number of the page that displays the current set of the total objects that the response returns. +func (r ListClusterQueryShapesApiRequest) PageNum(pageNum int) ListClusterQueryShapesApiRequest { + r.pageNum = &pageNum + return r +} + +func (r ListClusterQueryShapesApiRequest) Execute() (*PaginatedQueryShapes, *http.Response, error) { + return r.ApiService.ListClusterQueryShapesExecute(r) +} + +/* +ListClusterQueryShapes Return All Query Shapes + +Returns a list of query shapes for one cluster. Query shapes may be filtered by their status; at present, this endpoint supports only the REJECTED status. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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. + @param clusterName Human-readable label that identifies the cluster. + @return ListClusterQueryShapesApiRequest +*/ +func (a *QueryShapeInsightsApiService) ListClusterQueryShapes(ctx context.Context, groupId string, clusterName string) ListClusterQueryShapesApiRequest { + return ListClusterQueryShapesApiRequest{ + ApiService: a, + ctx: ctx, + groupId: groupId, + clusterName: clusterName, + } +} + +// ListClusterQueryShapesExecute executes the request +// +// @return PaginatedQueryShapes +func (a *QueryShapeInsightsApiService) ListClusterQueryShapesExecute(r ListClusterQueryShapesApiRequest) (*PaginatedQueryShapes, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody any + formFiles []formFile + localVarReturnValue *PaginatedQueryShapes + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QueryShapeInsightsApiService.ListClusterQueryShapes") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes" + if r.groupId == "" { + return localVarReturnValue, nil, reportError("groupId is empty and must be specified") + } + localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", url.PathEscape(r.groupId), -1) + if r.clusterName == "" { + return localVarReturnValue, nil, reportError("clusterName is empty and must be specified") + } + localVarPath = strings.Replace(localVarPath, "{"+"clusterName"+"}", url.PathEscape(r.clusterName), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.status != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "") + } else { + var defaultValue string = "REJECTED" + r.status = &defaultValue + parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "") + } + if r.includeCount != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "includeCount", r.includeCount, "") + } else { + var defaultValue bool = true + r.includeCount = &defaultValue + parameterAddToHeaderOrQuery(localVarQueryParams, "includeCount", r.includeCount, "") + } + if r.itemsPerPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } else { + var defaultValue int = 100 + r.itemsPerPage = &defaultValue + parameterAddToHeaderOrQuery(localVarQueryParams, "itemsPerPage", r.itemsPerPage, "") + } + if r.pageNum != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pageNum", r.pageNum, "") + } else { + var defaultValue int = 1 + r.pageNum = &defaultValue + parameterAddToHeaderOrQuery(localVarQueryParams, "pageNum", r.pageNum, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header (only first one) + localVarHTTPHeaderAccepts := []string{"application/vnd.atlas.2025-03-12+json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := a.client.makeApiError(localVarHTTPResponse, localVarHTTPMethod, localVarPath) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarHTTPResponse.Body, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + defer localVarHTTPResponse.Body.Close() + buf, readErr := io.ReadAll(localVarHTTPResponse.Body) + if readErr != nil { + err = readErr + } + newErr := &GenericOpenAPIError{ + body: buf, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ListQueryShapeSummariesApiRequest struct { ctx context.Context ApiService QueryShapeInsightsApi @@ -480,3 +874,144 @@ func (a *QueryShapeInsightsApiService) ListQueryShapeSummariesExecute(r ListQuer return localVarReturnValue, localVarHTTPResponse, nil } + +type UpdateClusterQueryShapeApiRequest struct { + ctx context.Context + ApiService QueryShapeInsightsApi + groupId string + clusterName string + queryShapeHash string + queryShapeUpdateRequest *QueryShapeUpdateRequest +} + +type UpdateClusterQueryShapeApiParams struct { + GroupId string + ClusterName string + QueryShapeHash string + QueryShapeUpdateRequest *QueryShapeUpdateRequest +} + +func (a *QueryShapeInsightsApiService) UpdateClusterQueryShapeWithParams(ctx context.Context, args *UpdateClusterQueryShapeApiParams) UpdateClusterQueryShapeApiRequest { + return UpdateClusterQueryShapeApiRequest{ + ApiService: a, + ctx: ctx, + groupId: args.GroupId, + clusterName: args.ClusterName, + queryShapeHash: args.QueryShapeHash, + queryShapeUpdateRequest: args.QueryShapeUpdateRequest, + } +} + +func (r UpdateClusterQueryShapeApiRequest) Execute() (*QueryShapeResponse, *http.Response, error) { + return r.ApiService.UpdateClusterQueryShapeExecute(r) +} + +/* +UpdateClusterQueryShape Update Query Shape Rejection Status + +Updates the rejection status of a query shape. Use this endpoint to reject a query shape (preventing it from executing on the cluster) or to unreject a previously rejected query shape (allowing it to execute again). This operation is idempotent: rejecting an already rejected query shape or unrejecting an already unrejected query shape will return 200 OK. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @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. + @param clusterName Human-readable label that identifies the cluster. + @param queryShapeHash A SHA256 hash of a query shape, output by MongoDB commands like $queryStats and $explain or slow query logs. + @return UpdateClusterQueryShapeApiRequest +*/ +func (a *QueryShapeInsightsApiService) UpdateClusterQueryShape(ctx context.Context, groupId string, clusterName string, queryShapeHash string, queryShapeUpdateRequest *QueryShapeUpdateRequest) UpdateClusterQueryShapeApiRequest { + return UpdateClusterQueryShapeApiRequest{ + ApiService: a, + ctx: ctx, + groupId: groupId, + clusterName: clusterName, + queryShapeHash: queryShapeHash, + queryShapeUpdateRequest: queryShapeUpdateRequest, + } +} + +// UpdateClusterQueryShapeExecute executes the request +// +// @return QueryShapeResponse +func (a *QueryShapeInsightsApiService) UpdateClusterQueryShapeExecute(r UpdateClusterQueryShapeApiRequest) (*QueryShapeResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody any + formFiles []formFile + localVarReturnValue *QueryShapeResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QueryShapeInsightsApiService.UpdateClusterQueryShape") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes/{queryShapeHash}" + if r.groupId == "" { + return localVarReturnValue, nil, reportError("groupId is empty and must be specified") + } + localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", url.PathEscape(r.groupId), -1) + if r.clusterName == "" { + return localVarReturnValue, nil, reportError("clusterName is empty and must be specified") + } + localVarPath = strings.Replace(localVarPath, "{"+"clusterName"+"}", url.PathEscape(r.clusterName), -1) + if r.queryShapeHash == "" { + return localVarReturnValue, nil, reportError("queryShapeHash is empty and must be specified") + } + localVarPath = strings.Replace(localVarPath, "{"+"queryShapeHash"+"}", url.PathEscape(r.queryShapeHash), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.queryShapeUpdateRequest == nil { + return localVarReturnValue, nil, reportError("queryShapeUpdateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/vnd.atlas.2025-03-12+json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header (only first one) + localVarHTTPHeaderAccepts := []string{"application/vnd.atlas.2025-03-12+json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.queryShapeUpdateRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := a.client.makeApiError(localVarHTTPResponse, localVarHTTPMethod, localVarPath) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarHTTPResponse.Body, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + defer localVarHTTPResponse.Body.Close() + buf, readErr := io.ReadAll(localVarHTTPResponse.Body) + if readErr != nil { + err = readErr + } + newErr := &GenericOpenAPIError{ + body: buf, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/admin/api_serverless_instances.go b/admin/api_serverless_instances.go index 563c85453..389109c57 100644 --- a/admin/api_serverless_instances.go +++ b/admin/api_serverless_instances.go @@ -23,6 +23,8 @@ type ServerlessInstancesApi interface { @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. @param serverlessInstanceDescriptionCreate Create One Serverless Instance in One Project. @return CreateServerlessInstanceApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessInstancesApi */ CreateServerlessInstance(ctx context.Context, groupId string, serverlessInstanceDescriptionCreate *ServerlessInstanceDescriptionCreate) CreateServerlessInstanceApiRequest /* @@ -32,6 +34,8 @@ type ServerlessInstancesApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param CreateServerlessInstanceApiParams - Parameters for the request @return CreateServerlessInstanceApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessInstancesApi */ CreateServerlessInstanceWithParams(ctx context.Context, args *CreateServerlessInstanceApiParams) CreateServerlessInstanceApiRequest @@ -49,6 +53,8 @@ type ServerlessInstancesApi interface { @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. @param name Human-readable label that identifies the serverless instance. @return DeleteServerlessInstanceApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessInstancesApi */ DeleteServerlessInstance(ctx context.Context, groupId string, name string) DeleteServerlessInstanceApiRequest /* @@ -58,6 +64,8 @@ type ServerlessInstancesApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param DeleteServerlessInstanceApiParams - Parameters for the request @return DeleteServerlessInstanceApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessInstancesApi */ DeleteServerlessInstanceWithParams(ctx context.Context, args *DeleteServerlessInstanceApiParams) DeleteServerlessInstanceApiRequest @@ -75,6 +83,8 @@ type ServerlessInstancesApi interface { @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. @param name Human-readable label that identifies the serverless instance. @return GetServerlessInstanceApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessInstancesApi */ GetServerlessInstance(ctx context.Context, groupId string, name string) GetServerlessInstanceApiRequest /* @@ -84,6 +94,8 @@ type ServerlessInstancesApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param GetServerlessInstanceApiParams - Parameters for the request @return GetServerlessInstanceApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessInstancesApi */ GetServerlessInstanceWithParams(ctx context.Context, args *GetServerlessInstanceApiParams) GetServerlessInstanceApiRequest @@ -100,6 +112,8 @@ type ServerlessInstancesApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @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. @return ListServerlessInstancesApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessInstancesApi */ ListServerlessInstances(ctx context.Context, groupId string) ListServerlessInstancesApiRequest /* @@ -109,6 +123,8 @@ type ServerlessInstancesApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ListServerlessInstancesApiParams - Parameters for the request @return ListServerlessInstancesApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessInstancesApi */ ListServerlessInstancesWithParams(ctx context.Context, args *ListServerlessInstancesApiParams) ListServerlessInstancesApiRequest @@ -127,6 +143,8 @@ type ServerlessInstancesApi interface { @param name Human-readable label that identifies the serverless instance. @param serverlessInstanceDescriptionUpdate Update One Serverless Instance in One Project. @return UpdateServerlessInstanceApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessInstancesApi */ UpdateServerlessInstance(ctx context.Context, groupId string, name string, serverlessInstanceDescriptionUpdate *ServerlessInstanceDescriptionUpdate) UpdateServerlessInstanceApiRequest /* @@ -136,6 +154,8 @@ type ServerlessInstancesApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param UpdateServerlessInstanceApiParams - Parameters for the request @return UpdateServerlessInstanceApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessInstancesApi */ UpdateServerlessInstanceWithParams(ctx context.Context, args *UpdateServerlessInstanceApiParams) UpdateServerlessInstanceApiRequest @@ -181,6 +201,8 @@ Creates one serverless instance in the specified project. To use this resource, @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @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. @return CreateServerlessInstanceApiRequest + +Deprecated */ func (a *ServerlessInstancesApiService) CreateServerlessInstance(ctx context.Context, groupId string, serverlessInstanceDescriptionCreate *ServerlessInstanceDescriptionCreate) CreateServerlessInstanceApiRequest { return CreateServerlessInstanceApiRequest{ @@ -194,6 +216,8 @@ func (a *ServerlessInstancesApiService) CreateServerlessInstance(ctx context.Con // CreateServerlessInstanceExecute executes the request // // @return ServerlessInstanceDescription +// +// Deprecated func (a *ServerlessInstancesApiService) CreateServerlessInstanceExecute(r CreateServerlessInstanceApiRequest) (*ServerlessInstanceDescription, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -307,6 +331,8 @@ This API can also be used on Flex clusters that were created with the [createSer @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. @param name Human-readable label that identifies the serverless instance. @return DeleteServerlessInstanceApiRequest + +Deprecated */ func (a *ServerlessInstancesApiService) DeleteServerlessInstance(ctx context.Context, groupId string, name string) DeleteServerlessInstanceApiRequest { return DeleteServerlessInstanceApiRequest{ @@ -320,6 +346,8 @@ func (a *ServerlessInstancesApiService) DeleteServerlessInstance(ctx context.Con // DeleteServerlessInstanceExecute executes the request // // @return any +// +// Deprecated func (a *ServerlessInstancesApiService) DeleteServerlessInstanceExecute(r DeleteServerlessInstanceApiRequest) (any, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete @@ -432,6 +460,8 @@ This API can also be used on Flex clusters that were created with the [createSer @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. @param name Human-readable label that identifies the serverless instance. @return GetServerlessInstanceApiRequest + +Deprecated */ func (a *ServerlessInstancesApiService) GetServerlessInstance(ctx context.Context, groupId string, name string) GetServerlessInstanceApiRequest { return GetServerlessInstanceApiRequest{ @@ -445,6 +475,8 @@ func (a *ServerlessInstancesApiService) GetServerlessInstance(ctx context.Contex // GetServerlessInstanceExecute executes the request // // @return ServerlessInstanceDescription +// +// Deprecated func (a *ServerlessInstancesApiService) GetServerlessInstanceExecute(r GetServerlessInstanceApiRequest) (*ServerlessInstanceDescription, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -580,6 +612,8 @@ This endpoint also lists Flex clusters that were created using the [createServer @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @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. @return ListServerlessInstancesApiRequest + +Deprecated */ func (a *ServerlessInstancesApiService) ListServerlessInstances(ctx context.Context, groupId string) ListServerlessInstancesApiRequest { return ListServerlessInstancesApiRequest{ @@ -592,6 +626,8 @@ func (a *ServerlessInstancesApiService) ListServerlessInstances(ctx context.Cont // ListServerlessInstancesExecute executes the request // // @return PaginatedServerlessInstanceDescription +// +// Deprecated func (a *ServerlessInstancesApiService) ListServerlessInstancesExecute(r ListServerlessInstancesApiRequest) (*PaginatedServerlessInstanceDescription, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -724,6 +760,8 @@ This API can also be used on Flex clusters that were created with the [createSer @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. @param name Human-readable label that identifies the serverless instance. @return UpdateServerlessInstanceApiRequest + +Deprecated */ func (a *ServerlessInstancesApiService) UpdateServerlessInstance(ctx context.Context, groupId string, name string, serverlessInstanceDescriptionUpdate *ServerlessInstanceDescriptionUpdate) UpdateServerlessInstanceApiRequest { return UpdateServerlessInstanceApiRequest{ @@ -738,6 +776,8 @@ func (a *ServerlessInstancesApiService) UpdateServerlessInstance(ctx context.Con // UpdateServerlessInstanceExecute executes the request // // @return ServerlessInstanceDescription +// +// Deprecated func (a *ServerlessInstancesApiService) UpdateServerlessInstanceExecute(r UpdateServerlessInstanceApiRequest) (*ServerlessInstanceDescription, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch diff --git a/admin/api_serverless_private_endpoints.go b/admin/api_serverless_private_endpoints.go index cb5ae247f..83853f293 100644 --- a/admin/api_serverless_private_endpoints.go +++ b/admin/api_serverless_private_endpoints.go @@ -26,6 +26,8 @@ type ServerlessPrivateEndpointsApi interface { @param instanceName Human-readable label that identifies the serverless instance for which the tenant endpoint will be created. @param serverlessTenantCreateRequest Information about the Private Endpoint to create for the Serverless Instance. @return CreateServerlessPrivateEndpointApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessPrivateEndpointsApi */ CreateServerlessPrivateEndpoint(ctx context.Context, groupId string, instanceName string, serverlessTenantCreateRequest *ServerlessTenantCreateRequest) CreateServerlessPrivateEndpointApiRequest /* @@ -35,6 +37,8 @@ type ServerlessPrivateEndpointsApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param CreateServerlessPrivateEndpointApiParams - Parameters for the request @return CreateServerlessPrivateEndpointApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessPrivateEndpointsApi */ CreateServerlessPrivateEndpointWithParams(ctx context.Context, args *CreateServerlessPrivateEndpointApiParams) CreateServerlessPrivateEndpointApiRequest @@ -53,6 +57,8 @@ type ServerlessPrivateEndpointsApi interface { @param instanceName Human-readable label that identifies the serverless instance from which the tenant endpoint will be removed. @param endpointId Unique 24-hexadecimal digit string that identifies the tenant endpoint which will be removed. @return DeleteServerlessPrivateEndpointApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessPrivateEndpointsApi */ DeleteServerlessPrivateEndpoint(ctx context.Context, groupId string, instanceName string, endpointId string) DeleteServerlessPrivateEndpointApiRequest /* @@ -62,6 +68,8 @@ type ServerlessPrivateEndpointsApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param DeleteServerlessPrivateEndpointApiParams - Parameters for the request @return DeleteServerlessPrivateEndpointApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessPrivateEndpointsApi */ DeleteServerlessPrivateEndpointWithParams(ctx context.Context, args *DeleteServerlessPrivateEndpointApiParams) DeleteServerlessPrivateEndpointApiRequest @@ -80,6 +88,8 @@ type ServerlessPrivateEndpointsApi interface { @param instanceName Human-readable label that identifies the serverless instance associated with the tenant endpoint. @param endpointId Unique 24-hexadecimal digit string that identifies the tenant endpoint. @return GetServerlessPrivateEndpointApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessPrivateEndpointsApi */ GetServerlessPrivateEndpoint(ctx context.Context, groupId string, instanceName string, endpointId string) GetServerlessPrivateEndpointApiRequest /* @@ -89,6 +99,8 @@ type ServerlessPrivateEndpointsApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param GetServerlessPrivateEndpointApiParams - Parameters for the request @return GetServerlessPrivateEndpointApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessPrivateEndpointsApi */ GetServerlessPrivateEndpointWithParams(ctx context.Context, args *GetServerlessPrivateEndpointApiParams) GetServerlessPrivateEndpointApiRequest @@ -106,6 +118,8 @@ type ServerlessPrivateEndpointsApi interface { @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. @param instanceName Human-readable label that identifies the serverless instance associated with the tenant endpoint. @return ListServerlessPrivateEndpointApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessPrivateEndpointsApi */ ListServerlessPrivateEndpoint(ctx context.Context, groupId string, instanceName string) ListServerlessPrivateEndpointApiRequest /* @@ -115,6 +129,8 @@ type ServerlessPrivateEndpointsApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ListServerlessPrivateEndpointApiParams - Parameters for the request @return ListServerlessPrivateEndpointApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessPrivateEndpointsApi */ ListServerlessPrivateEndpointWithParams(ctx context.Context, args *ListServerlessPrivateEndpointApiParams) ListServerlessPrivateEndpointApiRequest @@ -134,6 +150,8 @@ type ServerlessPrivateEndpointsApi interface { @param endpointId Unique 24-hexadecimal digit string that identifies the tenant endpoint which will be updated. @param serverlessTenantEndpointUpdate Object used for update. @return UpdateServerlessPrivateEndpointApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessPrivateEndpointsApi */ UpdateServerlessPrivateEndpoint(ctx context.Context, groupId string, instanceName string, endpointId string, serverlessTenantEndpointUpdate *ServerlessTenantEndpointUpdate) UpdateServerlessPrivateEndpointApiRequest /* @@ -143,6 +161,8 @@ type ServerlessPrivateEndpointsApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param UpdateServerlessPrivateEndpointApiParams - Parameters for the request @return UpdateServerlessPrivateEndpointApiRequest + + Deprecated: this method has been deprecated. Please check the latest resource version for ServerlessPrivateEndpointsApi */ UpdateServerlessPrivateEndpointWithParams(ctx context.Context, args *UpdateServerlessPrivateEndpointApiParams) UpdateServerlessPrivateEndpointApiRequest @@ -194,6 +214,8 @@ This feature does not work for Flex clusters. To continue using Private Endpoint @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. @param instanceName Human-readable label that identifies the serverless instance for which the tenant endpoint will be created. @return CreateServerlessPrivateEndpointApiRequest + +Deprecated */ func (a *ServerlessPrivateEndpointsApiService) CreateServerlessPrivateEndpoint(ctx context.Context, groupId string, instanceName string, serverlessTenantCreateRequest *ServerlessTenantCreateRequest) CreateServerlessPrivateEndpointApiRequest { return CreateServerlessPrivateEndpointApiRequest{ @@ -208,6 +230,8 @@ func (a *ServerlessPrivateEndpointsApiService) CreateServerlessPrivateEndpoint(c // CreateServerlessPrivateEndpointExecute executes the request // // @return ServerlessTenantEndpoint +// +// Deprecated func (a *ServerlessPrivateEndpointsApiService) CreateServerlessPrivateEndpointExecute(r CreateServerlessPrivateEndpointApiRequest) (*ServerlessTenantEndpoint, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -329,6 +353,8 @@ This feature does not work for Flex clusters. To continue using Private Endpoint @param instanceName Human-readable label that identifies the serverless instance from which the tenant endpoint will be removed. @param endpointId Unique 24-hexadecimal digit string that identifies the tenant endpoint which will be removed. @return DeleteServerlessPrivateEndpointApiRequest + +Deprecated */ func (a *ServerlessPrivateEndpointsApiService) DeleteServerlessPrivateEndpoint(ctx context.Context, groupId string, instanceName string, endpointId string) DeleteServerlessPrivateEndpointApiRequest { return DeleteServerlessPrivateEndpointApiRequest{ @@ -341,6 +367,7 @@ func (a *ServerlessPrivateEndpointsApiService) DeleteServerlessPrivateEndpoint(c } // DeleteServerlessPrivateEndpointExecute executes the request +// Deprecated func (a *ServerlessPrivateEndpointsApiService) DeleteServerlessPrivateEndpointExecute(r DeleteServerlessPrivateEndpointApiRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete @@ -446,6 +473,8 @@ This feature does not work for Flex clusters. To continue using Private Endpoint @param instanceName Human-readable label that identifies the serverless instance associated with the tenant endpoint. @param endpointId Unique 24-hexadecimal digit string that identifies the tenant endpoint. @return GetServerlessPrivateEndpointApiRequest + +Deprecated */ func (a *ServerlessPrivateEndpointsApiService) GetServerlessPrivateEndpoint(ctx context.Context, groupId string, instanceName string, endpointId string) GetServerlessPrivateEndpointApiRequest { return GetServerlessPrivateEndpointApiRequest{ @@ -460,6 +489,8 @@ func (a *ServerlessPrivateEndpointsApiService) GetServerlessPrivateEndpoint(ctx // GetServerlessPrivateEndpointExecute executes the request // // @return ServerlessTenantEndpoint +// +// Deprecated func (a *ServerlessPrivateEndpointsApiService) GetServerlessPrivateEndpointExecute(r GetServerlessPrivateEndpointApiRequest) (*ServerlessTenantEndpoint, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -576,6 +607,8 @@ This feature does not work for Flex clusters. To continue using Private Endpoint @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. @param instanceName Human-readable label that identifies the serverless instance associated with the tenant endpoint. @return ListServerlessPrivateEndpointApiRequest + +Deprecated */ func (a *ServerlessPrivateEndpointsApiService) ListServerlessPrivateEndpoint(ctx context.Context, groupId string, instanceName string) ListServerlessPrivateEndpointApiRequest { return ListServerlessPrivateEndpointApiRequest{ @@ -589,6 +622,8 @@ func (a *ServerlessPrivateEndpointsApiService) ListServerlessPrivateEndpoint(ctx // ListServerlessPrivateEndpointExecute executes the request // // @return []ServerlessTenantEndpoint +// +// Deprecated func (a *ServerlessPrivateEndpointsApiService) ListServerlessPrivateEndpointExecute(r ListServerlessPrivateEndpointApiRequest) ([]ServerlessTenantEndpoint, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -708,6 +743,8 @@ This feature does not work for Flex clusters. To continue using Private Endpoint @param instanceName Human-readable label that identifies the serverless instance associated with the tenant endpoint that will be updated. @param endpointId Unique 24-hexadecimal digit string that identifies the tenant endpoint which will be updated. @return UpdateServerlessPrivateEndpointApiRequest + +Deprecated */ func (a *ServerlessPrivateEndpointsApiService) UpdateServerlessPrivateEndpoint(ctx context.Context, groupId string, instanceName string, endpointId string, serverlessTenantEndpointUpdate *ServerlessTenantEndpointUpdate) UpdateServerlessPrivateEndpointApiRequest { return UpdateServerlessPrivateEndpointApiRequest{ @@ -723,6 +760,8 @@ func (a *ServerlessPrivateEndpointsApiService) UpdateServerlessPrivateEndpoint(c // UpdateServerlessPrivateEndpointExecute executes the request // // @return ServerlessTenantEndpoint +// +// Deprecated func (a *ServerlessPrivateEndpointsApiService) UpdateServerlessPrivateEndpointExecute(r UpdateServerlessPrivateEndpointApiRequest) (*ServerlessTenantEndpoint, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch diff --git a/admin/atlas_client.go b/admin/atlas_client.go index 68e9636f6..d15277975 100644 --- a/admin/atlas_client.go +++ b/admin/atlas_client.go @@ -1,4 +1,4 @@ -package admin // import "go.mongodb.org/atlas-sdk/v20250312010/admin" +package admin // import "github.com/mongodb/atlas-sdk-go/admin" import ( "context" @@ -7,9 +7,9 @@ import ( "strings" "github.com/mongodb-forks/digest" - "go.mongodb.org/atlas-sdk/v20250312010/auth" - "go.mongodb.org/atlas-sdk/v20250312010/auth/clientcredentials" - "go.mongodb.org/atlas-sdk/v20250312010/internal/core" + "github.com/mongodb/atlas-sdk-go/auth" + "github.com/mongodb/atlas-sdk-go/auth/clientcredentials" + "github.com/mongodb/atlas-sdk-go/internal/core" ) const ( diff --git a/admin/client.go b/admin/client.go index af7ccc0a9..010b5cd7a 100644 --- a/admin/client.go +++ b/admin/client.go @@ -102,6 +102,8 @@ type APIClient struct { OnlineArchiveApi OnlineArchiveApi + OpenAPIApi OpenAPIApi + OrganizationsApi OrganizationsApi PerformanceAdvisorApi PerformanceAdvisorApi @@ -191,6 +193,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.MonitoringAndLogsApi = (*MonitoringAndLogsApiService)(&c.common) c.NetworkPeeringApi = (*NetworkPeeringApiService)(&c.common) c.OnlineArchiveApi = (*OnlineArchiveApiService)(&c.common) + c.OpenAPIApi = (*OpenAPIApiService)(&c.common) c.OrganizationsApi = (*OrganizationsApiService)(&c.common) c.PerformanceAdvisorApi = (*PerformanceAdvisorApiService)(&c.common) c.PrivateEndpointServicesApi = (*PrivateEndpointServicesApiService)(&c.common) diff --git a/admin/model_alerts_notification_root_for_group.go b/admin/model_alerts_notification_root_for_group.go index cc375a7dc..a1045cb40 100644 --- a/admin/model_alerts_notification_root_for_group.go +++ b/admin/model_alerts_notification_root_for_group.go @@ -56,9 +56,9 @@ type AlertsNotificationRootForGroup struct { VictorOpsApiKey *string `json:"victorOpsApiKey,omitempty"` // Routing key that MongoDB Cloud needs to send alert notifications to Splunk On-Call. The resource requires this parameter when `\"notifications.[n].typeName\" : \"VICTOR_OPS\"`. If the key later becomes invalid, MongoDB Cloud sends an email to the project owners. If the key remains invalid, MongoDB Cloud removes it. VictorOpsRoutingKey *string `json:"victorOpsRoutingKey,omitempty"` - // Authentication secret for a webhook-based alert. Atlas returns this value if you set `\"notifications.[n].typeName\" :\"WEBHOOK\"` and either: * You set `notification.[n].webhookSecret` to a non-empty string * You set a default webhookSecret either on the Integrations page, or with the [Integrations API](#tag/Third-Party-Service-Integrations/operation/createIntegration) **NOTE**: When you view or edit the alert for a webhook notification, the secret appears completely redacted. + // Authentication secret for a webhook-based alert. Atlas returns this value if you set `\"notifications.[n].typeName\" :\"WEBHOOK\"` and either: * You set `notification.[n].webhookSecret` to a non-empty string * You set a default webhookSecret either on the Integrations page, or with the Integrations API **NOTE**: When you view or edit the alert for a webhook notification, the secret appears completely redacted. WebhookSecret *string `json:"webhookSecret,omitempty"` - // Target URL for a webhook-based alert. Atlas returns this value if you set `\"notifications.[n].typeName\" :\"WEBHOOK\"` and either: * You set `notification.[n].webhookURL` to a non-empty string * You set a default webhookUrl either on the [Integrations](https://www.mongodb.com/docs/atlas/tutorial/third-party-service-integrations/#std-label-third-party-integrations) page, or with the [Integrations API](#tag/Third-Party-Service-Integrations/operation/createIntegration) **NOTE**: When you view or edit the alert for a Webhook URL notification, the URL appears partially redacted. + // Target URL for a webhook-based alert. Atlas returns this value if you set `\"notifications.[n].typeName\" :\"WEBHOOK\"` and either: * You set `notification.[n].webhookURL` to a non-empty string * You set a default webhookUrl either on the Integrations page, or with the Integrations API **NOTE**: When you view or edit the alert for a Webhook URL notification, the URL appears partially redacted. WebhookUrl *string `json:"webhookUrl,omitempty"` } diff --git a/admin/model_api_version.go b/admin/model_api_version.go new file mode 100644 index 000000000..3e3511811 --- /dev/null +++ b/admin/model_api_version.go @@ -0,0 +1,59 @@ +// Code based on the AtlasAPI V2 OpenAPI file + +package admin + +// ApiVersion struct for ApiVersion +type ApiVersion struct { + // Object representing a version of the Atlas Admin API. + Version *string `json:"version,omitempty"` +} + +// NewApiVersion instantiates a new ApiVersion object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApiVersion() *ApiVersion { + this := ApiVersion{} + return &this +} + +// NewApiVersionWithDefaults instantiates a new ApiVersion object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApiVersionWithDefaults() *ApiVersion { + this := ApiVersion{} + return &this +} + +// GetVersion returns the Version field value if set, zero value otherwise +func (o *ApiVersion) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiVersion) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *ApiVersion) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *ApiVersion) SetVersion(v string) { + o.Version = &v +} diff --git a/admin/model_azure_key_vault.go b/admin/model_azure_key_vault.go index d0c4d4de6..15fd3d039 100644 --- a/admin/model_azure_key_vault.go +++ b/admin/model_azure_key_vault.go @@ -18,6 +18,8 @@ type AzureKeyVault struct { RequirePrivateNetworking *bool `json:"requirePrivateNetworking,omitempty"` // Name of the Azure resource group that contains your Azure Key Vault. This field cannot be modified when you enable and set up private endpoint connections to your Azure Key Vault. ResourceGroupName *string `json:"resourceGroupName,omitempty"` + // Unique 24-hexadecimal digit string that identifies the Azure Service Principal that MongoDB Cloud uses to access the Azure Key Vault. + RoleId *string `json:"roleId,omitempty"` // Private data that you need secured and that belongs to the specified Azure Key Vault (AKV) tenant (**azureKeyVault.tenantID**). This data can include any type of sensitive data such as passwords, database connection strings, API keys, and the like. AKV stores this information as encrypted binary data. // Write only field. Secret *string `json:"secret,omitempty"` @@ -278,6 +280,39 @@ func (o *AzureKeyVault) SetResourceGroupName(v string) { o.ResourceGroupName = &v } +// GetRoleId returns the RoleId field value if set, zero value otherwise +func (o *AzureKeyVault) GetRoleId() string { + if o == nil || IsNil(o.RoleId) { + var ret string + return ret + } + return *o.RoleId +} + +// GetRoleIdOk returns a tuple with the RoleId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AzureKeyVault) GetRoleIdOk() (*string, bool) { + if o == nil || IsNil(o.RoleId) { + return nil, false + } + + return o.RoleId, true +} + +// HasRoleId returns a boolean if a field has been set. +func (o *AzureKeyVault) HasRoleId() bool { + if o != nil && !IsNil(o.RoleId) { + return true + } + + return false +} + +// SetRoleId gets a reference to the given string and assigns it to the RoleId field. +func (o *AzureKeyVault) SetRoleId(v string) { + o.RoleId = &v +} + // GetSecret returns the Secret field value if set, zero value otherwise func (o *AzureKeyVault) GetSecret() string { if o == nil || IsNil(o.Secret) { diff --git a/admin/model_base_search_index_create_request_definition.go b/admin/model_base_search_index_create_request_definition.go index 94c1cc9f2..f5cad9df8 100644 --- a/admin/model_base_search_index_create_request_definition.go +++ b/admin/model_base_search_index_create_request_definition.go @@ -13,7 +13,7 @@ type BaseSearchIndexCreateRequestDefinition struct { NumPartitions *int `json:"numPartitions,omitempty"` // Method applied to identify words when searching this index. SearchAnalyzer *string `json:"searchAnalyzer,omitempty"` - // Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see Stored Source Fields. + // Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. Note that storing all fields (true) is not allowed for vector search indexes. To learn more, see Stored Source Fields. StoredSource any `json:"storedSource,omitempty"` // Rule sets that map words to their synonyms in this index. Synonyms *[]SearchSynonymMappingDefinition `json:"synonyms,omitempty"` diff --git a/admin/model_base_search_index_response_latest_definition.go b/admin/model_base_search_index_response_latest_definition.go index 004cf1b67..ccfa3c6ec 100644 --- a/admin/model_base_search_index_response_latest_definition.go +++ b/admin/model_base_search_index_response_latest_definition.go @@ -13,7 +13,7 @@ type BaseSearchIndexResponseLatestDefinition struct { NumPartitions *int `json:"numPartitions,omitempty"` // Method applied to identify words when searching this index. SearchAnalyzer *string `json:"searchAnalyzer,omitempty"` - // Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see Stored Source Fields. + // Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. Note that storing all fields (true) is not allowed for vector search indexes. To learn more, see Stored Source Fields. StoredSource any `json:"storedSource,omitempty"` // Rule sets that map words to their synonyms in this index. Synonyms *[]SearchSynonymMappingDefinition `json:"synonyms,omitempty"` diff --git a/admin/model_cluster_search_index.go b/admin/model_cluster_search_index.go index b7d4524cb..60afbc04d 100644 --- a/admin/model_cluster_search_index.go +++ b/admin/model_cluster_search_index.go @@ -18,6 +18,8 @@ type ClusterSearchIndex struct { // Condition of the search index when you made this request. - `IN_PROGRESS`: Atlas is building or re-building the index after an edit. - `STEADY`: You can use this search index. - `FAILED`: Atlas could not build the index. - `MIGRATING`: Atlas is upgrading the underlying cluster tier and migrating indexes. - `PAUSED`: The cluster is paused. // Read only field. Status *string `json:"status,omitempty"` + // Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. Note that storing all fields (true) is not allowed for vector search indexes. To learn more, see documentation. + StoredSource any `json:"storedSource,omitempty"` // Type of the index. Default type is search. Type *string `json:"type,omitempty"` // Specific pre-defined method chosen to convert database field text into searchable words. This conversion reduces the text of fields into the smallest units of text. These units are called a **term** or **token**. This process, known as tokenization, involves a variety of changes made to the text in fields: - extracting words - removing punctuation - removing accents - changing to lowercase - removing common words - reducing words to their root form (stemming) - changing words to their base form (lemmatization) MongoDB Cloud uses the selected process to build the Atlas Search index. @@ -27,8 +29,6 @@ type ClusterSearchIndex struct { Mappings *ApiAtlasFTSMappings `json:"mappings,omitempty"` // Method applied to identify words when searching this index. SearchAnalyzer *string `json:"searchAnalyzer,omitempty"` - // Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see documentation. - StoredSource any `json:"storedSource,omitempty"` // Rule sets that map words to their synonyms in this index. Synonyms *[]SearchSynonymMappingDefinition `json:"synonyms,omitempty"` // Settings that configure the fields, one per object, to index. You must define at least one \"vector\" type field. You can optionally define \"filter\" type fields also. @@ -238,6 +238,40 @@ func (o *ClusterSearchIndex) SetStatus(v string) { o.Status = &v } +// GetStoredSource returns the StoredSource field value if set, zero value otherwise +func (o *ClusterSearchIndex) GetStoredSource() any { + if o == nil || IsNil(o.StoredSource) { + var ret any + return ret + } + return o.StoredSource +} + +// GetStoredSourceOk returns a tuple with the StoredSource field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterSearchIndex) GetStoredSourceOk() (any, bool) { + if o == nil || IsNil(o.StoredSource) { + var ret any + return ret, false + } + + return o.StoredSource, true +} + +// HasStoredSource returns a boolean if a field has been set. +func (o *ClusterSearchIndex) HasStoredSource() bool { + if o != nil && !IsNil(o.StoredSource) { + return true + } + + return false +} + +// SetStoredSource gets a reference to the given any and assigns it to the StoredSource field. +func (o *ClusterSearchIndex) SetStoredSource(v any) { + o.StoredSource = v +} + // GetType returns the Type field value if set, zero value otherwise func (o *ClusterSearchIndex) GetType() string { if o == nil || IsNil(o.Type) { @@ -403,40 +437,6 @@ func (o *ClusterSearchIndex) SetSearchAnalyzer(v string) { o.SearchAnalyzer = &v } -// GetStoredSource returns the StoredSource field value if set, zero value otherwise -func (o *ClusterSearchIndex) GetStoredSource() any { - if o == nil || IsNil(o.StoredSource) { - var ret any - return ret - } - return o.StoredSource -} - -// GetStoredSourceOk returns a tuple with the StoredSource field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ClusterSearchIndex) GetStoredSourceOk() (any, bool) { - if o == nil || IsNil(o.StoredSource) { - var ret any - return ret, false - } - - return o.StoredSource, true -} - -// HasStoredSource returns a boolean if a field has been set. -func (o *ClusterSearchIndex) HasStoredSource() bool { - if o != nil && !IsNil(o.StoredSource) { - return true - } - - return false -} - -// SetStoredSource gets a reference to the given any and assigns it to the StoredSource field. -func (o *ClusterSearchIndex) SetStoredSource(v any) { - o.StoredSource = v -} - // GetSynonyms returns the Synonyms field value if set, zero value otherwise func (o *ClusterSearchIndex) GetSynonyms() []SearchSynonymMappingDefinition { if o == nil || IsNil(o.Synonyms) { diff --git a/admin/model_info.go b/admin/model_info.go new file mode 100644 index 000000000..974d86059 --- /dev/null +++ b/admin/model_info.go @@ -0,0 +1,198 @@ +// Code based on the AtlasAPI V2 OpenAPI file + +package admin + +// Info Information about the MongoDB Atlas Administration API OpenAPI Specification. +type Info struct { + // Description of the MongoDB Atlas Administration API. + Description *string `json:"description,omitempty"` + License *License `json:"license,omitempty"` + // Terms of Service URL. + TermsOfService *string `json:"termsOfService,omitempty"` + // Title of the MongoDB Atlas Administration API. + Title *string `json:"title,omitempty"` + // Version of the MongoDB Atlas Administration API. + Version *string `json:"version,omitempty"` +} + +// NewInfo instantiates a new Info object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInfo() *Info { + this := Info{} + return &this +} + +// NewInfoWithDefaults instantiates a new Info object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInfoWithDefaults() *Info { + this := Info{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise +func (o *Info) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Info) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Info) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Info) SetDescription(v string) { + o.Description = &v +} + +// GetLicense returns the License field value if set, zero value otherwise +func (o *Info) GetLicense() License { + if o == nil || IsNil(o.License) { + var ret License + return ret + } + return *o.License +} + +// GetLicenseOk returns a tuple with the License field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Info) GetLicenseOk() (*License, bool) { + if o == nil || IsNil(o.License) { + return nil, false + } + + return o.License, true +} + +// HasLicense returns a boolean if a field has been set. +func (o *Info) HasLicense() bool { + if o != nil && !IsNil(o.License) { + return true + } + + return false +} + +// SetLicense gets a reference to the given License and assigns it to the License field. +func (o *Info) SetLicense(v License) { + o.License = &v +} + +// GetTermsOfService returns the TermsOfService field value if set, zero value otherwise +func (o *Info) GetTermsOfService() string { + if o == nil || IsNil(o.TermsOfService) { + var ret string + return ret + } + return *o.TermsOfService +} + +// GetTermsOfServiceOk returns a tuple with the TermsOfService field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Info) GetTermsOfServiceOk() (*string, bool) { + if o == nil || IsNil(o.TermsOfService) { + return nil, false + } + + return o.TermsOfService, true +} + +// HasTermsOfService returns a boolean if a field has been set. +func (o *Info) HasTermsOfService() bool { + if o != nil && !IsNil(o.TermsOfService) { + return true + } + + return false +} + +// SetTermsOfService gets a reference to the given string and assigns it to the TermsOfService field. +func (o *Info) SetTermsOfService(v string) { + o.TermsOfService = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise +func (o *Info) GetTitle() string { + if o == nil || IsNil(o.Title) { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Info) GetTitleOk() (*string, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *Info) HasTitle() bool { + if o != nil && !IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *Info) SetTitle(v string) { + o.Title = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise +func (o *Info) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Info) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *Info) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *Info) SetVersion(v string) { + o.Version = &v +} diff --git a/admin/model_license.go b/admin/model_license.go new file mode 100644 index 000000000..3d40d10d2 --- /dev/null +++ b/admin/model_license.go @@ -0,0 +1,94 @@ +// Code based on the AtlasAPI V2 OpenAPI file + +package admin + +// License License information of the MongoDB Atlas Administration API. +type License struct { + // Name of the license. + Name *string `json:"name,omitempty"` + // URL of the license. + Url *string `json:"url,omitempty"` +} + +// NewLicense instantiates a new License object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLicense() *License { + this := License{} + return &this +} + +// NewLicenseWithDefaults instantiates a new License object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLicenseWithDefaults() *License { + this := License{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise +func (o *License) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *License) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *License) SetName(v string) { + o.Name = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise +func (o *License) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *License) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *License) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *License) SetUrl(v string) { + o.Url = &v +} diff --git a/admin/model_log_integration_request.go b/admin/model_log_integration_request.go new file mode 100644 index 000000000..4e72966b0 --- /dev/null +++ b/admin/model_log_integration_request.go @@ -0,0 +1,226 @@ +// Code based on the AtlasAPI V2 OpenAPI file + +package admin + +// LogIntegrationRequest Request schema for creating or updating a log integration. +type LogIntegrationRequest struct { + // Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type. + Type string `json:"type"` + // Human-readable label that identifies the S3 bucket name for storing log files. + BucketName *string `json:"bucketName,omitempty"` + // Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket. + IamRoleId *string `json:"iamRoleId,omitempty"` + // AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings. + KmsKey *string `json:"kmsKey,omitempty"` + // Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGOD_AUDIT, MONGOS_AUDIT. + LogTypes *[]string `json:"logTypes,omitempty"` + // S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type. + PrefixPath *string `json:"prefixPath,omitempty"` +} + +// NewLogIntegrationRequest instantiates a new LogIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLogIntegrationRequest(type_ string) *LogIntegrationRequest { + this := LogIntegrationRequest{} + this.Type = type_ + return &this +} + +// NewLogIntegrationRequestWithDefaults instantiates a new LogIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLogIntegrationRequestWithDefaults() *LogIntegrationRequest { + this := LogIntegrationRequest{} + return &this +} + +// GetType returns the Type field value +func (o *LogIntegrationRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *LogIntegrationRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *LogIntegrationRequest) SetType(v string) { + o.Type = v +} + +// GetBucketName returns the BucketName field value if set, zero value otherwise +func (o *LogIntegrationRequest) GetBucketName() string { + if o == nil || IsNil(o.BucketName) { + var ret string + return ret + } + return *o.BucketName +} + +// GetBucketNameOk returns a tuple with the BucketName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogIntegrationRequest) GetBucketNameOk() (*string, bool) { + if o == nil || IsNil(o.BucketName) { + return nil, false + } + + return o.BucketName, true +} + +// HasBucketName returns a boolean if a field has been set. +func (o *LogIntegrationRequest) HasBucketName() bool { + if o != nil && !IsNil(o.BucketName) { + return true + } + + return false +} + +// SetBucketName gets a reference to the given string and assigns it to the BucketName field. +func (o *LogIntegrationRequest) SetBucketName(v string) { + o.BucketName = &v +} + +// GetIamRoleId returns the IamRoleId field value if set, zero value otherwise +func (o *LogIntegrationRequest) GetIamRoleId() string { + if o == nil || IsNil(o.IamRoleId) { + var ret string + return ret + } + return *o.IamRoleId +} + +// GetIamRoleIdOk returns a tuple with the IamRoleId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogIntegrationRequest) GetIamRoleIdOk() (*string, bool) { + if o == nil || IsNil(o.IamRoleId) { + return nil, false + } + + return o.IamRoleId, true +} + +// HasIamRoleId returns a boolean if a field has been set. +func (o *LogIntegrationRequest) HasIamRoleId() bool { + if o != nil && !IsNil(o.IamRoleId) { + return true + } + + return false +} + +// SetIamRoleId gets a reference to the given string and assigns it to the IamRoleId field. +func (o *LogIntegrationRequest) SetIamRoleId(v string) { + o.IamRoleId = &v +} + +// GetKmsKey returns the KmsKey field value if set, zero value otherwise +func (o *LogIntegrationRequest) GetKmsKey() string { + if o == nil || IsNil(o.KmsKey) { + var ret string + return ret + } + return *o.KmsKey +} + +// GetKmsKeyOk returns a tuple with the KmsKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogIntegrationRequest) GetKmsKeyOk() (*string, bool) { + if o == nil || IsNil(o.KmsKey) { + return nil, false + } + + return o.KmsKey, true +} + +// HasKmsKey returns a boolean if a field has been set. +func (o *LogIntegrationRequest) HasKmsKey() bool { + if o != nil && !IsNil(o.KmsKey) { + return true + } + + return false +} + +// SetKmsKey gets a reference to the given string and assigns it to the KmsKey field. +func (o *LogIntegrationRequest) SetKmsKey(v string) { + o.KmsKey = &v +} + +// GetLogTypes returns the LogTypes field value if set, zero value otherwise +func (o *LogIntegrationRequest) GetLogTypes() []string { + if o == nil || IsNil(o.LogTypes) { + var ret []string + return ret + } + return *o.LogTypes +} + +// GetLogTypesOk returns a tuple with the LogTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogIntegrationRequest) GetLogTypesOk() (*[]string, bool) { + if o == nil || IsNil(o.LogTypes) { + return nil, false + } + + return o.LogTypes, true +} + +// HasLogTypes returns a boolean if a field has been set. +func (o *LogIntegrationRequest) HasLogTypes() bool { + if o != nil && !IsNil(o.LogTypes) { + return true + } + + return false +} + +// SetLogTypes gets a reference to the given []string and assigns it to the LogTypes field. +func (o *LogIntegrationRequest) SetLogTypes(v []string) { + o.LogTypes = &v +} + +// GetPrefixPath returns the PrefixPath field value if set, zero value otherwise +func (o *LogIntegrationRequest) GetPrefixPath() string { + if o == nil || IsNil(o.PrefixPath) { + var ret string + return ret + } + return *o.PrefixPath +} + +// GetPrefixPathOk returns a tuple with the PrefixPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogIntegrationRequest) GetPrefixPathOk() (*string, bool) { + if o == nil || IsNil(o.PrefixPath) { + return nil, false + } + + return o.PrefixPath, true +} + +// HasPrefixPath returns a boolean if a field has been set. +func (o *LogIntegrationRequest) HasPrefixPath() bool { + if o != nil && !IsNil(o.PrefixPath) { + return true + } + + return false +} + +// SetPrefixPath gets a reference to the given string and assigns it to the PrefixPath field. +func (o *LogIntegrationRequest) SetPrefixPath(v string) { + o.PrefixPath = &v +} diff --git a/admin/model_log_integration_response.go b/admin/model_log_integration_response.go new file mode 100644 index 000000000..f46a067cd --- /dev/null +++ b/admin/model_log_integration_response.go @@ -0,0 +1,253 @@ +// Code based on the AtlasAPI V2 OpenAPI file + +package admin + +// LogIntegrationResponse Response schema for log integration operations. +type LogIntegrationResponse struct { + // Unique 24-character hexadecimal digit string that identifies the log integration configuration. + Id string `json:"id"` + // Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type. + Type string `json:"type"` + // Human-readable label that identifies the S3 bucket name for storing log files. + BucketName *string `json:"bucketName,omitempty"` + // Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket. + IamRoleId *string `json:"iamRoleId,omitempty"` + // AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings. + KmsKey *string `json:"kmsKey,omitempty"` + // Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGOD_AUDIT, MONGOS_AUDIT. + LogTypes *[]string `json:"logTypes,omitempty"` + // S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type. + PrefixPath *string `json:"prefixPath,omitempty"` +} + +// NewLogIntegrationResponse instantiates a new LogIntegrationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLogIntegrationResponse(id string, type_ string) *LogIntegrationResponse { + this := LogIntegrationResponse{} + this.Id = id + this.Type = type_ + return &this +} + +// NewLogIntegrationResponseWithDefaults instantiates a new LogIntegrationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLogIntegrationResponseWithDefaults() *LogIntegrationResponse { + this := LogIntegrationResponse{} + return &this +} + +// GetId returns the Id field value +func (o *LogIntegrationResponse) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *LogIntegrationResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *LogIntegrationResponse) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *LogIntegrationResponse) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *LogIntegrationResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *LogIntegrationResponse) SetType(v string) { + o.Type = v +} + +// GetBucketName returns the BucketName field value if set, zero value otherwise +func (o *LogIntegrationResponse) GetBucketName() string { + if o == nil || IsNil(o.BucketName) { + var ret string + return ret + } + return *o.BucketName +} + +// GetBucketNameOk returns a tuple with the BucketName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogIntegrationResponse) GetBucketNameOk() (*string, bool) { + if o == nil || IsNil(o.BucketName) { + return nil, false + } + + return o.BucketName, true +} + +// HasBucketName returns a boolean if a field has been set. +func (o *LogIntegrationResponse) HasBucketName() bool { + if o != nil && !IsNil(o.BucketName) { + return true + } + + return false +} + +// SetBucketName gets a reference to the given string and assigns it to the BucketName field. +func (o *LogIntegrationResponse) SetBucketName(v string) { + o.BucketName = &v +} + +// GetIamRoleId returns the IamRoleId field value if set, zero value otherwise +func (o *LogIntegrationResponse) GetIamRoleId() string { + if o == nil || IsNil(o.IamRoleId) { + var ret string + return ret + } + return *o.IamRoleId +} + +// GetIamRoleIdOk returns a tuple with the IamRoleId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogIntegrationResponse) GetIamRoleIdOk() (*string, bool) { + if o == nil || IsNil(o.IamRoleId) { + return nil, false + } + + return o.IamRoleId, true +} + +// HasIamRoleId returns a boolean if a field has been set. +func (o *LogIntegrationResponse) HasIamRoleId() bool { + if o != nil && !IsNil(o.IamRoleId) { + return true + } + + return false +} + +// SetIamRoleId gets a reference to the given string and assigns it to the IamRoleId field. +func (o *LogIntegrationResponse) SetIamRoleId(v string) { + o.IamRoleId = &v +} + +// GetKmsKey returns the KmsKey field value if set, zero value otherwise +func (o *LogIntegrationResponse) GetKmsKey() string { + if o == nil || IsNil(o.KmsKey) { + var ret string + return ret + } + return *o.KmsKey +} + +// GetKmsKeyOk returns a tuple with the KmsKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogIntegrationResponse) GetKmsKeyOk() (*string, bool) { + if o == nil || IsNil(o.KmsKey) { + return nil, false + } + + return o.KmsKey, true +} + +// HasKmsKey returns a boolean if a field has been set. +func (o *LogIntegrationResponse) HasKmsKey() bool { + if o != nil && !IsNil(o.KmsKey) { + return true + } + + return false +} + +// SetKmsKey gets a reference to the given string and assigns it to the KmsKey field. +func (o *LogIntegrationResponse) SetKmsKey(v string) { + o.KmsKey = &v +} + +// GetLogTypes returns the LogTypes field value if set, zero value otherwise +func (o *LogIntegrationResponse) GetLogTypes() []string { + if o == nil || IsNil(o.LogTypes) { + var ret []string + return ret + } + return *o.LogTypes +} + +// GetLogTypesOk returns a tuple with the LogTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogIntegrationResponse) GetLogTypesOk() (*[]string, bool) { + if o == nil || IsNil(o.LogTypes) { + return nil, false + } + + return o.LogTypes, true +} + +// HasLogTypes returns a boolean if a field has been set. +func (o *LogIntegrationResponse) HasLogTypes() bool { + if o != nil && !IsNil(o.LogTypes) { + return true + } + + return false +} + +// SetLogTypes gets a reference to the given []string and assigns it to the LogTypes field. +func (o *LogIntegrationResponse) SetLogTypes(v []string) { + o.LogTypes = &v +} + +// GetPrefixPath returns the PrefixPath field value if set, zero value otherwise +func (o *LogIntegrationResponse) GetPrefixPath() string { + if o == nil || IsNil(o.PrefixPath) { + var ret string + return ret + } + return *o.PrefixPath +} + +// GetPrefixPathOk returns a tuple with the PrefixPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogIntegrationResponse) GetPrefixPathOk() (*string, bool) { + if o == nil || IsNil(o.PrefixPath) { + return nil, false + } + + return o.PrefixPath, true +} + +// HasPrefixPath returns a boolean if a field has been set. +func (o *LogIntegrationResponse) HasPrefixPath() bool { + if o != nil && !IsNil(o.PrefixPath) { + return true + } + + return false +} + +// SetPrefixPath gets a reference to the given string and assigns it to the PrefixPath field. +func (o *LogIntegrationResponse) SetPrefixPath(v string) { + o.PrefixPath = &v +} diff --git a/admin/model_open_api_info.go b/admin/model_open_api_info.go new file mode 100644 index 000000000..53488bf86 --- /dev/null +++ b/admin/model_open_api_info.go @@ -0,0 +1,58 @@ +// Code based on the AtlasAPI V2 OpenAPI file + +package admin + +// OpenApiInfo struct for OpenApiInfo +type OpenApiInfo struct { + Info *Info `json:"info,omitempty"` +} + +// NewOpenApiInfo instantiates a new OpenApiInfo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOpenApiInfo() *OpenApiInfo { + this := OpenApiInfo{} + return &this +} + +// NewOpenApiInfoWithDefaults instantiates a new OpenApiInfo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOpenApiInfoWithDefaults() *OpenApiInfo { + this := OpenApiInfo{} + return &this +} + +// GetInfo returns the Info field value if set, zero value otherwise +func (o *OpenApiInfo) GetInfo() Info { + if o == nil || IsNil(o.Info) { + var ret Info + return ret + } + return *o.Info +} + +// GetInfoOk returns a tuple with the Info field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OpenApiInfo) GetInfoOk() (*Info, bool) { + if o == nil || IsNil(o.Info) { + return nil, false + } + + return o.Info, true +} + +// HasInfo returns a boolean if a field has been set. +func (o *OpenApiInfo) HasInfo() bool { + if o != nil && !IsNil(o.Info) { + return true + } + + return false +} + +// SetInfo gets a reference to the given Info and assigns it to the Info field. +func (o *OpenApiInfo) SetInfo(v Info) { + o.Info = &v +} diff --git a/admin/model_paginated_api_versions.go b/admin/model_paginated_api_versions.go new file mode 100644 index 000000000..d4f90a4f4 --- /dev/null +++ b/admin/model_paginated_api_versions.go @@ -0,0 +1,132 @@ +// Code based on the AtlasAPI V2 OpenAPI file + +package admin + +// PaginatedApiVersions struct for PaginatedApiVersions +type PaginatedApiVersions struct { + // List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships. + // Read only field. + Links *[]Link `json:"links,omitempty"` + // List of returned documents that MongoDB Cloud provides when completing this request. + // Read only field. + Results *[]ApiVersion `json:"results,omitempty"` + // Total number of documents available. MongoDB Cloud omits this value if `includeCount` is set to `false`. The total number is an estimate and may not be exact. + // Read only field. + TotalCount *int `json:"totalCount,omitempty"` +} + +// NewPaginatedApiVersions instantiates a new PaginatedApiVersions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedApiVersions() *PaginatedApiVersions { + this := PaginatedApiVersions{} + return &this +} + +// NewPaginatedApiVersionsWithDefaults instantiates a new PaginatedApiVersions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedApiVersionsWithDefaults() *PaginatedApiVersions { + this := PaginatedApiVersions{} + return &this +} + +// GetLinks returns the Links field value if set, zero value otherwise +func (o *PaginatedApiVersions) GetLinks() []Link { + if o == nil || IsNil(o.Links) { + var ret []Link + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedApiVersions) GetLinksOk() (*[]Link, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *PaginatedApiVersions) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given []Link and assigns it to the Links field. +func (o *PaginatedApiVersions) SetLinks(v []Link) { + o.Links = &v +} + +// GetResults returns the Results field value if set, zero value otherwise +func (o *PaginatedApiVersions) GetResults() []ApiVersion { + if o == nil || IsNil(o.Results) { + var ret []ApiVersion + return ret + } + return *o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedApiVersions) GetResultsOk() (*[]ApiVersion, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedApiVersions) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ApiVersion and assigns it to the Results field. +func (o *PaginatedApiVersions) SetResults(v []ApiVersion) { + o.Results = &v +} + +// GetTotalCount returns the TotalCount field value if set, zero value otherwise +func (o *PaginatedApiVersions) GetTotalCount() int { + if o == nil || IsNil(o.TotalCount) { + var ret int + return ret + } + return *o.TotalCount +} + +// GetTotalCountOk returns a tuple with the TotalCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedApiVersions) GetTotalCountOk() (*int, bool) { + if o == nil || IsNil(o.TotalCount) { + return nil, false + } + + return o.TotalCount, true +} + +// HasTotalCount returns a boolean if a field has been set. +func (o *PaginatedApiVersions) HasTotalCount() bool { + if o != nil && !IsNil(o.TotalCount) { + return true + } + + return false +} + +// SetTotalCount gets a reference to the given int and assigns it to the TotalCount field. +func (o *PaginatedApiVersions) SetTotalCount(v int) { + o.TotalCount = &v +} diff --git a/admin/model_paginated_log_integration_response.go b/admin/model_paginated_log_integration_response.go new file mode 100644 index 000000000..3fc5fcee3 --- /dev/null +++ b/admin/model_paginated_log_integration_response.go @@ -0,0 +1,132 @@ +// Code based on the AtlasAPI V2 OpenAPI file + +package admin + +// PaginatedLogIntegrationResponse struct for PaginatedLogIntegrationResponse +type PaginatedLogIntegrationResponse struct { + // List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships. + // Read only field. + Links *[]Link `json:"links,omitempty"` + // List of returned documents that MongoDB Cloud provides when completing this request. + // Read only field. + Results *[]LogIntegrationResponse `json:"results,omitempty"` + // Total number of documents available. MongoDB Cloud omits this value if `includeCount` is set to `false`. The total number is an estimate and may not be exact. + // Read only field. + TotalCount *int `json:"totalCount,omitempty"` +} + +// NewPaginatedLogIntegrationResponse instantiates a new PaginatedLogIntegrationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedLogIntegrationResponse() *PaginatedLogIntegrationResponse { + this := PaginatedLogIntegrationResponse{} + return &this +} + +// NewPaginatedLogIntegrationResponseWithDefaults instantiates a new PaginatedLogIntegrationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedLogIntegrationResponseWithDefaults() *PaginatedLogIntegrationResponse { + this := PaginatedLogIntegrationResponse{} + return &this +} + +// GetLinks returns the Links field value if set, zero value otherwise +func (o *PaginatedLogIntegrationResponse) GetLinks() []Link { + if o == nil || IsNil(o.Links) { + var ret []Link + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedLogIntegrationResponse) GetLinksOk() (*[]Link, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *PaginatedLogIntegrationResponse) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given []Link and assigns it to the Links field. +func (o *PaginatedLogIntegrationResponse) SetLinks(v []Link) { + o.Links = &v +} + +// GetResults returns the Results field value if set, zero value otherwise +func (o *PaginatedLogIntegrationResponse) GetResults() []LogIntegrationResponse { + if o == nil || IsNil(o.Results) { + var ret []LogIntegrationResponse + return ret + } + return *o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedLogIntegrationResponse) GetResultsOk() (*[]LogIntegrationResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedLogIntegrationResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []LogIntegrationResponse and assigns it to the Results field. +func (o *PaginatedLogIntegrationResponse) SetResults(v []LogIntegrationResponse) { + o.Results = &v +} + +// GetTotalCount returns the TotalCount field value if set, zero value otherwise +func (o *PaginatedLogIntegrationResponse) GetTotalCount() int { + if o == nil || IsNil(o.TotalCount) { + var ret int + return ret + } + return *o.TotalCount +} + +// GetTotalCountOk returns a tuple with the TotalCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedLogIntegrationResponse) GetTotalCountOk() (*int, bool) { + if o == nil || IsNil(o.TotalCount) { + return nil, false + } + + return o.TotalCount, true +} + +// HasTotalCount returns a boolean if a field has been set. +func (o *PaginatedLogIntegrationResponse) HasTotalCount() bool { + if o != nil && !IsNil(o.TotalCount) { + return true + } + + return false +} + +// SetTotalCount gets a reference to the given int and assigns it to the TotalCount field. +func (o *PaginatedLogIntegrationResponse) SetTotalCount(v int) { + o.TotalCount = &v +} diff --git a/admin/model_paginated_query_shapes.go b/admin/model_paginated_query_shapes.go new file mode 100644 index 000000000..30b64132a --- /dev/null +++ b/admin/model_paginated_query_shapes.go @@ -0,0 +1,132 @@ +// Code based on the AtlasAPI V2 OpenAPI file + +package admin + +// PaginatedQueryShapes Paginated collection of query shapes. This endpoint returns a maximum of 100 results. +type PaginatedQueryShapes struct { + // List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships. + // Read only field. + Links *[]Link `json:"links,omitempty"` + // List of returned documents that MongoDB Cloud provides when completing this request. + // Read only field. + Results *[]QueryShapeResponse `json:"results,omitempty"` + // Total number of documents available. MongoDB Cloud omits this value if `includeCount` is set to `false`. The total number is an estimate and may not be exact. + // Read only field. + TotalCount *int `json:"totalCount,omitempty"` +} + +// NewPaginatedQueryShapes instantiates a new PaginatedQueryShapes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedQueryShapes() *PaginatedQueryShapes { + this := PaginatedQueryShapes{} + return &this +} + +// NewPaginatedQueryShapesWithDefaults instantiates a new PaginatedQueryShapes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedQueryShapesWithDefaults() *PaginatedQueryShapes { + this := PaginatedQueryShapes{} + return &this +} + +// GetLinks returns the Links field value if set, zero value otherwise +func (o *PaginatedQueryShapes) GetLinks() []Link { + if o == nil || IsNil(o.Links) { + var ret []Link + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedQueryShapes) GetLinksOk() (*[]Link, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *PaginatedQueryShapes) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given []Link and assigns it to the Links field. +func (o *PaginatedQueryShapes) SetLinks(v []Link) { + o.Links = &v +} + +// GetResults returns the Results field value if set, zero value otherwise +func (o *PaginatedQueryShapes) GetResults() []QueryShapeResponse { + if o == nil || IsNil(o.Results) { + var ret []QueryShapeResponse + return ret + } + return *o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedQueryShapes) GetResultsOk() (*[]QueryShapeResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedQueryShapes) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []QueryShapeResponse and assigns it to the Results field. +func (o *PaginatedQueryShapes) SetResults(v []QueryShapeResponse) { + o.Results = &v +} + +// GetTotalCount returns the TotalCount field value if set, zero value otherwise +func (o *PaginatedQueryShapes) GetTotalCount() int { + if o == nil || IsNil(o.TotalCount) { + var ret int + return ret + } + return *o.TotalCount +} + +// GetTotalCountOk returns a tuple with the TotalCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedQueryShapes) GetTotalCountOk() (*int, bool) { + if o == nil || IsNil(o.TotalCount) { + return nil, false + } + + return o.TotalCount, true +} + +// HasTotalCount returns a boolean if a field has been set. +func (o *PaginatedQueryShapes) HasTotalCount() bool { + if o != nil && !IsNil(o.TotalCount) { + return true + } + + return false +} + +// SetTotalCount gets a reference to the given int and assigns it to the TotalCount field. +func (o *PaginatedQueryShapes) SetTotalCount(v int) { + o.TotalCount = &v +} diff --git a/admin/model_query_shape_response.go b/admin/model_query_shape_response.go new file mode 100644 index 000000000..2eb63a55e --- /dev/null +++ b/admin/model_query_shape_response.go @@ -0,0 +1,187 @@ +// Code based on the AtlasAPI V2 OpenAPI file + +package admin + +// QueryShapeResponse Response containing the details and status of a query shape. The query shape field may be null if the user lacks PII view access. +type QueryShapeResponse struct { + // The MongoDB command type issued for a query shape. + // Read only field. + Command *string `json:"command,omitempty"` + // Human-readable label that identifies the namespace on the specified host. The resource expresses this parameter value as `.`. + // Read only field. + Namespace *string `json:"namespace,omitempty"` + // A query shape is a set of specifications that group similar queries together. Specifications can include filters, sorts, projections, aggregation pipeline stages, a namespace, and others. Queries that have similar specifications have the same query shape. This field may be null if the user lacks PII view access. + // Read only field. + QueryShape *string `json:"queryShape,omitempty"` + // A hexadecimal string that represents the hash of a MongoDB query shape. + // Read only field. + QueryShapeHash string `json:"queryShapeHash"` + // The rejection status of a query shape. Use REJECTED to prevent the query shape from executing on the cluster, or UNREJECTED to allow it to execute. + Status string `json:"status"` +} + +// NewQueryShapeResponse instantiates a new QueryShapeResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueryShapeResponse(queryShapeHash string, status string) *QueryShapeResponse { + this := QueryShapeResponse{} + this.QueryShapeHash = queryShapeHash + this.Status = status + return &this +} + +// NewQueryShapeResponseWithDefaults instantiates a new QueryShapeResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueryShapeResponseWithDefaults() *QueryShapeResponse { + this := QueryShapeResponse{} + return &this +} + +// GetCommand returns the Command field value if set, zero value otherwise +func (o *QueryShapeResponse) GetCommand() string { + if o == nil || IsNil(o.Command) { + var ret string + return ret + } + return *o.Command +} + +// GetCommandOk returns a tuple with the Command field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryShapeResponse) GetCommandOk() (*string, bool) { + if o == nil || IsNil(o.Command) { + return nil, false + } + + return o.Command, true +} + +// HasCommand returns a boolean if a field has been set. +func (o *QueryShapeResponse) HasCommand() bool { + if o != nil && !IsNil(o.Command) { + return true + } + + return false +} + +// SetCommand gets a reference to the given string and assigns it to the Command field. +func (o *QueryShapeResponse) SetCommand(v string) { + o.Command = &v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise +func (o *QueryShapeResponse) GetNamespace() string { + if o == nil || IsNil(o.Namespace) { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryShapeResponse) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *QueryShapeResponse) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *QueryShapeResponse) SetNamespace(v string) { + o.Namespace = &v +} + +// GetQueryShape returns the QueryShape field value if set, zero value otherwise +func (o *QueryShapeResponse) GetQueryShape() string { + if o == nil || IsNil(o.QueryShape) { + var ret string + return ret + } + return *o.QueryShape +} + +// GetQueryShapeOk returns a tuple with the QueryShape field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryShapeResponse) GetQueryShapeOk() (*string, bool) { + if o == nil || IsNil(o.QueryShape) { + return nil, false + } + + return o.QueryShape, true +} + +// HasQueryShape returns a boolean if a field has been set. +func (o *QueryShapeResponse) HasQueryShape() bool { + if o != nil && !IsNil(o.QueryShape) { + return true + } + + return false +} + +// SetQueryShape gets a reference to the given string and assigns it to the QueryShape field. +func (o *QueryShapeResponse) SetQueryShape(v string) { + o.QueryShape = &v +} + +// GetQueryShapeHash returns the QueryShapeHash field value +func (o *QueryShapeResponse) GetQueryShapeHash() string { + if o == nil { + var ret string + return ret + } + + return o.QueryShapeHash +} + +// GetQueryShapeHashOk returns a tuple with the QueryShapeHash field value +// and a boolean to check if the value has been set. +func (o *QueryShapeResponse) GetQueryShapeHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.QueryShapeHash, true +} + +// SetQueryShapeHash sets field value +func (o *QueryShapeResponse) SetQueryShapeHash(v string) { + o.QueryShapeHash = v +} + +// GetStatus returns the Status field value +func (o *QueryShapeResponse) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *QueryShapeResponse) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *QueryShapeResponse) SetStatus(v string) { + o.Status = v +} diff --git a/admin/model_query_shape_update_request.go b/admin/model_query_shape_update_request.go new file mode 100644 index 000000000..ebefb669c --- /dev/null +++ b/admin/model_query_shape_update_request.go @@ -0,0 +1,51 @@ +// Code based on the AtlasAPI V2 OpenAPI file + +package admin + +// QueryShapeUpdateRequest Request body for modifying the rejection status of a query shape. +type QueryShapeUpdateRequest struct { + // The rejection status of a query shape. Use REJECTED to prevent the query shape from executing on the cluster, or UNREJECTED to allow it to execute. + Status string `json:"status"` +} + +// NewQueryShapeUpdateRequest instantiates a new QueryShapeUpdateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQueryShapeUpdateRequest(status string) *QueryShapeUpdateRequest { + this := QueryShapeUpdateRequest{} + this.Status = status + return &this +} + +// NewQueryShapeUpdateRequestWithDefaults instantiates a new QueryShapeUpdateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQueryShapeUpdateRequestWithDefaults() *QueryShapeUpdateRequest { + this := QueryShapeUpdateRequest{} + return &this +} + +// GetStatus returns the Status field value +func (o *QueryShapeUpdateRequest) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *QueryShapeUpdateRequest) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *QueryShapeUpdateRequest) SetStatus(v string) { + o.Status = v +} diff --git a/admin/model_s3_log_integration_request.go b/admin/model_s3_log_integration_request.go new file mode 100644 index 000000000..7506abcf6 --- /dev/null +++ b/admin/model_s3_log_integration_request.go @@ -0,0 +1,194 @@ +// Code based on the AtlasAPI V2 OpenAPI file + +package admin + +// S3LogIntegrationRequest Request schema for creating or updating an S3 log export integration. +type S3LogIntegrationRequest struct { + // Human-readable label that identifies the S3 bucket name for storing log files. + BucketName string `json:"bucketName"` + // Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket. + IamRoleId string `json:"iamRoleId"` + // AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings. + KmsKey *string `json:"kmsKey,omitempty"` + // Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGOD_AUDIT, MONGOS_AUDIT. + LogTypes []string `json:"logTypes"` + // S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type. + PrefixPath string `json:"prefixPath"` + // Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type. + Type string `json:"type"` +} + +// NewS3LogIntegrationRequest instantiates a new S3LogIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewS3LogIntegrationRequest(bucketName string, iamRoleId string, logTypes []string, prefixPath string, type_ string) *S3LogIntegrationRequest { + this := S3LogIntegrationRequest{} + this.Type = type_ + this.BucketName = bucketName + this.IamRoleId = iamRoleId + this.LogTypes = logTypes + this.PrefixPath = prefixPath + return &this +} + +// NewS3LogIntegrationRequestWithDefaults instantiates a new S3LogIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewS3LogIntegrationRequestWithDefaults() *S3LogIntegrationRequest { + this := S3LogIntegrationRequest{} + return &this +} + +// GetBucketName returns the BucketName field value +func (o *S3LogIntegrationRequest) GetBucketName() string { + if o == nil { + var ret string + return ret + } + + return o.BucketName +} + +// GetBucketNameOk returns a tuple with the BucketName field value +// and a boolean to check if the value has been set. +func (o *S3LogIntegrationRequest) GetBucketNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BucketName, true +} + +// SetBucketName sets field value +func (o *S3LogIntegrationRequest) SetBucketName(v string) { + o.BucketName = v +} + +// GetIamRoleId returns the IamRoleId field value +func (o *S3LogIntegrationRequest) GetIamRoleId() string { + if o == nil { + var ret string + return ret + } + + return o.IamRoleId +} + +// GetIamRoleIdOk returns a tuple with the IamRoleId field value +// and a boolean to check if the value has been set. +func (o *S3LogIntegrationRequest) GetIamRoleIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.IamRoleId, true +} + +// SetIamRoleId sets field value +func (o *S3LogIntegrationRequest) SetIamRoleId(v string) { + o.IamRoleId = v +} + +// GetKmsKey returns the KmsKey field value if set, zero value otherwise +func (o *S3LogIntegrationRequest) GetKmsKey() string { + if o == nil || IsNil(o.KmsKey) { + var ret string + return ret + } + return *o.KmsKey +} + +// GetKmsKeyOk returns a tuple with the KmsKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *S3LogIntegrationRequest) GetKmsKeyOk() (*string, bool) { + if o == nil || IsNil(o.KmsKey) { + return nil, false + } + + return o.KmsKey, true +} + +// HasKmsKey returns a boolean if a field has been set. +func (o *S3LogIntegrationRequest) HasKmsKey() bool { + if o != nil && !IsNil(o.KmsKey) { + return true + } + + return false +} + +// SetKmsKey gets a reference to the given string and assigns it to the KmsKey field. +func (o *S3LogIntegrationRequest) SetKmsKey(v string) { + o.KmsKey = &v +} + +// GetLogTypes returns the LogTypes field value +func (o *S3LogIntegrationRequest) GetLogTypes() []string { + if o == nil { + var ret []string + return ret + } + + return o.LogTypes +} + +// GetLogTypesOk returns a tuple with the LogTypes field value +// and a boolean to check if the value has been set. +func (o *S3LogIntegrationRequest) GetLogTypesOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return &o.LogTypes, true +} + +// SetLogTypes sets field value +func (o *S3LogIntegrationRequest) SetLogTypes(v []string) { + o.LogTypes = v +} + +// GetPrefixPath returns the PrefixPath field value +func (o *S3LogIntegrationRequest) GetPrefixPath() string { + if o == nil { + var ret string + return ret + } + + return o.PrefixPath +} + +// GetPrefixPathOk returns a tuple with the PrefixPath field value +// and a boolean to check if the value has been set. +func (o *S3LogIntegrationRequest) GetPrefixPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PrefixPath, true +} + +// SetPrefixPath sets field value +func (o *S3LogIntegrationRequest) SetPrefixPath(v string) { + o.PrefixPath = v +} + +// GetType returns the Type field value +func (o *S3LogIntegrationRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *S3LogIntegrationRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *S3LogIntegrationRequest) SetType(v string) { + o.Type = v +} diff --git a/admin/model_s3_log_integration_request_all_of.go b/admin/model_s3_log_integration_request_all_of.go new file mode 100644 index 000000000..8e5fde34b --- /dev/null +++ b/admin/model_s3_log_integration_request_all_of.go @@ -0,0 +1,234 @@ +// Code based on the AtlasAPI V2 OpenAPI file + +package admin + +// S3LogIntegrationRequestAllOf struct for S3LogIntegrationRequestAllOf +type S3LogIntegrationRequestAllOf struct { + // Human-readable label that identifies the S3 bucket name for storing log files. + BucketName *string `json:"bucketName,omitempty"` + // Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket. + IamRoleId *string `json:"iamRoleId,omitempty"` + // AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings. + KmsKey *string `json:"kmsKey,omitempty"` + // Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGOD_AUDIT, MONGOS_AUDIT. + LogTypes *[]string `json:"logTypes,omitempty"` + // S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type. + PrefixPath *string `json:"prefixPath,omitempty"` + // Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type. + Type *string `json:"type,omitempty"` +} + +// NewS3LogIntegrationRequestAllOf instantiates a new S3LogIntegrationRequestAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewS3LogIntegrationRequestAllOf() *S3LogIntegrationRequestAllOf { + this := S3LogIntegrationRequestAllOf{} + return &this +} + +// NewS3LogIntegrationRequestAllOfWithDefaults instantiates a new S3LogIntegrationRequestAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewS3LogIntegrationRequestAllOfWithDefaults() *S3LogIntegrationRequestAllOf { + this := S3LogIntegrationRequestAllOf{} + return &this +} + +// GetBucketName returns the BucketName field value if set, zero value otherwise +func (o *S3LogIntegrationRequestAllOf) GetBucketName() string { + if o == nil || IsNil(o.BucketName) { + var ret string + return ret + } + return *o.BucketName +} + +// GetBucketNameOk returns a tuple with the BucketName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *S3LogIntegrationRequestAllOf) GetBucketNameOk() (*string, bool) { + if o == nil || IsNil(o.BucketName) { + return nil, false + } + + return o.BucketName, true +} + +// HasBucketName returns a boolean if a field has been set. +func (o *S3LogIntegrationRequestAllOf) HasBucketName() bool { + if o != nil && !IsNil(o.BucketName) { + return true + } + + return false +} + +// SetBucketName gets a reference to the given string and assigns it to the BucketName field. +func (o *S3LogIntegrationRequestAllOf) SetBucketName(v string) { + o.BucketName = &v +} + +// GetIamRoleId returns the IamRoleId field value if set, zero value otherwise +func (o *S3LogIntegrationRequestAllOf) GetIamRoleId() string { + if o == nil || IsNil(o.IamRoleId) { + var ret string + return ret + } + return *o.IamRoleId +} + +// GetIamRoleIdOk returns a tuple with the IamRoleId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *S3LogIntegrationRequestAllOf) GetIamRoleIdOk() (*string, bool) { + if o == nil || IsNil(o.IamRoleId) { + return nil, false + } + + return o.IamRoleId, true +} + +// HasIamRoleId returns a boolean if a field has been set. +func (o *S3LogIntegrationRequestAllOf) HasIamRoleId() bool { + if o != nil && !IsNil(o.IamRoleId) { + return true + } + + return false +} + +// SetIamRoleId gets a reference to the given string and assigns it to the IamRoleId field. +func (o *S3LogIntegrationRequestAllOf) SetIamRoleId(v string) { + o.IamRoleId = &v +} + +// GetKmsKey returns the KmsKey field value if set, zero value otherwise +func (o *S3LogIntegrationRequestAllOf) GetKmsKey() string { + if o == nil || IsNil(o.KmsKey) { + var ret string + return ret + } + return *o.KmsKey +} + +// GetKmsKeyOk returns a tuple with the KmsKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *S3LogIntegrationRequestAllOf) GetKmsKeyOk() (*string, bool) { + if o == nil || IsNil(o.KmsKey) { + return nil, false + } + + return o.KmsKey, true +} + +// HasKmsKey returns a boolean if a field has been set. +func (o *S3LogIntegrationRequestAllOf) HasKmsKey() bool { + if o != nil && !IsNil(o.KmsKey) { + return true + } + + return false +} + +// SetKmsKey gets a reference to the given string and assigns it to the KmsKey field. +func (o *S3LogIntegrationRequestAllOf) SetKmsKey(v string) { + o.KmsKey = &v +} + +// GetLogTypes returns the LogTypes field value if set, zero value otherwise +func (o *S3LogIntegrationRequestAllOf) GetLogTypes() []string { + if o == nil || IsNil(o.LogTypes) { + var ret []string + return ret + } + return *o.LogTypes +} + +// GetLogTypesOk returns a tuple with the LogTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *S3LogIntegrationRequestAllOf) GetLogTypesOk() (*[]string, bool) { + if o == nil || IsNil(o.LogTypes) { + return nil, false + } + + return o.LogTypes, true +} + +// HasLogTypes returns a boolean if a field has been set. +func (o *S3LogIntegrationRequestAllOf) HasLogTypes() bool { + if o != nil && !IsNil(o.LogTypes) { + return true + } + + return false +} + +// SetLogTypes gets a reference to the given []string and assigns it to the LogTypes field. +func (o *S3LogIntegrationRequestAllOf) SetLogTypes(v []string) { + o.LogTypes = &v +} + +// GetPrefixPath returns the PrefixPath field value if set, zero value otherwise +func (o *S3LogIntegrationRequestAllOf) GetPrefixPath() string { + if o == nil || IsNil(o.PrefixPath) { + var ret string + return ret + } + return *o.PrefixPath +} + +// GetPrefixPathOk returns a tuple with the PrefixPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *S3LogIntegrationRequestAllOf) GetPrefixPathOk() (*string, bool) { + if o == nil || IsNil(o.PrefixPath) { + return nil, false + } + + return o.PrefixPath, true +} + +// HasPrefixPath returns a boolean if a field has been set. +func (o *S3LogIntegrationRequestAllOf) HasPrefixPath() bool { + if o != nil && !IsNil(o.PrefixPath) { + return true + } + + return false +} + +// SetPrefixPath gets a reference to the given string and assigns it to the PrefixPath field. +func (o *S3LogIntegrationRequestAllOf) SetPrefixPath(v string) { + o.PrefixPath = &v +} + +// GetType returns the Type field value if set, zero value otherwise +func (o *S3LogIntegrationRequestAllOf) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *S3LogIntegrationRequestAllOf) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *S3LogIntegrationRequestAllOf) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *S3LogIntegrationRequestAllOf) SetType(v string) { + o.Type = &v +} diff --git a/admin/model_search_index_update_request_definition.go b/admin/model_search_index_update_request_definition.go index 901218f96..7e402bd64 100644 --- a/admin/model_search_index_update_request_definition.go +++ b/admin/model_search_index_update_request_definition.go @@ -13,7 +13,7 @@ type SearchIndexUpdateRequestDefinition struct { NumPartitions *int `json:"numPartitions,omitempty"` // Method applied to identify words when searching this index. SearchAnalyzer *string `json:"searchAnalyzer,omitempty"` - // Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see Stored Source Fields. + // Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. Note that storing all fields (true) is not allowed for vector search indexes. To learn more, see Stored Source Fields. StoredSource any `json:"storedSource,omitempty"` // Rule sets that map words to their synonyms in this index. Synonyms *[]SearchSynonymMappingDefinition `json:"synonyms,omitempty"` diff --git a/admin/model_streams_matcher.go b/admin/model_streams_matcher.go index 7294cd81f..489416e44 100644 --- a/admin/model_streams_matcher.go +++ b/admin/model_streams_matcher.go @@ -6,7 +6,7 @@ package admin type StreamsMatcher struct { // Name of the parameter in the target object that MongoDB Cloud checks. The parameter must match all rules for MongoDB Cloud to check for alert configurations. FieldName string `json:"fieldName"` - // Comparison operator to apply when checking the current metric value against **matcher[n].value**. + // Comparison operator to apply when checking the current metric value against **matcher[n].value**. The `REGEX` operator only supports inclusive matches. Use the `NOT_CONTAINS` operator to exclude values. Operator string `json:"operator"` // Value to match or exceed using the specified **matchers.operator**. Value string `json:"value"` diff --git a/admin/model_vector_search_index_definition.go b/admin/model_vector_search_index_definition.go index b357b2344..8ae31d0fc 100644 --- a/admin/model_vector_search_index_definition.go +++ b/admin/model_vector_search_index_definition.go @@ -8,6 +8,8 @@ type VectorSearchIndexDefinition struct { Fields *[]any `json:"fields,omitempty"` // Number of index partitions. Allowed values are [1, 2, 4]. NumPartitions *int `json:"numPartitions,omitempty"` + // Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. Note that storing all fields (true) is not allowed for vector search indexes. To learn more, see Stored Source Fields. + StoredSource any `json:"storedSource,omitempty"` } // NewVectorSearchIndexDefinition instantiates a new VectorSearchIndexDefinition object @@ -96,3 +98,37 @@ func (o *VectorSearchIndexDefinition) HasNumPartitions() bool { func (o *VectorSearchIndexDefinition) SetNumPartitions(v int) { o.NumPartitions = &v } + +// GetStoredSource returns the StoredSource field value if set, zero value otherwise +func (o *VectorSearchIndexDefinition) GetStoredSource() any { + if o == nil || IsNil(o.StoredSource) { + var ret any + return ret + } + return o.StoredSource +} + +// GetStoredSourceOk returns a tuple with the StoredSource field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VectorSearchIndexDefinition) GetStoredSourceOk() (any, bool) { + if o == nil || IsNil(o.StoredSource) { + var ret any + return ret, false + } + + return o.StoredSource, true +} + +// HasStoredSource returns a boolean if a field has been set. +func (o *VectorSearchIndexDefinition) HasStoredSource() bool { + if o != nil && !IsNil(o.StoredSource) { + return true + } + + return false +} + +// SetStoredSource gets a reference to the given any and assigns it to the StoredSource field. +func (o *VectorSearchIndexDefinition) SetStoredSource(v any) { + o.StoredSource = v +} diff --git a/auth/clientcredentials/clientcredentials.go b/auth/clientcredentials/clientcredentials.go index 86f55f456..23032c82e 100644 --- a/auth/clientcredentials/clientcredentials.go +++ b/auth/clientcredentials/clientcredentials.go @@ -11,8 +11,8 @@ import ( "golang.org/x/oauth2" - "go.mongodb.org/atlas-sdk/v20250312010/auth" - "go.mongodb.org/atlas-sdk/v20250312010/internal/core" + "github.com/mongodb/atlas-sdk-go/auth" + "github.com/mongodb/atlas-sdk-go/internal/core" "golang.org/x/oauth2/clientcredentials" ) diff --git a/auth/clientcredentials/clientcredentials_test.go b/auth/clientcredentials/clientcredentials_test.go index e3ff65aae..ec418c4cc 100644 --- a/auth/clientcredentials/clientcredentials_test.go +++ b/auth/clientcredentials/clientcredentials_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" + "github.com/mongodb/atlas-sdk-go/auth" "github.com/stretchr/testify/assert" - "go.mongodb.org/atlas-sdk/v20250312010/auth" ) // mockOAuthRevokeEndpoint creates a mock OAuth revoke endpoint, diff --git a/auth/code/device_flow.go b/auth/code/device_flow.go index 29de091ab..6d353bddb 100644 --- a/auth/code/device_flow.go +++ b/auth/code/device_flow.go @@ -22,7 +22,7 @@ import ( "strings" "time" - core "go.mongodb.org/atlas-sdk/v20250312010/internal/core" + core "github.com/mongodb/atlas-sdk-go/internal/core" ) const authExpiredError = "DEVICE_AUTHORIZATION_EXPIRED" diff --git a/auth/code/oauth.go b/auth/code/oauth.go index 8703e907e..170214993 100644 --- a/auth/code/oauth.go +++ b/auth/code/oauth.go @@ -26,7 +26,7 @@ import ( "runtime" "strings" - "go.mongodb.org/atlas-sdk/v20250312010/internal/core" + "github.com/mongodb/atlas-sdk-go/internal/core" ) const defaultBaseURL = "https://cloud.mongodb.com/" diff --git a/auth/code/oauth_test.go b/auth/code/oauth_test.go index 4a35981ac..1234427b1 100644 --- a/auth/code/oauth_test.go +++ b/auth/code/oauth_test.go @@ -24,7 +24,7 @@ import ( "reflect" "testing" - core "go.mongodb.org/atlas-sdk/v20250312010/internal/core" + core "github.com/mongodb/atlas-sdk-go/internal/core" ) const ( diff --git a/examples/aws_cluster/aws.go b/examples/aws_cluster/aws.go index 6199b7699..094fa1d3c 100644 --- a/examples/aws_cluster/aws.go +++ b/examples/aws_cluster/aws.go @@ -10,8 +10,8 @@ import ( "context" - "go.mongodb.org/atlas-sdk/v20250312010/admin" - "go.mongodb.org/atlas-sdk/v20250312010/examples" + "github.com/mongodb/atlas-sdk-go/admin" + "github.com/mongodb/atlas-sdk-go/examples" ) /* diff --git a/examples/basic/basic.go b/examples/basic/basic.go index d8278d4e3..cef32a155 100644 --- a/examples/basic/basic.go +++ b/examples/basic/basic.go @@ -7,8 +7,8 @@ import ( "context" - "go.mongodb.org/atlas-sdk/v20250312010/admin" - "go.mongodb.org/atlas-sdk/v20250312010/examples" + "github.com/mongodb/atlas-sdk-go/admin" + "github.com/mongodb/atlas-sdk-go/examples" ) /* diff --git a/examples/db_users/db_users.go b/examples/db_users/db_users.go index 7312ca6ed..3636ba59c 100644 --- a/examples/db_users/db_users.go +++ b/examples/db_users/db_users.go @@ -6,8 +6,8 @@ import ( "context" - "go.mongodb.org/atlas-sdk/v20250312010/admin" - "go.mongodb.org/atlas-sdk/v20250312010/examples" + "github.com/mongodb/atlas-sdk-go/admin" + "github.com/mongodb/atlas-sdk-go/examples" ) const ( diff --git a/examples/download/downloadLogs.go b/examples/download/downloadLogs.go index bb8654c52..1f337d74c 100644 --- a/examples/download/downloadLogs.go +++ b/examples/download/downloadLogs.go @@ -7,8 +7,8 @@ import ( "context" - "go.mongodb.org/atlas-sdk/v20250312010/admin" - "go.mongodb.org/atlas-sdk/v20250312010/examples" + "github.com/mongodb/atlas-sdk-go/admin" + "github.com/mongodb/atlas-sdk-go/examples" ) /* diff --git a/examples/errors.go b/examples/errors.go index 81e9ff7b5..7c6a28ad7 100644 --- a/examples/errors.go +++ b/examples/errors.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "go.mongodb.org/atlas-sdk/v20250312010/admin" + "github.com/mongodb/atlas-sdk-go/admin" ) func HandleErr(err error, resp *http.Response) { diff --git a/examples/go.mod b/examples/go.mod index 9c55d7632..e7210d872 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -1,15 +1,16 @@ -module go.mongodb.org/atlas-sdk/v20250312010/examples +module github.com/mongodb/atlas-sdk-go/examples go 1.24.0 -replace go.mongodb.org/atlas-sdk/v20250312010 => ../ +replace github.com/mongodb/atlas-sdk-go => ../ require ( github.com/hashicorp/go-retryablehttp v0.7.7 github.com/mongodb-forks/digest v1.1.0 - go.mongodb.org/atlas-sdk/v20250312010 v20250312010.1.0 ) +require github.com/mongodb/atlas-sdk-go v1.0.0 // indirect + require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect diff --git a/examples/invoice/invoice.go b/examples/invoice/invoice.go index bbfa5c36d..f5e41b040 100644 --- a/examples/invoice/invoice.go +++ b/examples/invoice/invoice.go @@ -7,8 +7,8 @@ import ( "context" - "go.mongodb.org/atlas-sdk/v20250312010/admin" - "go.mongodb.org/atlas-sdk/v20250312010/examples" + "github.com/mongodb/atlas-sdk-go/admin" + "github.com/mongodb/atlas-sdk-go/examples" ) func main() { diff --git a/examples/mock/cluster_test.go b/examples/mock/cluster_test.go index 74e26f539..6ec146a76 100644 --- a/examples/mock/cluster_test.go +++ b/examples/mock/cluster_test.go @@ -5,10 +5,10 @@ import ( "net/http" "testing" + "github.com/mongodb/atlas-sdk-go/admin" + "github.com/mongodb/atlas-sdk-go/mockadmin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "go.mongodb.org/atlas-sdk/v20250312010/admin" - "go.mongodb.org/atlas-sdk/v20250312010/mockadmin" ) func myFunctionCallingListClusters(clusterAPI admin.ClustersApi) (int, error) { diff --git a/examples/regions/regions.go b/examples/regions/regions.go index 1a14167ff..6e5312862 100644 --- a/examples/regions/regions.go +++ b/examples/regions/regions.go @@ -7,8 +7,8 @@ import ( "context" - "go.mongodb.org/atlas-sdk/v20250312010/admin" - "go.mongodb.org/atlas-sdk/v20250312010/examples" + "github.com/mongodb/atlas-sdk-go/admin" + "github.com/mongodb/atlas-sdk-go/examples" ) /* diff --git a/examples/retry/retry.go b/examples/retry/retry.go index 1d94d27e8..a7c47aae4 100644 --- a/examples/retry/retry.go +++ b/examples/retry/retry.go @@ -8,7 +8,7 @@ import ( "context" - "go.mongodb.org/atlas-sdk/v20250312010/admin" + "github.com/mongodb/atlas-sdk-go/admin" retryablehttp "github.com/hashicorp/go-retryablehttp" "github.com/mongodb-forks/digest" diff --git a/examples/service_account_management/sa_management.go b/examples/service_account_management/sa_management.go index 81cdd5922..00c6746d5 100644 --- a/examples/service_account_management/sa_management.go +++ b/examples/service_account_management/sa_management.go @@ -6,7 +6,7 @@ import ( "log" "os" - "go.mongodb.org/atlas-sdk/v20250312010/admin" + "github.com/mongodb/atlas-sdk-go/admin" ) // Example for Service Account Management API diff --git a/examples/service_account_token_store/cached_token.go b/examples/service_account_token_store/cached_token.go index 429bfe5bd..0d455d36a 100644 --- a/examples/service_account_token_store/cached_token.go +++ b/examples/service_account_token_store/cached_token.go @@ -4,13 +4,14 @@ import ( "context" "encoding/json" "fmt" - "go.mongodb.org/atlas-sdk/v20250312010/auth" "log" "os" "strings" - "go.mongodb.org/atlas-sdk/v20250312010/admin" - "go.mongodb.org/atlas-sdk/v20250312010/auth/clientcredentials" + "github.com/mongodb/atlas-sdk-go/auth" + + "github.com/mongodb/atlas-sdk-go/admin" + "github.com/mongodb/atlas-sdk-go/auth/clientcredentials" ) // Variable provided as example. diff --git a/go.mod b/go.mod index 4d846be03..1c6714380 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module go.mongodb.org/atlas-sdk/v20250312010 +module github.com/mongodb/atlas-sdk-go go 1.24.0 diff --git a/mockadmin/access_tracking_api.go b/mockadmin/access_tracking_api.go index 8ae02750c..b607fb1c0 100644 --- a/mockadmin/access_tracking_api.go +++ b/mockadmin/access_tracking_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/alert_configurations_api.go b/mockadmin/alert_configurations_api.go index 7cbf575a5..bbbb8aa16 100644 --- a/mockadmin/alert_configurations_api.go +++ b/mockadmin/alert_configurations_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/alerts_api.go b/mockadmin/alerts_api.go index 24fda29e6..2b6fd76e8 100644 --- a/mockadmin/alerts_api.go +++ b/mockadmin/alerts_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/atlas_search_api.go b/mockadmin/atlas_search_api.go index ad06a2ddc..1b82d684a 100644 --- a/mockadmin/atlas_search_api.go +++ b/mockadmin/atlas_search_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/auditing_api.go b/mockadmin/auditing_api.go index e18ed315e..cbaa8bb66 100644 --- a/mockadmin/auditing_api.go +++ b/mockadmin/auditing_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/aws_clusters_dns_api.go b/mockadmin/aws_clusters_dns_api.go index 8b75fdffd..6f8f303a1 100644 --- a/mockadmin/aws_clusters_dns_api.go +++ b/mockadmin/aws_clusters_dns_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/cloud_backups_api.go b/mockadmin/cloud_backups_api.go index 222f3b91f..17cac8390 100644 --- a/mockadmin/cloud_backups_api.go +++ b/mockadmin/cloud_backups_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/cloud_migration_service_api.go b/mockadmin/cloud_migration_service_api.go index 15830f08c..e6a00d866 100644 --- a/mockadmin/cloud_migration_service_api.go +++ b/mockadmin/cloud_migration_service_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/cloud_provider_access_api.go b/mockadmin/cloud_provider_access_api.go index 24646f14a..6ff204d10 100644 --- a/mockadmin/cloud_provider_access_api.go +++ b/mockadmin/cloud_provider_access_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/cluster_outage_simulation_api.go b/mockadmin/cluster_outage_simulation_api.go index fc56192a6..964087740 100644 --- a/mockadmin/cluster_outage_simulation_api.go +++ b/mockadmin/cluster_outage_simulation_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/clusters_api.go b/mockadmin/clusters_api.go index 79b23b28f..1c47e8255 100644 --- a/mockadmin/clusters_api.go +++ b/mockadmin/clusters_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/collection_level_metrics_api.go b/mockadmin/collection_level_metrics_api.go index 95d7a00c8..a51913f55 100644 --- a/mockadmin/collection_level_metrics_api.go +++ b/mockadmin/collection_level_metrics_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/custom_database_roles_api.go b/mockadmin/custom_database_roles_api.go index d2f0a7d4c..dd570ec10 100644 --- a/mockadmin/custom_database_roles_api.go +++ b/mockadmin/custom_database_roles_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/data_federation_api.go b/mockadmin/data_federation_api.go index db8a0253d..6463e3d2c 100644 --- a/mockadmin/data_federation_api.go +++ b/mockadmin/data_federation_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/data_lake_pipelines_api.go b/mockadmin/data_lake_pipelines_api.go index 0ad708270..0bc343662 100644 --- a/mockadmin/data_lake_pipelines_api.go +++ b/mockadmin/data_lake_pipelines_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/database_users_api.go b/mockadmin/database_users_api.go index 8c718ece2..995a5c07a 100644 --- a/mockadmin/database_users_api.go +++ b/mockadmin/database_users_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/encryption_at_rest_using_customer_key_management_api.go b/mockadmin/encryption_at_rest_using_customer_key_management_api.go index 14b4e332f..3a2511fe9 100644 --- a/mockadmin/encryption_at_rest_using_customer_key_management_api.go +++ b/mockadmin/encryption_at_rest_using_customer_key_management_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/events_api.go b/mockadmin/events_api.go index 1837d95fd..036821df7 100644 --- a/mockadmin/events_api.go +++ b/mockadmin/events_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/federated_authentication_api.go b/mockadmin/federated_authentication_api.go index f2a540632..4acc142ea 100644 --- a/mockadmin/federated_authentication_api.go +++ b/mockadmin/federated_authentication_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/flex_clusters_api.go b/mockadmin/flex_clusters_api.go index d6fbb954f..c5f2a6de4 100644 --- a/mockadmin/flex_clusters_api.go +++ b/mockadmin/flex_clusters_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/flex_restore_jobs_api.go b/mockadmin/flex_restore_jobs_api.go index af7a5bf1c..8d48fc411 100644 --- a/mockadmin/flex_restore_jobs_api.go +++ b/mockadmin/flex_restore_jobs_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/flex_snapshots_api.go b/mockadmin/flex_snapshots_api.go index 15edc4829..4aac95f44 100644 --- a/mockadmin/flex_snapshots_api.go +++ b/mockadmin/flex_snapshots_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/global_clusters_api.go b/mockadmin/global_clusters_api.go index 4c5107ead..35e6e4fbc 100644 --- a/mockadmin/global_clusters_api.go +++ b/mockadmin/global_clusters_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/invoices_api.go b/mockadmin/invoices_api.go index 0c527d1d5..686d455ce 100644 --- a/mockadmin/invoices_api.go +++ b/mockadmin/invoices_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/ldap_configuration_api.go b/mockadmin/ldap_configuration_api.go index f82139d0c..eed25a1f9 100644 --- a/mockadmin/ldap_configuration_api.go +++ b/mockadmin/ldap_configuration_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/legacy_backup_api.go b/mockadmin/legacy_backup_api.go index 36d74e0ca..adadf462e 100644 --- a/mockadmin/legacy_backup_api.go +++ b/mockadmin/legacy_backup_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/maintenance_windows_api.go b/mockadmin/maintenance_windows_api.go index fa3f0a1fd..e5a5b3fca 100644 --- a/mockadmin/maintenance_windows_api.go +++ b/mockadmin/maintenance_windows_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/mongo_db_cloud_users_api.go b/mockadmin/mongo_db_cloud_users_api.go index 342931f42..46833965e 100644 --- a/mockadmin/mongo_db_cloud_users_api.go +++ b/mockadmin/mongo_db_cloud_users_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/monitoring_and_logs_api.go b/mockadmin/monitoring_and_logs_api.go index 7d5dfa7d6..3792e5c12 100644 --- a/mockadmin/monitoring_and_logs_api.go +++ b/mockadmin/monitoring_and_logs_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/network_peering_api.go b/mockadmin/network_peering_api.go index e3e1e527a..6c175cdd5 100644 --- a/mockadmin/network_peering_api.go +++ b/mockadmin/network_peering_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/online_archive_api.go b/mockadmin/online_archive_api.go index e82d76183..1af5301de 100644 --- a/mockadmin/online_archive_api.go +++ b/mockadmin/online_archive_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/open_api_api.go b/mockadmin/open_api_api.go new file mode 100644 index 000000000..f18aca9a7 --- /dev/null +++ b/mockadmin/open_api_api.go @@ -0,0 +1,360 @@ +// Code generated by mockery. DO NOT EDIT. + +package mockadmin + +import ( + context "context" + + admin "github.com/mongodb/atlas-sdk-go/admin" + + http "net/http" + + mock "github.com/stretchr/testify/mock" +) + +// OpenAPIApi is an autogenerated mock type for the OpenAPIApi type +type OpenAPIApi struct { + mock.Mock +} + +type OpenAPIApi_Expecter struct { + mock *mock.Mock +} + +func (_m *OpenAPIApi) EXPECT() *OpenAPIApi_Expecter { + return &OpenAPIApi_Expecter{mock: &_m.Mock} +} + +// GetOpenapiInfo provides a mock function with given fields: ctx +func (_m *OpenAPIApi) GetOpenapiInfo(ctx context.Context) admin.GetOpenapiInfoApiRequest { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for GetOpenapiInfo") + } + + var r0 admin.GetOpenapiInfoApiRequest + if rf, ok := ret.Get(0).(func(context.Context) admin.GetOpenapiInfoApiRequest); ok { + r0 = rf(ctx) + } else { + r0 = ret.Get(0).(admin.GetOpenapiInfoApiRequest) + } + + return r0 +} + +// OpenAPIApi_GetOpenapiInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOpenapiInfo' +type OpenAPIApi_GetOpenapiInfo_Call struct { + *mock.Call +} + +// GetOpenapiInfo is a helper method to define mock.On call +// - ctx context.Context +func (_e *OpenAPIApi_Expecter) GetOpenapiInfo(ctx any) *OpenAPIApi_GetOpenapiInfo_Call { + return &OpenAPIApi_GetOpenapiInfo_Call{Call: _e.mock.On("GetOpenapiInfo", ctx)} +} + +func (_c *OpenAPIApi_GetOpenapiInfo_Call) Run(run func(ctx context.Context)) *OpenAPIApi_GetOpenapiInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *OpenAPIApi_GetOpenapiInfo_Call) Return(_a0 admin.GetOpenapiInfoApiRequest) *OpenAPIApi_GetOpenapiInfo_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OpenAPIApi_GetOpenapiInfo_Call) RunAndReturn(run func(context.Context) admin.GetOpenapiInfoApiRequest) *OpenAPIApi_GetOpenapiInfo_Call { + _c.Call.Return(run) + return _c +} + +// GetOpenapiInfoExecute provides a mock function with given fields: r +func (_m *OpenAPIApi) GetOpenapiInfoExecute(r admin.GetOpenapiInfoApiRequest) (*admin.OpenApiInfo, *http.Response, error) { + ret := _m.Called(r) + + if len(ret) == 0 { + panic("no return value specified for GetOpenapiInfoExecute") + } + + var r0 *admin.OpenApiInfo + var r1 *http.Response + var r2 error + if rf, ok := ret.Get(0).(func(admin.GetOpenapiInfoApiRequest) (*admin.OpenApiInfo, *http.Response, error)); ok { + return rf(r) + } + if rf, ok := ret.Get(0).(func(admin.GetOpenapiInfoApiRequest) *admin.OpenApiInfo); ok { + r0 = rf(r) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.OpenApiInfo) + } + } + + if rf, ok := ret.Get(1).(func(admin.GetOpenapiInfoApiRequest) *http.Response); ok { + r1 = rf(r) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*http.Response) + } + } + + if rf, ok := ret.Get(2).(func(admin.GetOpenapiInfoApiRequest) error); ok { + r2 = rf(r) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +// OpenAPIApi_GetOpenapiInfoExecute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOpenapiInfoExecute' +type OpenAPIApi_GetOpenapiInfoExecute_Call struct { + *mock.Call +} + +// GetOpenapiInfoExecute is a helper method to define mock.On call +// - r admin.GetOpenapiInfoApiRequest +func (_e *OpenAPIApi_Expecter) GetOpenapiInfoExecute(r any) *OpenAPIApi_GetOpenapiInfoExecute_Call { + return &OpenAPIApi_GetOpenapiInfoExecute_Call{Call: _e.mock.On("GetOpenapiInfoExecute", r)} +} + +func (_c *OpenAPIApi_GetOpenapiInfoExecute_Call) Run(run func(r admin.GetOpenapiInfoApiRequest)) *OpenAPIApi_GetOpenapiInfoExecute_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(admin.GetOpenapiInfoApiRequest)) + }) + return _c +} + +func (_c *OpenAPIApi_GetOpenapiInfoExecute_Call) Return(_a0 *admin.OpenApiInfo, _a1 *http.Response, _a2 error) *OpenAPIApi_GetOpenapiInfoExecute_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *OpenAPIApi_GetOpenapiInfoExecute_Call) RunAndReturn(run func(admin.GetOpenapiInfoApiRequest) (*admin.OpenApiInfo, *http.Response, error)) *OpenAPIApi_GetOpenapiInfoExecute_Call { + _c.Call.Return(run) + return _c +} + +// GetOpenapiInfoWithParams provides a mock function with given fields: ctx, args +func (_m *OpenAPIApi) GetOpenapiInfoWithParams(ctx context.Context, args *admin.GetOpenapiInfoApiParams) admin.GetOpenapiInfoApiRequest { + ret := _m.Called(ctx, args) + + if len(ret) == 0 { + panic("no return value specified for GetOpenapiInfoWithParams") + } + + var r0 admin.GetOpenapiInfoApiRequest + if rf, ok := ret.Get(0).(func(context.Context, *admin.GetOpenapiInfoApiParams) admin.GetOpenapiInfoApiRequest); ok { + r0 = rf(ctx, args) + } else { + r0 = ret.Get(0).(admin.GetOpenapiInfoApiRequest) + } + + return r0 +} + +// OpenAPIApi_GetOpenapiInfoWithParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOpenapiInfoWithParams' +type OpenAPIApi_GetOpenapiInfoWithParams_Call struct { + *mock.Call +} + +// GetOpenapiInfoWithParams is a helper method to define mock.On call +// - ctx context.Context +// - args *admin.GetOpenapiInfoApiParams +func (_e *OpenAPIApi_Expecter) GetOpenapiInfoWithParams(ctx any, args any) *OpenAPIApi_GetOpenapiInfoWithParams_Call { + return &OpenAPIApi_GetOpenapiInfoWithParams_Call{Call: _e.mock.On("GetOpenapiInfoWithParams", ctx, args)} +} + +func (_c *OpenAPIApi_GetOpenapiInfoWithParams_Call) Run(run func(ctx context.Context, args *admin.GetOpenapiInfoApiParams)) *OpenAPIApi_GetOpenapiInfoWithParams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*admin.GetOpenapiInfoApiParams)) + }) + return _c +} + +func (_c *OpenAPIApi_GetOpenapiInfoWithParams_Call) Return(_a0 admin.GetOpenapiInfoApiRequest) *OpenAPIApi_GetOpenapiInfoWithParams_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OpenAPIApi_GetOpenapiInfoWithParams_Call) RunAndReturn(run func(context.Context, *admin.GetOpenapiInfoApiParams) admin.GetOpenapiInfoApiRequest) *OpenAPIApi_GetOpenapiInfoWithParams_Call { + _c.Call.Return(run) + return _c +} + +// ListOpenapiVersions provides a mock function with given fields: ctx +func (_m *OpenAPIApi) ListOpenapiVersions(ctx context.Context) admin.ListOpenapiVersionsApiRequest { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for ListOpenapiVersions") + } + + var r0 admin.ListOpenapiVersionsApiRequest + if rf, ok := ret.Get(0).(func(context.Context) admin.ListOpenapiVersionsApiRequest); ok { + r0 = rf(ctx) + } else { + r0 = ret.Get(0).(admin.ListOpenapiVersionsApiRequest) + } + + return r0 +} + +// OpenAPIApi_ListOpenapiVersions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListOpenapiVersions' +type OpenAPIApi_ListOpenapiVersions_Call struct { + *mock.Call +} + +// ListOpenapiVersions is a helper method to define mock.On call +// - ctx context.Context +func (_e *OpenAPIApi_Expecter) ListOpenapiVersions(ctx any) *OpenAPIApi_ListOpenapiVersions_Call { + return &OpenAPIApi_ListOpenapiVersions_Call{Call: _e.mock.On("ListOpenapiVersions", ctx)} +} + +func (_c *OpenAPIApi_ListOpenapiVersions_Call) Run(run func(ctx context.Context)) *OpenAPIApi_ListOpenapiVersions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *OpenAPIApi_ListOpenapiVersions_Call) Return(_a0 admin.ListOpenapiVersionsApiRequest) *OpenAPIApi_ListOpenapiVersions_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OpenAPIApi_ListOpenapiVersions_Call) RunAndReturn(run func(context.Context) admin.ListOpenapiVersionsApiRequest) *OpenAPIApi_ListOpenapiVersions_Call { + _c.Call.Return(run) + return _c +} + +// ListOpenapiVersionsExecute provides a mock function with given fields: r +func (_m *OpenAPIApi) ListOpenapiVersionsExecute(r admin.ListOpenapiVersionsApiRequest) (*admin.PaginatedApiVersions, *http.Response, error) { + ret := _m.Called(r) + + if len(ret) == 0 { + panic("no return value specified for ListOpenapiVersionsExecute") + } + + var r0 *admin.PaginatedApiVersions + var r1 *http.Response + var r2 error + if rf, ok := ret.Get(0).(func(admin.ListOpenapiVersionsApiRequest) (*admin.PaginatedApiVersions, *http.Response, error)); ok { + return rf(r) + } + if rf, ok := ret.Get(0).(func(admin.ListOpenapiVersionsApiRequest) *admin.PaginatedApiVersions); ok { + r0 = rf(r) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.PaginatedApiVersions) + } + } + + if rf, ok := ret.Get(1).(func(admin.ListOpenapiVersionsApiRequest) *http.Response); ok { + r1 = rf(r) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*http.Response) + } + } + + if rf, ok := ret.Get(2).(func(admin.ListOpenapiVersionsApiRequest) error); ok { + r2 = rf(r) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +// OpenAPIApi_ListOpenapiVersionsExecute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListOpenapiVersionsExecute' +type OpenAPIApi_ListOpenapiVersionsExecute_Call struct { + *mock.Call +} + +// ListOpenapiVersionsExecute is a helper method to define mock.On call +// - r admin.ListOpenapiVersionsApiRequest +func (_e *OpenAPIApi_Expecter) ListOpenapiVersionsExecute(r any) *OpenAPIApi_ListOpenapiVersionsExecute_Call { + return &OpenAPIApi_ListOpenapiVersionsExecute_Call{Call: _e.mock.On("ListOpenapiVersionsExecute", r)} +} + +func (_c *OpenAPIApi_ListOpenapiVersionsExecute_Call) Run(run func(r admin.ListOpenapiVersionsApiRequest)) *OpenAPIApi_ListOpenapiVersionsExecute_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(admin.ListOpenapiVersionsApiRequest)) + }) + return _c +} + +func (_c *OpenAPIApi_ListOpenapiVersionsExecute_Call) Return(_a0 *admin.PaginatedApiVersions, _a1 *http.Response, _a2 error) *OpenAPIApi_ListOpenapiVersionsExecute_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *OpenAPIApi_ListOpenapiVersionsExecute_Call) RunAndReturn(run func(admin.ListOpenapiVersionsApiRequest) (*admin.PaginatedApiVersions, *http.Response, error)) *OpenAPIApi_ListOpenapiVersionsExecute_Call { + _c.Call.Return(run) + return _c +} + +// ListOpenapiVersionsWithParams provides a mock function with given fields: ctx, args +func (_m *OpenAPIApi) ListOpenapiVersionsWithParams(ctx context.Context, args *admin.ListOpenapiVersionsApiParams) admin.ListOpenapiVersionsApiRequest { + ret := _m.Called(ctx, args) + + if len(ret) == 0 { + panic("no return value specified for ListOpenapiVersionsWithParams") + } + + var r0 admin.ListOpenapiVersionsApiRequest + if rf, ok := ret.Get(0).(func(context.Context, *admin.ListOpenapiVersionsApiParams) admin.ListOpenapiVersionsApiRequest); ok { + r0 = rf(ctx, args) + } else { + r0 = ret.Get(0).(admin.ListOpenapiVersionsApiRequest) + } + + return r0 +} + +// OpenAPIApi_ListOpenapiVersionsWithParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListOpenapiVersionsWithParams' +type OpenAPIApi_ListOpenapiVersionsWithParams_Call struct { + *mock.Call +} + +// ListOpenapiVersionsWithParams is a helper method to define mock.On call +// - ctx context.Context +// - args *admin.ListOpenapiVersionsApiParams +func (_e *OpenAPIApi_Expecter) ListOpenapiVersionsWithParams(ctx any, args any) *OpenAPIApi_ListOpenapiVersionsWithParams_Call { + return &OpenAPIApi_ListOpenapiVersionsWithParams_Call{Call: _e.mock.On("ListOpenapiVersionsWithParams", ctx, args)} +} + +func (_c *OpenAPIApi_ListOpenapiVersionsWithParams_Call) Run(run func(ctx context.Context, args *admin.ListOpenapiVersionsApiParams)) *OpenAPIApi_ListOpenapiVersionsWithParams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*admin.ListOpenapiVersionsApiParams)) + }) + return _c +} + +func (_c *OpenAPIApi_ListOpenapiVersionsWithParams_Call) Return(_a0 admin.ListOpenapiVersionsApiRequest) *OpenAPIApi_ListOpenapiVersionsWithParams_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OpenAPIApi_ListOpenapiVersionsWithParams_Call) RunAndReturn(run func(context.Context, *admin.ListOpenapiVersionsApiParams) admin.ListOpenapiVersionsApiRequest) *OpenAPIApi_ListOpenapiVersionsWithParams_Call { + _c.Call.Return(run) + return _c +} + +// NewOpenAPIApi creates a new instance of OpenAPIApi. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewOpenAPIApi(t interface { + mock.TestingT + Cleanup(func()) +}) *OpenAPIApi { + mock := &OpenAPIApi{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mockadmin/organizations_api.go b/mockadmin/organizations_api.go index 47412dbcd..48e6fbe3f 100644 --- a/mockadmin/organizations_api.go +++ b/mockadmin/organizations_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/performance_advisor_api.go b/mockadmin/performance_advisor_api.go index fa61b91a4..8eb0026e5 100644 --- a/mockadmin/performance_advisor_api.go +++ b/mockadmin/performance_advisor_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/private_endpoint_services_api.go b/mockadmin/private_endpoint_services_api.go index 23e5dc497..8271bcfb3 100644 --- a/mockadmin/private_endpoint_services_api.go +++ b/mockadmin/private_endpoint_services_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/programmatic_api_keys_api.go b/mockadmin/programmatic_api_keys_api.go index ed706ffc9..ee042dd59 100644 --- a/mockadmin/programmatic_api_keys_api.go +++ b/mockadmin/programmatic_api_keys_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/project_ip_access_list_api.go b/mockadmin/project_ip_access_list_api.go index 45d072ea9..40ecc6b1d 100644 --- a/mockadmin/project_ip_access_list_api.go +++ b/mockadmin/project_ip_access_list_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/projects_api.go b/mockadmin/projects_api.go index c71644cad..0034aeaf8 100644 --- a/mockadmin/projects_api.go +++ b/mockadmin/projects_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/push_based_log_export_api.go b/mockadmin/push_based_log_export_api.go index 27b9f4d22..5a7551adf 100644 --- a/mockadmin/push_based_log_export_api.go +++ b/mockadmin/push_based_log_export_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" @@ -25,6 +25,168 @@ func (_m *PushBasedLogExportApi) EXPECT() *PushBasedLogExportApi_Expecter { return &PushBasedLogExportApi_Expecter{mock: &_m.Mock} } +// CreateGroupLogIntegration provides a mock function with given fields: ctx, groupId, s3LogIntegrationRequest +func (_m *PushBasedLogExportApi) CreateGroupLogIntegration(ctx context.Context, groupId string, s3LogIntegrationRequest *admin.S3LogIntegrationRequest) admin.CreateGroupLogIntegrationApiRequest { + ret := _m.Called(ctx, groupId, s3LogIntegrationRequest) + + if len(ret) == 0 { + panic("no return value specified for CreateGroupLogIntegration") + } + + var r0 admin.CreateGroupLogIntegrationApiRequest + if rf, ok := ret.Get(0).(func(context.Context, string, *admin.S3LogIntegrationRequest) admin.CreateGroupLogIntegrationApiRequest); ok { + r0 = rf(ctx, groupId, s3LogIntegrationRequest) + } else { + r0 = ret.Get(0).(admin.CreateGroupLogIntegrationApiRequest) + } + + return r0 +} + +// PushBasedLogExportApi_CreateGroupLogIntegration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateGroupLogIntegration' +type PushBasedLogExportApi_CreateGroupLogIntegration_Call struct { + *mock.Call +} + +// CreateGroupLogIntegration is a helper method to define mock.On call +// - ctx context.Context +// - groupId string +// - s3LogIntegrationRequest *admin.S3LogIntegrationRequest +func (_e *PushBasedLogExportApi_Expecter) CreateGroupLogIntegration(ctx any, groupId any, s3LogIntegrationRequest any) *PushBasedLogExportApi_CreateGroupLogIntegration_Call { + return &PushBasedLogExportApi_CreateGroupLogIntegration_Call{Call: _e.mock.On("CreateGroupLogIntegration", ctx, groupId, s3LogIntegrationRequest)} +} + +func (_c *PushBasedLogExportApi_CreateGroupLogIntegration_Call) Run(run func(ctx context.Context, groupId string, s3LogIntegrationRequest *admin.S3LogIntegrationRequest)) *PushBasedLogExportApi_CreateGroupLogIntegration_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(*admin.S3LogIntegrationRequest)) + }) + return _c +} + +func (_c *PushBasedLogExportApi_CreateGroupLogIntegration_Call) Return(_a0 admin.CreateGroupLogIntegrationApiRequest) *PushBasedLogExportApi_CreateGroupLogIntegration_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PushBasedLogExportApi_CreateGroupLogIntegration_Call) RunAndReturn(run func(context.Context, string, *admin.S3LogIntegrationRequest) admin.CreateGroupLogIntegrationApiRequest) *PushBasedLogExportApi_CreateGroupLogIntegration_Call { + _c.Call.Return(run) + return _c +} + +// CreateGroupLogIntegrationExecute provides a mock function with given fields: r +func (_m *PushBasedLogExportApi) CreateGroupLogIntegrationExecute(r admin.CreateGroupLogIntegrationApiRequest) (*admin.LogIntegrationResponse, *http.Response, error) { + ret := _m.Called(r) + + if len(ret) == 0 { + panic("no return value specified for CreateGroupLogIntegrationExecute") + } + + var r0 *admin.LogIntegrationResponse + var r1 *http.Response + var r2 error + if rf, ok := ret.Get(0).(func(admin.CreateGroupLogIntegrationApiRequest) (*admin.LogIntegrationResponse, *http.Response, error)); ok { + return rf(r) + } + if rf, ok := ret.Get(0).(func(admin.CreateGroupLogIntegrationApiRequest) *admin.LogIntegrationResponse); ok { + r0 = rf(r) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.LogIntegrationResponse) + } + } + + if rf, ok := ret.Get(1).(func(admin.CreateGroupLogIntegrationApiRequest) *http.Response); ok { + r1 = rf(r) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*http.Response) + } + } + + if rf, ok := ret.Get(2).(func(admin.CreateGroupLogIntegrationApiRequest) error); ok { + r2 = rf(r) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +// PushBasedLogExportApi_CreateGroupLogIntegrationExecute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateGroupLogIntegrationExecute' +type PushBasedLogExportApi_CreateGroupLogIntegrationExecute_Call struct { + *mock.Call +} + +// CreateGroupLogIntegrationExecute is a helper method to define mock.On call +// - r admin.CreateGroupLogIntegrationApiRequest +func (_e *PushBasedLogExportApi_Expecter) CreateGroupLogIntegrationExecute(r any) *PushBasedLogExportApi_CreateGroupLogIntegrationExecute_Call { + return &PushBasedLogExportApi_CreateGroupLogIntegrationExecute_Call{Call: _e.mock.On("CreateGroupLogIntegrationExecute", r)} +} + +func (_c *PushBasedLogExportApi_CreateGroupLogIntegrationExecute_Call) Run(run func(r admin.CreateGroupLogIntegrationApiRequest)) *PushBasedLogExportApi_CreateGroupLogIntegrationExecute_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(admin.CreateGroupLogIntegrationApiRequest)) + }) + return _c +} + +func (_c *PushBasedLogExportApi_CreateGroupLogIntegrationExecute_Call) Return(_a0 *admin.LogIntegrationResponse, _a1 *http.Response, _a2 error) *PushBasedLogExportApi_CreateGroupLogIntegrationExecute_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *PushBasedLogExportApi_CreateGroupLogIntegrationExecute_Call) RunAndReturn(run func(admin.CreateGroupLogIntegrationApiRequest) (*admin.LogIntegrationResponse, *http.Response, error)) *PushBasedLogExportApi_CreateGroupLogIntegrationExecute_Call { + _c.Call.Return(run) + return _c +} + +// CreateGroupLogIntegrationWithParams provides a mock function with given fields: ctx, args +func (_m *PushBasedLogExportApi) CreateGroupLogIntegrationWithParams(ctx context.Context, args *admin.CreateGroupLogIntegrationApiParams) admin.CreateGroupLogIntegrationApiRequest { + ret := _m.Called(ctx, args) + + if len(ret) == 0 { + panic("no return value specified for CreateGroupLogIntegrationWithParams") + } + + var r0 admin.CreateGroupLogIntegrationApiRequest + if rf, ok := ret.Get(0).(func(context.Context, *admin.CreateGroupLogIntegrationApiParams) admin.CreateGroupLogIntegrationApiRequest); ok { + r0 = rf(ctx, args) + } else { + r0 = ret.Get(0).(admin.CreateGroupLogIntegrationApiRequest) + } + + return r0 +} + +// PushBasedLogExportApi_CreateGroupLogIntegrationWithParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateGroupLogIntegrationWithParams' +type PushBasedLogExportApi_CreateGroupLogIntegrationWithParams_Call struct { + *mock.Call +} + +// CreateGroupLogIntegrationWithParams is a helper method to define mock.On call +// - ctx context.Context +// - args *admin.CreateGroupLogIntegrationApiParams +func (_e *PushBasedLogExportApi_Expecter) CreateGroupLogIntegrationWithParams(ctx any, args any) *PushBasedLogExportApi_CreateGroupLogIntegrationWithParams_Call { + return &PushBasedLogExportApi_CreateGroupLogIntegrationWithParams_Call{Call: _e.mock.On("CreateGroupLogIntegrationWithParams", ctx, args)} +} + +func (_c *PushBasedLogExportApi_CreateGroupLogIntegrationWithParams_Call) Run(run func(ctx context.Context, args *admin.CreateGroupLogIntegrationApiParams)) *PushBasedLogExportApi_CreateGroupLogIntegrationWithParams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*admin.CreateGroupLogIntegrationApiParams)) + }) + return _c +} + +func (_c *PushBasedLogExportApi_CreateGroupLogIntegrationWithParams_Call) Return(_a0 admin.CreateGroupLogIntegrationApiRequest) *PushBasedLogExportApi_CreateGroupLogIntegrationWithParams_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PushBasedLogExportApi_CreateGroupLogIntegrationWithParams_Call) RunAndReturn(run func(context.Context, *admin.CreateGroupLogIntegrationApiParams) admin.CreateGroupLogIntegrationApiRequest) *PushBasedLogExportApi_CreateGroupLogIntegrationWithParams_Call { + _c.Call.Return(run) + return _c +} + // CreateLogExport provides a mock function with given fields: ctx, groupId, createPushBasedLogExportProjectRequest func (_m *PushBasedLogExportApi) CreateLogExport(ctx context.Context, groupId string, createPushBasedLogExportProjectRequest *admin.CreatePushBasedLogExportProjectRequest) admin.CreateLogExportApiRequest { ret := _m.Called(ctx, groupId, createPushBasedLogExportProjectRequest) @@ -178,6 +340,159 @@ func (_c *PushBasedLogExportApi_CreateLogExportWithParams_Call) RunAndReturn(run return _c } +// DeleteGroupLogIntegration provides a mock function with given fields: ctx, groupId, id +func (_m *PushBasedLogExportApi) DeleteGroupLogIntegration(ctx context.Context, groupId string, id string) admin.DeleteGroupLogIntegrationApiRequest { + ret := _m.Called(ctx, groupId, id) + + if len(ret) == 0 { + panic("no return value specified for DeleteGroupLogIntegration") + } + + var r0 admin.DeleteGroupLogIntegrationApiRequest + if rf, ok := ret.Get(0).(func(context.Context, string, string) admin.DeleteGroupLogIntegrationApiRequest); ok { + r0 = rf(ctx, groupId, id) + } else { + r0 = ret.Get(0).(admin.DeleteGroupLogIntegrationApiRequest) + } + + return r0 +} + +// PushBasedLogExportApi_DeleteGroupLogIntegration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteGroupLogIntegration' +type PushBasedLogExportApi_DeleteGroupLogIntegration_Call struct { + *mock.Call +} + +// DeleteGroupLogIntegration is a helper method to define mock.On call +// - ctx context.Context +// - groupId string +// - id string +func (_e *PushBasedLogExportApi_Expecter) DeleteGroupLogIntegration(ctx any, groupId any, id any) *PushBasedLogExportApi_DeleteGroupLogIntegration_Call { + return &PushBasedLogExportApi_DeleteGroupLogIntegration_Call{Call: _e.mock.On("DeleteGroupLogIntegration", ctx, groupId, id)} +} + +func (_c *PushBasedLogExportApi_DeleteGroupLogIntegration_Call) Run(run func(ctx context.Context, groupId string, id string)) *PushBasedLogExportApi_DeleteGroupLogIntegration_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *PushBasedLogExportApi_DeleteGroupLogIntegration_Call) Return(_a0 admin.DeleteGroupLogIntegrationApiRequest) *PushBasedLogExportApi_DeleteGroupLogIntegration_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PushBasedLogExportApi_DeleteGroupLogIntegration_Call) RunAndReturn(run func(context.Context, string, string) admin.DeleteGroupLogIntegrationApiRequest) *PushBasedLogExportApi_DeleteGroupLogIntegration_Call { + _c.Call.Return(run) + return _c +} + +// DeleteGroupLogIntegrationExecute provides a mock function with given fields: r +func (_m *PushBasedLogExportApi) DeleteGroupLogIntegrationExecute(r admin.DeleteGroupLogIntegrationApiRequest) (*http.Response, error) { + ret := _m.Called(r) + + if len(ret) == 0 { + panic("no return value specified for DeleteGroupLogIntegrationExecute") + } + + var r0 *http.Response + var r1 error + if rf, ok := ret.Get(0).(func(admin.DeleteGroupLogIntegrationApiRequest) (*http.Response, error)); ok { + return rf(r) + } + if rf, ok := ret.Get(0).(func(admin.DeleteGroupLogIntegrationApiRequest) *http.Response); ok { + r0 = rf(r) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*http.Response) + } + } + + if rf, ok := ret.Get(1).(func(admin.DeleteGroupLogIntegrationApiRequest) error); ok { + r1 = rf(r) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PushBasedLogExportApi_DeleteGroupLogIntegrationExecute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteGroupLogIntegrationExecute' +type PushBasedLogExportApi_DeleteGroupLogIntegrationExecute_Call struct { + *mock.Call +} + +// DeleteGroupLogIntegrationExecute is a helper method to define mock.On call +// - r admin.DeleteGroupLogIntegrationApiRequest +func (_e *PushBasedLogExportApi_Expecter) DeleteGroupLogIntegrationExecute(r any) *PushBasedLogExportApi_DeleteGroupLogIntegrationExecute_Call { + return &PushBasedLogExportApi_DeleteGroupLogIntegrationExecute_Call{Call: _e.mock.On("DeleteGroupLogIntegrationExecute", r)} +} + +func (_c *PushBasedLogExportApi_DeleteGroupLogIntegrationExecute_Call) Run(run func(r admin.DeleteGroupLogIntegrationApiRequest)) *PushBasedLogExportApi_DeleteGroupLogIntegrationExecute_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(admin.DeleteGroupLogIntegrationApiRequest)) + }) + return _c +} + +func (_c *PushBasedLogExportApi_DeleteGroupLogIntegrationExecute_Call) Return(_a0 *http.Response, _a1 error) *PushBasedLogExportApi_DeleteGroupLogIntegrationExecute_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *PushBasedLogExportApi_DeleteGroupLogIntegrationExecute_Call) RunAndReturn(run func(admin.DeleteGroupLogIntegrationApiRequest) (*http.Response, error)) *PushBasedLogExportApi_DeleteGroupLogIntegrationExecute_Call { + _c.Call.Return(run) + return _c +} + +// DeleteGroupLogIntegrationWithParams provides a mock function with given fields: ctx, args +func (_m *PushBasedLogExportApi) DeleteGroupLogIntegrationWithParams(ctx context.Context, args *admin.DeleteGroupLogIntegrationApiParams) admin.DeleteGroupLogIntegrationApiRequest { + ret := _m.Called(ctx, args) + + if len(ret) == 0 { + panic("no return value specified for DeleteGroupLogIntegrationWithParams") + } + + var r0 admin.DeleteGroupLogIntegrationApiRequest + if rf, ok := ret.Get(0).(func(context.Context, *admin.DeleteGroupLogIntegrationApiParams) admin.DeleteGroupLogIntegrationApiRequest); ok { + r0 = rf(ctx, args) + } else { + r0 = ret.Get(0).(admin.DeleteGroupLogIntegrationApiRequest) + } + + return r0 +} + +// PushBasedLogExportApi_DeleteGroupLogIntegrationWithParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteGroupLogIntegrationWithParams' +type PushBasedLogExportApi_DeleteGroupLogIntegrationWithParams_Call struct { + *mock.Call +} + +// DeleteGroupLogIntegrationWithParams is a helper method to define mock.On call +// - ctx context.Context +// - args *admin.DeleteGroupLogIntegrationApiParams +func (_e *PushBasedLogExportApi_Expecter) DeleteGroupLogIntegrationWithParams(ctx any, args any) *PushBasedLogExportApi_DeleteGroupLogIntegrationWithParams_Call { + return &PushBasedLogExportApi_DeleteGroupLogIntegrationWithParams_Call{Call: _e.mock.On("DeleteGroupLogIntegrationWithParams", ctx, args)} +} + +func (_c *PushBasedLogExportApi_DeleteGroupLogIntegrationWithParams_Call) Run(run func(ctx context.Context, args *admin.DeleteGroupLogIntegrationApiParams)) *PushBasedLogExportApi_DeleteGroupLogIntegrationWithParams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*admin.DeleteGroupLogIntegrationApiParams)) + }) + return _c +} + +func (_c *PushBasedLogExportApi_DeleteGroupLogIntegrationWithParams_Call) Return(_a0 admin.DeleteGroupLogIntegrationApiRequest) *PushBasedLogExportApi_DeleteGroupLogIntegrationWithParams_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PushBasedLogExportApi_DeleteGroupLogIntegrationWithParams_Call) RunAndReturn(run func(context.Context, *admin.DeleteGroupLogIntegrationApiParams) admin.DeleteGroupLogIntegrationApiRequest) *PushBasedLogExportApi_DeleteGroupLogIntegrationWithParams_Call { + _c.Call.Return(run) + return _c +} + // DeleteLogExport provides a mock function with given fields: ctx, groupId func (_m *PushBasedLogExportApi) DeleteLogExport(ctx context.Context, groupId string) admin.DeleteLogExportApiRequest { ret := _m.Called(ctx, groupId) @@ -330,76 +645,77 @@ func (_c *PushBasedLogExportApi_DeleteLogExportWithParams_Call) RunAndReturn(run return _c } -// GetLogExport provides a mock function with given fields: ctx, groupId -func (_m *PushBasedLogExportApi) GetLogExport(ctx context.Context, groupId string) admin.GetLogExportApiRequest { - ret := _m.Called(ctx, groupId) +// GetGroupLogIntegration provides a mock function with given fields: ctx, groupId, id +func (_m *PushBasedLogExportApi) GetGroupLogIntegration(ctx context.Context, groupId string, id string) admin.GetGroupLogIntegrationApiRequest { + ret := _m.Called(ctx, groupId, id) if len(ret) == 0 { - panic("no return value specified for GetLogExport") + panic("no return value specified for GetGroupLogIntegration") } - var r0 admin.GetLogExportApiRequest - if rf, ok := ret.Get(0).(func(context.Context, string) admin.GetLogExportApiRequest); ok { - r0 = rf(ctx, groupId) + var r0 admin.GetGroupLogIntegrationApiRequest + if rf, ok := ret.Get(0).(func(context.Context, string, string) admin.GetGroupLogIntegrationApiRequest); ok { + r0 = rf(ctx, groupId, id) } else { - r0 = ret.Get(0).(admin.GetLogExportApiRequest) + r0 = ret.Get(0).(admin.GetGroupLogIntegrationApiRequest) } return r0 } -// PushBasedLogExportApi_GetLogExport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogExport' -type PushBasedLogExportApi_GetLogExport_Call struct { +// PushBasedLogExportApi_GetGroupLogIntegration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGroupLogIntegration' +type PushBasedLogExportApi_GetGroupLogIntegration_Call struct { *mock.Call } -// GetLogExport is a helper method to define mock.On call +// GetGroupLogIntegration is a helper method to define mock.On call // - ctx context.Context // - groupId string -func (_e *PushBasedLogExportApi_Expecter) GetLogExport(ctx any, groupId any) *PushBasedLogExportApi_GetLogExport_Call { - return &PushBasedLogExportApi_GetLogExport_Call{Call: _e.mock.On("GetLogExport", ctx, groupId)} +// - id string +func (_e *PushBasedLogExportApi_Expecter) GetGroupLogIntegration(ctx any, groupId any, id any) *PushBasedLogExportApi_GetGroupLogIntegration_Call { + return &PushBasedLogExportApi_GetGroupLogIntegration_Call{Call: _e.mock.On("GetGroupLogIntegration", ctx, groupId, id)} } -func (_c *PushBasedLogExportApi_GetLogExport_Call) Run(run func(ctx context.Context, groupId string)) *PushBasedLogExportApi_GetLogExport_Call { +func (_c *PushBasedLogExportApi_GetGroupLogIntegration_Call) Run(run func(ctx context.Context, groupId string, id string)) *PushBasedLogExportApi_GetGroupLogIntegration_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + run(args[0].(context.Context), args[1].(string), args[2].(string)) }) return _c } -func (_c *PushBasedLogExportApi_GetLogExport_Call) Return(_a0 admin.GetLogExportApiRequest) *PushBasedLogExportApi_GetLogExport_Call { +func (_c *PushBasedLogExportApi_GetGroupLogIntegration_Call) Return(_a0 admin.GetGroupLogIntegrationApiRequest) *PushBasedLogExportApi_GetGroupLogIntegration_Call { _c.Call.Return(_a0) return _c } -func (_c *PushBasedLogExportApi_GetLogExport_Call) RunAndReturn(run func(context.Context, string) admin.GetLogExportApiRequest) *PushBasedLogExportApi_GetLogExport_Call { +func (_c *PushBasedLogExportApi_GetGroupLogIntegration_Call) RunAndReturn(run func(context.Context, string, string) admin.GetGroupLogIntegrationApiRequest) *PushBasedLogExportApi_GetGroupLogIntegration_Call { _c.Call.Return(run) return _c } -// GetLogExportExecute provides a mock function with given fields: r -func (_m *PushBasedLogExportApi) GetLogExportExecute(r admin.GetLogExportApiRequest) (*admin.PushBasedLogExportProject, *http.Response, error) { +// GetGroupLogIntegrationExecute provides a mock function with given fields: r +func (_m *PushBasedLogExportApi) GetGroupLogIntegrationExecute(r admin.GetGroupLogIntegrationApiRequest) (*admin.LogIntegrationResponse, *http.Response, error) { ret := _m.Called(r) if len(ret) == 0 { - panic("no return value specified for GetLogExportExecute") + panic("no return value specified for GetGroupLogIntegrationExecute") } - var r0 *admin.PushBasedLogExportProject + var r0 *admin.LogIntegrationResponse var r1 *http.Response var r2 error - if rf, ok := ret.Get(0).(func(admin.GetLogExportApiRequest) (*admin.PushBasedLogExportProject, *http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(admin.GetGroupLogIntegrationApiRequest) (*admin.LogIntegrationResponse, *http.Response, error)); ok { return rf(r) } - if rf, ok := ret.Get(0).(func(admin.GetLogExportApiRequest) *admin.PushBasedLogExportProject); ok { + if rf, ok := ret.Get(0).(func(admin.GetGroupLogIntegrationApiRequest) *admin.LogIntegrationResponse); ok { r0 = rf(r) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*admin.PushBasedLogExportProject) + r0 = ret.Get(0).(*admin.LogIntegrationResponse) } } - if rf, ok := ret.Get(1).(func(admin.GetLogExportApiRequest) *http.Response); ok { + if rf, ok := ret.Get(1).(func(admin.GetGroupLogIntegrationApiRequest) *http.Response); ok { r1 = rf(r) } else { if ret.Get(1) != nil { @@ -407,7 +723,7 @@ func (_m *PushBasedLogExportApi) GetLogExportExecute(r admin.GetLogExportApiRequ } } - if rf, ok := ret.Get(2).(func(admin.GetLogExportApiRequest) error); ok { + if rf, ok := ret.Get(2).(func(admin.GetGroupLogIntegrationApiRequest) error); ok { r2 = rf(r) } else { r2 = ret.Error(2) @@ -416,54 +732,215 @@ func (_m *PushBasedLogExportApi) GetLogExportExecute(r admin.GetLogExportApiRequ return r0, r1, r2 } -// PushBasedLogExportApi_GetLogExportExecute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogExportExecute' -type PushBasedLogExportApi_GetLogExportExecute_Call struct { +// PushBasedLogExportApi_GetGroupLogIntegrationExecute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGroupLogIntegrationExecute' +type PushBasedLogExportApi_GetGroupLogIntegrationExecute_Call struct { *mock.Call } -// GetLogExportExecute is a helper method to define mock.On call -// - r admin.GetLogExportApiRequest -func (_e *PushBasedLogExportApi_Expecter) GetLogExportExecute(r any) *PushBasedLogExportApi_GetLogExportExecute_Call { - return &PushBasedLogExportApi_GetLogExportExecute_Call{Call: _e.mock.On("GetLogExportExecute", r)} +// GetGroupLogIntegrationExecute is a helper method to define mock.On call +// - r admin.GetGroupLogIntegrationApiRequest +func (_e *PushBasedLogExportApi_Expecter) GetGroupLogIntegrationExecute(r any) *PushBasedLogExportApi_GetGroupLogIntegrationExecute_Call { + return &PushBasedLogExportApi_GetGroupLogIntegrationExecute_Call{Call: _e.mock.On("GetGroupLogIntegrationExecute", r)} } -func (_c *PushBasedLogExportApi_GetLogExportExecute_Call) Run(run func(r admin.GetLogExportApiRequest)) *PushBasedLogExportApi_GetLogExportExecute_Call { +func (_c *PushBasedLogExportApi_GetGroupLogIntegrationExecute_Call) Run(run func(r admin.GetGroupLogIntegrationApiRequest)) *PushBasedLogExportApi_GetGroupLogIntegrationExecute_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(admin.GetLogExportApiRequest)) + run(args[0].(admin.GetGroupLogIntegrationApiRequest)) }) return _c } -func (_c *PushBasedLogExportApi_GetLogExportExecute_Call) Return(_a0 *admin.PushBasedLogExportProject, _a1 *http.Response, _a2 error) *PushBasedLogExportApi_GetLogExportExecute_Call { +func (_c *PushBasedLogExportApi_GetGroupLogIntegrationExecute_Call) Return(_a0 *admin.LogIntegrationResponse, _a1 *http.Response, _a2 error) *PushBasedLogExportApi_GetGroupLogIntegrationExecute_Call { _c.Call.Return(_a0, _a1, _a2) return _c } -func (_c *PushBasedLogExportApi_GetLogExportExecute_Call) RunAndReturn(run func(admin.GetLogExportApiRequest) (*admin.PushBasedLogExportProject, *http.Response, error)) *PushBasedLogExportApi_GetLogExportExecute_Call { +func (_c *PushBasedLogExportApi_GetGroupLogIntegrationExecute_Call) RunAndReturn(run func(admin.GetGroupLogIntegrationApiRequest) (*admin.LogIntegrationResponse, *http.Response, error)) *PushBasedLogExportApi_GetGroupLogIntegrationExecute_Call { _c.Call.Return(run) return _c } -// GetLogExportWithParams provides a mock function with given fields: ctx, args -func (_m *PushBasedLogExportApi) GetLogExportWithParams(ctx context.Context, args *admin.GetLogExportApiParams) admin.GetLogExportApiRequest { +// GetGroupLogIntegrationWithParams provides a mock function with given fields: ctx, args +func (_m *PushBasedLogExportApi) GetGroupLogIntegrationWithParams(ctx context.Context, args *admin.GetGroupLogIntegrationApiParams) admin.GetGroupLogIntegrationApiRequest { ret := _m.Called(ctx, args) if len(ret) == 0 { - panic("no return value specified for GetLogExportWithParams") + panic("no return value specified for GetGroupLogIntegrationWithParams") } - var r0 admin.GetLogExportApiRequest - if rf, ok := ret.Get(0).(func(context.Context, *admin.GetLogExportApiParams) admin.GetLogExportApiRequest); ok { + var r0 admin.GetGroupLogIntegrationApiRequest + if rf, ok := ret.Get(0).(func(context.Context, *admin.GetGroupLogIntegrationApiParams) admin.GetGroupLogIntegrationApiRequest); ok { r0 = rf(ctx, args) } else { - r0 = ret.Get(0).(admin.GetLogExportApiRequest) + r0 = ret.Get(0).(admin.GetGroupLogIntegrationApiRequest) } return r0 } -// PushBasedLogExportApi_GetLogExportWithParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogExportWithParams' -type PushBasedLogExportApi_GetLogExportWithParams_Call struct { +// PushBasedLogExportApi_GetGroupLogIntegrationWithParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGroupLogIntegrationWithParams' +type PushBasedLogExportApi_GetGroupLogIntegrationWithParams_Call struct { + *mock.Call +} + +// GetGroupLogIntegrationWithParams is a helper method to define mock.On call +// - ctx context.Context +// - args *admin.GetGroupLogIntegrationApiParams +func (_e *PushBasedLogExportApi_Expecter) GetGroupLogIntegrationWithParams(ctx any, args any) *PushBasedLogExportApi_GetGroupLogIntegrationWithParams_Call { + return &PushBasedLogExportApi_GetGroupLogIntegrationWithParams_Call{Call: _e.mock.On("GetGroupLogIntegrationWithParams", ctx, args)} +} + +func (_c *PushBasedLogExportApi_GetGroupLogIntegrationWithParams_Call) Run(run func(ctx context.Context, args *admin.GetGroupLogIntegrationApiParams)) *PushBasedLogExportApi_GetGroupLogIntegrationWithParams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*admin.GetGroupLogIntegrationApiParams)) + }) + return _c +} + +func (_c *PushBasedLogExportApi_GetGroupLogIntegrationWithParams_Call) Return(_a0 admin.GetGroupLogIntegrationApiRequest) *PushBasedLogExportApi_GetGroupLogIntegrationWithParams_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PushBasedLogExportApi_GetGroupLogIntegrationWithParams_Call) RunAndReturn(run func(context.Context, *admin.GetGroupLogIntegrationApiParams) admin.GetGroupLogIntegrationApiRequest) *PushBasedLogExportApi_GetGroupLogIntegrationWithParams_Call { + _c.Call.Return(run) + return _c +} + +// GetLogExport provides a mock function with given fields: ctx, groupId +func (_m *PushBasedLogExportApi) GetLogExport(ctx context.Context, groupId string) admin.GetLogExportApiRequest { + ret := _m.Called(ctx, groupId) + + if len(ret) == 0 { + panic("no return value specified for GetLogExport") + } + + var r0 admin.GetLogExportApiRequest + if rf, ok := ret.Get(0).(func(context.Context, string) admin.GetLogExportApiRequest); ok { + r0 = rf(ctx, groupId) + } else { + r0 = ret.Get(0).(admin.GetLogExportApiRequest) + } + + return r0 +} + +// PushBasedLogExportApi_GetLogExport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogExport' +type PushBasedLogExportApi_GetLogExport_Call struct { + *mock.Call +} + +// GetLogExport is a helper method to define mock.On call +// - ctx context.Context +// - groupId string +func (_e *PushBasedLogExportApi_Expecter) GetLogExport(ctx any, groupId any) *PushBasedLogExportApi_GetLogExport_Call { + return &PushBasedLogExportApi_GetLogExport_Call{Call: _e.mock.On("GetLogExport", ctx, groupId)} +} + +func (_c *PushBasedLogExportApi_GetLogExport_Call) Run(run func(ctx context.Context, groupId string)) *PushBasedLogExportApi_GetLogExport_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *PushBasedLogExportApi_GetLogExport_Call) Return(_a0 admin.GetLogExportApiRequest) *PushBasedLogExportApi_GetLogExport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PushBasedLogExportApi_GetLogExport_Call) RunAndReturn(run func(context.Context, string) admin.GetLogExportApiRequest) *PushBasedLogExportApi_GetLogExport_Call { + _c.Call.Return(run) + return _c +} + +// GetLogExportExecute provides a mock function with given fields: r +func (_m *PushBasedLogExportApi) GetLogExportExecute(r admin.GetLogExportApiRequest) (*admin.PushBasedLogExportProject, *http.Response, error) { + ret := _m.Called(r) + + if len(ret) == 0 { + panic("no return value specified for GetLogExportExecute") + } + + var r0 *admin.PushBasedLogExportProject + var r1 *http.Response + var r2 error + if rf, ok := ret.Get(0).(func(admin.GetLogExportApiRequest) (*admin.PushBasedLogExportProject, *http.Response, error)); ok { + return rf(r) + } + if rf, ok := ret.Get(0).(func(admin.GetLogExportApiRequest) *admin.PushBasedLogExportProject); ok { + r0 = rf(r) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.PushBasedLogExportProject) + } + } + + if rf, ok := ret.Get(1).(func(admin.GetLogExportApiRequest) *http.Response); ok { + r1 = rf(r) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*http.Response) + } + } + + if rf, ok := ret.Get(2).(func(admin.GetLogExportApiRequest) error); ok { + r2 = rf(r) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +// PushBasedLogExportApi_GetLogExportExecute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogExportExecute' +type PushBasedLogExportApi_GetLogExportExecute_Call struct { + *mock.Call +} + +// GetLogExportExecute is a helper method to define mock.On call +// - r admin.GetLogExportApiRequest +func (_e *PushBasedLogExportApi_Expecter) GetLogExportExecute(r any) *PushBasedLogExportApi_GetLogExportExecute_Call { + return &PushBasedLogExportApi_GetLogExportExecute_Call{Call: _e.mock.On("GetLogExportExecute", r)} +} + +func (_c *PushBasedLogExportApi_GetLogExportExecute_Call) Run(run func(r admin.GetLogExportApiRequest)) *PushBasedLogExportApi_GetLogExportExecute_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(admin.GetLogExportApiRequest)) + }) + return _c +} + +func (_c *PushBasedLogExportApi_GetLogExportExecute_Call) Return(_a0 *admin.PushBasedLogExportProject, _a1 *http.Response, _a2 error) *PushBasedLogExportApi_GetLogExportExecute_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *PushBasedLogExportApi_GetLogExportExecute_Call) RunAndReturn(run func(admin.GetLogExportApiRequest) (*admin.PushBasedLogExportProject, *http.Response, error)) *PushBasedLogExportApi_GetLogExportExecute_Call { + _c.Call.Return(run) + return _c +} + +// GetLogExportWithParams provides a mock function with given fields: ctx, args +func (_m *PushBasedLogExportApi) GetLogExportWithParams(ctx context.Context, args *admin.GetLogExportApiParams) admin.GetLogExportApiRequest { + ret := _m.Called(ctx, args) + + if len(ret) == 0 { + panic("no return value specified for GetLogExportWithParams") + } + + var r0 admin.GetLogExportApiRequest + if rf, ok := ret.Get(0).(func(context.Context, *admin.GetLogExportApiParams) admin.GetLogExportApiRequest); ok { + r0 = rf(ctx, args) + } else { + r0 = ret.Get(0).(admin.GetLogExportApiRequest) + } + + return r0 +} + +// PushBasedLogExportApi_GetLogExportWithParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogExportWithParams' +type PushBasedLogExportApi_GetLogExportWithParams_Call struct { *mock.Call } @@ -491,6 +968,330 @@ func (_c *PushBasedLogExportApi_GetLogExportWithParams_Call) RunAndReturn(run fu return _c } +// ListGroupLogIntegrations provides a mock function with given fields: ctx, groupId +func (_m *PushBasedLogExportApi) ListGroupLogIntegrations(ctx context.Context, groupId string) admin.ListGroupLogIntegrationsApiRequest { + ret := _m.Called(ctx, groupId) + + if len(ret) == 0 { + panic("no return value specified for ListGroupLogIntegrations") + } + + var r0 admin.ListGroupLogIntegrationsApiRequest + if rf, ok := ret.Get(0).(func(context.Context, string) admin.ListGroupLogIntegrationsApiRequest); ok { + r0 = rf(ctx, groupId) + } else { + r0 = ret.Get(0).(admin.ListGroupLogIntegrationsApiRequest) + } + + return r0 +} + +// PushBasedLogExportApi_ListGroupLogIntegrations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListGroupLogIntegrations' +type PushBasedLogExportApi_ListGroupLogIntegrations_Call struct { + *mock.Call +} + +// ListGroupLogIntegrations is a helper method to define mock.On call +// - ctx context.Context +// - groupId string +func (_e *PushBasedLogExportApi_Expecter) ListGroupLogIntegrations(ctx any, groupId any) *PushBasedLogExportApi_ListGroupLogIntegrations_Call { + return &PushBasedLogExportApi_ListGroupLogIntegrations_Call{Call: _e.mock.On("ListGroupLogIntegrations", ctx, groupId)} +} + +func (_c *PushBasedLogExportApi_ListGroupLogIntegrations_Call) Run(run func(ctx context.Context, groupId string)) *PushBasedLogExportApi_ListGroupLogIntegrations_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *PushBasedLogExportApi_ListGroupLogIntegrations_Call) Return(_a0 admin.ListGroupLogIntegrationsApiRequest) *PushBasedLogExportApi_ListGroupLogIntegrations_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PushBasedLogExportApi_ListGroupLogIntegrations_Call) RunAndReturn(run func(context.Context, string) admin.ListGroupLogIntegrationsApiRequest) *PushBasedLogExportApi_ListGroupLogIntegrations_Call { + _c.Call.Return(run) + return _c +} + +// ListGroupLogIntegrationsExecute provides a mock function with given fields: r +func (_m *PushBasedLogExportApi) ListGroupLogIntegrationsExecute(r admin.ListGroupLogIntegrationsApiRequest) (*admin.PaginatedLogIntegrationResponse, *http.Response, error) { + ret := _m.Called(r) + + if len(ret) == 0 { + panic("no return value specified for ListGroupLogIntegrationsExecute") + } + + var r0 *admin.PaginatedLogIntegrationResponse + var r1 *http.Response + var r2 error + if rf, ok := ret.Get(0).(func(admin.ListGroupLogIntegrationsApiRequest) (*admin.PaginatedLogIntegrationResponse, *http.Response, error)); ok { + return rf(r) + } + if rf, ok := ret.Get(0).(func(admin.ListGroupLogIntegrationsApiRequest) *admin.PaginatedLogIntegrationResponse); ok { + r0 = rf(r) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.PaginatedLogIntegrationResponse) + } + } + + if rf, ok := ret.Get(1).(func(admin.ListGroupLogIntegrationsApiRequest) *http.Response); ok { + r1 = rf(r) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*http.Response) + } + } + + if rf, ok := ret.Get(2).(func(admin.ListGroupLogIntegrationsApiRequest) error); ok { + r2 = rf(r) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +// PushBasedLogExportApi_ListGroupLogIntegrationsExecute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListGroupLogIntegrationsExecute' +type PushBasedLogExportApi_ListGroupLogIntegrationsExecute_Call struct { + *mock.Call +} + +// ListGroupLogIntegrationsExecute is a helper method to define mock.On call +// - r admin.ListGroupLogIntegrationsApiRequest +func (_e *PushBasedLogExportApi_Expecter) ListGroupLogIntegrationsExecute(r any) *PushBasedLogExportApi_ListGroupLogIntegrationsExecute_Call { + return &PushBasedLogExportApi_ListGroupLogIntegrationsExecute_Call{Call: _e.mock.On("ListGroupLogIntegrationsExecute", r)} +} + +func (_c *PushBasedLogExportApi_ListGroupLogIntegrationsExecute_Call) Run(run func(r admin.ListGroupLogIntegrationsApiRequest)) *PushBasedLogExportApi_ListGroupLogIntegrationsExecute_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(admin.ListGroupLogIntegrationsApiRequest)) + }) + return _c +} + +func (_c *PushBasedLogExportApi_ListGroupLogIntegrationsExecute_Call) Return(_a0 *admin.PaginatedLogIntegrationResponse, _a1 *http.Response, _a2 error) *PushBasedLogExportApi_ListGroupLogIntegrationsExecute_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *PushBasedLogExportApi_ListGroupLogIntegrationsExecute_Call) RunAndReturn(run func(admin.ListGroupLogIntegrationsApiRequest) (*admin.PaginatedLogIntegrationResponse, *http.Response, error)) *PushBasedLogExportApi_ListGroupLogIntegrationsExecute_Call { + _c.Call.Return(run) + return _c +} + +// ListGroupLogIntegrationsWithParams provides a mock function with given fields: ctx, args +func (_m *PushBasedLogExportApi) ListGroupLogIntegrationsWithParams(ctx context.Context, args *admin.ListGroupLogIntegrationsApiParams) admin.ListGroupLogIntegrationsApiRequest { + ret := _m.Called(ctx, args) + + if len(ret) == 0 { + panic("no return value specified for ListGroupLogIntegrationsWithParams") + } + + var r0 admin.ListGroupLogIntegrationsApiRequest + if rf, ok := ret.Get(0).(func(context.Context, *admin.ListGroupLogIntegrationsApiParams) admin.ListGroupLogIntegrationsApiRequest); ok { + r0 = rf(ctx, args) + } else { + r0 = ret.Get(0).(admin.ListGroupLogIntegrationsApiRequest) + } + + return r0 +} + +// PushBasedLogExportApi_ListGroupLogIntegrationsWithParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListGroupLogIntegrationsWithParams' +type PushBasedLogExportApi_ListGroupLogIntegrationsWithParams_Call struct { + *mock.Call +} + +// ListGroupLogIntegrationsWithParams is a helper method to define mock.On call +// - ctx context.Context +// - args *admin.ListGroupLogIntegrationsApiParams +func (_e *PushBasedLogExportApi_Expecter) ListGroupLogIntegrationsWithParams(ctx any, args any) *PushBasedLogExportApi_ListGroupLogIntegrationsWithParams_Call { + return &PushBasedLogExportApi_ListGroupLogIntegrationsWithParams_Call{Call: _e.mock.On("ListGroupLogIntegrationsWithParams", ctx, args)} +} + +func (_c *PushBasedLogExportApi_ListGroupLogIntegrationsWithParams_Call) Run(run func(ctx context.Context, args *admin.ListGroupLogIntegrationsApiParams)) *PushBasedLogExportApi_ListGroupLogIntegrationsWithParams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*admin.ListGroupLogIntegrationsApiParams)) + }) + return _c +} + +func (_c *PushBasedLogExportApi_ListGroupLogIntegrationsWithParams_Call) Return(_a0 admin.ListGroupLogIntegrationsApiRequest) *PushBasedLogExportApi_ListGroupLogIntegrationsWithParams_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PushBasedLogExportApi_ListGroupLogIntegrationsWithParams_Call) RunAndReturn(run func(context.Context, *admin.ListGroupLogIntegrationsApiParams) admin.ListGroupLogIntegrationsApiRequest) *PushBasedLogExportApi_ListGroupLogIntegrationsWithParams_Call { + _c.Call.Return(run) + return _c +} + +// UpdateGroupLogIntegration provides a mock function with given fields: ctx, groupId, id, logIntegrationRequest +func (_m *PushBasedLogExportApi) UpdateGroupLogIntegration(ctx context.Context, groupId string, id string, logIntegrationRequest *admin.LogIntegrationRequest) admin.UpdateGroupLogIntegrationApiRequest { + ret := _m.Called(ctx, groupId, id, logIntegrationRequest) + + if len(ret) == 0 { + panic("no return value specified for UpdateGroupLogIntegration") + } + + var r0 admin.UpdateGroupLogIntegrationApiRequest + if rf, ok := ret.Get(0).(func(context.Context, string, string, *admin.LogIntegrationRequest) admin.UpdateGroupLogIntegrationApiRequest); ok { + r0 = rf(ctx, groupId, id, logIntegrationRequest) + } else { + r0 = ret.Get(0).(admin.UpdateGroupLogIntegrationApiRequest) + } + + return r0 +} + +// PushBasedLogExportApi_UpdateGroupLogIntegration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateGroupLogIntegration' +type PushBasedLogExportApi_UpdateGroupLogIntegration_Call struct { + *mock.Call +} + +// UpdateGroupLogIntegration is a helper method to define mock.On call +// - ctx context.Context +// - groupId string +// - id string +// - logIntegrationRequest *admin.LogIntegrationRequest +func (_e *PushBasedLogExportApi_Expecter) UpdateGroupLogIntegration(ctx any, groupId any, id any, logIntegrationRequest any) *PushBasedLogExportApi_UpdateGroupLogIntegration_Call { + return &PushBasedLogExportApi_UpdateGroupLogIntegration_Call{Call: _e.mock.On("UpdateGroupLogIntegration", ctx, groupId, id, logIntegrationRequest)} +} + +func (_c *PushBasedLogExportApi_UpdateGroupLogIntegration_Call) Run(run func(ctx context.Context, groupId string, id string, logIntegrationRequest *admin.LogIntegrationRequest)) *PushBasedLogExportApi_UpdateGroupLogIntegration_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(*admin.LogIntegrationRequest)) + }) + return _c +} + +func (_c *PushBasedLogExportApi_UpdateGroupLogIntegration_Call) Return(_a0 admin.UpdateGroupLogIntegrationApiRequest) *PushBasedLogExportApi_UpdateGroupLogIntegration_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PushBasedLogExportApi_UpdateGroupLogIntegration_Call) RunAndReturn(run func(context.Context, string, string, *admin.LogIntegrationRequest) admin.UpdateGroupLogIntegrationApiRequest) *PushBasedLogExportApi_UpdateGroupLogIntegration_Call { + _c.Call.Return(run) + return _c +} + +// UpdateGroupLogIntegrationExecute provides a mock function with given fields: r +func (_m *PushBasedLogExportApi) UpdateGroupLogIntegrationExecute(r admin.UpdateGroupLogIntegrationApiRequest) (*admin.LogIntegrationResponse, *http.Response, error) { + ret := _m.Called(r) + + if len(ret) == 0 { + panic("no return value specified for UpdateGroupLogIntegrationExecute") + } + + var r0 *admin.LogIntegrationResponse + var r1 *http.Response + var r2 error + if rf, ok := ret.Get(0).(func(admin.UpdateGroupLogIntegrationApiRequest) (*admin.LogIntegrationResponse, *http.Response, error)); ok { + return rf(r) + } + if rf, ok := ret.Get(0).(func(admin.UpdateGroupLogIntegrationApiRequest) *admin.LogIntegrationResponse); ok { + r0 = rf(r) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.LogIntegrationResponse) + } + } + + if rf, ok := ret.Get(1).(func(admin.UpdateGroupLogIntegrationApiRequest) *http.Response); ok { + r1 = rf(r) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*http.Response) + } + } + + if rf, ok := ret.Get(2).(func(admin.UpdateGroupLogIntegrationApiRequest) error); ok { + r2 = rf(r) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +// PushBasedLogExportApi_UpdateGroupLogIntegrationExecute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateGroupLogIntegrationExecute' +type PushBasedLogExportApi_UpdateGroupLogIntegrationExecute_Call struct { + *mock.Call +} + +// UpdateGroupLogIntegrationExecute is a helper method to define mock.On call +// - r admin.UpdateGroupLogIntegrationApiRequest +func (_e *PushBasedLogExportApi_Expecter) UpdateGroupLogIntegrationExecute(r any) *PushBasedLogExportApi_UpdateGroupLogIntegrationExecute_Call { + return &PushBasedLogExportApi_UpdateGroupLogIntegrationExecute_Call{Call: _e.mock.On("UpdateGroupLogIntegrationExecute", r)} +} + +func (_c *PushBasedLogExportApi_UpdateGroupLogIntegrationExecute_Call) Run(run func(r admin.UpdateGroupLogIntegrationApiRequest)) *PushBasedLogExportApi_UpdateGroupLogIntegrationExecute_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(admin.UpdateGroupLogIntegrationApiRequest)) + }) + return _c +} + +func (_c *PushBasedLogExportApi_UpdateGroupLogIntegrationExecute_Call) Return(_a0 *admin.LogIntegrationResponse, _a1 *http.Response, _a2 error) *PushBasedLogExportApi_UpdateGroupLogIntegrationExecute_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *PushBasedLogExportApi_UpdateGroupLogIntegrationExecute_Call) RunAndReturn(run func(admin.UpdateGroupLogIntegrationApiRequest) (*admin.LogIntegrationResponse, *http.Response, error)) *PushBasedLogExportApi_UpdateGroupLogIntegrationExecute_Call { + _c.Call.Return(run) + return _c +} + +// UpdateGroupLogIntegrationWithParams provides a mock function with given fields: ctx, args +func (_m *PushBasedLogExportApi) UpdateGroupLogIntegrationWithParams(ctx context.Context, args *admin.UpdateGroupLogIntegrationApiParams) admin.UpdateGroupLogIntegrationApiRequest { + ret := _m.Called(ctx, args) + + if len(ret) == 0 { + panic("no return value specified for UpdateGroupLogIntegrationWithParams") + } + + var r0 admin.UpdateGroupLogIntegrationApiRequest + if rf, ok := ret.Get(0).(func(context.Context, *admin.UpdateGroupLogIntegrationApiParams) admin.UpdateGroupLogIntegrationApiRequest); ok { + r0 = rf(ctx, args) + } else { + r0 = ret.Get(0).(admin.UpdateGroupLogIntegrationApiRequest) + } + + return r0 +} + +// PushBasedLogExportApi_UpdateGroupLogIntegrationWithParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateGroupLogIntegrationWithParams' +type PushBasedLogExportApi_UpdateGroupLogIntegrationWithParams_Call struct { + *mock.Call +} + +// UpdateGroupLogIntegrationWithParams is a helper method to define mock.On call +// - ctx context.Context +// - args *admin.UpdateGroupLogIntegrationApiParams +func (_e *PushBasedLogExportApi_Expecter) UpdateGroupLogIntegrationWithParams(ctx any, args any) *PushBasedLogExportApi_UpdateGroupLogIntegrationWithParams_Call { + return &PushBasedLogExportApi_UpdateGroupLogIntegrationWithParams_Call{Call: _e.mock.On("UpdateGroupLogIntegrationWithParams", ctx, args)} +} + +func (_c *PushBasedLogExportApi_UpdateGroupLogIntegrationWithParams_Call) Run(run func(ctx context.Context, args *admin.UpdateGroupLogIntegrationApiParams)) *PushBasedLogExportApi_UpdateGroupLogIntegrationWithParams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*admin.UpdateGroupLogIntegrationApiParams)) + }) + return _c +} + +func (_c *PushBasedLogExportApi_UpdateGroupLogIntegrationWithParams_Call) Return(_a0 admin.UpdateGroupLogIntegrationApiRequest) *PushBasedLogExportApi_UpdateGroupLogIntegrationWithParams_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PushBasedLogExportApi_UpdateGroupLogIntegrationWithParams_Call) RunAndReturn(run func(context.Context, *admin.UpdateGroupLogIntegrationApiParams) admin.UpdateGroupLogIntegrationApiRequest) *PushBasedLogExportApi_UpdateGroupLogIntegrationWithParams_Call { + _c.Call.Return(run) + return _c +} + // UpdateLogExport provides a mock function with given fields: ctx, groupId, pushBasedLogExportProject func (_m *PushBasedLogExportApi) UpdateLogExport(ctx context.Context, groupId string, pushBasedLogExportProject *admin.PushBasedLogExportProject) admin.UpdateLogExportApiRequest { ret := _m.Called(ctx, groupId, pushBasedLogExportProject) diff --git a/mockadmin/query_shape_insights_api.go b/mockadmin/query_shape_insights_api.go index 598f2f926..38620fa9a 100644 --- a/mockadmin/query_shape_insights_api.go +++ b/mockadmin/query_shape_insights_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" @@ -25,6 +25,169 @@ func (_m *QueryShapeInsightsApi) EXPECT() *QueryShapeInsightsApi_Expecter { return &QueryShapeInsightsApi_Expecter{mock: &_m.Mock} } +// GetClusterQueryShape provides a mock function with given fields: ctx, groupId, clusterName, queryShapeHash +func (_m *QueryShapeInsightsApi) GetClusterQueryShape(ctx context.Context, groupId string, clusterName string, queryShapeHash string) admin.GetClusterQueryShapeApiRequest { + ret := _m.Called(ctx, groupId, clusterName, queryShapeHash) + + if len(ret) == 0 { + panic("no return value specified for GetClusterQueryShape") + } + + var r0 admin.GetClusterQueryShapeApiRequest + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) admin.GetClusterQueryShapeApiRequest); ok { + r0 = rf(ctx, groupId, clusterName, queryShapeHash) + } else { + r0 = ret.Get(0).(admin.GetClusterQueryShapeApiRequest) + } + + return r0 +} + +// QueryShapeInsightsApi_GetClusterQueryShape_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClusterQueryShape' +type QueryShapeInsightsApi_GetClusterQueryShape_Call struct { + *mock.Call +} + +// GetClusterQueryShape is a helper method to define mock.On call +// - ctx context.Context +// - groupId string +// - clusterName string +// - queryShapeHash string +func (_e *QueryShapeInsightsApi_Expecter) GetClusterQueryShape(ctx any, groupId any, clusterName any, queryShapeHash any) *QueryShapeInsightsApi_GetClusterQueryShape_Call { + return &QueryShapeInsightsApi_GetClusterQueryShape_Call{Call: _e.mock.On("GetClusterQueryShape", ctx, groupId, clusterName, queryShapeHash)} +} + +func (_c *QueryShapeInsightsApi_GetClusterQueryShape_Call) Run(run func(ctx context.Context, groupId string, clusterName string, queryShapeHash string)) *QueryShapeInsightsApi_GetClusterQueryShape_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + }) + return _c +} + +func (_c *QueryShapeInsightsApi_GetClusterQueryShape_Call) Return(_a0 admin.GetClusterQueryShapeApiRequest) *QueryShapeInsightsApi_GetClusterQueryShape_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *QueryShapeInsightsApi_GetClusterQueryShape_Call) RunAndReturn(run func(context.Context, string, string, string) admin.GetClusterQueryShapeApiRequest) *QueryShapeInsightsApi_GetClusterQueryShape_Call { + _c.Call.Return(run) + return _c +} + +// GetClusterQueryShapeExecute provides a mock function with given fields: r +func (_m *QueryShapeInsightsApi) GetClusterQueryShapeExecute(r admin.GetClusterQueryShapeApiRequest) (*admin.QueryShapeResponse, *http.Response, error) { + ret := _m.Called(r) + + if len(ret) == 0 { + panic("no return value specified for GetClusterQueryShapeExecute") + } + + var r0 *admin.QueryShapeResponse + var r1 *http.Response + var r2 error + if rf, ok := ret.Get(0).(func(admin.GetClusterQueryShapeApiRequest) (*admin.QueryShapeResponse, *http.Response, error)); ok { + return rf(r) + } + if rf, ok := ret.Get(0).(func(admin.GetClusterQueryShapeApiRequest) *admin.QueryShapeResponse); ok { + r0 = rf(r) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.QueryShapeResponse) + } + } + + if rf, ok := ret.Get(1).(func(admin.GetClusterQueryShapeApiRequest) *http.Response); ok { + r1 = rf(r) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*http.Response) + } + } + + if rf, ok := ret.Get(2).(func(admin.GetClusterQueryShapeApiRequest) error); ok { + r2 = rf(r) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +// QueryShapeInsightsApi_GetClusterQueryShapeExecute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClusterQueryShapeExecute' +type QueryShapeInsightsApi_GetClusterQueryShapeExecute_Call struct { + *mock.Call +} + +// GetClusterQueryShapeExecute is a helper method to define mock.On call +// - r admin.GetClusterQueryShapeApiRequest +func (_e *QueryShapeInsightsApi_Expecter) GetClusterQueryShapeExecute(r any) *QueryShapeInsightsApi_GetClusterQueryShapeExecute_Call { + return &QueryShapeInsightsApi_GetClusterQueryShapeExecute_Call{Call: _e.mock.On("GetClusterQueryShapeExecute", r)} +} + +func (_c *QueryShapeInsightsApi_GetClusterQueryShapeExecute_Call) Run(run func(r admin.GetClusterQueryShapeApiRequest)) *QueryShapeInsightsApi_GetClusterQueryShapeExecute_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(admin.GetClusterQueryShapeApiRequest)) + }) + return _c +} + +func (_c *QueryShapeInsightsApi_GetClusterQueryShapeExecute_Call) Return(_a0 *admin.QueryShapeResponse, _a1 *http.Response, _a2 error) *QueryShapeInsightsApi_GetClusterQueryShapeExecute_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *QueryShapeInsightsApi_GetClusterQueryShapeExecute_Call) RunAndReturn(run func(admin.GetClusterQueryShapeApiRequest) (*admin.QueryShapeResponse, *http.Response, error)) *QueryShapeInsightsApi_GetClusterQueryShapeExecute_Call { + _c.Call.Return(run) + return _c +} + +// GetClusterQueryShapeWithParams provides a mock function with given fields: ctx, args +func (_m *QueryShapeInsightsApi) GetClusterQueryShapeWithParams(ctx context.Context, args *admin.GetClusterQueryShapeApiParams) admin.GetClusterQueryShapeApiRequest { + ret := _m.Called(ctx, args) + + if len(ret) == 0 { + panic("no return value specified for GetClusterQueryShapeWithParams") + } + + var r0 admin.GetClusterQueryShapeApiRequest + if rf, ok := ret.Get(0).(func(context.Context, *admin.GetClusterQueryShapeApiParams) admin.GetClusterQueryShapeApiRequest); ok { + r0 = rf(ctx, args) + } else { + r0 = ret.Get(0).(admin.GetClusterQueryShapeApiRequest) + } + + return r0 +} + +// QueryShapeInsightsApi_GetClusterQueryShapeWithParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClusterQueryShapeWithParams' +type QueryShapeInsightsApi_GetClusterQueryShapeWithParams_Call struct { + *mock.Call +} + +// GetClusterQueryShapeWithParams is a helper method to define mock.On call +// - ctx context.Context +// - args *admin.GetClusterQueryShapeApiParams +func (_e *QueryShapeInsightsApi_Expecter) GetClusterQueryShapeWithParams(ctx any, args any) *QueryShapeInsightsApi_GetClusterQueryShapeWithParams_Call { + return &QueryShapeInsightsApi_GetClusterQueryShapeWithParams_Call{Call: _e.mock.On("GetClusterQueryShapeWithParams", ctx, args)} +} + +func (_c *QueryShapeInsightsApi_GetClusterQueryShapeWithParams_Call) Run(run func(ctx context.Context, args *admin.GetClusterQueryShapeApiParams)) *QueryShapeInsightsApi_GetClusterQueryShapeWithParams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*admin.GetClusterQueryShapeApiParams)) + }) + return _c +} + +func (_c *QueryShapeInsightsApi_GetClusterQueryShapeWithParams_Call) Return(_a0 admin.GetClusterQueryShapeApiRequest) *QueryShapeInsightsApi_GetClusterQueryShapeWithParams_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *QueryShapeInsightsApi_GetClusterQueryShapeWithParams_Call) RunAndReturn(run func(context.Context, *admin.GetClusterQueryShapeApiParams) admin.GetClusterQueryShapeApiRequest) *QueryShapeInsightsApi_GetClusterQueryShapeWithParams_Call { + _c.Call.Return(run) + return _c +} + // GetQueryShapeDetails provides a mock function with given fields: ctx, groupId, clusterName, queryShapeHash func (_m *QueryShapeInsightsApi) GetQueryShapeDetails(ctx context.Context, groupId string, clusterName string, queryShapeHash string) admin.GetQueryShapeDetailsApiRequest { ret := _m.Called(ctx, groupId, clusterName, queryShapeHash) @@ -188,6 +351,168 @@ func (_c *QueryShapeInsightsApi_GetQueryShapeDetailsWithParams_Call) RunAndRetur return _c } +// ListClusterQueryShapes provides a mock function with given fields: ctx, groupId, clusterName +func (_m *QueryShapeInsightsApi) ListClusterQueryShapes(ctx context.Context, groupId string, clusterName string) admin.ListClusterQueryShapesApiRequest { + ret := _m.Called(ctx, groupId, clusterName) + + if len(ret) == 0 { + panic("no return value specified for ListClusterQueryShapes") + } + + var r0 admin.ListClusterQueryShapesApiRequest + if rf, ok := ret.Get(0).(func(context.Context, string, string) admin.ListClusterQueryShapesApiRequest); ok { + r0 = rf(ctx, groupId, clusterName) + } else { + r0 = ret.Get(0).(admin.ListClusterQueryShapesApiRequest) + } + + return r0 +} + +// QueryShapeInsightsApi_ListClusterQueryShapes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListClusterQueryShapes' +type QueryShapeInsightsApi_ListClusterQueryShapes_Call struct { + *mock.Call +} + +// ListClusterQueryShapes is a helper method to define mock.On call +// - ctx context.Context +// - groupId string +// - clusterName string +func (_e *QueryShapeInsightsApi_Expecter) ListClusterQueryShapes(ctx any, groupId any, clusterName any) *QueryShapeInsightsApi_ListClusterQueryShapes_Call { + return &QueryShapeInsightsApi_ListClusterQueryShapes_Call{Call: _e.mock.On("ListClusterQueryShapes", ctx, groupId, clusterName)} +} + +func (_c *QueryShapeInsightsApi_ListClusterQueryShapes_Call) Run(run func(ctx context.Context, groupId string, clusterName string)) *QueryShapeInsightsApi_ListClusterQueryShapes_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *QueryShapeInsightsApi_ListClusterQueryShapes_Call) Return(_a0 admin.ListClusterQueryShapesApiRequest) *QueryShapeInsightsApi_ListClusterQueryShapes_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *QueryShapeInsightsApi_ListClusterQueryShapes_Call) RunAndReturn(run func(context.Context, string, string) admin.ListClusterQueryShapesApiRequest) *QueryShapeInsightsApi_ListClusterQueryShapes_Call { + _c.Call.Return(run) + return _c +} + +// ListClusterQueryShapesExecute provides a mock function with given fields: r +func (_m *QueryShapeInsightsApi) ListClusterQueryShapesExecute(r admin.ListClusterQueryShapesApiRequest) (*admin.PaginatedQueryShapes, *http.Response, error) { + ret := _m.Called(r) + + if len(ret) == 0 { + panic("no return value specified for ListClusterQueryShapesExecute") + } + + var r0 *admin.PaginatedQueryShapes + var r1 *http.Response + var r2 error + if rf, ok := ret.Get(0).(func(admin.ListClusterQueryShapesApiRequest) (*admin.PaginatedQueryShapes, *http.Response, error)); ok { + return rf(r) + } + if rf, ok := ret.Get(0).(func(admin.ListClusterQueryShapesApiRequest) *admin.PaginatedQueryShapes); ok { + r0 = rf(r) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.PaginatedQueryShapes) + } + } + + if rf, ok := ret.Get(1).(func(admin.ListClusterQueryShapesApiRequest) *http.Response); ok { + r1 = rf(r) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*http.Response) + } + } + + if rf, ok := ret.Get(2).(func(admin.ListClusterQueryShapesApiRequest) error); ok { + r2 = rf(r) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +// QueryShapeInsightsApi_ListClusterQueryShapesExecute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListClusterQueryShapesExecute' +type QueryShapeInsightsApi_ListClusterQueryShapesExecute_Call struct { + *mock.Call +} + +// ListClusterQueryShapesExecute is a helper method to define mock.On call +// - r admin.ListClusterQueryShapesApiRequest +func (_e *QueryShapeInsightsApi_Expecter) ListClusterQueryShapesExecute(r any) *QueryShapeInsightsApi_ListClusterQueryShapesExecute_Call { + return &QueryShapeInsightsApi_ListClusterQueryShapesExecute_Call{Call: _e.mock.On("ListClusterQueryShapesExecute", r)} +} + +func (_c *QueryShapeInsightsApi_ListClusterQueryShapesExecute_Call) Run(run func(r admin.ListClusterQueryShapesApiRequest)) *QueryShapeInsightsApi_ListClusterQueryShapesExecute_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(admin.ListClusterQueryShapesApiRequest)) + }) + return _c +} + +func (_c *QueryShapeInsightsApi_ListClusterQueryShapesExecute_Call) Return(_a0 *admin.PaginatedQueryShapes, _a1 *http.Response, _a2 error) *QueryShapeInsightsApi_ListClusterQueryShapesExecute_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *QueryShapeInsightsApi_ListClusterQueryShapesExecute_Call) RunAndReturn(run func(admin.ListClusterQueryShapesApiRequest) (*admin.PaginatedQueryShapes, *http.Response, error)) *QueryShapeInsightsApi_ListClusterQueryShapesExecute_Call { + _c.Call.Return(run) + return _c +} + +// ListClusterQueryShapesWithParams provides a mock function with given fields: ctx, args +func (_m *QueryShapeInsightsApi) ListClusterQueryShapesWithParams(ctx context.Context, args *admin.ListClusterQueryShapesApiParams) admin.ListClusterQueryShapesApiRequest { + ret := _m.Called(ctx, args) + + if len(ret) == 0 { + panic("no return value specified for ListClusterQueryShapesWithParams") + } + + var r0 admin.ListClusterQueryShapesApiRequest + if rf, ok := ret.Get(0).(func(context.Context, *admin.ListClusterQueryShapesApiParams) admin.ListClusterQueryShapesApiRequest); ok { + r0 = rf(ctx, args) + } else { + r0 = ret.Get(0).(admin.ListClusterQueryShapesApiRequest) + } + + return r0 +} + +// QueryShapeInsightsApi_ListClusterQueryShapesWithParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListClusterQueryShapesWithParams' +type QueryShapeInsightsApi_ListClusterQueryShapesWithParams_Call struct { + *mock.Call +} + +// ListClusterQueryShapesWithParams is a helper method to define mock.On call +// - ctx context.Context +// - args *admin.ListClusterQueryShapesApiParams +func (_e *QueryShapeInsightsApi_Expecter) ListClusterQueryShapesWithParams(ctx any, args any) *QueryShapeInsightsApi_ListClusterQueryShapesWithParams_Call { + return &QueryShapeInsightsApi_ListClusterQueryShapesWithParams_Call{Call: _e.mock.On("ListClusterQueryShapesWithParams", ctx, args)} +} + +func (_c *QueryShapeInsightsApi_ListClusterQueryShapesWithParams_Call) Run(run func(ctx context.Context, args *admin.ListClusterQueryShapesApiParams)) *QueryShapeInsightsApi_ListClusterQueryShapesWithParams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*admin.ListClusterQueryShapesApiParams)) + }) + return _c +} + +func (_c *QueryShapeInsightsApi_ListClusterQueryShapesWithParams_Call) Return(_a0 admin.ListClusterQueryShapesApiRequest) *QueryShapeInsightsApi_ListClusterQueryShapesWithParams_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *QueryShapeInsightsApi_ListClusterQueryShapesWithParams_Call) RunAndReturn(run func(context.Context, *admin.ListClusterQueryShapesApiParams) admin.ListClusterQueryShapesApiRequest) *QueryShapeInsightsApi_ListClusterQueryShapesWithParams_Call { + _c.Call.Return(run) + return _c +} + // ListQueryShapeSummaries provides a mock function with given fields: ctx, groupId, clusterName func (_m *QueryShapeInsightsApi) ListQueryShapeSummaries(ctx context.Context, groupId string, clusterName string) admin.ListQueryShapeSummariesApiRequest { ret := _m.Called(ctx, groupId, clusterName) @@ -350,6 +675,170 @@ func (_c *QueryShapeInsightsApi_ListQueryShapeSummariesWithParams_Call) RunAndRe return _c } +// UpdateClusterQueryShape provides a mock function with given fields: ctx, groupId, clusterName, queryShapeHash, queryShapeUpdateRequest +func (_m *QueryShapeInsightsApi) UpdateClusterQueryShape(ctx context.Context, groupId string, clusterName string, queryShapeHash string, queryShapeUpdateRequest *admin.QueryShapeUpdateRequest) admin.UpdateClusterQueryShapeApiRequest { + ret := _m.Called(ctx, groupId, clusterName, queryShapeHash, queryShapeUpdateRequest) + + if len(ret) == 0 { + panic("no return value specified for UpdateClusterQueryShape") + } + + var r0 admin.UpdateClusterQueryShapeApiRequest + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, *admin.QueryShapeUpdateRequest) admin.UpdateClusterQueryShapeApiRequest); ok { + r0 = rf(ctx, groupId, clusterName, queryShapeHash, queryShapeUpdateRequest) + } else { + r0 = ret.Get(0).(admin.UpdateClusterQueryShapeApiRequest) + } + + return r0 +} + +// QueryShapeInsightsApi_UpdateClusterQueryShape_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateClusterQueryShape' +type QueryShapeInsightsApi_UpdateClusterQueryShape_Call struct { + *mock.Call +} + +// UpdateClusterQueryShape is a helper method to define mock.On call +// - ctx context.Context +// - groupId string +// - clusterName string +// - queryShapeHash string +// - queryShapeUpdateRequest *admin.QueryShapeUpdateRequest +func (_e *QueryShapeInsightsApi_Expecter) UpdateClusterQueryShape(ctx any, groupId any, clusterName any, queryShapeHash any, queryShapeUpdateRequest any) *QueryShapeInsightsApi_UpdateClusterQueryShape_Call { + return &QueryShapeInsightsApi_UpdateClusterQueryShape_Call{Call: _e.mock.On("UpdateClusterQueryShape", ctx, groupId, clusterName, queryShapeHash, queryShapeUpdateRequest)} +} + +func (_c *QueryShapeInsightsApi_UpdateClusterQueryShape_Call) Run(run func(ctx context.Context, groupId string, clusterName string, queryShapeHash string, queryShapeUpdateRequest *admin.QueryShapeUpdateRequest)) *QueryShapeInsightsApi_UpdateClusterQueryShape_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(*admin.QueryShapeUpdateRequest)) + }) + return _c +} + +func (_c *QueryShapeInsightsApi_UpdateClusterQueryShape_Call) Return(_a0 admin.UpdateClusterQueryShapeApiRequest) *QueryShapeInsightsApi_UpdateClusterQueryShape_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *QueryShapeInsightsApi_UpdateClusterQueryShape_Call) RunAndReturn(run func(context.Context, string, string, string, *admin.QueryShapeUpdateRequest) admin.UpdateClusterQueryShapeApiRequest) *QueryShapeInsightsApi_UpdateClusterQueryShape_Call { + _c.Call.Return(run) + return _c +} + +// UpdateClusterQueryShapeExecute provides a mock function with given fields: r +func (_m *QueryShapeInsightsApi) UpdateClusterQueryShapeExecute(r admin.UpdateClusterQueryShapeApiRequest) (*admin.QueryShapeResponse, *http.Response, error) { + ret := _m.Called(r) + + if len(ret) == 0 { + panic("no return value specified for UpdateClusterQueryShapeExecute") + } + + var r0 *admin.QueryShapeResponse + var r1 *http.Response + var r2 error + if rf, ok := ret.Get(0).(func(admin.UpdateClusterQueryShapeApiRequest) (*admin.QueryShapeResponse, *http.Response, error)); ok { + return rf(r) + } + if rf, ok := ret.Get(0).(func(admin.UpdateClusterQueryShapeApiRequest) *admin.QueryShapeResponse); ok { + r0 = rf(r) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.QueryShapeResponse) + } + } + + if rf, ok := ret.Get(1).(func(admin.UpdateClusterQueryShapeApiRequest) *http.Response); ok { + r1 = rf(r) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*http.Response) + } + } + + if rf, ok := ret.Get(2).(func(admin.UpdateClusterQueryShapeApiRequest) error); ok { + r2 = rf(r) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +// QueryShapeInsightsApi_UpdateClusterQueryShapeExecute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateClusterQueryShapeExecute' +type QueryShapeInsightsApi_UpdateClusterQueryShapeExecute_Call struct { + *mock.Call +} + +// UpdateClusterQueryShapeExecute is a helper method to define mock.On call +// - r admin.UpdateClusterQueryShapeApiRequest +func (_e *QueryShapeInsightsApi_Expecter) UpdateClusterQueryShapeExecute(r any) *QueryShapeInsightsApi_UpdateClusterQueryShapeExecute_Call { + return &QueryShapeInsightsApi_UpdateClusterQueryShapeExecute_Call{Call: _e.mock.On("UpdateClusterQueryShapeExecute", r)} +} + +func (_c *QueryShapeInsightsApi_UpdateClusterQueryShapeExecute_Call) Run(run func(r admin.UpdateClusterQueryShapeApiRequest)) *QueryShapeInsightsApi_UpdateClusterQueryShapeExecute_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(admin.UpdateClusterQueryShapeApiRequest)) + }) + return _c +} + +func (_c *QueryShapeInsightsApi_UpdateClusterQueryShapeExecute_Call) Return(_a0 *admin.QueryShapeResponse, _a1 *http.Response, _a2 error) *QueryShapeInsightsApi_UpdateClusterQueryShapeExecute_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *QueryShapeInsightsApi_UpdateClusterQueryShapeExecute_Call) RunAndReturn(run func(admin.UpdateClusterQueryShapeApiRequest) (*admin.QueryShapeResponse, *http.Response, error)) *QueryShapeInsightsApi_UpdateClusterQueryShapeExecute_Call { + _c.Call.Return(run) + return _c +} + +// UpdateClusterQueryShapeWithParams provides a mock function with given fields: ctx, args +func (_m *QueryShapeInsightsApi) UpdateClusterQueryShapeWithParams(ctx context.Context, args *admin.UpdateClusterQueryShapeApiParams) admin.UpdateClusterQueryShapeApiRequest { + ret := _m.Called(ctx, args) + + if len(ret) == 0 { + panic("no return value specified for UpdateClusterQueryShapeWithParams") + } + + var r0 admin.UpdateClusterQueryShapeApiRequest + if rf, ok := ret.Get(0).(func(context.Context, *admin.UpdateClusterQueryShapeApiParams) admin.UpdateClusterQueryShapeApiRequest); ok { + r0 = rf(ctx, args) + } else { + r0 = ret.Get(0).(admin.UpdateClusterQueryShapeApiRequest) + } + + return r0 +} + +// QueryShapeInsightsApi_UpdateClusterQueryShapeWithParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateClusterQueryShapeWithParams' +type QueryShapeInsightsApi_UpdateClusterQueryShapeWithParams_Call struct { + *mock.Call +} + +// UpdateClusterQueryShapeWithParams is a helper method to define mock.On call +// - ctx context.Context +// - args *admin.UpdateClusterQueryShapeApiParams +func (_e *QueryShapeInsightsApi_Expecter) UpdateClusterQueryShapeWithParams(ctx any, args any) *QueryShapeInsightsApi_UpdateClusterQueryShapeWithParams_Call { + return &QueryShapeInsightsApi_UpdateClusterQueryShapeWithParams_Call{Call: _e.mock.On("UpdateClusterQueryShapeWithParams", ctx, args)} +} + +func (_c *QueryShapeInsightsApi_UpdateClusterQueryShapeWithParams_Call) Run(run func(ctx context.Context, args *admin.UpdateClusterQueryShapeApiParams)) *QueryShapeInsightsApi_UpdateClusterQueryShapeWithParams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*admin.UpdateClusterQueryShapeApiParams)) + }) + return _c +} + +func (_c *QueryShapeInsightsApi_UpdateClusterQueryShapeWithParams_Call) Return(_a0 admin.UpdateClusterQueryShapeApiRequest) *QueryShapeInsightsApi_UpdateClusterQueryShapeWithParams_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *QueryShapeInsightsApi_UpdateClusterQueryShapeWithParams_Call) RunAndReturn(run func(context.Context, *admin.UpdateClusterQueryShapeApiParams) admin.UpdateClusterQueryShapeApiRequest) *QueryShapeInsightsApi_UpdateClusterQueryShapeWithParams_Call { + _c.Call.Return(run) + return _c +} + // NewQueryShapeInsightsApi creates a new instance of QueryShapeInsightsApi. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewQueryShapeInsightsApi(t interface { diff --git a/mockadmin/resource_policies_api.go b/mockadmin/resource_policies_api.go index b9ba56ef0..ab1282e31 100644 --- a/mockadmin/resource_policies_api.go +++ b/mockadmin/resource_policies_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/rolling_index_api.go b/mockadmin/rolling_index_api.go index 2d061d975..5076d6676 100644 --- a/mockadmin/rolling_index_api.go +++ b/mockadmin/rolling_index_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/root_api.go b/mockadmin/root_api.go index c71e11b7d..3851a9806 100644 --- a/mockadmin/root_api.go +++ b/mockadmin/root_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/serverless_instances_api.go b/mockadmin/serverless_instances_api.go index f5db719af..73358896b 100644 --- a/mockadmin/serverless_instances_api.go +++ b/mockadmin/serverless_instances_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/serverless_private_endpoints_api.go b/mockadmin/serverless_private_endpoints_api.go index e1a988f14..627e63ca2 100644 --- a/mockadmin/serverless_private_endpoints_api.go +++ b/mockadmin/serverless_private_endpoints_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/service_accounts_api.go b/mockadmin/service_accounts_api.go index 396c80b7f..851dcd714 100644 --- a/mockadmin/service_accounts_api.go +++ b/mockadmin/service_accounts_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/shared_tier_restore_jobs_api.go b/mockadmin/shared_tier_restore_jobs_api.go index b528816e3..f80cecc1f 100644 --- a/mockadmin/shared_tier_restore_jobs_api.go +++ b/mockadmin/shared_tier_restore_jobs_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/shared_tier_snapshots_api.go b/mockadmin/shared_tier_snapshots_api.go index 7849495fc..d5ca6f4cf 100644 --- a/mockadmin/shared_tier_snapshots_api.go +++ b/mockadmin/shared_tier_snapshots_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/streams_api.go b/mockadmin/streams_api.go index f62097617..3a2c2ad8d 100644 --- a/mockadmin/streams_api.go +++ b/mockadmin/streams_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/teams_api.go b/mockadmin/teams_api.go index 1a22270a8..3fc921a29 100644 --- a/mockadmin/teams_api.go +++ b/mockadmin/teams_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/third_party_integrations_api.go b/mockadmin/third_party_integrations_api.go index 3befd1ace..fa2426443 100644 --- a/mockadmin/third_party_integrations_api.go +++ b/mockadmin/third_party_integrations_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/mockadmin/x509_authentication_api.go b/mockadmin/x509_authentication_api.go index a15f62c0f..ec92c2310 100644 --- a/mockadmin/x509_authentication_api.go +++ b/mockadmin/x509_authentication_api.go @@ -5,7 +5,7 @@ package mockadmin import ( context "context" - admin "go.mongodb.org/atlas-sdk/v20250312010/admin" + admin "github.com/mongodb/atlas-sdk-go/admin" http "net/http" diff --git a/openapi/atlas-api-transformed.yaml b/openapi/atlas-api-transformed.yaml index 3c4b377d8..d44e952af 100644 --- a/openapi/atlas-api-transformed.yaml +++ b/openapi/atlas-api-transformed.yaml @@ -817,7 +817,7 @@ components: Atlas returns this value if you set `"notifications.[n].typeName" :"WEBHOOK"` and either: * You set `notification.[n].webhookSecret` to a non-empty string - * You set a default webhookSecret either on the Integrations page, or with the [Integrations API](#tag/Third-Party-Service-Integrations/operation/createIntegration) + * You set a default webhookSecret either on the Integrations page, or with the Integrations API **NOTE**: When you view or edit the alert for a webhook notification, the secret appears completely redacted. externalDocs: @@ -831,10 +831,13 @@ components: Atlas returns this value if you set `"notifications.[n].typeName" :"WEBHOOK"` and either: * You set `notification.[n].webhookURL` to a non-empty string - * You set a default webhookUrl either on the [Integrations](https://www.mongodb.com/docs/atlas/tutorial/third-party-service-integrations/#std-label-third-party-integrations) page, or with the [Integrations API](#tag/Third-Party-Service-Integrations/operation/createIntegration) + * You set a default webhookUrl either on the Integrations page, or with the Integrations API **NOTE**: When you view or edit the alert for a Webhook URL notification, the URL appears partially redacted. example: https://webhook.com/**** + externalDocs: + description: Integrations page + url: https://www.mongodb.com/docs/atlas/tutorial/third-party-service-integrations/#std-label-third-party-integrations type: string AlertsToggle: description: Enables or disables the specified alert configuration in the specified project. @@ -1094,6 +1097,12 @@ components: description: Specify the sort order (ascending / descending) used to specify how to sort query results. Defaults to descending. type: string type: object + ApiVersion: + properties: + version: + description: Object representing a version of the Atlas Admin API. + type: string + type: object AtlasClusterOutageSimulationOutageFilter: properties: cloudProvider: @@ -1555,6 +1564,11 @@ components: resourceGroupName: description: Name of the Azure resource group that contains your Azure Key Vault. This field cannot be modified when you enable and set up private endpoint connections to your Azure Key Vault. type: string + roleId: + description: Unique 24-hexadecimal digit string that identifies the Azure Service Principal that MongoDB Cloud uses to access the Azure Key Vault. + example: 32b6e34b3d91647abb20e7b8 + pattern: ^([a-f0-9]{24})$ + type: string secret: description: Private data that you need secured and that belongs to the specified Azure Key Vault (AKV) tenant (**azureKeyVault.tenantID**). This data can include any type of sensitive data such as passwords, database connection strings, API keys, and the like. AKV stores this information as encrypted binary data. externalDocs: @@ -4227,6 +4241,16 @@ components: - `PAUSED`: The cluster is paused. readOnly: true type: string + storedSource: + description: Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. Note that storing all fields (true) is not allowed for vector search indexes. To learn more, see documentation. + example: + include | exclude: + - field1 + - field2 + externalDocs: + description: Stored Source Fields + url: https://dochub.mongodb.org/core/atlas-search-stored-source + type: object type: description: Type of the index. Default type is search. type: string @@ -4261,16 +4285,6 @@ components: default: lucene.standard description: Method applied to identify words when searching this index. type: string - storedSource: - description: Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see documentation. - example: - include | exclude: - - field1 - - field2 - externalDocs: - description: Stored Source Fields - url: https://dochub.mongodb.org/core/atlas-search-stored-source - type: object synonyms: description: Rule sets that map words to their synonyms in this index. externalDocs: @@ -8707,6 +8721,28 @@ components: type: object type: object writeOnly: true + Info: + description: Information about the MongoDB Atlas Administration API OpenAPI Specification. + properties: + description: + description: Description of the MongoDB Atlas Administration API. + example: The MongoDB Atlas Administration API allows developers to manage all components in MongoDB Atlas. + type: string + license: + $ref: "#/components/schemas/License" + termsOfService: + description: Terms of Service URL. + example: https://www.mongodb.com/mongodb-management-service-terms-and-conditions + type: string + title: + description: Title of the MongoDB Atlas Administration API. + example: MongoDB Atlas Administration API. + type: string + version: + description: Version of the MongoDB Atlas Administration API. + example: "2.0" + type: string + type: object IngestionPipelineRun: description: Run details of a Data Lake Pipeline. properties: @@ -9663,6 +9699,18 @@ components: description: Human-readable label that identifies the zone in a Global Cluster. Provide this value only if **clusterType** is `GEOSHARDED`. type: string type: object + License: + description: License information of the MongoDB Atlas Administration API. + properties: + name: + description: Name of the license. + example: CC BY-NC-SA 3.0 US + type: string + url: + description: URL of the license. + example: https://creativecommons.org/licenses/by-nc-sa/3.0/us/ + type: string + type: object Link: properties: href: @@ -9830,6 +9878,88 @@ components: readOnly: true type: string type: object + LogIntegrationRequest: + description: Request schema for creating or updating a log integration. + properties: + type: + description: Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type. + type: string + bucketName: + description: Human-readable label that identifies the S3 bucket name for storing log files. + example: my-log-bucket + type: string + iamRoleId: + description: Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket. + example: 507f1f77bcf86cd799439011 + type: string + kmsKey: + description: AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings. + example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + type: string + logTypes: + description: "Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGOD_AUDIT, MONGOS_AUDIT." + example: + - MONGOD + - MONGOS + - MONGOD_AUDIT + - MONGOS_AUDIT + items: + type: string + maxItems: 4 + minItems: 1 + type: array + uniqueItems: true + prefixPath: + description: S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type. + example: mongo-logs/ + type: string + required: + - type + title: Log Export Integration Request + type: object + LogIntegrationResponse: + description: Response schema for log integration operations. + properties: + id: + description: Unique 24-character hexadecimal digit string that identifies the log integration configuration. + example: 507f1f77bcf86cd799439011 + type: string + type: + description: Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type. + type: string + bucketName: + description: Human-readable label that identifies the S3 bucket name for storing log files. + example: my-log-bucket + type: string + iamRoleId: + description: Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket. + example: 507f1f77bcf86cd799439011 + type: string + kmsKey: + description: AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings. + example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + type: string + logTypes: + description: "Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGOD_AUDIT, MONGOS_AUDIT." + example: + - MONGOD + - MONGOS + - MONGOD_AUDIT + - MONGOS_AUDIT + items: + type: string + maxItems: 4 + type: array + uniqueItems: true + prefixPath: + description: S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type. + example: mongo-logs/ + type: string + required: + - id + - type + title: Log Integration Response + type: object ManagedNamespaces: properties: collection: @@ -10402,6 +10532,11 @@ components: - type title: Online Archive Schedule type: object + OpenApiInfo: + properties: + info: + $ref: "#/components/schemas/Info" + type: object OrgFederationSettings: description: Details that define how to connect one MongoDB Cloud organization to one federated authentication service. properties: @@ -10909,6 +11044,30 @@ components: readOnly: true title: Outbound Control Plane IP Addresses By Cloud Provider type: object + PaginatedApiVersions: + properties: + links: + description: List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships. + externalDocs: + description: Web Linking Specification (RFC 5988) + url: https://datatracker.ietf.org/doc/html/rfc5988 + items: + $ref: "#/components/schemas/Link" + readOnly: true + type: array + results: + description: List of returned documents that MongoDB Cloud provides when completing this request. + items: + $ref: "#/components/schemas/ApiVersion" + readOnly: true + type: array + totalCount: + description: Total number of documents available. MongoDB Cloud omits this value if `includeCount` is set to `false`. The total number is an estimate and may not be exact. + format: int32 + minimum: 0 + readOnly: true + type: integer + type: object PaginatedClusterDescription20240805: properties: links: @@ -11054,6 +11213,30 @@ components: readOnly: true type: integer type: object + PaginatedLogIntegrationResponse: + properties: + links: + description: List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships. + externalDocs: + description: Web Linking Specification (RFC 5988) + url: https://datatracker.ietf.org/doc/html/rfc5988 + items: + $ref: "#/components/schemas/Link" + readOnly: true + type: array + results: + description: List of returned documents that MongoDB Cloud provides when completing this request. + items: + $ref: "#/components/schemas/LogIntegrationResponse" + readOnly: true + type: array + totalCount: + description: Total number of documents available. MongoDB Cloud omits this value if `includeCount` is set to `false`. The total number is an estimate and may not be exact. + format: int32 + minimum: 0 + readOnly: true + type: integer + type: object PaginatedOrgServiceAccounts: description: A list of Organization Service Accounts. properties: @@ -11079,6 +11262,31 @@ components: readOnly: true type: integer type: object + PaginatedQueryShapes: + description: Paginated collection of query shapes. This endpoint returns a maximum of 100 results. + properties: + links: + description: List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships. + externalDocs: + description: Web Linking Specification (RFC 5988) + url: https://datatracker.ietf.org/doc/html/rfc5988 + items: + $ref: "#/components/schemas/Link" + readOnly: true + type: array + results: + description: List of returned documents that MongoDB Cloud provides when completing this request. + items: + $ref: "#/components/schemas/QueryShapeResponse" + readOnly: true + type: array + totalCount: + description: Total number of documents available. MongoDB Cloud omits this value if `includeCount` is set to `false`. The total number is an estimate and may not be exact. + format: int32 + minimum: 0 + readOnly: true + type: integer + type: object PaginatedServiceAccountGroup: description: A list of projects associated with the Service Account. properties: @@ -11542,6 +11750,32 @@ components: readOnly: true type: string type: object + QueryShapeResponse: + description: Response containing the details and status of a query shape. The query shape field may be null if the user lacks PII view access. + properties: + command: + description: The MongoDB command type issued for a query shape. + readOnly: true + type: string + namespace: + description: Human-readable label that identifies the namespace on the specified host. The resource expresses this parameter value as `.`. + readOnly: true + type: string + queryShape: + description: A query shape is a set of specifications that group similar queries together. Specifications can include filters, sorts, projections, aggregation pipeline stages, a namespace, and others. Queries that have similar specifications have the same query shape. This field may be null if the user lacks PII view access. + readOnly: true + type: string + queryShapeHash: + description: A hexadecimal string that represents the hash of a MongoDB query shape. + readOnly: true + type: string + status: + description: The rejection status of a query shape. Use REJECTED to prevent the query shape from executing on the cluster, or UNREJECTED to allow it to execute. + type: string + required: + - queryShapeHash + - status + type: object QueryShapeSeenMetadata: description: Metadata about when a query shape was seen. properties: @@ -11559,6 +11793,15 @@ components: format: int64 type: integer type: object + QueryShapeUpdateRequest: + description: Request body for modifying the rejection status of a query shape. + properties: + status: + description: The rejection status of a query shape. Use REJECTED to prevent the query shape from executing on the cluster, or UNREJECTED to allow it to execute. + type: string + required: + - status + type: object QueryStatsDetailsResponse: description: Metadata and summary statistics for a given query shape. properties: @@ -11757,6 +12000,85 @@ components: type: string readOnly: true type: object + S3LogIntegrationRequest: + allOf: + - $ref: "#/components/schemas/LogIntegrationRequest" + - properties: + bucketName: + description: Human-readable label that identifies the S3 bucket name for storing log files. + example: my-log-bucket + type: string + iamRoleId: + description: Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket. + example: 507f1f77bcf86cd799439011 + type: string + kmsKey: + description: AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings. + example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + type: string + logTypes: + description: "Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGOD_AUDIT, MONGOS_AUDIT." + example: + - MONGOD + - MONGOS + - MONGOD_AUDIT + - MONGOS_AUDIT + items: + type: string + maxItems: 4 + minItems: 1 + type: array + uniqueItems: true + prefixPath: + description: S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type. + example: mongo-logs/ + type: string + type: + description: Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type. + type: string + type: object + description: Request schema for creating or updating an S3 log export integration. + required: + - bucketName + - iamRoleId + - logTypes + - prefixPath + - type + title: S3 Log Export Integration Request + type: object + properties: + bucketName: + description: Human-readable label that identifies the S3 bucket name for storing log files. + example: my-log-bucket + type: string + iamRoleId: + description: Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket. + example: 507f1f77bcf86cd799439011 + type: string + kmsKey: + description: AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings. + example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + type: string + logTypes: + description: "Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGOD_AUDIT, MONGOS_AUDIT." + example: + - MONGOD + - MONGOS + - MONGOD_AUDIT + - MONGOS_AUDIT + items: + type: string + maxItems: 4 + minItems: 1 + type: array + uniqueItems: true + prefixPath: + description: S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type. + example: mongo-logs/ + type: string + type: + description: Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type. + type: string SampleDatasetStatus: properties: _id: @@ -11970,7 +12292,7 @@ components: description: Method applied to identify words when searching this index. type: string storedSource: - description: Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see Stored Source Fields. + description: Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. Note that storing all fields (true) is not allowed for vector search indexes. To learn more, see Stored Source Fields. example: include | exclude: - field1 @@ -12706,6 +13028,9 @@ components: StreamProcessorEventTypeViewAlertableWithThreshold: description: Event type that triggers an alert. example: OUTSIDE_STREAM_PROCESSOR_METRIC_THRESHOLD + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ title: Stream Processor Event Types type: string StreamProcessorMetricThreshold: @@ -12975,7 +13300,7 @@ components: fieldName: $ref: "#/components/schemas/StreamsMatcherField" operator: - description: Comparison operator to apply when checking the current metric value against **matcher[n].value**. + description: Comparison operator to apply when checking the current metric value against **matcher[n].value**. The `REGEX` operator only supports inclusive matches. Use the `NOT_CONTAINS` operator to exclude values. type: string value: description: Value to match or exceed using the specified **matchers.operator**. @@ -14125,6 +14450,16 @@ components: description: Number of index partitions. Allowed values are [1, 2, 4]. format: int32 type: integer + storedSource: + description: Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. Note that storing all fields (true) is not allowed for vector search indexes. To learn more, see Stored Source Fields. + example: + include | exclude: + - field1 + - field2 + externalDocs: + description: Stored Source Fields + url: https://dochub.mongodb.org/core/atlas-search-stored-source + type: object title: Vector Search Index Definition type: object VectorSearchIndexStatusDetail: @@ -14291,7 +14626,7 @@ components: description: Method applied to identify words when searching this index. type: string storedSource: - description: Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see Stored Source Fields. + description: Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. Note that storing all fields (true) is not allowed for vector search indexes. To learn more, see Stored Source Fields. example: include | exclude: - field1 @@ -14361,7 +14696,7 @@ components: description: Method applied to identify words when searching this index. type: string storedSource: - description: Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see Stored Source Fields. + description: Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. Note that storing all fields (true) is not allowed for vector search indexes. To learn more, see Stored Source Fields. example: include | exclude: - field1 @@ -16571,7 +16906,7 @@ info: termsOfService: https://www.mongodb.com/mongodb-management-service-terms-and-conditions title: MongoDB Atlas Administration API version: "2.0" - x-xgen-sha: e4219471118c0a8a188bd428e61c78b629902817 + x-xgen-sha: 00bde811d099b69403160c912d6f01d6648563c8 openapi: 3.0.1 paths: /api/atlas/v2: @@ -28094,6 +28429,285 @@ paths: --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapeInsights/summaries?pretty=true" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Query-Shape-Insights/operation/listGroupClusterQueryShapeInsightSummaries + /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes: + get: + description: Returns a list of query shapes for one cluster. Query shapes may be filtered by their status; at present, this endpoint supports only the REJECTED status. + operationId: listClusterQueryShapes + parameters: + - $ref: "#/components/parameters/groupId" + - description: Human-readable label that identifies the cluster. + in: path + name: clusterName + required: true + schema: + pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$ + type: string + - description: The status of query shapes to retrieve. Only REJECTED status is supported. If omitted, defaults to REJECTED. + in: query + name: status + schema: + default: REJECTED + type: string + - $ref: "#/components/parameters/includeCount" + - $ref: "#/components/parameters/itemsPerPage" + - $ref: "#/components/parameters/pageNum" + responses: + "200": + content: + application/vnd.atlas.2025-03-12+json: + schema: + $ref: "#/components/schemas/PaginatedQueryShapes" + x-xgen-version: 2025-03-12 + description: OK + "400": + $ref: "#/components/responses/badRequest" + "401": + $ref: "#/components/responses/unauthorized" + "403": + $ref: "#/components/responses/forbidden" + "404": + $ref: "#/components/responses/notFound" + "429": + $ref: "#/components/responses/tooManyRequests" + "500": + $ref: "#/components/responses/internalServerError" + summary: Return All Query Shapes + tags: + - Query Shape Insights + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api queryShapeInsights listClusterQueryShapes --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.ListGroupClusterQueryShapesApiParams{} + sdkResp, httpResp, err := client.QueryShapeInsightsApi. + ListGroupClusterQueryShapesWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes?pretty=true" + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes?pretty=true" + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Query-Shape-Insights/operation/listGroupClusterQueryShapes + x-xgen-version: 2025-03-12 + /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes/{queryShapeHash}: + get: + description: Returns the details for a single query shape. This endpoint only returns query shapes with REJECTED status. If the specified query shape hash does not correspond to a rejected query shape, a 404 Not Found error is returned. + operationId: getClusterQueryShape + parameters: + - $ref: "#/components/parameters/groupId" + - description: Human-readable label that identifies the cluster. + in: path + name: clusterName + required: true + schema: + pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$ + type: string + - description: A SHA256 hash of a query shape, output by MongoDB commands like $queryStats and $explain or slow query logs. + in: path + name: queryShapeHash + required: true + schema: + pattern: ^([a-fA-F0-9]{64})$ + type: string + responses: + "200": + content: + application/vnd.atlas.2025-03-12+json: + schema: + $ref: "#/components/schemas/QueryShapeResponse" + x-xgen-version: 2025-03-12 + description: OK + "400": + $ref: "#/components/responses/badRequest" + "401": + $ref: "#/components/responses/unauthorized" + "403": + $ref: "#/components/responses/forbidden" + "404": + $ref: "#/components/responses/notFound" + "429": + $ref: "#/components/responses/tooManyRequests" + "500": + $ref: "#/components/responses/internalServerError" + summary: Return One Query Shape + tags: + - Query Shape Insights + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api queryShapeInsights getClusterQueryShape --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.GetGroupClusterQueryShapeApiParams{} + sdkResp, httpResp, err := client.QueryShapeInsightsApi. + GetGroupClusterQueryShapeWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes/{queryShapeHash}?pretty=true" + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes/{queryShapeHash}?pretty=true" + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Query-Shape-Insights/operation/getGroupClusterQueryShape + x-xgen-version: 2025-03-12 + patch: + description: "Updates the rejection status of a query shape. Use this endpoint to reject a query shape (preventing it from executing on the cluster) or to unreject a previously rejected query shape (allowing it to execute again). This operation is idempotent: rejecting an already rejected query shape or unrejecting an already unrejected query shape will return 200 OK." + operationId: updateClusterQueryShape + parameters: + - $ref: "#/components/parameters/groupId" + - description: Human-readable label that identifies the cluster. + in: path + name: clusterName + required: true + schema: + pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$ + type: string + - description: A SHA256 hash of a query shape, output by MongoDB commands like $queryStats and $explain or slow query logs. + in: path + name: queryShapeHash + required: true + schema: + pattern: ^([a-fA-F0-9]{64})$ + type: string + requestBody: + content: + application/vnd.atlas.2025-03-12+json: + schema: + $ref: "#/components/schemas/QueryShapeUpdateRequest" + description: The desired rejection status for the query shape. Provide REJECTED to block the query shape from executing, or UNREJECTED to allow it to execute. + required: true + responses: + "200": + content: + application/vnd.atlas.2025-03-12+json: + schema: + $ref: "#/components/schemas/QueryShapeResponse" + x-xgen-version: 2025-03-12 + description: OK + "400": + $ref: "#/components/responses/badRequest" + "401": + $ref: "#/components/responses/unauthorized" + "403": + $ref: "#/components/responses/forbidden" + "404": + $ref: "#/components/responses/notFound" + "429": + $ref: "#/components/responses/tooManyRequests" + "500": + $ref: "#/components/responses/internalServerError" + summary: Update Query Shape Rejection Status + tags: + - Query Shape Insights + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api queryShapeInsights updateClusterQueryShape --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.UpdateGroupClusterQueryShapeApiParams{} + sdkResp, httpResp, err := client.QueryShapeInsightsApi. + UpdateGroupClusterQueryShapeWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + --header "Content-Type: application/json" \ + -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes/{queryShapeHash}" \ + -d '{ }' + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + --header "Content-Type: application/json" \ + -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes/{queryShapeHash}" \ + -d '{ }' + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Query-Shape-Insights/operation/updateGroupClusterQueryShape + x-xgen-version: 2025-03-12 /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restartPrimaries: post: description: "Starts a failover test for the specified cluster in the specified project. Clusters contain a group of hosts that maintain the same data set. A failover test checks how MongoDB Cloud handles the failure of the cluster's primary node. During the test, MongoDB Cloud shuts down the primary node and elects a new primary. To use this resource, the requesting Service Account or API Key must have the Project Cluster Manager role. Deprecated versions: v2-{2023-01-01}" @@ -37694,9 +38308,336 @@ paths: log.Fatalf("Error: %v", err) } - params = &sdk.ValidateGroupLiveMigrationsApiParams{} - sdkResp, httpResp, err := client.CloudMigrationServiceApi. - ValidateGroupLiveMigrationsWithParams(ctx, params). + params = &sdk.ValidateGroupLiveMigrationsApiParams{} + sdkResp, httpResp, err := client.CloudMigrationServiceApi. + ValidateGroupLiveMigrationsWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + --header "Content-Type: application/json" \ + -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/liveMigrations/validate" \ + -d '{ }' + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + --header "Content-Type: application/json" \ + -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/liveMigrations/validate" \ + -d '{ }' + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Migration-Service/operation/validateGroupLiveMigrations + x-xgen-method-verb-override: + customMethod: true + /api/atlas/v2/groups/{groupId}/liveMigrations/validate/{validationId}: + get: + description: Return the status of one migration validation job. Your API Key must have the Organization Owner role to successfully call this resource. + operationId: getMigrationValidateStatus + parameters: + - $ref: "#/components/parameters/groupId" + - description: Unique 24-hexadecimal digit string that identifies the validation job. + in: path + name: validationId + required: true + schema: + example: 507f1f77bcf86cd799439011 + pattern: ^([a-f0-9]{24})$ + type: string + responses: + "200": + content: + application/vnd.atlas.2023-01-01+json: + schema: + $ref: "#/components/schemas/LiveImportValidation" + x-xgen-version: 2023-01-01 + description: OK + "400": + $ref: "#/components/responses/badRequest" + "401": + $ref: "#/components/responses/unauthorized" + "403": + $ref: "#/components/responses/forbidden" + "404": + $ref: "#/components/responses/notFound" + "500": + $ref: "#/components/responses/internalServerError" + summary: Return One Migration Validation Job + tags: + - Cloud Migration Service + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api cloudMigrationService getMigrationValidateStatus --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.GetGroupLiveMigrationValidateStatusApiParams{} + sdkResp, httpResp, err := client.CloudMigrationServiceApi. + GetGroupLiveMigrationValidateStatusWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/liveMigrations/validate/{validationId}?pretty=true" + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/liveMigrations/validate/{validationId}?pretty=true" + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Migration-Service/operation/getGroupLiveMigrationValidateStatus + x-xgen-method-verb-override: + customMethod: true + verb: getStatus + /api/atlas/v2/groups/{groupId}/logIntegrations: + get: + description: Returns all log integration configurations for the project. Optionally filter by integration type. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + operationId: listGroupLogIntegrations + parameters: + - $ref: "#/components/parameters/groupId" + - $ref: "#/components/parameters/includeCount" + - $ref: "#/components/parameters/itemsPerPage" + - $ref: "#/components/parameters/pageNum" + - description: Optional filter by integration type (e.g., 'S3_LOG_EXPORT'). + in: query + name: integrationType + schema: + type: string + responses: + "200": + content: + application/vnd.atlas.2025-03-12+json: + schema: + $ref: "#/components/schemas/PaginatedLogIntegrationResponse" + x-xgen-version: 2025-03-12 + description: OK + "400": + $ref: "#/components/responses/badRequest" + "401": + $ref: "#/components/responses/unauthorized" + "403": + $ref: "#/components/responses/forbidden" + "404": + $ref: "#/components/responses/notFound" + "500": + $ref: "#/components/responses/internalServerError" + summary: Return All Active Log Integrations + tags: + - Push-Based Log Export + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api pushBasedLogExport listGroupLogIntegrations --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.ListGroupLogIntegrationsApiParams{} + sdkResp, httpResp, err := client.Push - BasedLogExportApi. + ListGroupLogIntegrationsWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations?pretty=true" + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations?pretty=true" + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Push-Based-Log-Export/operation/listGroupLogIntegrations + post: + description: Creates a new log integration configuration identified by a unique ID. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + operationId: createGroupLogIntegration + parameters: + - $ref: "#/components/parameters/groupId" + requestBody: + content: + application/vnd.atlas.2025-03-12+json: + schema: + $ref: "#/components/schemas/S3LogIntegrationRequest" + description: Log integration configuration to create. + required: true + responses: + "201": + content: + application/vnd.atlas.2025-03-12+json: + schema: + $ref: "#/components/schemas/LogIntegrationResponse" + x-xgen-version: 2025-03-12 + description: Created + "400": + $ref: "#/components/responses/badRequest" + "401": + $ref: "#/components/responses/unauthorized" + "403": + $ref: "#/components/responses/forbidden" + "404": + $ref: "#/components/responses/notFound" + "500": + $ref: "#/components/responses/internalServerError" + summary: Create One Log Integration + tags: + - Push-Based Log Export + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api pushBasedLogExport createGroupLogIntegration --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.CreateGroupLogIntegrationApiParams{} + sdkResp, httpResp, err := client.Push - BasedLogExportApi. + CreateGroupLogIntegrationWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + --header "Content-Type: application/json" \ + -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations" \ + -d '{ }' + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + --header "Content-Type: application/json" \ + -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations" \ + -d '{ }' + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Push-Based-Log-Export/operation/createGroupLogIntegration + /api/atlas/v2/groups/{groupId}/logIntegrations/{id}: + delete: + description: Removes the configuration for one log integration identified by its unique ID. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + operationId: deleteGroupLogIntegration + parameters: + - $ref: "#/components/parameters/groupId" + - description: Unique identifier of the log integration configuration. + in: path + name: id + required: true + schema: + type: string + responses: + "204": + content: + application/vnd.atlas.2025-03-12+json: + x-xgen-version: 2025-03-12 + description: This endpoint does not return a response body. + "400": + $ref: "#/components/responses/badRequest" + "401": + $ref: "#/components/responses/unauthorized" + "403": + $ref: "#/components/responses/forbidden" + "404": + $ref: "#/components/responses/notFound" + "500": + $ref: "#/components/responses/internalServerError" + summary: Remove One Log Integration + tags: + - Push-Based Log Export + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api pushBasedLogExport deleteGroupLogIntegration --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.DeleteGroupLogIntegrationApiParams{} + httpResp, err := client.Push - BasedLogExportApi. + DeleteGroupLogIntegrationWithParams(ctx, params). Execute() } - label: curl (Service Accounts) @@ -37704,42 +38645,33 @@ paths: source: |- curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ - --header "Content-Type: application/json" \ - -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/liveMigrations/validate" \ - -d '{ }' + -X DELETE "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations/{id}" - label: curl (Digest) lang: cURL source: |- curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ - --header "Content-Type: application/json" \ - -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/liveMigrations/validate" \ - -d '{ }' - x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Migration-Service/operation/validateGroupLiveMigrations - x-xgen-method-verb-override: - customMethod: true - /api/atlas/v2/groups/{groupId}/liveMigrations/validate/{validationId}: + -X DELETE "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations/{id}" + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Push-Based-Log-Export/operation/deleteGroupLogIntegration get: - description: Return the status of one migration validation job. Your API Key must have the Organization Owner role to successfully call this resource. - operationId: getMigrationValidateStatus + description: Returns the configuration for one log integration identified by its unique ID. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + operationId: getGroupLogIntegration parameters: - $ref: "#/components/parameters/groupId" - - description: Unique 24-hexadecimal digit string that identifies the validation job. + - description: Unique identifier of the log integration configuration. in: path - name: validationId + name: id required: true schema: - example: 507f1f77bcf86cd799439011 - pattern: ^([a-f0-9]{24})$ type: string responses: "200": content: - application/vnd.atlas.2023-01-01+json: + application/vnd.atlas.2025-03-12+json: schema: - $ref: "#/components/schemas/LiveImportValidation" - x-xgen-version: 2023-01-01 + $ref: "#/components/schemas/LogIntegrationResponse" + x-xgen-version: 2025-03-12 description: OK "400": $ref: "#/components/responses/badRequest" @@ -37751,13 +38683,13 @@ paths: $ref: "#/components/responses/notFound" "500": $ref: "#/components/responses/internalServerError" - summary: Return One Migration Validation Job + summary: Return One Log Integration tags: - - Cloud Migration Service + - Push-Based Log Export x-codeSamples: - label: Atlas CLI lang: cURL - source: atlas api cloudMigrationService getMigrationValidateStatus --help + source: atlas api pushBasedLogExport getGroupLogIntegration --help - label: Go lang: go source: | @@ -37780,9 +38712,9 @@ paths: log.Fatalf("Error: %v", err) } - params = &sdk.GetGroupLiveMigrationValidateStatusApiParams{} - sdkResp, httpResp, err := client.CloudMigrationServiceApi. - GetGroupLiveMigrationValidateStatusWithParams(ctx, params). + params = &sdk.GetGroupLogIntegrationApiParams{} + sdkResp, httpResp, err := client.Push - BasedLogExportApi. + GetGroupLogIntegrationWithParams(ctx, params). Execute() } - label: curl (Service Accounts) @@ -37790,18 +38722,103 @@ paths: source: |- curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ - -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/liveMigrations/validate/{validationId}?pretty=true" + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations/{id}?pretty=true" - label: curl (Digest) lang: cURL source: |- curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ - -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/liveMigrations/validate/{validationId}?pretty=true" - x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Migration-Service/operation/getGroupLiveMigrationValidateStatus - x-xgen-method-verb-override: - customMethod: true - verb: getStatus + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations/{id}?pretty=true" + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Push-Based-Log-Export/operation/getGroupLogIntegration + put: + description: Updates the configuration for one log integration identified by its unique ID. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + operationId: updateGroupLogIntegration + parameters: + - $ref: "#/components/parameters/groupId" + - description: Unique identifier of the log integration configuration. + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/vnd.atlas.2025-03-12+json: + schema: + $ref: "#/components/schemas/LogIntegrationRequest" + description: Updated log integration configuration. + required: true + responses: + "200": + content: + application/vnd.atlas.2025-03-12+json: + schema: + $ref: "#/components/schemas/LogIntegrationResponse" + x-xgen-version: 2025-03-12 + description: OK + "400": + $ref: "#/components/responses/badRequest" + "401": + $ref: "#/components/responses/unauthorized" + "403": + $ref: "#/components/responses/forbidden" + "404": + $ref: "#/components/responses/notFound" + "500": + $ref: "#/components/responses/internalServerError" + summary: Update One Log Integration + tags: + - Push-Based Log Export + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api pushBasedLogExport updateGroupLogIntegration --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.UpdateGroupLogIntegrationApiParams{} + sdkResp, httpResp, err := client.Push - BasedLogExportApi. + UpdateGroupLogIntegrationWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + --header "Content-Type: application/json" \ + -X PUT "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations/{id}" \ + -d '{ }' + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + --header "Content-Type: application/json" \ + -X PUT "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations/{id}" \ + -d '{ }' + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Push-Based-Log-Export/operation/updateGroupLogIntegration /api/atlas/v2/groups/{groupId}/maintenanceWindow: delete: description: Resets the maintenance window for the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role. Urgent maintenance activities such as security patches can't wait for your chosen window. MongoDB Cloud starts those maintenance activities when needed. After you schedule maintenance for your cluster, you can't change your maintenance window until the current maintenance efforts complete. The maintenance procedure that MongoDB Cloud performs requires at least one replica set election during the maintenance window per replica set. Maintenance always begins as close to the scheduled hour as possible, but in-progress cluster updates or unexpected system issues could delay the start time. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -40867,6 +41884,7 @@ paths: verb: toggle /api/atlas/v2/groups/{groupId}/privateEndpoint/serverless/instance/{instanceName}/endpoint: get: + deprecated: true description: |- Returns all private endpoints for one serverless instance. You must have at least the Project Read Only role for the project to successfully call this resource. @@ -40954,8 +41972,10 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/privateEndpoint/serverless/instance/{instanceName}/endpoint?pretty=true" + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Private-Endpoints/operation/listGroupPrivateEndpointServerlessInstanceEndpoint post: + deprecated: true description: |- Creates one private endpoint for one serverless instance. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -41051,9 +42071,11 @@ paths: --header "Content-Type: application/json" \ -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/privateEndpoint/serverless/instance/{instanceName}/endpoint" \ -d '{ }' + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Private-Endpoints/operation/createGroupPrivateEndpointServerlessInstanceEndpoint /api/atlas/v2/groups/{groupId}/privateEndpoint/serverless/instance/{instanceName}/endpoint/{endpointId}: delete: + deprecated: true description: |- Remove one private endpoint from one serverless instance. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -41138,8 +42160,10 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X DELETE "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/privateEndpoint/serverless/instance/{instanceName}/endpoint/{endpointId}" + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Private-Endpoints/operation/deleteGroupPrivateEndpointServerlessInstanceEndpoint get: + deprecated: true description: |- Return one private endpoint for one serverless instance. Identify this endpoint using its unique ID. You must have at least the Project Read Only role for the project to successfully call this resource. @@ -41228,8 +42252,10 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/privateEndpoint/serverless/instance/{instanceName}/endpoint/{endpointId}?pretty=true" + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Private-Endpoints/operation/getGroupPrivateEndpointServerlessInstanceEndpoint patch: + deprecated: true description: |- Updates one private endpoint for one serverless instance. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -41327,6 +42353,7 @@ paths: --header "Content-Type: application/json" \ -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/privateEndpoint/serverless/instance/{instanceName}/endpoint/{endpointId}" \ -d '{ }' + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Private-Endpoints/operation/updateGroupPrivateEndpointServerlessInstanceEndpoint /api/atlas/v2/groups/{groupId}/privateIpMode: get: @@ -43635,6 +44662,7 @@ paths: x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Clusters/operation/getGroupSampleDatasetLoad /api/atlas/v2/groups/{groupId}/serverless: get: + deprecated: true description: |- Returns details for all serverless instances in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role. @@ -43713,11 +44741,13 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless?pretty=true" + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Instances/operation/listGroupServerlessInstances x-xgen-method-verb-override: customMethod: false verb: listInstances post: + deprecated: true description: |- Update as of Feb 2025: This endpoint now creates a Flex cluster instead. This endpoint will no longer be supported starting January 2026. Continuous backups are not supported and serverlessContinuousBackupEnabled will not take effect. Please use the createFlexCluster endpoint instead. @@ -43808,12 +44838,14 @@ paths: --header "Content-Type: application/json" \ -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless" \ -d '{ }' + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Instances/operation/createGroupServerlessInstance x-xgen-method-verb-override: customMethod: false verb: createInstance /api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/restoreJobs: get: + deprecated: true description: |- Returns all restore jobs for one serverless instance from the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -43899,8 +44931,10 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/restoreJobs?pretty=true" + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Backups/operation/listGroupServerlessBackupRestoreJobs post: + deprecated: true description: |- Restores one snapshot of one serverless instance from the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -43996,9 +45030,11 @@ paths: --header "Content-Type: application/json" \ -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/restoreJobs" \ -d '{ }' + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Backups/operation/createGroupServerlessBackupRestoreJob /api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/restoreJobs/{restoreJobId}: get: + deprecated: true description: |- Returns one restore job for one serverless instance from the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -44090,9 +45126,11 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/restoreJobs/{restoreJobId}?pretty=true" + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Backups/operation/getGroupServerlessBackupRestoreJob /api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/snapshots: get: + deprecated: true description: |- Returns all snapshots of one serverless instance from the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role. @@ -44178,9 +45216,11 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/snapshots?pretty=true" + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Backups/operation/listGroupServerlessBackupSnapshots /api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/snapshots/{snapshotId}: get: + deprecated: true description: |- Returns one snapshot of one serverless instance from the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role. @@ -44273,9 +45313,11 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/snapshots/{snapshotId}?pretty=true" + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Backups/operation/getGroupServerlessBackupSnapshot /api/atlas/v2/groups/{groupId}/serverless/{clusterName}/performanceAdvisor/autoIndexing: get: + deprecated: true description: Get whether the Serverless Auto Indexing feature is enabled. This endpoint returns a value for Flex clusters that were created with the createServerlessInstance endpoint or Flex clusters that were migrated from Serverless instances. However, the value returned is not indicative of the Auto Indexing state as Auto Indexing is unavailable for Flex clusters. This endpoint will be sunset in January 2026. externalDocs: description: createServerlessInstance @@ -44355,11 +45397,13 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{clusterName}/performanceAdvisor/autoIndexing?pretty=true" + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Performance-Advisor/operation/getGroupServerlessPerformanceAdvisorAutoIndexing x-xgen-method-verb-override: customMethod: false verb: get post: + deprecated: true description: Set whether the Serverless Auto Indexing feature is enabled. This endpoint sets a value for Flex clusters that were created with the createServerlessInstance endpoint or Flex clusters that were migrated from Serverless instances. However, the value returned is not indicative of the Auto Indexing state as Auto Indexing is unavailable for Flex clusters. This endpoint will be sunset in January 2026. externalDocs: description: createServerlessInstance @@ -44447,12 +45491,14 @@ paths: --header "Content-Type: application/json" \ -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{clusterName}/performanceAdvisor/autoIndexing" \ -d '{ }' + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Performance-Advisor/operation/setGroupServerlessPerformanceAdvisorAutoIndexing x-xgen-method-verb-override: customMethod: "True" verb: set /api/atlas/v2/groups/{groupId}/serverless/{name}: delete: + deprecated: true description: |- Removes one serverless instance from the specified project. The serverless instance must have termination protection disabled in order to be deleted. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -44537,11 +45583,13 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X DELETE "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{name}" + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Instances/operation/deleteGroupServerlessInstance x-xgen-method-verb-override: customMethod: false verb: deleteInstance get: + deprecated: true description: |- Returns details for one serverless instance in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role. @@ -44628,11 +45676,13 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{name}?pretty=true" + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Instances/operation/getGroupServerlessInstance x-xgen-method-verb-override: customMethod: false verb: getInstance patch: + deprecated: true description: |- Updates one serverless instance in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -44728,6 +45778,7 @@ paths: --header "Content-Type: application/json" \ -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{name}" \ -d '{ }' + x-sunset: 2026-01-15 x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Instances/operation/updateGroupServerlessInstance x-xgen-method-verb-override: customMethod: false @@ -50051,6 +51102,75 @@ paths: --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/byName/{groupName}?pretty=true" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Projects/operation/getGroupByName + /api/atlas/v2/openapi/info: + get: + description: "This resource returns general information about the MongoDB Atlas Administration API OpenAPI Specification. Deprecated versions: v2-{2024-05-30}" + operationId: getOpenapiInfo + parameters: [] + responses: + "200": + content: + application/vnd.atlas.2024-08-05+json: + schema: + $ref: "#/components/schemas/OpenApiInfo" + x-xgen-version: 2024-08-05 + description: OK + "401": + $ref: "#/components/responses/unauthorized" + "403": + $ref: "#/components/responses/forbidden" + "500": + $ref: "#/components/responses/internalServerError" + summary: Return General Information on MongoDB Atlas Administration API OpenAPI Specification + tags: + - OpenAPI + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api openApi getOpenapiInfo --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.GetOpenapiInfoApiParams{} + sdkResp, httpResp, err := client.OpenAPIApi. + GetOpenapiInfoWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/openapi/info?pretty=true" + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/openapi/info?pretty=true" + x-xgen-method-verb-override: + customMethod: "False" + verb: get /api/atlas/v2/orgs: get: description: Returns all organizations to which the requesting Service Account or API Key has access. To use this resource, the requesting Service Account or API Key must have the Organization Member role. @@ -56525,6 +57645,79 @@ paths: --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/unauth/controlPlaneIPAddresses?pretty=true" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Root/operation/listControlPlaneIpAddresses + /api/atlas/v2/unauth/openapi/versions: + get: + description: API that provides a list of available versionsfor a given environment. + operationId: listOpenapiVersions + parameters: + - $ref: "#/components/parameters/itemsPerPage" + - $ref: "#/components/parameters/pageNum" + - description: The environment to get the versions from. If not provided, it returnsthe versions for the given MongoDB URL. (E.g. prod for cloud.mongodb.com). + in: query + name: env + schema: + type: string + responses: + "200": + content: + application/vnd.atlas.2024-08-05+json: + schema: + $ref: "#/components/schemas/PaginatedApiVersions" + x-xgen-version: 2024-08-05 + application/vnd.atlas.2024-08-05+yaml: + schema: + $ref: "#/components/schemas/PaginatedApiVersions" + x-xgen-version: 2024-08-05 + description: OK + "500": + $ref: "#/components/responses/internalServerError" + summary: Return All Versions for One Environment + tags: + - OpenAPI + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api openApi listOpenapiVersions --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.ListOpenapiVersionsApiParams{} + sdkResp, httpResp, err := client.OpenAPIApi. + ListOpenapiVersionsWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/unauth/openapi/versions?pretty=true" + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/unauth/openapi/versions?pretty=true" /api/atlas/v2/users: post: deprecated: true @@ -56851,6 +58044,8 @@ tags: name: Network Peering - description: Returns, adds, edits, or removes an online archive. name: Online Archive + - description: Returns information about the MongoDB Atlas Specification. + name: OpenAPI - description: Returns, adds, and edits organizational units in MongoDB Cloud. name: Organizations - description: Returns suggested indexes and slow query data for a database deployment. Also enables or disables MongoDB Cloud-managed slow operation thresholds. To view field values in a sample query, you must have the Project Data Access Read Only role or higher. Otherwise, MongoDB Cloud returns redacted data rather than the field values. @@ -56863,7 +58058,7 @@ tags: name: Project IP Access List - description: Returns, adds, and edits collections of clusters and users in MongoDB Cloud. name: Projects - - description: You can continually push logs from mongod, mongos, and audit logs to an AWS S3 bucket. Atlas exports logs every 5 minutes. + - description: You can continually export mongod, mongos, and audit logs to an AWS S3 bucket. The new `/logIntegrations` API provides 1-minute log export. The existing `/pushBasedLogExport` API provides 5-minute log export and will be deprecated in the future. The log export integrations are managed at the project level. name: Push-Based Log Export - description: Configure and manage Atlas Resource Policies within your organization. name: Resource Policies diff --git a/openapi/atlas-api.yaml b/openapi/atlas-api.yaml index 74d3e67e0..973aadc23 100644 --- a/openapi/atlas-api.yaml +++ b/openapi/atlas-api.yaml @@ -1457,7 +1457,7 @@ components: description: Name of the parameter in the target object that MongoDB Cloud checks. The parameter must match all rules for MongoDB Cloud to check for alert configurations. type: string operator: - description: Comparison operator to apply when checking the current metric value against **matcher[n].value**. + description: Comparison operator to apply when checking the current metric value against **matcher[n].value**. The `REGEX` operator only supports inclusive matches. Use the `NOT_CONTAINS` operator to exclude values. enum: - EQUALS - CONTAINS @@ -2930,6 +2930,12 @@ components: - id title: API User Events type: object + ApiVersion: + properties: + version: + description: Object representing a version of the Atlas Admin API. + type: string + type: object AppServiceAlertConfigViewForNdsGroup: description: App Services metric alert configuration allows to select which app service conditions and events trigger alerts and how users are notified. properties: @@ -3154,6 +3160,9 @@ components: - DEPLOYMENT_MODEL_CHANGE_SUCCESS - DEPLOYMENT_MODEL_CHANGE_FAILURE example: DEPLOYMENT_FAILURE + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ title: App Services Event Types type: string AppServiceEventTypeViewAlertableWithThreshold: @@ -3161,6 +3170,9 @@ components: enum: - OUTSIDE_REALM_METRIC_THRESHOLD example: OUTSIDE_REALM_METRIC_THRESHOLD + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ title: App Services Event Types type: string AppServiceEventView: @@ -3282,7 +3294,7 @@ components: fieldName: $ref: '#/components/schemas/AppServiceMetricMatcherField' operator: - description: Comparison operator to apply when checking the current metric value against **matcher[n].value**. + description: Comparison operator to apply when checking the current metric value against **matcher[n].value**. The `REGEX` operator only supports inclusive matches. Use the `NOT_CONTAINS` operator to exclude values. enum: - EQUALS - CONTAINS @@ -4914,6 +4926,11 @@ components: resourceGroupName: description: Name of the Azure resource group that contains your Azure Key Vault. This field cannot be modified when you enable and set up private endpoint connections to your Azure Key Vault. type: string + roleId: + description: Unique 24-hexadecimal digit string that identifies the Azure Service Principal that MongoDB Cloud uses to access the Azure Key Vault. + example: 32b6e34b3d91647abb20e7b8 + pattern: ^([a-f0-9]{24})$ + type: string secret: description: Private data that you need secured and that belongs to the specified Azure Key Vault (AKV) tenant (**azureKeyVault.tenantID**). This data can include any type of sensitive data such as passwords, database connection strings, API keys, and the like. AKV stores this information as encrypted binary data. externalDocs: @@ -6230,6 +6247,9 @@ components: - PENDING_INVOICE_OVER_THRESHOLD - DAILY_BILL_OVER_THRESHOLD example: PENDING_INVOICE_OVER_THRESHOLD + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ title: Billing Event Type type: string BillingEventTypeViewForNdsGroup: @@ -9464,6 +9484,9 @@ components: enum: - CLUSTER_MONGOS_IS_MISSING example: CLUSTER_MONGOS_IS_MISSING + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ title: Cluster Event Types type: string ClusterEventViewForNdsGroup: @@ -9624,7 +9647,7 @@ components: fieldName: $ref: '#/components/schemas/ClusterMatcherField' operator: - description: Comparison operator to apply when checking the current metric value against **matcher[n].value**. + description: Comparison operator to apply when checking the current metric value against **matcher[n].value**. The `REGEX` operator only supports inclusive matches. Use the `NOT_CONTAINS` operator to exclude values. enum: - EQUALS - CONTAINS @@ -9776,6 +9799,16 @@ components: - PAUSED readOnly: true type: string + storedSource: + description: Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. Note that storing all fields (true) is not allowed for vector search indexes. To learn more, see documentation. + example: + include | exclude: + - field1 + - field2 + externalDocs: + description: Stored Source Fields + url: https://dochub.mongodb.org/core/atlas-search-stored-source + type: object type: description: Type of the index. Default type is search. enum: @@ -10098,13 +10131,13 @@ components: allOf: - $ref: '#/components/schemas/StreamsConnectionPrivatePreview' - properties: - authentication: - $ref: '#/components/schemas/ConfluentSchemaRegistryAuthentication' provider: description: The Schema Registry provider. enum: - CONFLUENT type: string + schemaRegistryAuthentication: + $ref: '#/components/schemas/ConfluentSchemaRegistryAuthentication' schemaRegistryUrls: description: List of Schema Registry URLs. items: @@ -10406,6 +10439,9 @@ components: - CPS_PREV_SNAPSHOT_OLD - CPS_OPLOG_BEHIND example: CPS_SNAPSHOT_BEHIND + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ title: Cps Backup Event Type type: string CpsBackupThresholdAlertConfigViewForNdsGroup: @@ -13088,6 +13124,9 @@ components: type: boolean eventTypeName: description: Incident that triggered this alert. + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ oneOf: - enum: - CREDIT_CARD_ABOUT_TO_EXPIRE @@ -13146,6 +13185,10 @@ components: - GROUP_SERVICE_ACCOUNT_SECRETS_EXPIRED title: Group Event Types type: string + - enum: + - MONGOTUNE_ALERT + title: Mongotune Event Types + type: string - enum: - CLUSTER_INSTANCE_STOP_START - CLUSTER_INSTANCE_RESYNC_REQUESTED @@ -13212,6 +13255,28 @@ components: - RESOURCE_POLICY_VIOLATED title: Atlas Resource Policy Audit Types type: string + - enum: + - HOST_DOWN + - HOST_HAS_INDEX_SUGGESTIONS + - HOST_MONGOT_CRASHING_OOM + - HOST_MONGOT_STOP_REPLICATION + - HOST_MONGOT_APPROACHING_STOP_REPLICATION + - HOST_MONGOT_PAUSE_INITIAL_SYNC + - HOST_SEARCH_NODE_INDEX_FAILED + - HOST_EXTERNAL_LOG_SINK_EXPORT_DOWN + - HOST_NOT_ENOUGH_DISK_SPACE + - SSH_KEY_NDS_HOST_ACCESS_REQUESTED + - SSH_KEY_NDS_HOST_ACCESS_REFRESHED + - PUSH_BASED_LOG_EXPORT_STOPPED + - PUSH_BASED_LOG_EXPORT_DROPPED_LOG + - HOST_VERSION_BEHIND + - VERSION_BEHIND + - HOST_EXPOSED + - HOST_SSL_CERTIFICATE_STALE + - HOST_SECURITY_CHECKUP_NOT_MET + - ALERT_HOST_SSH_SESSION_STARTED + title: Host Event Types + type: string type: object groupId: description: Unique 24-hexadecimal digit string that identifies the project that owns this alert configuration. @@ -13362,6 +13427,10 @@ components: - GROUP_SERVICE_ACCOUNT_SECRETS_EXPIRED title: Group Event Types type: string + - enum: + - MONGOTUNE_ALERT + title: Mongotune Event Types + type: string - enum: - CLUSTER_INSTANCE_STOP_START - CLUSTER_INSTANCE_RESYNC_REQUESTED @@ -13452,6 +13521,28 @@ components: - RESOURCE_POLICY_VIOLATED title: Atlas Resource Policy Audit Types type: string + - enum: + - HOST_DOWN + - HOST_HAS_INDEX_SUGGESTIONS + - HOST_MONGOT_CRASHING_OOM + - HOST_MONGOT_STOP_REPLICATION + - HOST_MONGOT_APPROACHING_STOP_REPLICATION + - HOST_MONGOT_PAUSE_INITIAL_SYNC + - HOST_SEARCH_NODE_INDEX_FAILED + - HOST_EXTERNAL_LOG_SINK_EXPORT_DOWN + - HOST_NOT_ENOUGH_DISK_SPACE + - SSH_KEY_NDS_HOST_ACCESS_REQUESTED + - SSH_KEY_NDS_HOST_ACCESS_REFRESHED + - PUSH_BASED_LOG_EXPORT_STOPPED + - PUSH_BASED_LOG_EXPORT_DROPPED_LOG + - HOST_VERSION_BEHIND + - VERSION_BEHIND + - HOST_EXPOSED + - HOST_SSL_CERTIFICATE_STALE + - HOST_SECURITY_CHECKUP_NOT_MET + - ALERT_HOST_SSH_SESSION_STARTED + title: Host Event Types + type: string readOnly: true type: object groupId: @@ -13791,6 +13882,14 @@ components: - SEARCH_DEPLOYMENT_DELETED title: Search Deployment Audit Types type: string + - enum: + - SEARCH_PLAN_STARTED + - SEARCH_PLAN_COMPLETED + - SEARCH_PLAN_FAILED + - SEARCH_PLANNING_FAILURE + - SEARCH_PLAN_ASAP_REQUESTED + title: Search Planner Audit Types + type: string - enum: - SERVERLESS_DEPLOYMENT_CREATED - SERVERLESS_DEPLOYMENT_DELETED @@ -13872,6 +13971,11 @@ components: - QUERY_SHAPE_UNBLOCKED title: Query Shape Event Types type: string + - enum: + - MONGOTUNE_INFO + - MONGOTUNE_ALERT + title: Mongotune Event Types + type: string type: object groupId: description: Unique 24-hexadecimal digit string that identifies the project in which the event occurred. The **eventId** identifies the specific event. @@ -16329,6 +16433,9 @@ components: - AZURE_ENCRYPTION_KEY_INVALID - GCP_ENCRYPTION_KEY_INVALID example: AWS_ENCRYPTION_KEY_NEEDS_ROTATION + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ title: Encryption Event Types type: string EndpointService: @@ -16685,6 +16792,7 @@ components: - SSH_KEY_NDS_HOST_ACCESS_ATTEMPT - SSH_KEY_NDS_HOST_ACCESS_GRANTED - SSH_KEY_NDS_HOST_ACCESS_LEVEL_CHANGED + - ALERT_HOST_SSH_SESSION_STARTED - HOST_SSH_SESSION_ENDED - HOST_X509_CERTIFICATE_CERTIFICATE_GENERATED_FOR_SUPPORT_ACCESS - PUSH_BASED_LOG_EXPORT_RESUMED @@ -16711,6 +16819,11 @@ components: - INDEX_SUCCESS_INDEX_BUILD title: Index Build Audit Types type: string + - enum: + - MONGOTUNE_INFO + - MONGOTUNE_ALERT + title: Mongotune Event Types + type: string - enum: - CLUSTER_CREATED - CLUSTER_RESURRECTED @@ -16885,6 +16998,7 @@ components: - INGESTION_PIPELINE_CREATED - INGESTION_PIPELINE_UPDATED - OS_TUNE_FILE_OVERRIDES + - CLUSTER_SYSTEMD_OVERRIDES_CHANGED - MONITORING_AGENT_OVERRIDES - MONITORING_AGENT_REBALANCE_FLAG - MONITORING_AGENT_REBALANCE_TRIGGERED @@ -17113,6 +17227,14 @@ components: - SEARCH_DEPLOYMENT_DELETED title: Search Deployment Audit Types type: string + - enum: + - SEARCH_PLAN_STARTED + - SEARCH_PLAN_COMPLETED + - SEARCH_PLAN_FAILED + - SEARCH_PLANNING_FAILURE + - SEARCH_PLAN_ASAP_REQUESTED + title: Search Planner Audit Types + type: string - enum: - SERVERLESS_DEPLOYMENT_CREATED - SERVERLESS_DEPLOYMENT_DELETED @@ -17572,6 +17694,7 @@ components: - $ref: '#/components/schemas/NDSTenantEndpointAuditView' - $ref: '#/components/schemas/ForNdsGroup' - $ref: '#/components/schemas/SearchDeploymentAuditView' + - $ref: '#/components/schemas/SearchPlannerAuditView' - $ref: '#/components/schemas/TeamEventViewForNdsGroup' - $ref: '#/components/schemas/UserEventViewForNdsGroup' - $ref: '#/components/schemas/ResourceEventViewForNdsGroup' @@ -19175,6 +19298,9 @@ components: enum: - OUTSIDE_FLEX_METRIC_THRESHOLD example: OUTSIDE_FLEX_METRIC_THRESHOLD + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ title: Flex Metric Event Types type: string FlexNetworkBytesInDataMetricThresholdView: @@ -21609,6 +21735,7 @@ components: - SSH_KEY_NDS_HOST_ACCESS_ATTEMPT - SSH_KEY_NDS_HOST_ACCESS_GRANTED - SSH_KEY_NDS_HOST_ACCESS_LEVEL_CHANGED + - ALERT_HOST_SSH_SESSION_STARTED - HOST_SSH_SESSION_ENDED - HOST_X509_CERTIFICATE_CERTIFICATE_GENERATED_FOR_SUPPORT_ACCESS - PUSH_BASED_LOG_EXPORT_RESUMED @@ -21643,7 +21770,11 @@ components: - HOST_EXPOSED - HOST_SSL_CERTIFICATE_STALE - HOST_SECURITY_CHECKUP_NOT_MET + - ALERT_HOST_SSH_SESSION_STARTED example: HOST_DOWN + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ title: Host Event Types type: string HostEventViewForNdsGroup: @@ -21760,7 +21891,7 @@ components: fieldName: $ref: '#/components/schemas/HostMatcherField' operator: - description: Comparison operator to apply when checking the current metric value against **matcher[n].value**. + description: Comparison operator to apply when checking the current metric value against **matcher[n].value**. The `REGEX` operator only supports inclusive matches. Use the `NOT_CONTAINS` operator to exclude values. enum: - EQUALS - CONTAINS @@ -22453,6 +22584,9 @@ components: enum: - OUTSIDE_METRIC_THRESHOLD example: OUTSIDE_METRIC_THRESHOLD + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ title: Host Metric Event Types type: string HostMetricThreshold: @@ -23154,6 +23288,28 @@ components: type: object type: object writeOnly: true + Info: + description: Information about the MongoDB Atlas Administration API OpenAPI Specification. + properties: + description: + description: Description of the MongoDB Atlas Administration API. + example: The MongoDB Atlas Administration API allows developers to manage all components in MongoDB Atlas. + type: string + license: + $ref: '#/components/schemas/License' + termsOfService: + description: Terms of Service URL. + example: https://www.mongodb.com/mongodb-management-service-terms-and-conditions + type: string + title: + description: Title of the MongoDB Atlas Administration API. + example: MongoDB Atlas Administration API. + type: string + version: + description: Version of the MongoDB Atlas Administration API. + example: "2.0" + type: string + type: object IngestionPipelineRun: description: Run details of a Data Lake Pipeline. properties: @@ -23419,6 +23575,7 @@ components: - ATLAS_AWS_BACKUP_DOWNLOAD_VM - ATLAS_AWS_BACKUP_DOWNLOAD_VM_STORAGE - ATLAS_AWS_BACKUP_DOWNLOAD_VM_STORAGE_IOPS + - ATLAS_AWS_BACKUP_EXPORT_PRIVATE_ENDPOINT - ATLAS_AWS_PRIVATE_ENDPOINT - ATLAS_AWS_PRIVATE_ENDPOINT_CAPACITY_UNITS - ATLAS_GCP_SEARCH_INSTANCE_S20_COMPUTE_LOCALSSD @@ -23765,23 +23922,49 @@ components: - ATLAS_GCP_STREAM_PROCESSING_DATA_TRANSFER_INTERNET - ATLAS_GCP_STREAM_PROCESSING_PRIVATELINK - VOYAGE_EMBEDDING_3_TEXT_LARGE_API + - VOYAGE_EMBEDDING_3_TEXT_LARGE_API_FREE - VOYAGE_EMBEDDING_3_TEXT_API + - VOYAGE_EMBEDDING_3_TEXT_API_FREE - VOYAGE_EMBEDDING_3_TEXT_LITE_API + - VOYAGE_EMBEDDING_3_TEXT_LITE_API_FREE - VOYAGE_EMBEDDING_3_5_TEXT_API + - VOYAGE_EMBEDDING_3_5_TEXT_API_FREE - VOYAGE_EMBEDDING_3_5_TEXT_LITE_API + - VOYAGE_EMBEDDING_3_5_TEXT_LITE_API_FREE - VOYAGE_EMBEDDING_3_TEXT_CONTEXT_API + - VOYAGE_EMBEDDING_3_TEXT_CONTEXT_API_FREE - VOYAGE_EMBEDDING_3_CODE_API + - VOYAGE_EMBEDDING_3_CODE_API_FREE - VOYAGE_EMBEDDING_2_FINANCE_API + - VOYAGE_EMBEDDING_2_FINANCE_API_FREE - VOYAGE_EMBEDDING_2_LAW_API + - VOYAGE_EMBEDDING_2_LAW_API_FREE - VOYAGE_EMBEDDING_2_CODE_API + - VOYAGE_EMBEDDING_2_CODE_API_FREE - VOYAGE_EMBEDDING_3_5_MULTIMODAL_TOKENS_API + - VOYAGE_EMBEDDING_3_5_MULTIMODAL_TOKENS_API_FREE - VOYAGE_EMBEDDING_3_5_MULTIMODAL_PIXELS_API + - VOYAGE_EMBEDDING_3_5_MULTIMODAL_PIXELS_API_FREE - VOYAGE_EMBEDDING_3_MULTIMODAL_TOKENS_API + - VOYAGE_EMBEDDING_3_MULTIMODAL_TOKENS_API_FREE - VOYAGE_EMBEDDING_3_MULTIMODAL_PIXELS_API + - VOYAGE_EMBEDDING_3_MULTIMODAL_PIXELS_API_FREE - VOYAGE_RERANK_2_5_LITE_API + - VOYAGE_RERANK_2_5_LITE_API_FREE - VOYAGE_RERANK_2_5_API + - VOYAGE_RERANK_2_5_API_FREE - VOYAGE_RERANK_2_LITE_API + - VOYAGE_RERANK_2_LITE_API_FREE - VOYAGE_RERANK_2_API + - VOYAGE_RERANK_2_API_FREE + - VOYAGE_EMBEDDING_4_TEXT_LARGE_API + - VOYAGE_EMBEDDING_4_TEXT_LARGE_API_FREE + - VOYAGE_EMBEDDING_4_TEXT_API + - VOYAGE_EMBEDDING_4_TEXT_API_FREE + - VOYAGE_EMBEDDING_4_TEXT_LITE_API + - VOYAGE_EMBEDDING_4_TEXT_LITE_API_FREE + - VOYAGE_EMBEDDING_4_TEXT_NANO_API + - VOYAGE_EMBEDDING_4_TEXT_NANO_API_FREE - VOYAGE_EMBEDDING_3_TEXT_LARGE_AUTOEMBED - VOYAGE_EMBEDDING_3_TEXT_AUTOEMBED - VOYAGE_EMBEDDING_3_TEXT_LITE_AUTOEMBED @@ -23796,6 +23979,10 @@ components: - VOYAGE_EMBEDDING_3_5_MULTIMODAL_PIXELS_AUTOEMBED - VOYAGE_EMBEDDING_3_MULTIMODAL_TOKENS_AUTOEMBED - VOYAGE_EMBEDDING_3_MULTIMODAL_PIXELS_AUTOEMBED + - VOYAGE_EMBEDDING_4_TEXT_LARGE_AUTOEMBED + - VOYAGE_EMBEDDING_4_TEXT_AUTOEMBED + - VOYAGE_EMBEDDING_4_TEXT_LITE_AUTOEMBED + - VOYAGE_EMBEDDING_4_TEXT_NANO_AUTOEMBED readOnly: true type: string startDate: @@ -24846,6 +25033,18 @@ components: - eventTypeName - notifications type: object + License: + description: License information of the MongoDB Atlas Administration API. + properties: + name: + description: Name of the license. + example: CC BY-NC-SA 3.0 US + type: string + url: + description: URL of the license. + example: https://creativecommons.org/licenses/by-nc-sa/3.0/us/ + type: string + type: object Link: properties: href: @@ -25057,6 +25256,47 @@ components: readOnly: true type: string type: object + LogIntegrationRequest: + description: Request schema for creating or updating a log integration. + discriminator: + mapping: + S3_LOG_EXPORT: '#/components/schemas/S3LogIntegrationRequest' + propertyName: type + oneOf: + - $ref: '#/components/schemas/S3LogIntegrationRequest' + properties: + type: + description: Type of log integration. Identifies which service will receive the exported logs. + enum: + - S3_LOG_EXPORT + type: string + required: + - type + title: Log Export Integration Request + type: object + LogIntegrationResponse: + description: Response schema for log integration operations. + discriminator: + mapping: + S3_LOG_EXPORT: '#/components/schemas/S3LogIntegrationResponse' + propertyName: type + oneOf: + - $ref: '#/components/schemas/S3LogIntegrationResponse' + properties: + id: + description: Unique 24-character hexadecimal digit string that identifies the log integration configuration. + example: 507f1f77bcf86cd799439011 + type: string + type: + description: Type of log integration. Identifies which service will receive the exported logs. + enum: + - S3_LOG_EXPORT + type: string + required: + - id + - type + title: Log Integration Response + type: object LogicalSizeDataMetricThresholdView: properties: metricName: @@ -25157,6 +25397,10 @@ components: - RULE_ID title: Log Ingestion Matcher Fields type: string + - enum: + - SOFTWARE_TYPE + title: Global Software Type Matcher Fields + type: string type: object MatcherHostType: description: Value to match or exceed using the specified **matchers.operator**. @@ -26812,6 +27056,7 @@ components: - INGESTION_PIPELINE_CREATED - INGESTION_PIPELINE_UPDATED - OS_TUNE_FILE_OVERRIDES + - CLUSTER_SYSTEMD_OVERRIDES_CHANGED - MONITORING_AGENT_OVERRIDES - MONITORING_AGENT_REBALANCE_FLAG - MONITORING_AGENT_REBALANCE_TRIGGERED @@ -27491,6 +27736,9 @@ components: - NDS_X509_USER_AUTHENTICATION_CUSTOMER_CRL_EXPIRATION_CHECK - NDS_X509_USER_AUTHENTICATION_MANAGED_USER_CERTS_EXPIRATION_CHECK example: NDS_X509_USER_AUTHENTICATION_CUSTOMER_CA_EXPIRATION_CHECK + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ title: NDS x509 User Auth Event Types type: string NamespaceObj: @@ -28438,6 +28686,11 @@ components: required: - metricName type: object + OpenApiInfo: + properties: + info: + $ref: '#/components/schemas/Info' + type: object OperationThrottlingRejectedOperationsRawMetricThresholdView: properties: metricName: @@ -30170,6 +30423,30 @@ components: readOnly: true type: integer type: object + PaginatedApiVersions: + properties: + links: + description: List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships. + externalDocs: + description: Web Linking Specification (RFC 5988) + url: https://datatracker.ietf.org/doc/html/rfc5988 + items: + $ref: '#/components/schemas/Link' + readOnly: true + type: array + results: + description: List of returned documents that MongoDB Cloud provides when completing this request. + items: + $ref: '#/components/schemas/ApiVersion' + readOnly: true + type: array + totalCount: + description: Total number of documents available. MongoDB Cloud omits this value if `includeCount` is set to `false`. The total number is an estimate and may not be exact. + format: int32 + minimum: 0 + readOnly: true + type: integer + type: object PaginatedAtlasGroupView: properties: links: @@ -30654,6 +30931,30 @@ components: readOnly: true type: integer type: object + PaginatedLogIntegrationResponse: + properties: + links: + description: List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships. + externalDocs: + description: Web Linking Specification (RFC 5988) + url: https://datatracker.ietf.org/doc/html/rfc5988 + items: + $ref: '#/components/schemas/Link' + readOnly: true + type: array + results: + description: List of returned documents that MongoDB Cloud provides when completing this request. + items: + $ref: '#/components/schemas/LogIntegrationResponse' + readOnly: true + type: array + totalCount: + description: Total number of documents available. MongoDB Cloud omits this value if `includeCount` is set to `false`. The total number is an estimate and may not be exact. + format: int32 + minimum: 0 + readOnly: true + type: integer + type: object PaginatedNetworkAccessView: properties: links: @@ -30871,6 +31172,31 @@ components: readOnly: true type: integer type: object + PaginatedQueryShapes: + description: Paginated collection of query shapes. This endpoint returns a maximum of 100 results. + properties: + links: + description: List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships. + externalDocs: + description: Web Linking Specification (RFC 5988) + url: https://datatracker.ietf.org/doc/html/rfc5988 + items: + $ref: '#/components/schemas/Link' + readOnly: true + type: array + results: + description: List of returned documents that MongoDB Cloud provides when completing this request. + items: + $ref: '#/components/schemas/QueryShapeResponse' + readOnly: true + type: array + totalCount: + description: Total number of documents available. MongoDB Cloud omits this value if `includeCount` is set to `false`. The total number is an estimate and may not be exact. + format: int32 + minimum: 0 + readOnly: true + type: integer + type: object PaginatedRestoreJobView: properties: links: @@ -31853,6 +32179,39 @@ components: required: - metricName type: object + QueryShapeResponse: + description: Response containing the details and status of a query shape. The query shape field may be null if the user lacks PII view access. + properties: + command: + description: The MongoDB command type issued for a query shape. + enum: + - FIND + - DISTINCT + - AGGREGATE + readOnly: true + type: string + namespace: + description: Human-readable label that identifies the namespace on the specified host. The resource expresses this parameter value as `.`. + readOnly: true + type: string + queryShape: + description: A query shape is a set of specifications that group similar queries together. Specifications can include filters, sorts, projections, aggregation pipeline stages, a namespace, and others. Queries that have similar specifications have the same query shape. This field may be null if the user lacks PII view access. + readOnly: true + type: string + queryShapeHash: + description: A hexadecimal string that represents the hash of a MongoDB query shape. + readOnly: true + type: string + status: + description: The rejection status of a query shape. Use REJECTED to prevent the query shape from executing on the cluster, or UNREJECTED to allow it to execute. + enum: + - REJECTED + - UNREJECTED + type: string + required: + - queryShapeHash + - status + type: object QueryShapeSeenMetadata: description: Metadata about when a query shape was seen. properties: @@ -31870,129 +32229,141 @@ components: format: int64 type: integer type: object - QuerySpillToDiskDuringSortRawMetricThresholdView: + QueryShapeUpdateRequest: + description: Request body for modifying the rejection status of a query shape. properties: - metricName: - description: Human-readable label that identifies the metric against which MongoDB Cloud checks the configured **metricThreshold.threshold**. - type: string - mode: - description: MongoDB Cloud computes the current metric value as an average. - enum: - - AVERAGE - type: string - operator: - description: Comparison operator to apply when checking the current metric value. + status: + description: The rejection status of a query shape. Use REJECTED to prevent the query shape from executing on the cluster, or UNREJECTED to allow it to execute. enum: - - LESS_THAN - - GREATER_THAN + - REJECTED + - UNREJECTED type: string - threshold: - description: Value of metric that, when exceeded, triggers an alert. - format: double - type: number - units: - $ref: '#/components/schemas/RawMetricUnits' required: - - metricName - type: object - QueryStatsDetailsResponse: - description: Metadata and summary statistics for a given query shape. - properties: - firstSeen: - $ref: '#/components/schemas/QueryShapeSeenMetadata' - lastSeen: - $ref: '#/components/schemas/QueryShapeSeenMetadata' - queryStats: - $ref: '#/components/schemas/QueryStatsSummary' - type: object - QueryStatsSummary: - description: A summary of execution statistics for a given query shape. - properties: - avgWorkingMillis: - description: Average total time in milliseconds spent running queries with the given query shape. If the query resulted in getMore commands, this metric includes the time spent processing the getMore requests. This metric does not include time spent waiting for the client. - format: double - type: number - bytesRead: - description: The number of bytes read by the given query shape from the disk to the cache. - format: double - type: number - command: - description: The MongoDB command issued for this query shape. - enum: - - find - - distinct - - aggregate - type: string - docsExamined: - description: Total number of documents examined by queries with the given query shape. - format: double - type: number - docsExaminedRatio: - description: Ratio of documents examined to documents returned by queries with the given query shape. - format: double - type: number - docsReturned: - description: Total number of documents returned by queries with the given query shape. - format: double - type: number - execCount: - description: Total number of times that queries with the given query shape have been executed. - format: double - type: number - keysExamined: - description: Total number of in-bounds and out-of-bounds index keys examined by queries with the given query shape. - format: double - type: number - keysExaminedRatio: - description: Ratio of in-bounds and out-of-bounds index keys examined to indexes containing documents returned by queries with the given query shape. - format: double - type: number - lastExecMicros: - description: Execution runtime in microseconds for the most recent query with the given query shape. - format: double - type: number - namespace: - description: Human-readable label that identifies the namespace on the specified host. The resource expresses this parameter value as `.`. - type: string - p50ExecMicros: - description: The 50th percentile value of execution time in microseconds. - format: double - type: number - p90ExecMicros: - description: The 90th percentile value of execution time in microseconds. - format: double - type: number - p99ExecMicros: - description: The 99th percentile value of execution time in microseconds. - format: double - type: number - queryShape: - description: A query shape is a set of specifications that group similar queries together. Specifications can include filters, sorts, projections, aggregation pipeline stages, a namespace, and others. Queries that have similar specifications have the same query shape. - type: string - queryShapeHash: - description: A hexadecimal string that represents the hash of a MongoDB query shape. - type: string - systemQuery: - description: Indicates whether this query shape represents a system-initiated query. - type: boolean - totalTimeToResponseMicros: - description: Time in microseconds spent from the beginning of query processing to the first server response. - format: double - type: number - totalWorkingMillis: - description: Total time in milliseconds spent running queries with the given query shape. If the query resulted in `getMore` commands, this metric includes the time spent processing the `getMore` requests. This metric does not include time spent waiting for the client. - format: double - type: number - type: object - QueryStatsSummaryListResponse: - properties: - summaries: - description: List of query shape statistic summaries from Query Shape Insights. - items: - $ref: '#/components/schemas/QueryStatsSummary' - type: array + - status type: object - QueryTargetingScannedObjectsPerReturnedRawMetricThresholdView: + QuerySpillToDiskDuringSortRawMetricThresholdView: + properties: + metricName: + description: Human-readable label that identifies the metric against which MongoDB Cloud checks the configured **metricThreshold.threshold**. + type: string + mode: + description: MongoDB Cloud computes the current metric value as an average. + enum: + - AVERAGE + type: string + operator: + description: Comparison operator to apply when checking the current metric value. + enum: + - LESS_THAN + - GREATER_THAN + type: string + threshold: + description: Value of metric that, when exceeded, triggers an alert. + format: double + type: number + units: + $ref: '#/components/schemas/RawMetricUnits' + required: + - metricName + type: object + QueryStatsDetailsResponse: + description: Metadata and summary statistics for a given query shape. + properties: + firstSeen: + $ref: '#/components/schemas/QueryShapeSeenMetadata' + lastSeen: + $ref: '#/components/schemas/QueryShapeSeenMetadata' + queryStats: + $ref: '#/components/schemas/QueryStatsSummary' + type: object + QueryStatsSummary: + description: A summary of execution statistics for a given query shape. + properties: + avgWorkingMillis: + description: Average total time in milliseconds spent running queries with the given query shape. If the query resulted in getMore commands, this metric includes the time spent processing the getMore requests. This metric does not include time spent waiting for the client. + format: double + type: number + bytesRead: + description: The number of bytes read by the given query shape from the disk to the cache. + format: double + type: number + command: + description: The MongoDB command issued for this query shape. + enum: + - find + - distinct + - aggregate + type: string + docsExamined: + description: Total number of documents examined by queries with the given query shape. + format: double + type: number + docsExaminedRatio: + description: Ratio of documents examined to documents returned by queries with the given query shape. + format: double + type: number + docsReturned: + description: Total number of documents returned by queries with the given query shape. + format: double + type: number + execCount: + description: Total number of times that queries with the given query shape have been executed. + format: double + type: number + keysExamined: + description: Total number of in-bounds and out-of-bounds index keys examined by queries with the given query shape. + format: double + type: number + keysExaminedRatio: + description: Ratio of in-bounds and out-of-bounds index keys examined to indexes containing documents returned by queries with the given query shape. + format: double + type: number + lastExecMicros: + description: Execution runtime in microseconds for the most recent query with the given query shape. + format: double + type: number + namespace: + description: Human-readable label that identifies the namespace on the specified host. The resource expresses this parameter value as `.`. + type: string + p50ExecMicros: + description: The 50th percentile value of execution time in microseconds. + format: double + type: number + p90ExecMicros: + description: The 90th percentile value of execution time in microseconds. + format: double + type: number + p99ExecMicros: + description: The 99th percentile value of execution time in microseconds. + format: double + type: number + queryShape: + description: A query shape is a set of specifications that group similar queries together. Specifications can include filters, sorts, projections, aggregation pipeline stages, a namespace, and others. Queries that have similar specifications have the same query shape. + type: string + queryShapeHash: + description: A hexadecimal string that represents the hash of a MongoDB query shape. + type: string + systemQuery: + description: Indicates whether this query shape represents a system-initiated query. + type: boolean + totalTimeToResponseMicros: + description: Time in microseconds spent from the beginning of query processing to the first server response. + format: double + type: number + totalWorkingMillis: + description: Total time in milliseconds spent running queries with the given query shape. If the query resulted in `getMore` commands, this metric includes the time spent processing the `getMore` requests. This metric does not include time spent waiting for the client. + format: double + type: number + type: object + QueryStatsSummaryListResponse: + properties: + summaries: + description: List of query shape statistic summaries from Query Shape Insights. + items: + $ref: '#/components/schemas/QueryStatsSummary' + type: array + type: object + QueryTargetingScannedObjectsPerReturnedRawMetricThresholdView: properties: metricName: description: Human-readable label that identifies the metric against which MongoDB Cloud checks the configured **metricThreshold.threshold**. @@ -32629,6 +33000,9 @@ components: - NO_PRIMARY - PRIMARY_ELECTED example: NO_PRIMARY + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ title: ReplicaSet Event Types type: string ReplicaSetEventTypeViewForNdsGroupAlertableWithThreshold: @@ -32639,6 +33013,9 @@ components: - TOO_FEW_HEALTHY_MEMBERS - TOO_MANY_UNHEALTHY_MEMBERS example: TOO_MANY_ELECTIONS + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ title: ReplicaSet Event Types type: string ReplicaSetMatcher: @@ -32647,7 +33024,7 @@ components: fieldName: $ref: '#/components/schemas/ReplicaSetMatcherField' operator: - description: Comparison operator to apply when checking the current metric value against **matcher[n].value**. + description: Comparison operator to apply when checking the current metric value against **matcher[n].value**. The `REGEX` operator only supports inclusive matches. Use the `NOT_CONTAINS` operator to exclude values. enum: - EQUALS - CONTAINS @@ -33141,6 +33518,113 @@ components: - prefixPath title: S3 Log Export type: object + S3LogIntegrationRequest: + allOf: + - $ref: '#/components/schemas/LogIntegrationRequest' + - properties: + bucketName: + description: Human-readable label that identifies the S3 bucket name for storing log files. + example: my-log-bucket + type: string + iamRoleId: + description: Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket. + example: 507f1f77bcf86cd799439011 + type: string + kmsKey: + description: AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings. + example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + nullable: true + type: string + logTypes: + description: 'Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGOD_AUDIT, MONGOS_AUDIT.' + example: + - MONGOD + - MONGOS + - MONGOD_AUDIT + - MONGOS_AUDIT + items: + enum: + - MONGOD + - MONGOS + - MONGOD_AUDIT + - MONGOS_AUDIT + type: string + maxItems: 4 + minItems: 1 + type: array + uniqueItems: true + prefixPath: + description: S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type. + example: mongo-logs/ + type: string + type: + description: Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type. + enum: + - S3_LOG_EXPORT + type: string + type: object + description: Request schema for creating or updating an S3 log export integration. + required: + - bucketName + - iamRoleId + - logTypes + - prefixPath + - type + title: S3 Log Export Integration Request + type: object + S3LogIntegrationResponse: + allOf: + - $ref: '#/components/schemas/LogIntegrationResponse' + - properties: + bucketName: + description: Human-readable label that identifies the S3 bucket name for storing log files. + example: my-log-bucket + type: string + iamRoleId: + description: Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket. + example: 507f1f77bcf86cd799439011 + type: string + kmsKey: + description: AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings. + example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + nullable: true + type: string + logTypes: + description: 'Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGOD_AUDIT, MONGOS_AUDIT.' + example: + - MONGOD + - MONGOS + - MONGOD_AUDIT + - MONGOS_AUDIT + items: + enum: + - MONGOD + - MONGOS + - MONGOD_AUDIT + - MONGOS_AUDIT + type: string + maxItems: 4 + type: array + uniqueItems: true + prefixPath: + description: S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type. + example: mongo-logs/ + type: string + type: + description: Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type. + enum: + - S3_LOG_EXPORT + type: string + type: object + description: Details to integrate S3 log export with one MongoDB Cloud project. + required: + - bucketName + - iamRoleId + - id + - prefixPath + - type + title: S3 Log Export Integration Response + type: object SMSNotification: description: SMS notification configuration for MongoDB Cloud to send information when an event triggers an alert condition. properties: @@ -33532,16 +34016,6 @@ components: - lucene.turkish - lucene.ukrainian type: string - storedSource: - description: Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see documentation. - example: - include | exclude: - - field1 - - field2 - externalDocs: - description: Stored Source Fields - url: https://dochub.mongodb.org/core/atlas-search-stored-source - type: object synonyms: description: Rule sets that map words to their synonyms in this index. externalDocs: @@ -33591,6 +34065,16 @@ components: description: Number of index partitions. Allowed values are [1, 2, 4]. format: int32 type: integer + storedSource: + description: Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. Note that storing all fields (true) is not allowed for vector search indexes. To learn more, see Stored Source Fields. + example: + include | exclude: + - field1 + - field2 + externalDocs: + description: Stored Source Fields + url: https://dochub.mongodb.org/core/atlas-search-stored-source + type: object title: Search Index Definition type: object SearchIndexDefinitionVersion: @@ -33959,6 +34443,101 @@ components: required: - metricName type: object + SearchPlannerAuditTypeView: + description: Unique identifier of event type. + enum: + - SEARCH_PLAN_STARTED + - SEARCH_PLAN_COMPLETED + - SEARCH_PLAN_FAILED + - SEARCH_PLANNING_FAILURE + - SEARCH_PLAN_ASAP_REQUESTED + example: SEARCH_PLAN_STARTED + title: Search Planner Audit Types + type: string + SearchPlannerAuditView: + description: Indicates search planner activities. + properties: + apiKeyId: + description: Unique 24-hexadecimal digit string that identifies the API Key that triggered the event. If this resource returns this parameter, it doesn't return the **userId** parameter. + example: 32b6e34b3d91647abb20e7b8 + externalDocs: + description: Create Programmatic API Key + url: https://dochub.mongodb.org/core/atlas-create-prog-api-key + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + created: + description: Date and time when this event occurred. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + externalDocs: + description: ISO 8601 + url: https://en.wikipedia.org/wiki/ISO_8601 + format: date-time + readOnly: true + type: string + eventTypeName: + $ref: '#/components/schemas/SearchPlannerAuditTypeView' + groupId: + description: Unique 24-hexadecimal digit string that identifies the project in which the event occurred. The **eventId** identifies the specific event. + example: 32b6e34b3d91647abb20e7b8 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + id: + description: Unique 24-hexadecimal digit string that identifies the event. + example: 32b6e34b3d91647abb20e7b8 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + isGlobalAdmin: + description: Flag that indicates whether a MongoDB employee triggered the specified event. + readOnly: true + type: boolean + links: + description: List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships. + externalDocs: + description: Web Linking Specification (RFC 5988) + url: https://datatracker.ietf.org/doc/html/rfc5988 + items: + $ref: '#/components/schemas/Link' + readOnly: true + type: array + orgId: + description: Unique 24-hexadecimal digit string that identifies the organization to which these events apply. + example: 32b6e34b3d91647abb20e7b8 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + publicKey: + description: Public part of the API key that triggered the event. If this resource returns this parameter, it doesn't return the **username** parameter. + externalDocs: + url: https://dochub.mongodb.org/core/atlas-create-prog-api-key + readOnly: true + type: string + raw: + $ref: '#/components/schemas/raw' + remoteAddress: + description: IPv4 or IPv6 address from which the user triggered this event. + example: 216.172.40.186 + pattern: ^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}|([0-9a-f]{1,4}:){7}[0-9a-f]{1,4}$ + readOnly: true + type: string + userId: + description: Unique 24-hexadecimal digit string that identifies the console user who triggered the event. If this resource returns this parameter, it doesn't return the **apiKeyId** parameter. + example: 32b6e34b3d91647abb20e7b8 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + username: + description: Email address for the user who triggered this event. If this resource returns this parameter, it doesn't return the **publicApiKey** parameter. + format: email + readOnly: true + type: string + required: + - created + - eventTypeName + - id + title: Search Planner Audits + type: object SearchReplicationLagTimeMetricThresholdView: properties: metricName: @@ -34526,6 +35105,9 @@ components: enum: - OUTSIDE_SERVERLESS_METRIC_THRESHOLD example: OUTSIDE_SERVERLESS_METRIC_THRESHOLD + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ title: Serverless Event Types type: string ServerlessInstanceDescription: @@ -35923,6 +36505,9 @@ components: enum: - STREAM_PROCESSOR_STATE_IS_FAILED example: STREAM_PROCESSOR_STATE_IS_FAILED + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ title: Stream Processor Event Types type: string StreamProcessorEventTypeViewAlertableWithThreshold: @@ -35930,6 +36515,9 @@ components: enum: - OUTSIDE_STREAM_PROCESSOR_METRIC_THRESHOLD example: OUTSIDE_STREAM_PROCESSOR_METRIC_THRESHOLD + externalDocs: + description: Atlas Alert Event Types + url: https://www.mongodb.com/docs/atlas/reference/atlas-alert-event-types/ title: Stream Processor Event Types type: string StreamProcessorEventTypeViewForNdsGroup: @@ -36544,7 +37132,7 @@ components: fieldName: $ref: '#/components/schemas/StreamsMatcherField' operator: - description: Comparison operator to apply when checking the current metric value against **matcher[n].value**. + description: Comparison operator to apply when checking the current metric value against **matcher[n].value**. The `REGEX` operator only supports inclusive matches. Use the `NOT_CONTAINS` operator to exclude values. enum: - EQUALS - CONTAINS @@ -37950,7 +38538,7 @@ components: - lucene.ukrainian type: string storedSource: - description: Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see Stored Source Fields. + description: Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. Note that storing all fields (true) is not allowed for vector search indexes. To learn more, see Stored Source Fields. example: include | exclude: - field1 @@ -39355,6 +39943,16 @@ components: description: Number of index partitions. Allowed values are [1, 2, 4]. format: int32 type: integer + storedSource: + description: Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. Note that storing all fields (true) is not allowed for vector search indexes. To learn more, see Stored Source Fields. + example: + include | exclude: + - field1 + - field2 + externalDocs: + description: Stored Source Fields + url: https://dochub.mongodb.org/core/atlas-search-stored-source + type: object title: Vector Search Index Definition type: object VectorSearchIndexResponse: @@ -39549,7 +40147,7 @@ components: Atlas returns this value if you set `"notifications.[n].typeName" :"WEBHOOK"` and either: * You set `notification.[n].webhookSecret` to a non-empty string - * You set a default webhookSecret either on the Integrations page, or with the [Integrations API](#tag/Third-Party-Service-Integrations/operation/createIntegration) + * You set a default webhookSecret either on the Integrations page, or with the Integrations API **NOTE**: When you view or edit the alert for a webhook notification, the secret appears completely redacted. externalDocs: @@ -39563,10 +40161,13 @@ components: Atlas returns this value if you set `"notifications.[n].typeName" :"WEBHOOK"` and either: * You set `notification.[n].webhookURL` to a non-empty string - * You set a default webhookUrl either on the [Integrations](https://www.mongodb.com/docs/atlas/tutorial/third-party-service-integrations/#std-label-third-party-integrations) page, or with the [Integrations API](#tag/Third-Party-Service-Integrations/operation/createIntegration) + * You set a default webhookUrl either on the Integrations page, or with the Integrations API **NOTE**: When you view or edit the alert for a Webhook URL notification, the URL appears partially redacted. example: https://webhook.com/**** + externalDocs: + description: Integrations page + url: https://www.mongodb.com/docs/atlas/tutorial/third-party-service-integrations/#std-label-third-party-integrations type: string required: - typeName @@ -40280,7 +40881,7 @@ info: termsOfService: https://www.mongodb.com/mongodb-management-service-terms-and-conditions title: MongoDB Atlas Administration API version: "2.0" - x-xgen-sha: e4219471118c0a8a188bd428e61c78b629902817 + x-xgen-sha: 00bde811d099b69403160c912d6f01d6648563c8 openapi: 3.0.1 paths: /api/atlas/v2: @@ -52190,14 +52791,12 @@ paths: -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapeInsights/summaries?pretty=true" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Query-Shape-Insights/operation/listGroupClusterQueryShapeInsightSummaries x-xgen-operation-id-override: listQueryShapeSummaries - /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restartPrimaries: - post: - description: 'Starts a failover test for the specified cluster in the specified project. Clusters contain a group of hosts that maintain the same data set. A failover test checks how MongoDB Cloud handles the failure of the cluster''s primary node. During the test, MongoDB Cloud shuts down the primary node and elects a new primary. To use this resource, the requesting Service Account or API Key must have the Project Cluster Manager role. Deprecated versions: v2-{2023-01-01}' - operationId: restartGroupClusterPrimaries + /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes: + get: + description: Returns a list of query shapes for one cluster. Query shapes may be filtered by their status; at present, this endpoint supports only the REJECTED status. + operationId: listGroupClusterQueryShapes parameters: - - $ref: '#/components/parameters/envelope' - $ref: '#/components/parameters/groupId' - - $ref: '#/components/parameters/pretty' - description: Human-readable label that identifies the cluster. in: path name: clusterName @@ -52205,27 +52804,46 @@ paths: schema: pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$ type: string + - description: The status of query shapes to retrieve. Only REJECTED status is supported. If omitted, defaults to REJECTED. + in: query + name: status + schema: + default: REJECTED + enum: + - REJECTED + type: string + - $ref: '#/components/parameters/envelope' + - $ref: '#/components/parameters/includeCount' + - $ref: '#/components/parameters/itemsPerPage' + - $ref: '#/components/parameters/pageNum' + - $ref: '#/components/parameters/pretty' responses: "200": content: - application/vnd.atlas.2023-02-01+json: - x-xgen-version: "2023-02-01" + application/vnd.atlas.2025-03-12+json: + schema: + $ref: '#/components/schemas/PaginatedQueryShapes' + x-xgen-version: "2025-03-12" description: OK + "400": + $ref: '#/components/responses/badRequest' "401": $ref: '#/components/responses/unauthorized' "403": $ref: '#/components/responses/forbidden' "404": $ref: '#/components/responses/notFound' + "429": + $ref: '#/components/responses/tooManyRequests' "500": $ref: '#/components/responses/internalServerError' - summary: Test Failover for One Cluster + summary: Return All Query Shapes tags: - - Clusters + - Query Shape Insights x-codeSamples: - label: Atlas CLI lang: cURL - source: atlas api clusters restartPrimaries --help + source: atlas api queryShapeInsights listClusterQueryShapes --help - label: Go lang: go source: | @@ -52248,9 +52866,9 @@ paths: log.Fatalf("Error: %v", err) } - params = &sdk.RestartGroupClusterPrimariesApiParams{} - sdkResp, httpResp, err := client.ClustersApi. - RestartGroupClusterPrimariesWithParams(ctx, params). + params = &sdk.ListGroupClusterQueryShapesApiParams{} + sdkResp, httpResp, err := client.QueryShapeInsightsApi. + ListGroupClusterQueryShapesWithParams(ctx, params). Execute() } - label: curl (Service Accounts) @@ -52258,60 +52876,46 @@ paths: source: |- curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ - --header "Content-Type: application/json" \ - -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restartPrimaries" \ - -d '{ }' + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes?pretty=true" - label: curl (Digest) lang: cURL source: |- curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ - --header "Content-Type: application/json" \ - -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restartPrimaries" \ - -d '{ }' - x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Clusters/operation/restartGroupClusterPrimaries - x-xgen-method-verb-override: - customMethod: "True" - x-xgen-operation-id-override: restartPrimaries - /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restoreJobs: + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes?pretty=true" + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Query-Shape-Insights/operation/listGroupClusterQueryShapes + x-xgen-operation-id-override: listClusterQueryShapes + x-xgen-version: "2025-03-12" + /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes/{queryShapeHash}: get: - deprecated: true - description: |- - Returns all legacy backup restore jobs for one cluster in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role. - - Effective 23 March 2020, all new clusters can use only Cloud Backups. When you upgrade to 4.2, your backup system upgrades to cloud backup if it is currently set to legacy backup. After this upgrade, all your existing legacy backup snapshots remain available. They expire over time in accordance with your retention policy. Your backup policy resets to the default schedule. If you had a custom backup policy in place with legacy backups, you must re-create it with the procedure outlined in the Cloud Backup documentation. If you use the `BATCH-ID` query parameter, you can retrieve all restore jobs in the specified batch. When creating a restore job for a sharded cluster, MongoDB Cloud creates a separate job for each shard, plus another for the config server. Each of those jobs are part of a batch. However, a batch can't include a restore job for a replica set. - externalDocs: - description: Cloud Backup Documentation - url: https://www.mongodb.com/docs/atlas/backup/cloud-backup/scheduling/#std-label-cloud-provider-backup-schedule - operationId: listGroupClusterRestoreJobs + description: Returns the details for a single query shape. This endpoint only returns query shapes with REJECTED status. If the specified query shape hash does not correspond to a rejected query shape, a 404 Not Found error is returned. + operationId: getGroupClusterQueryShape parameters: - $ref: '#/components/parameters/envelope' - - $ref: '#/components/parameters/groupId' - - $ref: '#/components/parameters/includeCount' - - $ref: '#/components/parameters/itemsPerPage' - - $ref: '#/components/parameters/pageNum' - $ref: '#/components/parameters/pretty' - - description: Unique 24-hexadecimal digit string that identifies the batch of restore jobs to return. Timestamp in ISO 8601 date and time format in UTC when creating a restore job for a sharded cluster, Application creates a separate job for each shard, plus another for the config host. Each of these jobs comprise one batch. A restore job for a replica set can't be part of a batch. - in: query - name: batchId - schema: - pattern: ^([a-f0-9]{24})$ - type: string - - description: Human-readable label that identifies the cluster with the snapshot you want to return. + - $ref: '#/components/parameters/groupId' + - description: Human-readable label that identifies the cluster. in: path name: clusterName required: true schema: pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$ type: string + - description: A SHA256 hash of a query shape, output by MongoDB commands like $queryStats and $explain or slow query logs. + in: path + name: queryShapeHash + required: true + schema: + pattern: ^([a-fA-F0-9]{64})$ + type: string responses: "200": content: - application/vnd.atlas.2023-01-01+json: + application/vnd.atlas.2025-03-12+json: schema: - $ref: '#/components/schemas/PaginatedRestoreJobView' - x-xgen-version: "2023-01-01" + $ref: '#/components/schemas/QueryShapeResponse' + x-xgen-version: "2025-03-12" description: OK "400": $ref: '#/components/responses/badRequest' @@ -52321,15 +52925,17 @@ paths: $ref: '#/components/responses/forbidden' "404": $ref: '#/components/responses/notFound' + "429": + $ref: '#/components/responses/tooManyRequests' "500": $ref: '#/components/responses/internalServerError' - summary: Return All Legacy Backup Restore Jobs + summary: Return One Query Shape tags: - - Legacy Backup + - Query Shape Insights x-codeSamples: - label: Atlas CLI lang: cURL - source: atlas api legacyBackup listClusterRestoreJobs --help + source: atlas api queryShapeInsights getClusterQueryShape --help - label: Go lang: go source: | @@ -52352,9 +52958,9 @@ paths: log.Fatalf("Error: %v", err) } - params = &sdk.ListGroupClusterRestoreJobsApiParams{} - sdkResp, httpResp, err := client.LegacyBackupApi. - ListGroupClusterRestoreJobsWithParams(ctx, params). + params = &sdk.GetGroupClusterQueryShapeApiParams{} + sdkResp, httpResp, err := client.QueryShapeInsightsApi. + GetGroupClusterQueryShapeWithParams(ctx, params). Execute() } - label: curl (Service Accounts) @@ -52362,48 +52968,52 @@ paths: source: |- curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ - -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restoreJobs?pretty=true" + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes/{queryShapeHash}?pretty=true" - label: curl (Digest) lang: cURL source: |- curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ - -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restoreJobs?pretty=true" - x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Legacy-Backup/operation/listGroupClusterRestoreJobs - x-xgen-operation-id-override: listClusterRestoreJobs - post: - deprecated: true - description: Restores one legacy backup for one cluster in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role. Effective 23 March 2020, all new clusters can use only Cloud Backups. When you upgrade to 4.2, your backup system upgrades to cloud backup if it is currently set to legacy backup. After this upgrade, all your existing legacy backup snapshots remain available. They expire over time in accordance with your retention policy. Your backup policy resets to the default schedule. If you had a custom backup policy in place with legacy backups, you must re-create it with the procedure outlined in the Cloud Backup documentation. This endpoint doesn't support creating checkpoint restore jobs for sharded clusters, or creating restore jobs for queryable backup snapshots. If you create an automated restore job by specifying `delivery.methodName` of `AUTOMATED_RESTORE` in your request body, MongoDB Cloud removes all existing data on the target cluster prior to the restore. - externalDocs: - description: Cloud Backup Documentation - url: https://www.mongodb.com/docs/atlas/backup/cloud-backup/scheduling/#std-label-cloud-provider-backup-schedule - operationId: createGroupClusterRestoreJob + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes/{queryShapeHash}?pretty=true" + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Query-Shape-Insights/operation/getGroupClusterQueryShape + x-xgen-operation-id-override: getClusterQueryShape + x-xgen-version: "2025-03-12" + patch: + description: 'Updates the rejection status of a query shape. Use this endpoint to reject a query shape (preventing it from executing on the cluster) or to unreject a previously rejected query shape (allowing it to execute again). This operation is idempotent: rejecting an already rejected query shape or unrejecting an already unrejected query shape will return 200 OK.' + operationId: updateGroupClusterQueryShape parameters: - $ref: '#/components/parameters/envelope' - - $ref: '#/components/parameters/groupId' - $ref: '#/components/parameters/pretty' - - description: Human-readable label that identifies the cluster with the snapshot you want to return. + - $ref: '#/components/parameters/groupId' + - description: Human-readable label that identifies the cluster. in: path name: clusterName required: true schema: pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$ type: string + - description: A SHA256 hash of a query shape, output by MongoDB commands like $queryStats and $explain or slow query logs. + in: path + name: queryShapeHash + required: true + schema: + pattern: ^([a-fA-F0-9]{64})$ + type: string requestBody: content: - application/vnd.atlas.2023-01-01+json: + application/vnd.atlas.2025-03-12+json: schema: - $ref: '#/components/schemas/BackupRestoreJob' - description: Legacy backup to restore to one cluster in the specified project. + $ref: '#/components/schemas/QueryShapeUpdateRequest' + description: The desired rejection status for the query shape. Provide REJECTED to block the query shape from executing, or UNREJECTED to allow it to execute. required: true responses: "200": content: - application/vnd.atlas.2023-01-01+json: + application/vnd.atlas.2025-03-12+json: schema: - $ref: '#/components/schemas/PaginatedRestoreJobView' - x-xgen-version: "2023-01-01" + $ref: '#/components/schemas/QueryShapeResponse' + x-xgen-version: "2025-03-12" description: OK "400": $ref: '#/components/responses/badRequest' @@ -52413,15 +53023,17 @@ paths: $ref: '#/components/responses/forbidden' "404": $ref: '#/components/responses/notFound' + "429": + $ref: '#/components/responses/tooManyRequests' "500": $ref: '#/components/responses/internalServerError' - summary: Create One Legacy Backup Restore Job + summary: Update Query Shape Rejection Status tags: - - Legacy Backup + - Query Shape Insights x-codeSamples: - label: Atlas CLI lang: cURL - source: atlas api legacyBackup createClusterRestoreJob --help + source: atlas api queryShapeInsights updateClusterQueryShape --help - label: Go lang: go source: | @@ -52444,9 +53056,9 @@ paths: log.Fatalf("Error: %v", err) } - params = &sdk.CreateGroupClusterRestoreJobApiParams{} - sdkResp, httpResp, err := client.LegacyBackupApi. - CreateGroupClusterRestoreJobWithParams(ctx, params). + params = &sdk.UpdateGroupClusterQueryShapeApiParams{} + sdkResp, httpResp, err := client.QueryShapeInsightsApi. + UpdateGroupClusterQueryShapeWithParams(ctx, params). Execute() } - label: curl (Service Accounts) @@ -52455,7 +53067,7 @@ paths: curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ --header "Content-Type: application/json" \ - -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restoreJobs" \ + -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes/{queryShapeHash}" \ -d '{ }' - label: curl (Digest) lang: cURL @@ -52464,52 +53076,32 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ --header "Content-Type: application/json" \ - -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restoreJobs" \ + -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes/{queryShapeHash}" \ -d '{ }' - x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Legacy-Backup/operation/createGroupClusterRestoreJob - x-xgen-operation-id-override: createClusterRestoreJob - /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restoreJobs/{jobId}: - get: - deprecated: true - description: |- - Returns one legacy backup restore job for one cluster in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role. - - Effective 23 March 2020, all new clusters can use only Cloud Backups. When you upgrade to 4.2, your backup system upgrades to cloud backup if it is currently set to legacy backup. After this upgrade, all your existing legacy backup snapshots remain available. They expire over time in accordance with your retention policy. Your backup policy resets to the default schedule. If you had a custom backup policy in place with legacy backups, you must re-create it with the procedure outlined in the Cloud Backup documentation. - externalDocs: - description: Cloud Backup Documentation - url: https://www.mongodb.com/docs/atlas/backup/cloud-backup/scheduling/#std-label-cloud-provider-backup-schedule - operationId: getGroupClusterRestoreJob + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Query-Shape-Insights/operation/updateGroupClusterQueryShape + x-xgen-operation-id-override: updateClusterQueryShape + x-xgen-version: "2025-03-12" + /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restartPrimaries: + post: + description: 'Starts a failover test for the specified cluster in the specified project. Clusters contain a group of hosts that maintain the same data set. A failover test checks how MongoDB Cloud handles the failure of the cluster''s primary node. During the test, MongoDB Cloud shuts down the primary node and elects a new primary. To use this resource, the requesting Service Account or API Key must have the Project Cluster Manager role. Deprecated versions: v2-{2023-01-01}' + operationId: restartGroupClusterPrimaries parameters: - $ref: '#/components/parameters/envelope' - $ref: '#/components/parameters/groupId' - $ref: '#/components/parameters/pretty' - - description: Human-readable label that identifies the cluster with the snapshot you want to return. + - description: Human-readable label that identifies the cluster. in: path name: clusterName required: true schema: pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$ type: string - - description: Unique 24-hexadecimal digit string that identifies the restore job. - in: path - name: jobId - required: true - schema: - pattern: ^([a-f0-9]{24})$ - type: string responses: "200": content: - application/vnd.atlas.2023-01-01+json: - schema: - $ref: '#/components/schemas/BackupRestoreJob' - x-xgen-IPA-exception: - xgen-IPA-104-get-method-response-has-no-input-fields: API predates IPA validation. - xgen-IPA-104-get-method-returns-response-suffixed-object: API predates IPA validation. - x-xgen-version: "2023-01-01" + application/vnd.atlas.2023-02-01+json: + x-xgen-version: "2023-02-01" description: OK - "400": - $ref: '#/components/responses/badRequest' "401": $ref: '#/components/responses/unauthorized' "403": @@ -52518,13 +53110,13 @@ paths: $ref: '#/components/responses/notFound' "500": $ref: '#/components/responses/internalServerError' - summary: Return One Legacy Backup Restore Job + summary: Test Failover for One Cluster tags: - - Legacy Backup + - Clusters x-codeSamples: - label: Atlas CLI lang: cURL - source: atlas api legacyBackup getClusterRestoreJob --help + source: atlas api clusters restartPrimaries --help - label: Go lang: go source: | @@ -52547,9 +53139,9 @@ paths: log.Fatalf("Error: %v", err) } - params = &sdk.GetGroupClusterRestoreJobApiParams{} - sdkResp, httpResp, err := client.LegacyBackupApi. - GetGroupClusterRestoreJobWithParams(ctx, params). + params = &sdk.RestartGroupClusterPrimariesApiParams{} + sdkResp, httpResp, err := client.ClustersApi. + RestartGroupClusterPrimariesWithParams(ctx, params). Execute() } - label: curl (Service Accounts) @@ -52557,25 +53149,47 @@ paths: source: |- curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ - -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restoreJobs/{jobId}?pretty=true" + --header "Content-Type: application/json" \ + -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restartPrimaries" \ + -d '{ }' - label: curl (Digest) lang: cURL source: |- curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ - -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restoreJobs/{jobId}?pretty=true" - x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Legacy-Backup/operation/getGroupClusterRestoreJob - x-xgen-operation-id-override: getClusterRestoreJob - /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/deployment: - delete: - description: Deletes the Search Nodes for the specified cluster. - operationId: deleteGroupClusterSearchDeployment + --header "Content-Type: application/json" \ + -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restartPrimaries" \ + -d '{ }' + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Clusters/operation/restartGroupClusterPrimaries + x-xgen-method-verb-override: + customMethod: "True" + x-xgen-operation-id-override: restartPrimaries + /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restoreJobs: + get: + deprecated: true + description: |- + Returns all legacy backup restore jobs for one cluster in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role. + + Effective 23 March 2020, all new clusters can use only Cloud Backups. When you upgrade to 4.2, your backup system upgrades to cloud backup if it is currently set to legacy backup. After this upgrade, all your existing legacy backup snapshots remain available. They expire over time in accordance with your retention policy. Your backup policy resets to the default schedule. If you had a custom backup policy in place with legacy backups, you must re-create it with the procedure outlined in the Cloud Backup documentation. If you use the `BATCH-ID` query parameter, you can retrieve all restore jobs in the specified batch. When creating a restore job for a sharded cluster, MongoDB Cloud creates a separate job for each shard, plus another for the config server. Each of those jobs are part of a batch. However, a batch can't include a restore job for a replica set. + externalDocs: + description: Cloud Backup Documentation + url: https://www.mongodb.com/docs/atlas/backup/cloud-backup/scheduling/#std-label-cloud-provider-backup-schedule + operationId: listGroupClusterRestoreJobs parameters: - $ref: '#/components/parameters/envelope' - - $ref: '#/components/parameters/pretty' - $ref: '#/components/parameters/groupId' - - description: Label that identifies the cluster to delete. + - $ref: '#/components/parameters/includeCount' + - $ref: '#/components/parameters/itemsPerPage' + - $ref: '#/components/parameters/pageNum' + - $ref: '#/components/parameters/pretty' + - description: Unique 24-hexadecimal digit string that identifies the batch of restore jobs to return. Timestamp in ISO 8601 date and time format in UTC when creating a restore job for a sharded cluster, Application creates a separate job for each shard, plus another for the config host. Each of these jobs comprise one batch. A restore job for a replica set can't be part of a batch. + in: query + name: batchId + schema: + pattern: ^([a-f0-9]{24})$ + type: string + - description: Human-readable label that identifies the cluster with the snapshot you want to return. in: path name: clusterName required: true @@ -52583,11 +53197,13 @@ paths: pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$ type: string responses: - "204": + "200": content: - application/vnd.atlas.2024-05-30+json: - x-xgen-version: "2024-05-30" - description: This endpoint does not return a response body. + application/vnd.atlas.2023-01-01+json: + schema: + $ref: '#/components/schemas/PaginatedRestoreJobView' + x-xgen-version: "2023-01-01" + description: OK "400": $ref: '#/components/responses/badRequest' "401": @@ -52596,17 +53212,292 @@ paths: $ref: '#/components/responses/forbidden' "404": $ref: '#/components/responses/notFound' - "409": - $ref: '#/components/responses/conflict' "500": $ref: '#/components/responses/internalServerError' - summary: Delete Search Nodes + summary: Return All Legacy Backup Restore Jobs tags: - - Atlas Search + - Legacy Backup x-codeSamples: - label: Atlas CLI lang: cURL - source: atlas api atlasSearch deleteClusterSearchDeployment --help + source: atlas api legacyBackup listClusterRestoreJobs --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.ListGroupClusterRestoreJobsApiParams{} + sdkResp, httpResp, err := client.LegacyBackupApi. + ListGroupClusterRestoreJobsWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restoreJobs?pretty=true" + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restoreJobs?pretty=true" + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Legacy-Backup/operation/listGroupClusterRestoreJobs + x-xgen-operation-id-override: listClusterRestoreJobs + post: + deprecated: true + description: Restores one legacy backup for one cluster in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role. Effective 23 March 2020, all new clusters can use only Cloud Backups. When you upgrade to 4.2, your backup system upgrades to cloud backup if it is currently set to legacy backup. After this upgrade, all your existing legacy backup snapshots remain available. They expire over time in accordance with your retention policy. Your backup policy resets to the default schedule. If you had a custom backup policy in place with legacy backups, you must re-create it with the procedure outlined in the Cloud Backup documentation. This endpoint doesn't support creating checkpoint restore jobs for sharded clusters, or creating restore jobs for queryable backup snapshots. If you create an automated restore job by specifying `delivery.methodName` of `AUTOMATED_RESTORE` in your request body, MongoDB Cloud removes all existing data on the target cluster prior to the restore. + externalDocs: + description: Cloud Backup Documentation + url: https://www.mongodb.com/docs/atlas/backup/cloud-backup/scheduling/#std-label-cloud-provider-backup-schedule + operationId: createGroupClusterRestoreJob + parameters: + - $ref: '#/components/parameters/envelope' + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/pretty' + - description: Human-readable label that identifies the cluster with the snapshot you want to return. + in: path + name: clusterName + required: true + schema: + pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$ + type: string + requestBody: + content: + application/vnd.atlas.2023-01-01+json: + schema: + $ref: '#/components/schemas/BackupRestoreJob' + description: Legacy backup to restore to one cluster in the specified project. + required: true + responses: + "200": + content: + application/vnd.atlas.2023-01-01+json: + schema: + $ref: '#/components/schemas/PaginatedRestoreJobView' + x-xgen-version: "2023-01-01" + description: OK + "400": + $ref: '#/components/responses/badRequest' + "401": + $ref: '#/components/responses/unauthorized' + "403": + $ref: '#/components/responses/forbidden' + "404": + $ref: '#/components/responses/notFound' + "500": + $ref: '#/components/responses/internalServerError' + summary: Create One Legacy Backup Restore Job + tags: + - Legacy Backup + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api legacyBackup createClusterRestoreJob --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.CreateGroupClusterRestoreJobApiParams{} + sdkResp, httpResp, err := client.LegacyBackupApi. + CreateGroupClusterRestoreJobWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + --header "Content-Type: application/json" \ + -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restoreJobs" \ + -d '{ }' + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + --header "Content-Type: application/json" \ + -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restoreJobs" \ + -d '{ }' + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Legacy-Backup/operation/createGroupClusterRestoreJob + x-xgen-operation-id-override: createClusterRestoreJob + /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restoreJobs/{jobId}: + get: + deprecated: true + description: |- + Returns one legacy backup restore job for one cluster in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role. + + Effective 23 March 2020, all new clusters can use only Cloud Backups. When you upgrade to 4.2, your backup system upgrades to cloud backup if it is currently set to legacy backup. After this upgrade, all your existing legacy backup snapshots remain available. They expire over time in accordance with your retention policy. Your backup policy resets to the default schedule. If you had a custom backup policy in place with legacy backups, you must re-create it with the procedure outlined in the Cloud Backup documentation. + externalDocs: + description: Cloud Backup Documentation + url: https://www.mongodb.com/docs/atlas/backup/cloud-backup/scheduling/#std-label-cloud-provider-backup-schedule + operationId: getGroupClusterRestoreJob + parameters: + - $ref: '#/components/parameters/envelope' + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/pretty' + - description: Human-readable label that identifies the cluster with the snapshot you want to return. + in: path + name: clusterName + required: true + schema: + pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$ + type: string + - description: Unique 24-hexadecimal digit string that identifies the restore job. + in: path + name: jobId + required: true + schema: + pattern: ^([a-f0-9]{24})$ + type: string + responses: + "200": + content: + application/vnd.atlas.2023-01-01+json: + schema: + $ref: '#/components/schemas/BackupRestoreJob' + x-xgen-IPA-exception: + xgen-IPA-104-get-method-response-has-no-input-fields: API predates IPA validation. + xgen-IPA-104-get-method-returns-response-suffixed-object: API predates IPA validation. + x-xgen-version: "2023-01-01" + description: OK + "400": + $ref: '#/components/responses/badRequest' + "401": + $ref: '#/components/responses/unauthorized' + "403": + $ref: '#/components/responses/forbidden' + "404": + $ref: '#/components/responses/notFound' + "500": + $ref: '#/components/responses/internalServerError' + summary: Return One Legacy Backup Restore Job + tags: + - Legacy Backup + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api legacyBackup getClusterRestoreJob --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.GetGroupClusterRestoreJobApiParams{} + sdkResp, httpResp, err := client.LegacyBackupApi. + GetGroupClusterRestoreJobWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restoreJobs/{jobId}?pretty=true" + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restoreJobs/{jobId}?pretty=true" + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Legacy-Backup/operation/getGroupClusterRestoreJob + x-xgen-operation-id-override: getClusterRestoreJob + /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/deployment: + delete: + description: Deletes the Search Nodes for the specified cluster. + operationId: deleteGroupClusterSearchDeployment + parameters: + - $ref: '#/components/parameters/envelope' + - $ref: '#/components/parameters/pretty' + - $ref: '#/components/parameters/groupId' + - description: Label that identifies the cluster to delete. + in: path + name: clusterName + required: true + schema: + pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$ + type: string + responses: + "204": + content: + application/vnd.atlas.2024-05-30+json: + x-xgen-version: "2024-05-30" + description: This endpoint does not return a response body. + "400": + $ref: '#/components/responses/badRequest' + "401": + $ref: '#/components/responses/unauthorized' + "403": + $ref: '#/components/responses/forbidden' + "404": + $ref: '#/components/responses/notFound' + "409": + $ref: '#/components/responses/conflict' + "500": + $ref: '#/components/responses/internalServerError' + summary: Delete Search Nodes + tags: + - Atlas Search + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api atlasSearch deleteClusterSearchDeployment --help - label: Go lang: go source: | @@ -62235,9 +63126,345 @@ paths: log.Fatalf("Error: %v", err) } - params = &sdk.ValidateGroupLiveMigrationsApiParams{} - sdkResp, httpResp, err := client.CloudMigrationServiceApi. - ValidateGroupLiveMigrationsWithParams(ctx, params). + params = &sdk.ValidateGroupLiveMigrationsApiParams{} + sdkResp, httpResp, err := client.CloudMigrationServiceApi. + ValidateGroupLiveMigrationsWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + --header "Content-Type: application/json" \ + -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/liveMigrations/validate" \ + -d '{ }' + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + --header "Content-Type: application/json" \ + -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/liveMigrations/validate" \ + -d '{ }' + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Migration-Service/operation/validateGroupLiveMigrations + x-xgen-method-verb-override: + customMethod: true + x-xgen-operation-id-override: validateLiveMigrations + /api/atlas/v2/groups/{groupId}/liveMigrations/validate/{validationId}: + get: + description: Return the status of one migration validation job. Your API Key must have the Organization Owner role to successfully call this resource. + operationId: getGroupLiveMigrationValidateStatus + parameters: + - $ref: '#/components/parameters/groupId' + - description: Unique 24-hexadecimal digit string that identifies the validation job. + in: path + name: validationId + required: true + schema: + example: 507f1f77bcf86cd799439011 + pattern: ^([a-f0-9]{24})$ + type: string + - $ref: '#/components/parameters/envelope' + responses: + "200": + content: + application/vnd.atlas.2023-01-01+json: + schema: + $ref: '#/components/schemas/LiveImportValidation' + x-xgen-version: "2023-01-01" + description: OK + "400": + $ref: '#/components/responses/badRequest' + "401": + $ref: '#/components/responses/unauthorized' + "403": + $ref: '#/components/responses/forbidden' + "404": + $ref: '#/components/responses/notFound' + "500": + $ref: '#/components/responses/internalServerError' + summary: Return One Migration Validation Job + tags: + - Cloud Migration Service + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api cloudMigrationService getMigrationValidateStatus --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.GetGroupLiveMigrationValidateStatusApiParams{} + sdkResp, httpResp, err := client.CloudMigrationServiceApi. + GetGroupLiveMigrationValidateStatusWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/liveMigrations/validate/{validationId}?pretty=true" + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/liveMigrations/validate/{validationId}?pretty=true" + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Migration-Service/operation/getGroupLiveMigrationValidateStatus + x-xgen-method-verb-override: + customMethod: true + verb: getStatus + x-xgen-operation-id-override: getMigrationValidateStatus + /api/atlas/v2/groups/{groupId}/logIntegrations: + get: + description: Returns all log integration configurations for the project. Optionally filter by integration type. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + operationId: listGroupLogIntegrations + parameters: + - $ref: '#/components/parameters/envelope' + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/includeCount' + - $ref: '#/components/parameters/itemsPerPage' + - $ref: '#/components/parameters/pageNum' + - $ref: '#/components/parameters/pretty' + - description: Optional filter by integration type (e.g., 'S3_LOG_EXPORT'). + in: query + name: integrationType + schema: + type: string + responses: + "200": + content: + application/vnd.atlas.2025-03-12+json: + schema: + $ref: '#/components/schemas/PaginatedLogIntegrationResponse' + x-xgen-version: "2025-03-12" + description: OK + "400": + $ref: '#/components/responses/badRequest' + "401": + $ref: '#/components/responses/unauthorized' + "403": + $ref: '#/components/responses/forbidden' + "404": + $ref: '#/components/responses/notFound' + "500": + $ref: '#/components/responses/internalServerError' + summary: Return All Active Log Integrations + tags: + - Push-Based Log Export + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api pushBasedLogExport listGroupLogIntegrations --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.ListGroupLogIntegrationsApiParams{} + sdkResp, httpResp, err := client.Push - BasedLogExportApi. + ListGroupLogIntegrationsWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations?pretty=true" + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations?pretty=true" + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Push-Based-Log-Export/operation/listGroupLogIntegrations + post: + description: Creates a new log integration configuration identified by a unique ID. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + operationId: createGroupLogIntegration + parameters: + - $ref: '#/components/parameters/envelope' + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/pretty' + requestBody: + content: + application/vnd.atlas.2025-03-12+json: + schema: + $ref: '#/components/schemas/S3LogIntegrationRequest' + description: Log integration configuration to create. + required: true + responses: + "201": + content: + application/vnd.atlas.2025-03-12+json: + schema: + $ref: '#/components/schemas/LogIntegrationResponse' + x-xgen-version: "2025-03-12" + description: Created + "400": + $ref: '#/components/responses/badRequest' + "401": + $ref: '#/components/responses/unauthorized' + "403": + $ref: '#/components/responses/forbidden' + "404": + $ref: '#/components/responses/notFound' + "500": + $ref: '#/components/responses/internalServerError' + summary: Create One Log Integration + tags: + - Push-Based Log Export + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api pushBasedLogExport createGroupLogIntegration --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.CreateGroupLogIntegrationApiParams{} + sdkResp, httpResp, err := client.Push - BasedLogExportApi. + CreateGroupLogIntegrationWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + --header "Content-Type: application/json" \ + -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations" \ + -d '{ }' + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + --header "Content-Type: application/json" \ + -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations" \ + -d '{ }' + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Push-Based-Log-Export/operation/createGroupLogIntegration + /api/atlas/v2/groups/{groupId}/logIntegrations/{id}: + delete: + description: Removes the configuration for one log integration identified by its unique ID. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + operationId: deleteGroupLogIntegration + parameters: + - $ref: '#/components/parameters/envelope' + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/pretty' + - description: Unique identifier of the log integration configuration. + in: path + name: id + required: true + schema: + type: string + responses: + "204": + content: + application/vnd.atlas.2025-03-12+json: + x-xgen-version: "2025-03-12" + description: This endpoint does not return a response body. + "400": + $ref: '#/components/responses/badRequest' + "401": + $ref: '#/components/responses/unauthorized' + "403": + $ref: '#/components/responses/forbidden' + "404": + $ref: '#/components/responses/notFound' + "500": + $ref: '#/components/responses/internalServerError' + summary: Remove One Log Integration + tags: + - Push-Based Log Export + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api pushBasedLogExport deleteGroupLogIntegration --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.DeleteGroupLogIntegrationApiParams{} + httpResp, err := client.Push - BasedLogExportApi. + DeleteGroupLogIntegrationWithParams(ctx, params). Execute() } - label: curl (Service Accounts) @@ -62245,44 +63472,121 @@ paths: source: |- curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ - --header "Content-Type: application/json" \ - -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/liveMigrations/validate" \ - -d '{ }' + -X DELETE "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations/{id}" - label: curl (Digest) lang: cURL source: |- curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ - --header "Content-Type: application/json" \ - -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/liveMigrations/validate" \ - -d '{ }' - x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Migration-Service/operation/validateGroupLiveMigrations - x-xgen-method-verb-override: - customMethod: true - x-xgen-operation-id-override: validateLiveMigrations - /api/atlas/v2/groups/{groupId}/liveMigrations/validate/{validationId}: + -X DELETE "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations/{id}" + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Push-Based-Log-Export/operation/deleteGroupLogIntegration get: - description: Return the status of one migration validation job. Your API Key must have the Organization Owner role to successfully call this resource. - operationId: getGroupLiveMigrationValidateStatus + description: Returns the configuration for one log integration identified by its unique ID. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + operationId: getGroupLogIntegration parameters: + - $ref: '#/components/parameters/envelope' - $ref: '#/components/parameters/groupId' - - description: Unique 24-hexadecimal digit string that identifies the validation job. + - $ref: '#/components/parameters/pretty' + - description: Unique identifier of the log integration configuration. in: path - name: validationId + name: id required: true schema: - example: 507f1f77bcf86cd799439011 - pattern: ^([a-f0-9]{24})$ type: string + responses: + "200": + content: + application/vnd.atlas.2025-03-12+json: + schema: + $ref: '#/components/schemas/LogIntegrationResponse' + x-xgen-version: "2025-03-12" + description: OK + "400": + $ref: '#/components/responses/badRequest' + "401": + $ref: '#/components/responses/unauthorized' + "403": + $ref: '#/components/responses/forbidden' + "404": + $ref: '#/components/responses/notFound' + "500": + $ref: '#/components/responses/internalServerError' + summary: Return One Log Integration + tags: + - Push-Based Log Export + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api pushBasedLogExport getGroupLogIntegration --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.GetGroupLogIntegrationApiParams{} + sdkResp, httpResp, err := client.Push - BasedLogExportApi. + GetGroupLogIntegrationWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations/{id}?pretty=true" + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations/{id}?pretty=true" + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Push-Based-Log-Export/operation/getGroupLogIntegration + put: + description: Updates the configuration for one log integration identified by its unique ID. To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role. This is currently in preview. Please contact your Customer Success Manager (CSM) for access. + operationId: updateGroupLogIntegration + parameters: - $ref: '#/components/parameters/envelope' + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/pretty' + - description: Unique identifier of the log integration configuration. + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/vnd.atlas.2025-03-12+json: + schema: + $ref: '#/components/schemas/LogIntegrationRequest' + description: Updated log integration configuration. + required: true responses: "200": content: - application/vnd.atlas.2023-01-01+json: + application/vnd.atlas.2025-03-12+json: schema: - $ref: '#/components/schemas/LiveImportValidation' - x-xgen-version: "2023-01-01" + $ref: '#/components/schemas/LogIntegrationResponse' + x-xgen-version: "2025-03-12" description: OK "400": $ref: '#/components/responses/badRequest' @@ -62294,13 +63598,13 @@ paths: $ref: '#/components/responses/notFound' "500": $ref: '#/components/responses/internalServerError' - summary: Return One Migration Validation Job + summary: Update One Log Integration tags: - - Cloud Migration Service + - Push-Based Log Export x-codeSamples: - label: Atlas CLI lang: cURL - source: atlas api cloudMigrationService getMigrationValidateStatus --help + source: atlas api pushBasedLogExport updateGroupLogIntegration --help - label: Go lang: go source: | @@ -62323,9 +63627,9 @@ paths: log.Fatalf("Error: %v", err) } - params = &sdk.GetGroupLiveMigrationValidateStatusApiParams{} - sdkResp, httpResp, err := client.CloudMigrationServiceApi. - GetGroupLiveMigrationValidateStatusWithParams(ctx, params). + params = &sdk.UpdateGroupLogIntegrationApiParams{} + sdkResp, httpResp, err := client.Push - BasedLogExportApi. + UpdateGroupLogIntegrationWithParams(ctx, params). Execute() } - label: curl (Service Accounts) @@ -62333,19 +63637,19 @@ paths: source: |- curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ - -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/liveMigrations/validate/{validationId}?pretty=true" + --header "Content-Type: application/json" \ + -X PUT "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations/{id}" \ + -d '{ }' - label: curl (Digest) lang: cURL source: |- curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ - -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/liveMigrations/validate/{validationId}?pretty=true" - x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Migration-Service/operation/getGroupLiveMigrationValidateStatus - x-xgen-method-verb-override: - customMethod: true - verb: getStatus - x-xgen-operation-id-override: getMigrationValidateStatus + --header "Content-Type: application/json" \ + -X PUT "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/logIntegrations/{id}" \ + -d '{ }' + x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Push-Based-Log-Export/operation/updateGroupLogIntegration /api/atlas/v2/groups/{groupId}/maintenanceWindow: delete: description: Resets the maintenance window for the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role. Urgent maintenance activities such as security patches can't wait for your chosen window. MongoDB Cloud starts those maintenance activities when needed. After you schedule maintenance for your cluster, you can't change your maintenance window until the current maintenance efforts complete. The maintenance procedure that MongoDB Cloud performs requires at least one replica set election during the maintenance window per replica set. Maintenance always begins as close to the scheduled hour as possible, but in-progress cluster updates or unexpected system issues could delay the start time. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -65541,6 +66845,7 @@ paths: x-xgen-operation-id-override: toggleRegionalEndpointMode /api/atlas/v2/groups/{groupId}/privateEndpoint/serverless/instance/{instanceName}/endpoint: get: + deprecated: true description: |- Returns all private endpoints for one serverless instance. You must have at least the Project Read Only role for the project to successfully call this resource. @@ -65629,9 +66934,11 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/privateEndpoint/serverless/instance/{instanceName}/endpoint?pretty=true" + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Private-Endpoints/operation/listGroupPrivateEndpointServerlessInstanceEndpoint x-xgen-operation-id-override: listServerlessPrivateEndpoint post: + deprecated: true description: |- Creates one private endpoint for one serverless instance. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -65728,10 +67035,12 @@ paths: --header "Content-Type: application/json" \ -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/privateEndpoint/serverless/instance/{instanceName}/endpoint" \ -d '{ }' + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Private-Endpoints/operation/createGroupPrivateEndpointServerlessInstanceEndpoint x-xgen-operation-id-override: createServerlessPrivateEndpoint /api/atlas/v2/groups/{groupId}/privateEndpoint/serverless/instance/{instanceName}/endpoint/{endpointId}: delete: + deprecated: true description: |- Remove one private endpoint from one serverless instance. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -65817,9 +67126,11 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X DELETE "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/privateEndpoint/serverless/instance/{instanceName}/endpoint/{endpointId}" + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Private-Endpoints/operation/deleteGroupPrivateEndpointServerlessInstanceEndpoint x-xgen-operation-id-override: deleteServerlessPrivateEndpoint get: + deprecated: true description: |- Return one private endpoint for one serverless instance. Identify this endpoint using its unique ID. You must have at least the Project Read Only role for the project to successfully call this resource. @@ -65909,9 +67220,11 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/privateEndpoint/serverless/instance/{instanceName}/endpoint/{endpointId}?pretty=true" + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Private-Endpoints/operation/getGroupPrivateEndpointServerlessInstanceEndpoint x-xgen-operation-id-override: getServerlessPrivateEndpoint patch: + deprecated: true description: |- Updates one private endpoint for one serverless instance. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -66010,6 +67323,7 @@ paths: --header "Content-Type: application/json" \ -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/privateEndpoint/serverless/instance/{instanceName}/endpoint/{endpointId}" \ -d '{ }' + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Private-Endpoints/operation/updateGroupPrivateEndpointServerlessInstanceEndpoint x-xgen-operation-id-override: updateServerlessPrivateEndpoint /api/atlas/v2/groups/{groupId}/privateIpMode: @@ -68587,6 +69901,7 @@ paths: x-xgen-operation-id-override: getSampleDatasetLoad /api/atlas/v2/groups/{groupId}/serverless: get: + deprecated: true description: |- Returns details for all serverless instances in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role. @@ -68667,12 +69982,14 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless?pretty=true" + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Instances/operation/listGroupServerlessInstances x-xgen-method-verb-override: customMethod: false verb: listInstances x-xgen-operation-id-override: listServerlessInstances post: + deprecated: true description: |- Update as of Feb 2025: This endpoint now creates a Flex cluster instead. This endpoint will no longer be supported starting January 2026. Continuous backups are not supported and serverlessContinuousBackupEnabled will not take effect. Please use the createFlexCluster endpoint instead. @@ -68765,6 +70082,7 @@ paths: --header "Content-Type: application/json" \ -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless" \ -d '{ }' + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Instances/operation/createGroupServerlessInstance x-xgen-method-verb-override: customMethod: false @@ -68772,6 +70090,7 @@ paths: x-xgen-operation-id-override: createServerlessInstance /api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/restoreJobs: get: + deprecated: true description: |- Returns all restore jobs for one serverless instance from the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -68859,9 +70178,11 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/restoreJobs?pretty=true" + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Backups/operation/listGroupServerlessBackupRestoreJobs x-xgen-operation-id-override: listServerlessRestoreJobs post: + deprecated: true description: |- Restores one snapshot of one serverless instance from the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -68959,10 +70280,12 @@ paths: --header "Content-Type: application/json" \ -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/restoreJobs" \ -d '{ }' + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Backups/operation/createGroupServerlessBackupRestoreJob x-xgen-operation-id-override: createServerlessRestoreJob /api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/restoreJobs/{restoreJobId}: get: + deprecated: true description: |- Returns one restore job for one serverless instance from the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -69056,10 +70379,12 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/restoreJobs/{restoreJobId}?pretty=true" + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Backups/operation/getGroupServerlessBackupRestoreJob x-xgen-operation-id-override: getServerlessRestoreJob /api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/snapshots: get: + deprecated: true description: |- Returns all snapshots of one serverless instance from the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role. @@ -69147,10 +70472,12 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/snapshots?pretty=true" + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Backups/operation/listGroupServerlessBackupSnapshots x-xgen-operation-id-override: listServerlessBackupSnapshots /api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/snapshots/{snapshotId}: get: + deprecated: true description: |- Returns one snapshot of one serverless instance from the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role. @@ -69244,10 +70571,12 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/snapshots/{snapshotId}?pretty=true" + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Cloud-Backups/operation/getGroupServerlessBackupSnapshot x-xgen-operation-id-override: getServerlessBackupSnapshot /api/atlas/v2/groups/{groupId}/serverless/{clusterName}/performanceAdvisor/autoIndexing: get: + deprecated: true description: Get whether the Serverless Auto Indexing feature is enabled. This endpoint returns a value for Flex clusters that were created with the createServerlessInstance endpoint or Flex clusters that were migrated from Serverless instances. However, the value returned is not indicative of the Auto Indexing state as Auto Indexing is unavailable for Flex clusters. This endpoint will be sunset in January 2026. externalDocs: description: createServerlessInstance @@ -69329,12 +70658,14 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{clusterName}/performanceAdvisor/autoIndexing?pretty=true" + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Performance-Advisor/operation/getGroupServerlessPerformanceAdvisorAutoIndexing x-xgen-method-verb-override: customMethod: false verb: get x-xgen-operation-id-override: getServerlessAutoIndexing post: + deprecated: true description: Set whether the Serverless Auto Indexing feature is enabled. This endpoint sets a value for Flex clusters that were created with the createServerlessInstance endpoint or Flex clusters that were migrated from Serverless instances. However, the value returned is not indicative of the Auto Indexing state as Auto Indexing is unavailable for Flex clusters. This endpoint will be sunset in January 2026. externalDocs: description: createServerlessInstance @@ -69423,6 +70754,7 @@ paths: --header "Content-Type: application/json" \ -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{clusterName}/performanceAdvisor/autoIndexing" \ -d '{ }' + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Performance-Advisor/operation/setGroupServerlessPerformanceAdvisorAutoIndexing x-xgen-method-verb-override: customMethod: "True" @@ -69430,6 +70762,7 @@ paths: x-xgen-operation-id-override: setServerlessAutoIndexing /api/atlas/v2/groups/{groupId}/serverless/{name}: delete: + deprecated: true description: |- Removes one serverless instance from the specified project. The serverless instance must have termination protection disabled in order to be deleted. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -69516,12 +70849,14 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X DELETE "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{name}" + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Instances/operation/deleteGroupServerlessInstance x-xgen-method-verb-override: customMethod: false verb: deleteInstance x-xgen-operation-id-override: deleteServerlessInstance get: + deprecated: true description: |- Returns details for one serverless instance in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role. @@ -69610,12 +70945,14 @@ paths: --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{name}?pretty=true" + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Instances/operation/getGroupServerlessInstance x-xgen-method-verb-override: customMethod: false verb: getInstance x-xgen-operation-id-override: getServerlessInstance patch: + deprecated: true description: |- Updates one serverless instance in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role. @@ -69713,6 +71050,7 @@ paths: --header "Content-Type: application/json" \ -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{name}" \ -d '{ }' + x-sunset: "2026-01-15" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Instances/operation/updateGroupServerlessInstance x-xgen-method-verb-override: customMethod: false @@ -75189,6 +76527,76 @@ paths: --header "Accept: application/vnd.atlas.2025-03-12+json" \ -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/byName/{groupName}?pretty=true" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Projects/operation/getGroupByName + /api/atlas/v2/openapi/info: + get: + description: 'This resource returns general information about the MongoDB Atlas Administration API OpenAPI Specification. Deprecated versions: v2-{2024-05-30}' + operationId: getOpenapiInfo + parameters: + - $ref: '#/components/parameters/pretty' + responses: + "200": + content: + application/vnd.atlas.2024-08-05+json: + schema: + $ref: '#/components/schemas/OpenApiInfo' + x-xgen-version: "2024-08-05" + description: OK + "401": + $ref: '#/components/responses/unauthorized' + "403": + $ref: '#/components/responses/forbidden' + "500": + $ref: '#/components/responses/internalServerError' + summary: Return General Information on MongoDB Atlas Administration API OpenAPI Specification + tags: + - OpenAPI + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api openApi getOpenapiInfo --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.GetOpenapiInfoApiParams{} + sdkResp, httpResp, err := client.OpenAPIApi. + GetOpenapiInfoWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/openapi/info?pretty=true" + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/openapi/info?pretty=true" + x-xgen-method-verb-override: + customMethod: "False" + verb: get /api/atlas/v2/orgs: get: description: Returns all organizations to which the requesting Service Account or API Key has access. To use this resource, the requesting Service Account or API Key must have the Organization Member role. @@ -81849,6 +83257,86 @@ paths: -X GET "https://cloud.mongodb.com/api/atlas/v2/unauth/controlPlaneIPAddresses?pretty=true" x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Root/operation/listControlPlaneIpAddresses x-xgen-operation-id-override: listControlPlaneAddresses + /api/atlas/v2/unauth/openapi/versions: + get: + description: API that provides a list of available versionsfor a given environment. + operationId: listOpenapiVersions + parameters: + - $ref: '#/components/parameters/envelope' + - $ref: '#/components/parameters/itemsPerPage' + - $ref: '#/components/parameters/pageNum' + - $ref: '#/components/parameters/pretty' + - description: The environment to get the versions from. If not provided, it returnsthe versions for the given MongoDB URL. (E.g. prod for cloud.mongodb.com). + in: query + name: env + schema: + enum: + - dev + - qa + - prod + - stage + type: string + responses: + "200": + content: + application/vnd.atlas.2024-08-05+json: + schema: + $ref: '#/components/schemas/PaginatedApiVersions' + x-xgen-version: "2024-08-05" + application/vnd.atlas.2024-08-05+yaml: + schema: + $ref: '#/components/schemas/PaginatedApiVersions' + x-xgen-version: "2024-08-05" + description: OK + "500": + $ref: '#/components/responses/internalServerError' + summary: Return All Versions for One Environment + tags: + - OpenAPI + x-codeSamples: + - label: Atlas CLI + lang: cURL + source: atlas api openApi listOpenapiVersions --help + - label: Go + lang: go + source: | + import ( + "os" + "context" + "log" + sdk "go.mongodb.org/atlas-sdk/v20250312001/admin" + ) + + func main() { + ctx := context.Background() + clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID") + clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET") + + // See https://dochub.mongodb.org/core/atlas-go-sdk-oauth + client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret)) + + if err != nil { + log.Fatalf("Error: %v", err) + } + + params = &sdk.ListOpenapiVersionsApiParams{} + sdkResp, httpResp, err := client.OpenAPIApi. + ListOpenapiVersionsWithParams(ctx, params). + Execute() + } + - label: curl (Service Accounts) + lang: cURL + source: |- + curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/unauth/openapi/versions?pretty=true" + - label: curl (Digest) + lang: cURL + source: |- + curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ + --digest --include \ + --header "Accept: application/vnd.atlas.2025-03-12+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/unauth/openapi/versions?pretty=true" /api/atlas/v2/users: post: deprecated: true @@ -82181,6 +83669,8 @@ tags: name: Network Peering - description: Returns, adds, edits, or removes an online archive. name: Online Archive + - description: Returns information about the MongoDB Atlas Specification. + name: OpenAPI - description: Returns, adds, and edits organizational units in MongoDB Cloud. name: Organizations - description: Returns suggested indexes and slow query data for a database deployment. Also enables or disables MongoDB Cloud-managed slow operation thresholds. To view field values in a sample query, you must have the Project Data Access Read Only role or higher. Otherwise, MongoDB Cloud returns redacted data rather than the field values. @@ -82193,7 +83683,7 @@ tags: name: Project IP Access List - description: Returns, adds, and edits collections of clusters and users in MongoDB Cloud. name: Projects - - description: You can continually push logs from mongod, mongos, and audit logs to an AWS S3 bucket. Atlas exports logs every 5 minutes. + - description: You can continually export mongod, mongos, and audit logs to an AWS S3 bucket. The new `/logIntegrations` API provides 1-minute log export. The existing `/pushBasedLogExport` API provides 5-minute log export and will be deprecated in the future. The log export integrations are managed at the project level. name: Push-Based Log Export - description: Configure and manage Atlas Resource Policies within your organization. name: Resource Policies diff --git a/test/example_client_test.go b/test/example_client_test.go index ba674ce02..917271429 100644 --- a/test/example_client_test.go +++ b/test/example_client_test.go @@ -3,7 +3,7 @@ package test import ( "fmt" - "go.mongodb.org/atlas-sdk/v20250312010/admin" + "github.com/mongodb/atlas-sdk-go/admin" ) func ExampleNewClient() { diff --git a/test/utils_test.go b/test/utils_test.go index e4cba0a65..b82641136 100644 --- a/test/utils_test.go +++ b/test/utils_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "go.mongodb.org/atlas-sdk/v20250312010/admin" + "github.com/mongodb/atlas-sdk-go/admin" ) type testCase[T comparable] struct { diff --git a/tools/config/go-templates/api_doc.mustache b/tools/config/go-templates/api_doc.mustache index 40ca7a07e..320722f45 100644 --- a/tools/config/go-templates/api_doc.mustache +++ b/tools/config/go-templates/api_doc.mustache @@ -29,7 +29,7 @@ import ( "fmt" "os" - "go.mongodb.org/atlas-sdk/v20250312010/admin" + "github.com/mongodb/atlas-sdk-go/admin" ) func main() { diff --git a/tools/config/go-templates/atlas_client.mustache b/tools/config/go-templates/atlas_client.mustache index 73e709b87..1c1b2af41 100644 --- a/tools/config/go-templates/atlas_client.mustache +++ b/tools/config/go-templates/atlas_client.mustache @@ -1,4 +1,4 @@ -{{! X-XGEN-CUSTOM }}package {{packageName}} // import "go.mongodb.org/atlas-sdk/v20250312010/admin" +{{! X-XGEN-CUSTOM }}package {{packageName}} // import "github.com/mongodb/atlas-sdk-go/admin" import ( "errors" @@ -6,9 +6,9 @@ import ( "strings" "github.com/mongodb-forks/digest" - "go.mongodb.org/atlas-sdk/v20250312010/auth" - "go.mongodb.org/atlas-sdk/v20250312010/auth/clientcredentials" - "go.mongodb.org/atlas-sdk/v20250312010/internal/core" + "github.com/mongodb/atlas-sdk-go/auth" + "github.com/mongodb/atlas-sdk-go/auth/clientcredentials" + "github.com/mongodb/atlas-sdk-go/internal/core" ) const (