From 7fddd6abccf669875839b8846063461bc1d3f158 Mon Sep 17 00:00:00 2001 From: Filipe C Menezes Date: Fri, 31 Jan 2025 17:43:09 +0000 Subject: [PATCH 1/2] CLOUDP-297409 Apply openapi overlays into spec --- Makefile | 7 +++- tools/api-generator/main.go | 71 +++++++++++--------------------- tools/api-generator/main_test.go | 22 +++------- 3 files changed, 36 insertions(+), 64 deletions(-) diff --git a/Makefile b/Makefile index 5f3ff8df97..fc5710b37d 100644 --- a/Makefile +++ b/Makefile @@ -110,10 +110,13 @@ gen-code: ## Generate code @echo "==> Generating code" go run ./tools/cli-generator +bin/api-generator: + go build -o ./bin/api-generator ./tools/api-generator + .PHONY: gen-api-commands -gen-api-commands: ## Generate api commands +gen-api-commands: bin/api-generator ## Generate api commands @echo "==> Generating api commands" - go run ./tools/api-generator --spec ./tools/api-generator/spec.yaml --output ./internal/api/commands.go + bin/api-generator --spec ./tools/api-generator/spec.yaml > ./internal/api/commands.go .PHONY: otel otel: ## Generate code diff --git a/tools/api-generator/main.go b/tools/api-generator/main.go index cdc60dd9cd..1a0dae11cb 100644 --- a/tools/api-generator/main.go +++ b/tools/api-generator/main.go @@ -18,16 +18,15 @@ import ( "bytes" "context" _ "embed" - "errors" "fmt" "go/format" + "io" "os" "text/template" "time" "github.com/getkin/kin-openapi/openapi3" "github.com/mongodb/mongodb-atlas-cli/atlascli/internal/api" - "github.com/spf13/afero" "github.com/spf13/cobra" ) @@ -35,32 +34,19 @@ import ( var templateContent string func main() { - var ( - specPath string - outputPath string - ) + var specPath string var rootCmd = &cobra.Command{ Use: "api-generator", Short: "CLI which generates api command definitions from a OpenAPI spec", - PreRunE: func(_ *cobra.Command, _ []string) error { - if specPath == "" { - return errors.New("--spec is a required flag") - } - - if outputPath == "" { - return errors.New("--output is a required flag") - } - - return nil - }, RunE: func(command *cobra.Command, _ []string) error { - return convertSpecToAPICommands(command.Context(), afero.NewOsFs(), specPath, outputPath) + return run(command.Context(), specPath, command.OutOrStdout()) }, } - rootCmd.PersistentFlags().StringVar(&specPath, "spec", "", "Path to spec file") - rootCmd.PersistentFlags().StringVar(&outputPath, "output", "", "Path to output file") + rootCmd.Flags().StringVar(&specPath, "spec", "", "Path to spec file") + _ = rootCmd.MarkFlagRequired("spec") + _ = rootCmd.MarkFlagFilename("spec") if err := rootCmd.Execute(); err != nil { fmt.Println(err) @@ -68,10 +54,21 @@ func main() { } } -func convertSpecToAPICommands(ctx context.Context, fs afero.Fs, specPath, outputPath string) error { - spec, err := loadSpec(fs, specPath) +func run(ctx context.Context, specPath string, w io.Writer) error { + specFile, err := os.OpenFile(specPath, os.O_RDONLY, os.ModePerm) if err != nil { - return fmt.Errorf("failed to load spec: '%s', error: %w", specPath, err) + return err + } + + defer specFile.Close() + + return convertSpecToAPICommands(ctx, specFile, w) +} + +func convertSpecToAPICommands(ctx context.Context, r io.Reader, w io.Writer) error { + spec, err := loadSpec(r) + if err != nil { + return fmt.Errorf("failed to load spec, error: %w", err) } if err := spec.Validate(ctx, openapi3.DisableSchemaPatternValidation(), openapi3.DisableExamplesValidation()); err != nil { @@ -83,24 +80,15 @@ func convertSpecToAPICommands(ctx context.Context, fs afero.Fs, specPath, output return fmt.Errorf("failed convert spec to api commands: %w", err) } - return writeCommands(fs, outputPath, commands) + return writeCommands(w, commands) } -func loadSpec(fs afero.Fs, specPath string) (*openapi3.T, error) { - file, err := fs.Open(specPath) - if err != nil { - return nil, err - } - - defer func() { - _ = file.Close() - }() - +func loadSpec(r io.Reader) (*openapi3.T, error) { loader := openapi3.NewLoader() - return loader.LoadFromIoReader(file) + return loader.LoadFromIoReader(r) } -func writeCommands(fs afero.Fs, outputPath string, data api.GroupedAndSortedCommands) error { +func writeCommands(w io.Writer, data api.GroupedAndSortedCommands) error { tmpl, err := template.New("commands.go.tmpl").Funcs(template.FuncMap{ "currentYear": func() int { return time.Now().UTC().Year() @@ -122,15 +110,6 @@ func writeCommands(fs afero.Fs, outputPath string, data api.GroupedAndSortedComm return fmt.Errorf("failed to format generated code: %w", err) } - // Write the formatted code to file - file, err := fs.Create(outputPath) - if err != nil { - return fmt.Errorf("failed to open output file %s, error: %w", outputPath, err) - } - defer func() { - _ = file.Close() - }() - - _, err = file.Write(formatted) + _, err = w.Write(formatted) return err } diff --git a/tools/api-generator/main_test.go b/tools/api-generator/main_test.go index 9f12c69fab..c45f17aaf0 100644 --- a/tools/api-generator/main_test.go +++ b/tools/api-generator/main_test.go @@ -15,13 +15,13 @@ package main import ( + "bytes" "context" "os" "path/filepath" "testing" "github.com/bradleyjkemp/cupaloy/v2" - "github.com/spf13/afero" "github.com/stretchr/testify/require" ) @@ -29,30 +29,20 @@ func testSpec(t *testing.T, name, specPath string) { t.Helper() snapshotter := cupaloy.New(cupaloy.SnapshotFileExtension(".snapshot")) - realFs := afero.NewOsFs() - - specBytes, err := afero.ReadFile(realFs, specPath) + specFile, err := os.OpenFile(specPath, os.O_RDONLY, os.ModePerm) if err != nil { t.Errorf("failed to load '%s', error: %s", specPath, err) t.FailNow() } + defer specFile.Close() - fs := afero.NewMemMapFs() - _ = afero.WriteFile(fs, "spec.yml", specBytes, os.ModeType) - - if err := convertSpecToAPICommands(context.Background(), fs, "spec.yml", "commands.go"); err != nil { + buf := &bytes.Buffer{} + if err := convertSpecToAPICommands(context.Background(), specFile, buf); err != nil { t.Errorf("failed to convert spec into commmands, error: %s", err) t.FailNow() } - resultBytes, err := afero.ReadFile(fs, "commands.go") - if err != nil { - t.Errorf("failed to read result commands file, error: %s", err) - t.FailNow() - } - - resultString := string(resultBytes) - if err := snapshotter.SnapshotWithName(name, resultString); err != nil { + if err := snapshotter.SnapshotWithName(name, buf.String()); err != nil { t.Errorf("unexpected result %s", err) t.FailNow() } From 630ca0c21596f661445955b490d0c9190edefb0c Mon Sep 17 00:00:00 2001 From: Filipe C Menezes Date: Fri, 31 Jan 2025 18:52:44 +0000 Subject: [PATCH 2/2] add overlays --- Makefile | 2 +- build/ci/library_owners.json | 1 + go.mod | 7 + go.sum | 28 + .../05-spec-with-overlay.yaml.snapshot | 98 + .../fixtures/05-spec-with-overlay.yaml | 8423 +++++++++++++++++ .../05-spec-with-overlay.yaml.overlay.yaml | 23 + tools/api-generator/main.go | 85 +- tools/api-generator/main_test.go | 32 +- tools/api-generator/overlays/.gitkeep | 0 10 files changed, 8683 insertions(+), 16 deletions(-) create mode 100644 tools/api-generator/.snapshots/05-spec-with-overlay.yaml.snapshot create mode 100644 tools/api-generator/fixtures/05-spec-with-overlay.yaml create mode 100644 tools/api-generator/fixtures/05-spec-with-overlay.yaml.overlay.yaml create mode 100644 tools/api-generator/overlays/.gitkeep diff --git a/Makefile b/Makefile index fc5710b37d..f6ab2cdc41 100644 --- a/Makefile +++ b/Makefile @@ -116,7 +116,7 @@ bin/api-generator: .PHONY: gen-api-commands gen-api-commands: bin/api-generator ## Generate api commands @echo "==> Generating api commands" - bin/api-generator --spec ./tools/api-generator/spec.yaml > ./internal/api/commands.go + bin/api-generator --spec ./tools/api-generator/spec.yaml --overlay ./tools/api-generator/overlays > ./internal/api/commands.go .PHONY: otel otel: ## Generate code diff --git a/build/ci/library_owners.json b/build/ci/library_owners.json index 0ea5c55d55..5668a516bf 100644 --- a/build/ci/library_owners.json +++ b/build/ci/library_owners.json @@ -33,6 +33,7 @@ "github.com/pelletier/go-toml": "apix-2", "github.com/pkg/browser": "apix-2", "github.com/shirou/gopsutil/v4": "apix-2", + "github.com/speakeasy-api/openapi-overlay": "apix-2", "github.com/spf13/afero": "apix-2", "github.com/spf13/cobra": "apix-2", "github.com/spf13/pflag": "apix-2", diff --git a/go.mod b/go.mod index e2972cec92..9deaac0731 100644 --- a/go.mod +++ b/go.mod @@ -36,6 +36,7 @@ require ( github.com/pelletier/go-toml v1.9.5 github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c github.com/shirou/gopsutil/v4 v4.24.12 + github.com/speakeasy-api/openapi-overlay v0.10.1 github.com/spf13/afero v1.12.0 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 @@ -69,6 +70,12 @@ require ( sigs.k8s.io/yaml v1.4.0 ) +require ( + github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960 // indirect + github.com/speakeasy-api/jsonpath v0.6.0 // indirect + github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect +) + require ( cloud.google.com/go v0.116.0 // indirect cloud.google.com/go/auth v0.14.0 // indirect diff --git a/go.sum b/go.sum index 9f16856245..811b00860c 100644 --- a/go.sum +++ b/go.sum @@ -143,6 +143,8 @@ github.com/denisbrodbeck/machineid v1.0.1 h1:geKr9qtkB876mXguW2X6TU4ZynleN6ezuMS github.com/denisbrodbeck/machineid v1.0.1/go.mod h1:dJUwb7PTidGDeYyUBmXZ2GphQBbjJCrnectwCyxcUSI= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960 h1:aRd8M7HJVZOqn/vhOzrGcQH0lNAMkqMn+pXUYkatmcA= +github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960/go.mod h1:9HQzr9D/0PGwMEbC3d5AB7oi67+h4TsQqItC1GVYG58= github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 h1:2tV76y6Q9BB+NEBasnqvs7e49aEBFI8ejC89PSnWH+4= github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= @@ -162,6 +164,7 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= @@ -277,6 +280,8 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02 h1:AgcIVYPa6XJnU3phs104wLj8l5GEththEw6+F79YsIY= github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -350,8 +355,12 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/nwaples/rardecode/v2 v2.0.0-beta.4.0.20241112120701-034e449c6e78 h1:MYzLheyVx1tJVDqfu3YnN4jtnyALNzLvwl+f58TcvQY= github.com/nwaples/rardecode/v2 v2.0.0-beta.4.0.20241112120701-034e449c6e78/go.mod h1:yntwv/HfMc/Hbvtq9I19D1n58te3h6KsqCf3GxyfBGY= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.2 h1:uqH7bpe+ERSiDa34FDOF7RikN6RzXgduUF8yarlZp94= +github.com/onsi/ginkgo v1.10.2/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo/v2 v2.22.2 h1:/3X8Panh8/WwhU/3Ssa6rCKqPLuAkVY2I0RoyDLySlU= github.com/onsi/ginkgo/v2 v2.22.2/go.mod h1:oeMosUL+8LtarXBHu/c0bx2D/K9zyQ6uX3cTyztHwsk= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= @@ -391,12 +400,18 @@ github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6ke github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil/v4 v4.24.12 h1:qvePBOk20e0IKA1QXrIIU+jmk+zEiYVVx06WjBRlZo4= github.com/shirou/gopsutil/v4 v4.24.12/go.mod h1:DCtMPAad2XceTeIAbGyVfycbYQNBGk2P8cvDi7/VN9o= github.com/sorairolake/lzip-go v0.3.5 h1:ms5Xri9o1JBIWvOFAorYtUNik6HI3HgBTkISiqu0Cwg= github.com/sorairolake/lzip-go v0.3.5/go.mod h1:N0KYq5iWrMXI0ZEXKXaS9hCyOjZUQdBDEIbXfoUwbdk= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= +github.com/speakeasy-api/jsonpath v0.6.0 h1:IhtFOV9EbXplhyRqsVhHoBmmYjblIRh5D1/g8DHMXJ8= +github.com/speakeasy-api/jsonpath v0.6.0/go.mod h1:ymb2iSkyOycmzKwbEAYPJV/yi2rSmvBCLZJcyD+VVWw= +github.com/speakeasy-api/openapi-overlay v0.10.1 h1:XFx/GvJvtAGf4dcQ6bxzsLNf76x/QWE2X0SSZrWojBQ= +github.com/speakeasy-api/openapi-overlay v0.10.1/go.mod h1:n0iOU7AqKpNFfEt6tq7qYITC4f0yzVVdFw0S7hukemg= github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs= github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= @@ -416,6 +431,7 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -439,6 +455,8 @@ github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95 github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc= github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/vmware-labs/yaml-jsonpath v0.3.2 h1:/5QKeCBGdsInyDCyVNLbXyilb61MXGi9NP674f9Hobk= +github.com/vmware-labs/yaml-jsonpath v0.3.2/go.mod h1:U6whw1z03QyqgWdgXxvVnQ90zN1BWz5V+51Ewf8k+rQ= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= @@ -551,6 +569,7 @@ golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -589,6 +608,7 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -720,16 +740,24 @@ google.golang.org/protobuf v1.36.4 h1:6A3ZDJHn/eNqc1i+IdefRzy/9PokBTPvcqMySR7NNI google.golang.org/protobuf v1.36.4/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20191026110619-0b21df46bc1d/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/tools/api-generator/.snapshots/05-spec-with-overlay.yaml.snapshot b/tools/api-generator/.snapshots/05-spec-with-overlay.yaml.snapshot new file mode 100644 index 0000000000..977742b8de --- /dev/null +++ b/tools/api-generator/.snapshots/05-spec-with-overlay.yaml.snapshot @@ -0,0 +1,98 @@ +// Copyright 2025 MongoDB Inc +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// This code was autogenerated using `make gen-L1-commands` +// Don't make any manual changes to this file. +package api + +import "net/http" + +var Commands = GroupedAndSortedCommands{ + { + Name: `Clusters`, + Description: `Returns, adds, edits, and removes database deployments. Changes to cluster configurations can affect costs. This resource requires your Project ID.`, + Commands: []Command{ + { + OperationID: `createClusterX`, + Description: `OVERRIDDEN`, + RequestParameters: RequestParameters{ + URL: `/api/atlas/v2/groups/{groupId}/clusters`, + QueryParameters: []Parameter{ + { + Name: `envelope`, + Description: `Flag that indicates whether Application wraps the response in an envelope JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body.`, + Required: false, + Type: ParameterType{ + IsArray: false, + Type: `bool`, + }, + }, + { + Name: `pretty`, + Description: `Flag that indicates whether the response body should be in the prettyprint format.`, + Required: false, + Type: ParameterType{ + IsArray: false, + Type: `bool`, + }, + }, + }, + URLParameters: []Parameter{ + { + Name: `groupIdX`, + Description: `OVERRIDDEN`, + Required: true, + Type: ParameterType{ + IsArray: false, + Type: `string`, + }, + }, + }, + Verb: http.MethodPost, + }, + Versions: []Version{ + { + Version: `2023-01-01`, + RequestContentType: `json`, + ResponseContentTypes: []string{ + `json`, + }, + }, + { + Version: `2023-02-01`, + RequestContentType: `json`, + ResponseContentTypes: []string{ + `json`, + }, + }, + { + Version: `2024-08-05`, + RequestContentType: `json`, + ResponseContentTypes: []string{ + `json`, + }, + }, + { + Version: `2024-10-23`, + RequestContentType: `json`, + ResponseContentTypes: []string{ + `json`, + }, + }, + }, + }, + }, + }, +} + diff --git a/tools/api-generator/fixtures/05-spec-with-overlay.yaml b/tools/api-generator/fixtures/05-spec-with-overlay.yaml new file mode 100644 index 0000000000..c21d14f62b --- /dev/null +++ b/tools/api-generator/fixtures/05-spec-with-overlay.yaml @@ -0,0 +1,8423 @@ +openapi: 3.0.1 +info: + description: |- + The MongoDB Atlas Administration API allows developers to manage all components in MongoDB Atlas. + + The Atlas Administration API uses HTTP Digest Authentication to authenticate requests. Provide a programmatic API public key and corresponding private key as the username and password when constructing the HTTP request. For example, to [return database access history](#tag/Access-Tracking/operation/listAccessLogsByClusterName) with [cURL](https://en.wikipedia.org/wiki/CURL), run the following command in the terminal: + + ``` + curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" \ + --digest \ + --header "Accept: application/vnd.atlas.2025-01-01+json" \ + -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/dbAccessHistory/clusters/{clusterName}?pretty=true" + ``` + + To learn more, see [Get Started with the Atlas Administration API](https://www.mongodb.com/docs/atlas/configure-api-access/). For support, see [MongoDB Support](https://www.mongodb.com/support/get-started). + + You can also explore the various endpoints available through the Atlas Administration API in MongoDB's [Postman workspace](https://www.postman.com/mongodb-devrel/workspace/mongodb-atlas-administration-apis/). + license: + name: CC BY-NC-SA 3.0 US + url: https://creativecommons.org/licenses/by-nc-sa/3.0/us/ + termsOfService: https://www.mongodb.com/mongodb-management-service-terms-and-conditions + title: MongoDB Atlas Administration API + version: '2.0' + x-xgen-sha: e4e03e44a819d3c9846972a63cc6d6acf236fbd7 +servers: + - url: https://cloud.mongodb.com +security: + - DigestAuth: [] +tags: + - description: Returns access logs for authentication attempts made to Atlas database deployments. To view database access history, you must have either the Project Owner or Organization Owner role. + name: Access Tracking + - description: Returns and edits the conditions that trigger alerts and how MongoDB Cloud notifies users. This collection remains under revision and may change. + name: Alert Configurations + - description: Returns and acknowledges alerts that MongoDB Cloud triggers based on the alert conditions that you define. This collection remains under revision and may change. + name: Alerts + - description: Returns, adds, edits, and removes Atlas Search indexes for the specified cluster. Also returns and updates user-defined analyzers for the specified cluster. + name: Atlas Search + - description: Returns and edits database auditing settings for MongoDB Cloud projects. + name: Auditing + - description: Returns and edits custom DNS configurations for MongoDB Cloud database deployments on AWS. The resource requires your Project ID. If you use the VPC peering on AWS and you use your own DNS servers instead of Amazon Route 53, enable custom DNS. Before 31 March 2020, applications deployed within AWS using custom DNS services and VPC-peered with MongoDB Cloud couldn't connect over private IP addresses. Custom DNS resolved to public IP addresses. AWS internal DNS resolved to private IP addresses. Applications deployed with custom DNS services in AWS should use Private IP for Peering connection strings. + name: AWS Clusters DNS + - description: Manages Cloud Backup snapshots, snapshot export buckets, restore jobs, and schedules. This resource applies only to clusters that use Cloud Backups. + name: Cloud Backups + - description: Manages the Cloud Migration Service. Source organizations, projects, and MongoDB clusters reside on Cloud Manager or Ops Manager. Destination organizations, projects, and MongoDB clusters reside on MongoDB Cloud. Source databases can't use any authentication except SCRAM-SHA. + name: Cloud Migration Service + - description: Returns, adds, authorizes, and removes AWS IAM roles in Atlas. + name: Cloud Provider Access + - description: Returns, starts, or ends a cluster outage simulation. + name: Cluster Outage Simulation + - description: Returns, adds, edits, and removes database deployments. Changes to cluster configurations can affect costs. This resource requires your Project ID. + name: Clusters + - description: Returns, adds, and edits pinned namespaces for the specified cluster or process. Also returns collection level latency metric data. + name: Collection Level Metrics + - description: Returns, adds, edits, and removes custom database user privilege roles. Use custom roles to specify custom sets of actions that the MongoDB Cloud built-in roles can't describe. You define custom roles at the project level, for all clusters in the project. This resource supports a subset of MongoDB privilege actions. You can create a subset of custom role actions. To create a wider list of custom role actions, use the MongoDB Cloud user interface. Custom roles must include actions that all project's clusters support, and that are compatible with each MongoDB version that your project's clusters use. For example, if your project has MongoDB 4.2 clusters, you can't create custom roles that use actions introduced in MongoDB 4.4. + name: Custom Database Roles + - description: Returns, adds, edits, and removes Federated Database Instances. This resource requires your project ID. Changes to federated database instance configurations can affect costs. + name: Data Federation + - description: Returns, edits, and removes Atlas Data Lake Pipelines and associated runs. + externalDocs: + description: Data Lake Pipelines are deprecated. Please see Data Lake Deprecation Guide. + url: https://dochub.mongodb.org/core/data-lake-deprecation + name: Data Lake Pipelines + - description: Returns, adds, edits, and removes database users. + name: Database Users + - description: Returns and edits the Encryption at Rest using Customer Key Management configuration. MongoDB Cloud encrypts all storage whether or not you use your own key management. + name: Encryption at Rest using Customer Key Management + - description: Returns events. This collection remains under revision and may change. + name: Events + - description: Returns, adds, edits, and removes federation-related features such as role mappings and connected organization configurations. + name: Federated Authentication + - description: |- + Returns, adds, and removes Global Cluster managed namespaces and custom zone mappings. Each collection in a Global Cluster is associated with a managed namespace. When you create a managed namespace for a Global Cluster, MongoDB Cloud creates an empty collection for that namespace. Creating a managed namespace doesn't populate a collection with data. Similarly, deleting a managed namespace doesn't delete the associated collection. + MongoDB Cloud shards the empty collection using the required location field and a custom shard key. For example, if your custom shard key is `city`, the compound shard key is `location, city`. Each Global Cluster is also associated with one or more Global Writes Zones. When a user creates a Global Cluster, MongoDB Cloud automatically maps each location code to the closest geographical zone. Custom zone mappings allow administrators to override these automatic mappings. For example, a use case might require mapping a location code to a geographically distant zone. Administrators can manage custom zone mappings with the APIs below and the **Global Cluster Configuration** pane when you create or modify your Global Cluster. + name: Global Clusters + - description: Private resources. + name: Internal + - description: Returns invoices. + name: Invoices + - description: Returns, edits, verifies, and removes LDAP configurations. An LDAP configuration defines settings for MongoDB Cloud to connect to your LDAP server over TLS for user authentication and authorization. Your LDAP server must be visible to the internet or connected to your MongoDB Cloud cluster with VPC Peering. Also, your LDAP server must use TLS. You must have the MongoDB Cloud admin user privilege to use these endpoints. Also, to configure user authentication and authorization with LDAPS, your cluster must run MongoDB 3.6 or higher. Groups for which you have configured LDAPS can't create a cluster using a version of MongoDB 3.6 or lower. + name: LDAP Configuration + - description: Manages Legacy Backup snapshots, restore jobs, schedules and checkpoints. + name: Legacy Backup + - description: Returns, edits, and removes maintenance windows. The maintenance procedure that MongoDB Cloud performs requires at least one replica set election during the maintenance window per replica set. You can defer a scheduled maintenance event for a project up to two times. Deferred maintenance events occur during your preferred maintenance window exactly one week after the previously scheduled date and time. + name: Maintenance Windows + - description: Returns, adds, and edits MongoDB Cloud users. + name: MongoDB Cloud Users + - description: Returns database deployment monitoring and logging data. + name: Monitoring and Logs + - description: |- + Returns, adds, edits, and removes network peering containers and peering connections. + When you deploy an M10+ dedicated cluster, Atlas creates a VPC for the selected provider and region or regions if no existing VPC or VPC peering connection exists for that provider and region. Atlas assigns the VPC a Classless Inter-Domain Routing (CIDR) block. + 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. + name: Performance Advisor + - description: Returns, adds, edits, and removes private endpoint services. + name: Private Endpoint Services + - description: Returns, adds, edits, and removes access tokens to use the MongoDB Cloud API. MongoDB Cloud applies these keys to organizations. These resources can return, assign, or revoke use of these keys within a specified project. + name: Programmatic API Keys + - description: Returns, adds, edits, and removes network access limits to database deployments in Atlas. This resource replaces the whitelist resource. Atlas removed whitelists in July 2021. Update your applications to use this new resource. This resource manages a project's IP Access List and supports creating temporary Access List entries that automatically expire within a user-configurable 7-day period. + 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. + name: Push-Based Log Export + - description: Configure and manage Atlas Resource Policies within your organization. + name: Resource Policies + - description: Creates one index to a database deployment in a rolling manner. You can't create a rolling index on an `M0` free cluster or `M2/M5` shared cluster. + name: Rolling Index + - description: Returns details that describe the MongoDB Cloud build and the access token that requests this resource. This starts the MongoDB Cloud API. + name: Root + - description: Returns, adds, edits, and removes serverless instances. + name: Serverless Instances + - description: Returns, adds, edits, and removes private endpoints for serverless instances. To learn more, see the Atlas Administration API tab on the following tutorial. + externalDocs: + description: Set Up a Private Endpoint for a Serverless Instance Tutorial + url: https://dochub.mongodb.org/core/serverless-private-endpoint + name: Serverless Private Endpoints + - description: Endpoints for managing Service Accounts and secrets. Service Accounts are used for programmatic access to the Atlas Admin API through the OAuth 2.0 Client Credentials flow. This feature is available as a Preview feature. + externalDocs: + description: Get Started with the Atlas Administration API + url: https://www.mongodb.com/docs/atlas/configure-api-access/ + name: Service Accounts + - description: Returns and adds restore jobs for shared-tier database deployments. + name: Shared-Tier Restore Jobs + - description: Returns and requests to download shared-tier database deployment snapshots. + name: Shared-Tier Snapshots + - description: Returns, adds, edits, and removes Streams Instances. This resource requires your project ID. + name: Streams + - description: Returns, adds, edits, or removes teams. + name: Teams + - description: Atlas test endpoints. + name: Test + - description: |- + Returns, adds, edits, and removes third-party service integration configurations. MongoDB Cloud sends alerts to each third-party service that you configure. + + **IMPORTANT**: Each project can only have one configuration per integrationType. + name: Third-Party Integrations + - description: Returns, edits, and removes user-managed X.509 configurations. Also returns and generates MongoDB Cloud-managed X.509 certificates for database users. The following resources help manage database users who authenticate using X.509 certificates. You can manage these X.509 certificates or let MongoDB Cloud do it for you. If MongoDB Cloud manages your certificates, it also manages your Certificate Authority and can generate certificates for your database users. No additional X.509 configuration is required. If you manage your certificates, you must provide a Certificate Authority and generate certificates for your database users. + externalDocs: + description: Self-Managed X.509 Certificates + url: https://www.mongodb.com/docs/atlas/security-self-managed-x509/ + name: X.509 Authentication +paths: + /api/atlas/v2/groups/{groupId}/clusters: + post: + description: Creates one cluster in the specified project. Clusters contain a group of hosts that maintain the same data set. This resource can create clusters with asymmetrically-sized shards. Each project supports up to 25 database deployments. To use this resource, the requesting API Key must have the Project Owner role. This feature is not available for serverless clusters. + operationId: createCluster + parameters: + - $ref: '#/components/parameters/envelope' + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/pretty' + requestBody: + content: + application/vnd.atlas.2023-01-01+json: + schema: + $ref: '#/components/schemas/LegacyAtlasCluster' + application/vnd.atlas.2023-02-01+json: + schema: + $ref: '#/components/schemas/AdvancedClusterDescription' + application/vnd.atlas.2024-08-05+json: + examples: + Cluster: + description: Cluster + value: + clusterType: SHARDED + name: myCluster + replicationSpecs: + - regionConfigs: + - analyticsAutoScaling: + autoIndexing: + enabled: false + compute: + enabled: false + diskGB: + enabled: true + analyticsSpecs: + diskSizeGB: 10 + instanceSize: M30 + nodeCount: 0 + autoScaling: + autoIndexing: + enabled: false + compute: + enabled: false + diskGB: + enabled: true + electableSpecs: + diskSizeGB: 10 + instanceSize: M30 + nodeCount: 3 + priority: 7 + providerName: AWS + readOnlySpecs: + diskSizeGB: 10 + instanceSize: M30 + nodeCount: 0 + regionName: US_EAST_1 + zoneName: Zone 1 + - regionConfigs: + - analyticsAutoScaling: + autoIndexing: + enabled: false + compute: + enabled: false + diskGB: + enabled: true + analyticsSpecs: + diskSizeGB: 10 + instanceSize: M10 + nodeCount: 0 + autoScaling: + autoIndexing: + enabled: false + compute: + enabled: false + diskGB: + enabled: true + electableSpecs: + diskSizeGB: 10 + instanceSize: M10 + nodeCount: 3 + priority: 7 + providerName: AWS + readOnlySpecs: + diskSizeGB: 10 + instanceSize: M10 + nodeCount: 0 + regionName: US_EAST_1 + zoneName: Zone 1 + schema: + $ref: '#/components/schemas/ClusterDescription20240805' + x-xgen-version: '2024-08-05' + application/vnd.atlas.2024-10-23+json: + examples: + Cluster: + description: Cluster + value: + clusterType: SHARDED + name: myCluster + replicationSpecs: + - regionConfigs: + - analyticsAutoScaling: + autoIndexing: + enabled: false + compute: + enabled: false + diskGB: + enabled: true + analyticsSpecs: + diskSizeGB: 10 + instanceSize: M30 + nodeCount: 0 + autoScaling: + autoIndexing: + enabled: false + compute: + enabled: false + diskGB: + enabled: true + electableSpecs: + diskSizeGB: 10 + instanceSize: M30 + nodeCount: 3 + priority: 7 + providerName: AWS + readOnlySpecs: + diskSizeGB: 10 + instanceSize: M30 + nodeCount: 0 + regionName: US_EAST_1 + zoneName: Zone 1 + - regionConfigs: + - analyticsAutoScaling: + autoIndexing: + enabled: false + compute: + enabled: false + diskGB: + enabled: true + analyticsSpecs: + diskSizeGB: 10 + instanceSize: M10 + nodeCount: 0 + autoScaling: + autoIndexing: + enabled: false + compute: + enabled: false + diskGB: + enabled: true + electableSpecs: + diskSizeGB: 10 + instanceSize: M10 + nodeCount: 3 + priority: 7 + providerName: AWS + readOnlySpecs: + diskSizeGB: 10 + instanceSize: M10 + nodeCount: 0 + regionName: US_EAST_1 + zoneName: Zone 1 + schema: + $ref: '#/components/schemas/ClusterDescription20240805' + x-xgen-version: '2024-10-23' + description: Cluster to create in this project. + required: true + responses: + '201': + content: + application/vnd.atlas.2023-01-01+json: + schema: + $ref: '#/components/schemas/LegacyAtlasCluster' + x-sunset: '2025-06-01' + x-xgen-version: '2023-01-01' + application/vnd.atlas.2023-02-01+json: + schema: + $ref: '#/components/schemas/AdvancedClusterDescription' + x-sunset: '2026-03-01' + x-xgen-version: '2023-02-01' + application/vnd.atlas.2024-08-05+json: + schema: + $ref: '#/components/schemas/ClusterDescription20240805' + x-sunset: '2026-03-01' + x-xgen-version: '2024-08-05' + application/vnd.atlas.2024-10-23+json: + schema: + $ref: '#/components/schemas/ClusterDescription20240805' + x-xgen-version: '2024-10-23' + description: Created + '400': + $ref: '#/components/responses/badRequest' + '401': + $ref: '#/components/responses/unauthorized' + '402': + $ref: '#/components/responses/paymentRequired' + '403': + $ref: '#/components/responses/forbidden' + '409': + $ref: '#/components/responses/conflict' + '500': + $ref: '#/components/responses/internalServerError' + summary: Create One Cluster from One Project + tags: + - Clusters + x-xgen-owner-team: Atlas Dedicated +components: + parameters: + envelope: + description: Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body. + in: query + name: envelope + schema: + default: false + example: false + type: boolean + groupId: + x-xgen-atlascli: + override: + description: OVERRRIDEN + name: groupIdX + description: |- + 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. + in: path + name: groupId + required: true + schema: + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + type: string + pretty: + description: Flag that indicates whether the response body should be in the prettyprint format. + in: query + name: pretty + schema: + default: false + example: false + type: boolean + responses: + badRequest: + content: + application/json: + example: + detail: (This is just an example, the exception may not be related to this endpoint) No provider AWS exists. + error: 400 + errorCode: VALIDATION_ERROR + reason: Bad Request + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request. + conflict: + content: + application/json: + example: + detail: '(This is just an example, the exception may not be related to this endpoint) Cannot delete organization link while there is active migration in following project ids: 60c4fd418ebe251047c50554' + error: 409 + errorCode: CANNOT_DELETE_ORG_ACTIVE_LIVE_MIGRATION_ATLAS_ORG_LINK + reason: Conflict + schema: + $ref: '#/components/schemas/ApiError' + description: Conflict. + forbidden: + content: + application/json: + example: + detail: (This is just an example, the exception may not be related to this endpoint) + error: 403 + errorCode: CANNOT_CHANGE_GROUP_NAME + reason: Forbidden + schema: + $ref: '#/components/schemas/ApiError' + description: Forbidden. + internalServerError: + content: + application/json: + example: + detail: (This is just an example, the exception may not be related to this endpoint) + error: 500 + errorCode: UNEXPECTED_ERROR + reason: Internal Server Error + schema: + $ref: '#/components/schemas/ApiError' + description: Internal Server Error. + paymentRequired: + content: + application/json: + example: + detail: (This is just an example, the exception may not be related to this endpoint) + error: 402 + errorCode: NO_PAYMENT_INFORMATION_FOUND + reason: Payment Required + schema: + $ref: '#/components/schemas/ApiError' + description: Payment Required. + unauthorized: + content: + application/json: + example: + detail: (This is just an example, the exception may not be related to this endpoint) + error: 401 + errorCode: NOT_ORG_GROUP_CREATOR + reason: Unauthorized + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized. + schemas: + AWSCloudProviderContainer: + allOf: + - $ref: '#/components/schemas/CloudProviderContainer' + - properties: + atlasCidrBlock: + description: |- + IP addresses expressed in Classless Inter-Domain Routing (CIDR) notation that MongoDB Cloud uses for the network peering containers in your project. MongoDB Cloud assigns all of the project's clusters deployed to this cloud provider an IP address from this range. MongoDB Cloud locks this value if an M10 or greater cluster or a network peering connection exists in this project. + + These CIDR blocks must fall within the ranges reserved per RFC 1918. AWS and Azure further limit the block to between the `/24` and `/21` ranges. + + To modify the CIDR block, the target project cannot have: + + - Any M10 or greater clusters + - Any other VPC peering connections + + You can also create a new project and create a network peering connection to set the desired MongoDB Cloud network peering container CIDR block for that project. MongoDB Cloud limits the number of MongoDB nodes per network peering connection based on the CIDR block and the region selected for the project. + + **Example:** A project in an Amazon Web Services (AWS) region supporting three availability zones and an MongoDB CIDR network peering container block of limit of `/24` equals 27 three-node replica sets. + pattern: ^((([0-9]{1,3}\.){3}[0-9]{1,3})|(:{0,2}([0-9a-f]{1,4}:){0,7}[0-9a-f]{1,4}[:]{0,2}))((%2[fF]|/)[0-9]{1,3})+$ + type: string + regionName: + description: Geographic area that Amazon Web Services (AWS) defines to which MongoDB Cloud deployed this network peering container. + enum: + - US_EAST_1 + - US_EAST_2 + - US_WEST_1 + - US_WEST_2 + - CA_CENTRAL_1 + - EU_NORTH_1 + - EU_WEST_1 + - EU_WEST_2 + - EU_WEST_3 + - EU_CENTRAL_1 + - EU_CENTRAL_2 + - SA_EAST_1 + - AP_EAST_1 + - AP_SOUTHEAST_2 + - AP_SOUTHEAST_3 + - AP_SOUTHEAST_4 + - AP_NORTHEAST_1 + - AP_NORTHEAST_2 + - AP_NORTHEAST_3 + - AP_SOUTHEAST_1 + - AP_SOUTH_1 + - AP_SOUTH_2 + - CN_NORTH_1 + - CN_NORTHWEST_1 + - ME_CENTRAL_1 + - ME_SOUTH_1 + - AF_SOUTH_1 + - EU_SOUTH_1 + - EU_SOUTH_2 + - IL_CENTRAL_1 + - CA_WEST_1 + - GLOBAL + - US_GOV_WEST_1 + - US_GOV_EAST_1 + type: string + vpcId: + description: Unique string that identifies the MongoDB Cloud VPC on AWS. + example: vpc-b555d3b0d9cb783b0 + minLength: 5 + pattern: ^vpc-[0-9a-f]{17}$ + readOnly: true + type: string + type: object + description: Collection of settings that configures the network container for a virtual private connection on Amazon Web Services. + required: + - regionName + title: AWS + type: object + AWSCloudProviderSettings: + allOf: + - $ref: '#/components/schemas/ClusterProviderSettings' + - properties: + autoScaling: + $ref: '#/components/schemas/CloudProviderAWSAutoScaling' + diskIOPS: + description: Maximum Disk Input/Output Operations per Second (IOPS) that the database host can perform. + format: int32 + type: integer + encryptEBSVolume: + default: true + deprecated: true + description: Flag that indicates whether the Amazon Elastic Block Store (EBS) encryption feature encrypts the host's root volume for both data at rest within the volume and for data moving between the volume and the cluster. Clusters always have this setting enabled. + type: boolean + instanceSizeName: + description: Cluster tier, with a default storage and memory capacity, that applies to all the data-bearing hosts in your cluster. + enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M100 + - M140 + - M200 + - M300 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - R700 + - M40_NVME + - M50_NVME + - M60_NVME + - M80_NVME + - M200_NVME + - M400_NVME + title: AWS Instance Sizes + type: string + regionName: + description: Physical location where MongoDB Cloud deploys your AWS-hosted MongoDB cluster nodes. The region you choose can affect network latency for clients accessing your databases. When MongoDB Cloud deploys a dedicated cluster, it checks if a VPC or VPC connection exists for that provider and region. If not, MongoDB Cloud creates them as part of the deployment. MongoDB Cloud assigns the VPC a CIDR block. To limit a new VPC peering connection to one CIDR block and region, create the connection first. Deploy the cluster after the connection starts. + enum: + - US_GOV_WEST_1 + - US_GOV_EAST_1 + - US_EAST_1 + - US_EAST_2 + - US_WEST_1 + - US_WEST_2 + - CA_CENTRAL_1 + - EU_NORTH_1 + - EU_WEST_1 + - EU_WEST_2 + - EU_WEST_3 + - EU_CENTRAL_1 + - EU_CENTRAL_2 + - AP_EAST_1 + - AP_NORTHEAST_1 + - AP_NORTHEAST_2 + - AP_NORTHEAST_3 + - AP_SOUTHEAST_1 + - AP_SOUTHEAST_2 + - AP_SOUTHEAST_3 + - AP_SOUTHEAST_4 + - AP_SOUTH_1 + - AP_SOUTH_2 + - SA_EAST_1 + - CN_NORTH_1 + - CN_NORTHWEST_1 + - ME_SOUTH_1 + - ME_CENTRAL_1 + - AF_SOUTH_1 + - EU_SOUTH_1 + - EU_SOUTH_2 + - IL_CENTRAL_1 + - CA_WEST_1 + - GLOBAL + externalDocs: + description: AWS + url: https://docs.atlas.mongodb.com/reference/amazon-aws/#std-label-amazon-aws + title: AWS Regions + type: string + volumeType: + description: Disk Input/Output Operations per Second (IOPS) setting for Amazon Web Services (AWS) storage that you configure only for abbr title="Amazon Web Services">AWS. Specify whether Disk Input/Output Operations per Second (IOPS) must not exceed the default Input/Output Operations per Second (IOPS) rate for the selected volume size (`STANDARD`), or must fall within the allowable Input/Output Operations per Second (IOPS) range for the selected volume size (`PROVISIONED`). You must set this value to (`PROVISIONED`) for NVMe clusters. + enum: + - STANDARD + - PROVISIONED + type: string + type: object + type: object + AWSComputeAutoScaling: + description: Collection of settings that configures how a cluster might scale its cluster tier and whether the cluster can scale down. Cluster tier auto-scaling is unavailable for clusters using Low CPU or NVME storage classes. + properties: + maxInstanceSize: + description: Maximum instance size to which your cluster can automatically scale. + enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M100 + - M140 + - M200 + - M300 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - R700 + - M40_NVME + - M50_NVME + - M60_NVME + - M80_NVME + - M200_NVME + - M400_NVME + title: AWS Instance Sizes + type: string + minInstanceSize: + description: Minimum instance size to which your cluster can automatically scale. + enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M100 + - M140 + - M200 + - M300 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - R700 + - M40_NVME + - M50_NVME + - M60_NVME + - M80_NVME + - M200_NVME + - M400_NVME + title: AWS Instance Sizes + type: string + title: AWS + type: object + AWSCreateDataProcessRegionView: + allOf: + - $ref: '#/components/schemas/CreateDataProcessRegionView' + - properties: + region: + description: Human-readable label that identifies the geographic location of the region where you wish to store your archived data. + enum: + - US_EAST_1 + - US_WEST_2 + - SA_EAST_1 + - EU_WEST_1 + - EU_WEST_2 + - EU_CENTRAL_1 + - AP_SOUTH_1 + - AP_SOUTHEAST_1 + - AP_SOUTHEAST_2 + type: string + type: object + type: object + AWSDataProcessRegionView: + allOf: + - $ref: '#/components/schemas/DataProcessRegionView' + - properties: + region: + description: Human-readable label that identifies the geographic location of the region where you store your archived data. + enum: + - US_EAST_1 + - US_WEST_2 + - SA_EAST_1 + - EU_WEST_1 + - EU_WEST_2 + - EU_CENTRAL_1 + - AP_SOUTH_1 + - AP_SOUTHEAST_1 + - AP_SOUTHEAST_2 + readOnly: true + type: string + type: object + type: object + AWSHardwareSpec: + description: Hardware specifications for nodes deployed in the region. + properties: + diskIOPS: + description: |- + Target IOPS (Input/Output Operations Per Second) desired for storage attached to this hardware. + + Change this parameter if you: + + - set `"replicationSpecs[n].regionConfigs[m].providerName" to "AWS"`. + - set `"replicationSpecs[n].regionConfigs[m].electableSpecs.instanceSize" to "M30"` or greater (not including `Mxx_NVME` tiers). + + - set `"replicationSpecs[n].regionConfigs[m].electableSpecs.ebsVolumeType" to "PROVISIONED"`. + + The maximum input/output operations per second (IOPS) depend on the selected **.instanceSize** and **.diskSizeGB**. + This parameter defaults to the cluster tier's standard IOPS value. + Changing this value impacts cluster cost. + MongoDB Cloud enforces minimum ratios of storage capacity to system memory for given cluster tiers. This keeps cluster performance consistent with large datasets. + + - Instance sizes `M10` to `M40` have a ratio of disk capacity to system memory of 60:1. + - Instance sizes greater than `M40` have a ratio of 120:1. + format: int32 + type: integer + ebsVolumeType: + default: STANDARD + description: |- + Type of storage you want to attach to your AWS-provisioned cluster. + + - `STANDARD` volume types can't exceed the default input/output operations per second (IOPS) rate for the selected volume size. + + - `PROVISIONED` volume types must fall within the allowable IOPS range for the selected volume size. You must set this value to (`PROVISIONED`) for NVMe clusters. + enum: + - STANDARD + - PROVISIONED + type: string + instanceSize: + description: Hardware specification for the instance sizes in this region. Each instance size has a default storage and memory capacity. The instance size you select applies to all the data-bearing hosts of the node type. + enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M100 + - M140 + - M200 + - M300 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - R700 + - M40_NVME + - M50_NVME + - M60_NVME + - M80_NVME + - M200_NVME + - M400_NVME + title: AWS Instance Sizes + type: string + nodeCount: + description: Number of nodes of the given type for MongoDB Cloud to deploy to the region. + format: int32 + type: integer + title: AWS Cluster Hardware Settings + type: object + AWSHardwareSpec20240805: + description: Hardware specifications for nodes deployed in the region. + properties: + diskIOPS: + description: |- + Target IOPS (Input/Output Operations Per Second) desired for storage attached to this hardware. + + You can set different IOPS values on different shards when provisioned IOPS are supported. + + Change this parameter if you: + + - set `"replicationSpecs[n].regionConfigs[m].providerName" to "AWS"`. + - set `"replicationSpecs[n].regionConfigs[m].electableSpecs.instanceSize" to "M30"` or greater (not including `Mxx_NVME` tiers). + + - set `"replicationSpecs[n].regionConfigs[m].electableSpecs.ebsVolumeType" to "PROVISIONED"`. + + The maximum input/output operations per second (IOPS) depend on the selected **.instanceSize** and **.diskSizeGB**. + This parameter defaults to the cluster tier's standard IOPS value. + Changing this value impacts cluster cost. + MongoDB Cloud enforces minimum ratios of storage capacity to system memory for given cluster tiers. This keeps cluster performance consistent with large datasets. + + - Instance sizes `M10` to `M40` have a ratio of disk capacity to system memory of 60:1. + - Instance sizes greater than `M40` have a ratio of 120:1. + format: int32 + type: integer + diskSizeGB: + description: |- + Storage capacity of instance data volumes expressed in gigabytes. Increase this number to add capacity. + + This value must be equal for all shards and node types. + + This value is not configurable on M0/M2/M5 clusters. + + MongoDB Cloud requires this parameter if you set **replicationSpecs**. + + If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value. + + Storage charge calculations depend on whether you choose the default value or a custom value. + + The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier. + format: double + maximum: 4096 + minimum: 10 + type: number + ebsVolumeType: + default: STANDARD + description: |- + Type of storage you want to attach to your AWS-provisioned cluster. + + - `STANDARD` volume types can't exceed the default input/output operations per second (IOPS) rate for the selected volume size. + + - `PROVISIONED` volume types must fall within the allowable IOPS range for the selected volume size. You must set this value to (`PROVISIONED`) for NVMe clusters. + enum: + - STANDARD + - PROVISIONED + type: string + instanceSize: + description: Hardware specification for the instance sizes in this region in this shard. Each instance size has a default storage and memory capacity. Electable nodes and read-only nodes (known as "base nodes") within a single shard must use the same instance size. Analytics nodes can scale independently from base nodes within a shard. Both base nodes and analytics nodes can scale independently from their equivalents in other shards. + enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M100 + - M140 + - M200 + - M300 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - R700 + - M40_NVME + - M50_NVME + - M60_NVME + - M80_NVME + - M200_NVME + - M400_NVME + title: AWS Instance Sizes + type: string + nodeCount: + description: Number of nodes of the given type for MongoDB Cloud to deploy to the region. + format: int32 + type: integer + title: AWS Cluster Hardware Settings + type: object + AWSRegionConfig: + allOf: + - $ref: '#/components/schemas/CloudRegionConfig' + - properties: + analyticsAutoScaling: + $ref: '#/components/schemas/AdvancedAutoScalingSettings' + analyticsSpecs: + $ref: '#/components/schemas/DedicatedHardwareSpec' + autoScaling: + $ref: '#/components/schemas/AdvancedAutoScalingSettings' + readOnlySpecs: + $ref: '#/components/schemas/DedicatedHardwareSpec' + type: object + description: Details that explain how MongoDB Cloud replicates data in one region on the specified MongoDB database. + title: AWS Regional Replication Specifications + type: object + AWSRegionConfig20240805: + allOf: + - $ref: '#/components/schemas/CloudRegionConfig20240805' + - properties: + analyticsAutoScaling: + $ref: '#/components/schemas/AdvancedAutoScalingSettings' + analyticsSpecs: + $ref: '#/components/schemas/DedicatedHardwareSpec20240805' + autoScaling: + $ref: '#/components/schemas/AdvancedAutoScalingSettings' + readOnlySpecs: + $ref: '#/components/schemas/DedicatedHardwareSpec20240805' + type: object + description: Details that explain how MongoDB Cloud replicates data in one region on the specified MongoDB database. + title: AWS Regional Replication Specifications + type: object + AdvancedAutoScalingSettings: + description: Options that determine how this cluster handles resource scaling. + properties: + compute: + $ref: '#/components/schemas/AdvancedComputeAutoScaling' + diskGB: + $ref: '#/components/schemas/DiskGBAutoScaling' + title: Automatic Scaling Settings + type: object + AdvancedClusterDescription: + properties: + acceptDataRisksAndForceReplicaSetReconfig: + description: If reconfiguration is necessary to regain a primary due to a regional outage, submit this field alongside your topology reconfiguration to request a new regional outage resistant topology. Forced reconfigurations during an outage of the majority of electable nodes carry a risk of data loss if replicated writes (even majority committed writes) have not been replicated to the new primary node. MongoDB Atlas docs contain more information. To proceed with an operation which carries that risk, set **acceptDataRisksAndForceReplicaSetReconfig** to the current date. + externalDocs: + description: Reconfiguring a Replica Set during a regional outage + url: https://dochub.mongodb.org/core/regional-outage-reconfigure-replica-set + format: date-time + type: string + backupEnabled: + default: false + description: Flag that indicates whether the cluster can perform backups. If set to `true`, the cluster can perform backups. You must set this value to `true` for NVMe clusters. Backup uses [Cloud Backups](https://docs.atlas.mongodb.com/backup/cloud-backup/overview/) for dedicated clusters and [Shared Cluster Backups](https://docs.atlas.mongodb.com/backup/shared-tier/overview/) for tenant clusters. If set to `false`, the cluster doesn't use backups. + type: boolean + biConnector: + $ref: '#/components/schemas/BiConnector' + clusterType: + description: Configuration of nodes that comprise the cluster. + enum: + - REPLICASET + - SHARDED + - GEOSHARDED + type: string + configServerManagementMode: + default: ATLAS_MANAGED + description: |- + Config Server Management Mode for creating or updating a sharded cluster. + + When configured as ATLAS_MANAGED, atlas may automatically switch the cluster's config server type for optimal performance and savings. + + When configured as FIXED_TO_DEDICATED, the cluster will always use a dedicated config server. + enum: + - ATLAS_MANAGED + - FIXED_TO_DEDICATED + externalDocs: + description: MongoDB Sharded Cluster Config Servers + url: https://dochub.mongodb.org/docs/manual/core/sharded-cluster-config-servers + type: string + configServerType: + description: Describes a sharded cluster's config server type. + enum: + - DEDICATED + - EMBEDDED + externalDocs: + description: MongoDB Sharded Cluster Config Servers + url: https://dochub.mongodb.org/docs/manual/core/sharded-cluster-config-servers + readOnly: true + type: string + connectionStrings: + $ref: '#/components/schemas/ClusterConnectionStrings' + createDate: + description: Date and time when MongoDB Cloud created this cluster. This parameter expresses its value in ISO 8601 format in UTC. + format: date-time + readOnly: true + type: string + diskSizeGB: + description: |- + Storage capacity of instance data volumes expressed in gigabytes. Increase this number to add capacity. + + This value is not configurable on M0/M2/M5 clusters. + + MongoDB Cloud requires this parameter if you set **replicationSpecs**. + + If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value. + + Storage charge calculations depend on whether you choose the default value or a custom value. + + The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier. + format: double + maximum: 4096 + minimum: 10 + type: number + diskWarmingMode: + default: FULLY_WARMED + description: Disk warming mode selection. + enum: + - FULLY_WARMED + - VISIBLE_EARLIER + externalDocs: + description: Reduce Secondary Disk Warming Impact + url: https://docs.atlas.mongodb.com/reference/replica-set-tags/#reduce-secondary-disk-warming-impact + type: string + encryptionAtRestProvider: + description: 'Cloud service provider that manages your customer keys to provide an additional layer of encryption at rest for the cluster. To enable customer key management for encryption at rest, the cluster **replicationSpecs[n].regionConfigs[m].{type}Specs.instanceSize** setting must be `M10` or higher and `"backupEnabled" : false` or omitted entirely.' + enum: + - NONE + - AWS + - AZURE + - GCP + externalDocs: + description: Encryption at Rest using Customer Key Management + url: https://www.mongodb.com/docs/atlas/security-kms-encryption/ + type: string + featureCompatibilityVersion: + description: Feature compatibility version of the cluster. + readOnly: true + type: string + featureCompatibilityVersionExpirationDate: + description: Feature compatibility version expiration date. + format: date-time + readOnly: true + type: string + globalClusterSelfManagedSharding: + description: |- + Set this field to configure the Sharding Management Mode when creating a new Global Cluster. + + When set to false, the management mode is set to Atlas-Managed Sharding. This mode fully manages the sharding of your Global Cluster and is built to provide a seamless deployment experience. + + When set to true, the management mode is set to Self-Managed Sharding. This mode leaves the management of shards in your hands and is built to provide an advanced and flexible deployment experience. + + This setting cannot be changed once the cluster is deployed. + externalDocs: + description: Creating a Global Cluster + url: https://dochub.mongodb.org/core/global-cluster-management + type: boolean + groupId: + description: Unique 24-hexadecimal character string that identifies the project. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + id: + description: Unique 24-hexadecimal digit string that identifies the cluster. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + labels: + deprecated: true + description: |- + Collection of key-value pairs between 1 to 255 characters in length that tag and categorize the cluster. The MongoDB Cloud console doesn't display your labels. + + Cluster labels are deprecated and will be removed in a future release. We strongly recommend that you use [resource tags](https://dochub.mongodb.org/core/add-cluster-tag-atlas) instead. + items: + $ref: '#/components/schemas/ComponentLabel' + type: array + 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 + mongoDBEmployeeAccessGrant: + $ref: '#/components/schemas/EmployeeAccessGrantView' + mongoDBMajorVersion: + description: |- + MongoDB major version of the cluster. + + On creation: Choose from the available versions of MongoDB, or leave unspecified for the current recommended default in the MongoDB Cloud platform. The recommended version is a recent Long Term Support version. The default is not guaranteed to be the most recently released version throughout the entire release cycle. For versions available in a specific project, see the linked documentation or use the API endpoint for [project LTS versions endpoint](#tag/Projects/operation/getProjectLTSVersions). + + On update: Increase version only by 1 major version at a time. If the cluster is pinned to a MongoDB feature compatibility version exactly one major version below the current MongoDB version, the MongoDB version can be downgraded to the previous major version. + externalDocs: + description: Available MongoDB Versions in Atlas + url: https://www.mongodb.com/docs/atlas/reference/faq/database/#which-versions-of-mongodb-do-service-clusters-use- + type: string + mongoDBVersion: + description: Version of MongoDB that the cluster runs. + pattern: ([\d]+\.[\d]+\.[\d]+) + readOnly: true + type: string + name: + description: Human-readable label that identifies the advanced cluster. + maxLength: 64 + minLength: 1 + pattern: ^([a-zA-Z0-9][a-zA-Z0-9-]*)?[a-zA-Z0-9]+$ + type: string + paused: + description: Flag that indicates whether the cluster is paused. + type: boolean + pitEnabled: + description: Flag that indicates whether the cluster uses continuous cloud backups. + externalDocs: + description: Continuous Cloud Backups + url: https://docs.atlas.mongodb.com/backup/cloud-backup/overview/ + type: boolean + replicaSetScalingStrategy: + default: WORKLOAD_TYPE + description: |- + Set this field to configure the replica set scaling mode for your cluster. + + By default, Atlas scales under WORKLOAD_TYPE. This mode allows Atlas to scale your analytics nodes in parallel to your operational nodes. + + When configured as SEQUENTIAL, Atlas scales all nodes sequentially. This mode is intended for steady-state workloads and applications performing latency-sensitive secondary reads. + + When configured as NODE_TYPE, Atlas scales your electable nodes in parallel with your read-only and analytics nodes. This mode is intended for large, dynamic workloads requiring frequent and timely cluster tier scaling. This is the fastest scaling strategy, but it might impact latency of workloads when performing extensive secondary reads. + enum: + - SEQUENTIAL + - WORKLOAD_TYPE + - NODE_TYPE + externalDocs: + description: Modify the Replica Set Scaling Mode + url: https://dochub.mongodb.org/core/scale-nodes + type: string + replicationSpecs: + description: List of settings that configure your cluster regions. For Global Clusters, each object in the array represents a zone where your clusters nodes deploy. For non-Global sharded clusters and replica sets, this array has one object representing where your clusters nodes deploy. + items: + $ref: '#/components/schemas/ReplicationSpec' + type: array + rootCertType: + default: ISRGROOTX1 + description: Root Certificate Authority that MongoDB Cloud cluster uses. MongoDB Cloud supports Internet Security Research Group. + enum: + - ISRGROOTX1 + type: string + stateName: + description: Human-readable label that indicates the current operating condition of this cluster. + enum: + - IDLE + - CREATING + - UPDATING + - DELETING + - REPAIRING + readOnly: true + type: string + tags: + description: List that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. + externalDocs: + description: Resource Tags + url: https://dochub.mongodb.org/core/add-cluster-tag-atlas + items: + $ref: '#/components/schemas/ResourceTag' + type: array + terminationProtectionEnabled: + default: false + description: Flag that indicates whether termination protection is enabled on the cluster. If set to `true`, MongoDB Cloud won't delete the cluster. If set to `false`, MongoDB Cloud will delete the cluster. + type: boolean + versionReleaseSystem: + default: LTS + description: Method by which the cluster maintains the MongoDB versions. If value is `CONTINUOUS`, you must not specify **mongoDBMajorVersion**. + enum: + - LTS + - CONTINUOUS + type: string + type: object + AdvancedComputeAutoScaling: + description: Options that determine how this cluster handles CPU scaling. + properties: + enabled: + description: |- + Flag that indicates whether someone enabled instance size auto-scaling. + + - Set to `true` to enable instance size auto-scaling. If enabled, you must specify a value for **replicationSpecs[n].regionConfigs[m].autoScaling.compute.maxInstanceSize**. + - Set to `false` to disable instance size automatic scaling. + type: boolean + maxInstanceSize: + $ref: '#/components/schemas/BaseCloudProviderInstanceSize' + minInstanceSize: + $ref: '#/components/schemas/BaseCloudProviderInstanceSize' + scaleDownEnabled: + description: 'Flag that indicates whether the instance size may scale down. MongoDB Cloud requires this parameter if `"replicationSpecs[n].regionConfigs[m].autoScaling.compute.enabled" : true`. If you enable this option, specify a value for **replicationSpecs[n].regionConfigs[m].autoScaling.compute.minInstanceSize**.' + type: boolean + title: Automatic Compute Scaling Settings + type: object + ApiAtlasCloudProviderAccessFeatureUsageFeatureIdView: + description: Object that contains the identifying characteristics of the Amazon Web Services (AWS) Key Management Service (KMS). This field always returns a null value. + nullable: true + type: object + ApiAtlasDataLakeStorageView: + $ref: '#/components/schemas/DataLakeStorage' + ApiAtlasFTSAnalyzersViewManual: + description: Settings that describe one Atlas Search custom analyzer. + properties: + charFilters: + description: Filters that examine text one character at a time and perform filtering operations. + items: + oneOf: + - $ref: '#/components/schemas/charFilterhtmlStrip' + - $ref: '#/components/schemas/charFiltericuNormalize' + - $ref: '#/components/schemas/charFiltermapping' + - $ref: '#/components/schemas/charFilterpersian' + type: object + type: array + name: + description: |- + Human-readable name that identifies the custom analyzer. Names must be unique within an index, and must not start with any of the following strings: + - `lucene.` + - `builtin.` + - `mongodb.` + type: string + tokenFilters: + description: |- + Filter that performs operations such as: + + - Stemming, which reduces related words, such as "talking", "talked", and "talks" to their root word "talk". + + - Redaction, the removal of sensitive information from public documents. + items: + anyOf: + - $ref: '#/components/schemas/tokenFilterasciiFolding' + - $ref: '#/components/schemas/tokenFilterdaitchMokotoffSoundex' + - $ref: '#/components/schemas/tokenFilteredgeGram' + - $ref: '#/components/schemas/TokenFilterEnglishPossessive' + - $ref: '#/components/schemas/TokenFilterFlattenGraph' + - $ref: '#/components/schemas/tokenFiltericuFolding' + - $ref: '#/components/schemas/tokenFiltericuNormalizer' + - $ref: '#/components/schemas/TokenFilterkStemming' + - $ref: '#/components/schemas/tokenFilterlength' + - $ref: '#/components/schemas/tokenFilterlowercase' + - $ref: '#/components/schemas/tokenFilternGram' + - $ref: '#/components/schemas/TokenFilterPorterStemming' + - $ref: '#/components/schemas/tokenFilterregex' + - $ref: '#/components/schemas/tokenFilterreverse' + - $ref: '#/components/schemas/tokenFiltershingle' + - $ref: '#/components/schemas/tokenFiltersnowballStemming' + - $ref: '#/components/schemas/TokenFilterSpanishPluralStemming' + - $ref: '#/components/schemas/TokenFilterStempel' + - $ref: '#/components/schemas/tokenFilterstopword' + - $ref: '#/components/schemas/tokenFiltertrim' + - $ref: '#/components/schemas/TokenFilterWordDelimiterGraph' + type: array + tokenizer: + description: Tokenizer that you want to use to create tokens. Tokens determine how Atlas Search splits up text into discrete chunks for indexing. + discriminator: + mapping: + edgeGram: '#/components/schemas/tokenizeredgeGram' + keyword: '#/components/schemas/tokenizerkeyword' + nGram: '#/components/schemas/tokenizernGram' + regexCaptureGroup: '#/components/schemas/tokenizerregexCaptureGroup' + regexSplit: '#/components/schemas/tokenizerregexSplit' + standard: '#/components/schemas/tokenizerstandard' + uaxUrlEmail: '#/components/schemas/tokenizeruaxUrlEmail' + whitespace: '#/components/schemas/tokenizerwhitespace' + propertyName: type + oneOf: + - $ref: '#/components/schemas/tokenizeredgeGram' + - $ref: '#/components/schemas/tokenizerkeyword' + - $ref: '#/components/schemas/tokenizernGram' + - $ref: '#/components/schemas/tokenizerregexCaptureGroup' + - $ref: '#/components/schemas/tokenizerregexSplit' + - $ref: '#/components/schemas/tokenizerstandard' + - $ref: '#/components/schemas/tokenizeruaxUrlEmail' + - $ref: '#/components/schemas/tokenizerwhitespace' + type: object + required: + - name + - tokenizer + title: analyzers + type: object + ApiAtlasFTSMappingsViewManual: + description: Index specifications for the collection's fields. + properties: + dynamic: + default: false + description: Flag that indicates whether the index uses dynamic or static mappings. Required if **mappings.fields** is omitted. + externalDocs: + description: Dynamic or Static Mappings + url: https://dochub.mongodb.org/core/index-definitions-fts#field-mapping-examples + type: boolean + fields: + additionalProperties: + externalDocs: + description: Atlas Search Field Mappings + url: https://dochub.mongodb.org/core/field-mapping-definition-fts#define-field-mappings + type: object + description: One or more field specifications for the Atlas Search index. Required if **mappings.dynamic** is omitted or set to **false**. + externalDocs: + description: Atlas Search Index + url: https://dochub.mongodb.org/core/index-definitions-fts + type: object + title: mappings + type: object + ApiError: + properties: + badRequestDetail: + $ref: '#/components/schemas/BadRequestDetail' + detail: + description: Describes the specific conditions or reasons that cause each type of error. + type: string + error: + description: HTTP status code returned with this error. + externalDocs: + url: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status + format: int32 + readOnly: true + type: integer + errorCode: + description: Application error code returned with this error. + readOnly: true + type: string + parameters: + description: Parameters used to give more information about the error. + items: + readOnly: true + type: object + readOnly: true + type: array + reason: + description: Application error message returned with this error. + readOnly: true + type: string + required: + - error + - errorCode + type: object + AtlasSearchAnalyzer: + properties: + charFilters: + description: Filters that examine text one character at a time and perform filtering operations. + items: + $ref: '#/components/schemas/BasicDBObject' + type: array + name: + description: |- + Name that identifies the custom analyzer. Names must be unique within an index, and must not start with any of the following strings: + - `lucene.` + - `builtin.` + - `mongodb.` + type: string + tokenFilters: + description: |- + Filter that performs operations such as: + + - Stemming, which reduces related words, such as "talking", "talked", and "talks" to their root word "talk". + + - Redaction, which is the removal of sensitive information from public documents. + items: + $ref: '#/components/schemas/BasicDBObject' + type: array + tokenizer: + additionalProperties: + description: Tokenizer that you want to use to create tokens. Tokens determine how Atlas Search splits up text into discrete chunks for indexing. + type: object + description: Tokenizer that you want to use to create tokens. Tokens determine how Atlas Search splits up text into discrete chunks for indexing. + type: object + required: + - name + - tokenizer + title: Atlas Search Analyzer + type: object + AzureCloudProviderContainer: + allOf: + - $ref: '#/components/schemas/CloudProviderContainer' + - properties: + atlasCidrBlock: + description: |- + IP addresses expressed in Classless Inter-Domain Routing (CIDR) notation that MongoDB Cloud uses for the network peering containers in your project. MongoDB Cloud assigns all of the project's clusters deployed to this cloud provider an IP address from this range. MongoDB Cloud locks this value if an M10 or greater cluster or a network peering connection exists in this project. + + These CIDR blocks must fall within the ranges reserved per RFC 1918. AWS and Azure further limit the block to between the `/24` and `/21` ranges. + + To modify the CIDR block, the target project cannot have: + + - Any M10 or greater clusters + - Any other VPC peering connections + + You can also create a new project and create a network peering connection to set the desired MongoDB Cloud network peering container CIDR block for that project. MongoDB Cloud limits the number of MongoDB nodes per network peering connection based on the CIDR block and the region selected for the project. + + **Example:** A project in an Amazon Web Services (AWS) region supporting three availability zones and an MongoDB CIDR network peering container block of limit of `/24` equals 27 three-node replica sets. + pattern: ^((([0-9]{1,3}\.){3}[0-9]{1,3})|(:{0,2}([0-9a-f]{1,4}:){0,7}[0-9a-f]{1,4}[:]{0,2}))((%2[fF]|/)[0-9]{1,3})+$ + type: string + azureSubscriptionId: + description: Unique string that identifies the Azure subscription in which the MongoDB Cloud VNet resides. + example: 32b6e34b3d91647abb20e7b8 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + region: + description: Azure region to which MongoDB Cloud deployed this network peering container. + enum: + - US_CENTRAL + - US_EAST + - US_EAST_2 + - US_EAST_2_EUAP + - US_NORTH_CENTRAL + - US_WEST + - US_SOUTH_CENTRAL + - EUROPE_NORTH + - EUROPE_WEST + - US_WEST_CENTRAL + - US_WEST_2 + - US_WEST_3 + - CANADA_EAST + - CANADA_CENTRAL + - BRAZIL_SOUTH + - BRAZIL_SOUTHEAST + - AUSTRALIA_EAST + - AUSTRALIA_SOUTH_EAST + - AUSTRALIA_CENTRAL + - AUSTRALIA_CENTRAL_2 + - UAE_NORTH + - GERMANY_CENTRAL + - GERMANY_NORTH_EAST + - GERMANY_WEST_CENTRAL + - GERMANY_NORTH + - SWITZERLAND_NORTH + - SWITZERLAND_WEST + - SWEDEN_CENTRAL + - SWEDEN_SOUTH + - UK_SOUTH + - UK_WEST + - INDIA_CENTRAL + - INDIA_WEST + - INDIA_SOUTH + - CHINA_EAST + - CHINA_NORTH + - ASIA_EAST + - JAPAN_EAST + - JAPAN_WEST + - ASIA_SOUTH_EAST + - KOREA_CENTRAL + - KOREA_SOUTH + - FRANCE_CENTRAL + - FRANCE_SOUTH + - SOUTH_AFRICA_NORTH + - SOUTH_AFRICA_WEST + - NORWAY_EAST + - NORWAY_WEST + - UAE_CENTRAL + - QATAR_CENTRAL + - POLAND_CENTRAL + - ISRAEL_CENTRAL + - ITALY_NORTH + type: string + vnetName: + description: Unique string that identifies the Azure VNet in which MongoDB Cloud clusters in this network peering container exist. The response returns **null** if no clusters exist in this network peering container. + maxLength: 38 + minLength: 38 + pattern: ^([-\w._()])+$ + readOnly: true + type: string + type: object + description: Collection of settings that configures the network container for a virtual private connection on Amazon Web Services. + required: + - atlasCidrBlock + - region + title: AZURE + type: object + AzureCloudProviderSettings: + allOf: + - $ref: '#/components/schemas/ClusterProviderSettings' + - properties: + autoScaling: + $ref: '#/components/schemas/CloudProviderAzureAutoScaling' + diskTypeName: + description: Disk type that corresponds to the host's root volume for Azure instances. If omitted, the default disk type for the selected **providerSettings.instanceSizeName** applies. + enum: + - P2 + - P3 + - P4 + - P6 + - P10 + - P15 + - P20 + - P30 + - P40 + - P50 + externalDocs: + description: Disk type + url: https://docs.microsoft.com/en-us/azure/virtual-machines/premium-storage-performance#premium-storage-disk-sizes + type: string + instanceSizeName: + description: Cluster tier, with a default storage and memory capacity, that applies to all the data-bearing hosts in your cluster. + enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M90 + - M200 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - M60_NVME + - M80_NVME + - M200_NVME + - M300_NVME + - M400_NVME + - M600_NVME + title: Azure Instance Sizes + type: string + regionName: + description: Microsoft Azure Regions. + enum: + - US_CENTRAL + - US_EAST + - US_EAST_2 + - US_NORTH_CENTRAL + - US_WEST + - US_SOUTH_CENTRAL + - EUROPE_NORTH + - EUROPE_WEST + - US_WEST_CENTRAL + - US_WEST_2 + - US_WEST_3 + - CANADA_EAST + - CANADA_CENTRAL + - BRAZIL_SOUTH + - BRAZIL_SOUTHEAST + - AUSTRALIA_CENTRAL + - AUSTRALIA_CENTRAL_2 + - AUSTRALIA_EAST + - AUSTRALIA_SOUTH_EAST + - GERMANY_CENTRAL + - GERMANY_NORTH_EAST + - GERMANY_WEST_CENTRAL + - GERMANY_NORTH + - SWEDEN_CENTRAL + - SWEDEN_SOUTH + - SWITZERLAND_NORTH + - SWITZERLAND_WEST + - UK_SOUTH + - UK_WEST + - NORWAY_EAST + - NORWAY_WEST + - INDIA_CENTRAL + - INDIA_SOUTH + - INDIA_WEST + - CHINA_EAST + - CHINA_NORTH + - ASIA_EAST + - JAPAN_EAST + - JAPAN_WEST + - ASIA_SOUTH_EAST + - KOREA_CENTRAL + - KOREA_SOUTH + - FRANCE_CENTRAL + - FRANCE_SOUTH + - SOUTH_AFRICA_NORTH + - SOUTH_AFRICA_WEST + - UAE_CENTRAL + - UAE_NORTH + - QATAR_CENTRAL + externalDocs: + description: Azure + url: https://docs.atlas.mongodb.com/reference/microsoft-azure/ + title: Azure Regions + type: string + type: object + type: object + AzureComputeAutoScalingRules: + description: Collection of settings that configures how a cluster might scale its cluster tier and whether the cluster can scale down. Cluster tier auto-scaling is unavailable for clusters using Low CPU or NVME storage classes. + properties: + maxInstanceSize: + description: Maximum instance size to which your cluster can automatically scale. + enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M90 + - M200 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - M60_NVME + - M80_NVME + - M200_NVME + - M300_NVME + - M400_NVME + - M600_NVME + title: Azure Instance Sizes + type: string + minInstanceSize: + description: Minimum instance size to which your cluster can automatically scale. + enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M90 + - M200 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - M60_NVME + - M80_NVME + - M200_NVME + - M300_NVME + - M400_NVME + - M600_NVME + title: Azure Instance Sizes + type: string + title: Azure + type: object + AzureCreateDataProcessRegionView: + allOf: + - $ref: '#/components/schemas/CreateDataProcessRegionView' + - properties: + region: + description: Human-readable label that identifies the geographic location of the region where you wish to store your archived data. + enum: + - US_EAST_2 + - EUROPE_WEST + type: string + type: object + type: object + AzureDataProcessRegionView: + allOf: + - $ref: '#/components/schemas/DataProcessRegionView' + - properties: + region: + description: Human-readable label that identifies the geographic location of the region where you store your archived data. + enum: + - US_EAST_2 + - EUROPE_WEST + readOnly: true + type: string + type: object + type: object + AzureHardwareSpec: + properties: + diskIOPS: + description: |- + Target throughput desired for storage attached to your Azure-provisioned cluster. Change this parameter if you: + + - set `"replicationSpecs[n].regionConfigs[m].providerName" : "Azure"`. + - set `"replicationSpecs[n].regionConfigs[m].electableSpecs.instanceSize" : "M40"` or greater not including `Mxx_NVME` tiers. + + The maximum input/output operations per second (IOPS) depend on the selected **.instanceSize** and **.diskSizeGB**. + This parameter defaults to the cluster tier's standard IOPS value. + Changing this value impacts cluster cost. + externalDocs: + description: Programmatic API Keys + url: https://www.mongodb.com/docs/atlas/customize-storage/#extend-iops-on-azure + format: int32 + type: integer + instanceSize: + description: Hardware specification for the instance sizes in this region. Each instance size has a default storage and memory capacity. The instance size you select applies to all the data-bearing hosts of the node type. + enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M90 + - M200 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - M60_NVME + - M80_NVME + - M200_NVME + - M300_NVME + - M400_NVME + - M600_NVME + title: Azure Instance Sizes + type: string + nodeCount: + description: Number of nodes of the given type for MongoDB Cloud to deploy to the region. + format: int32 + type: integer + type: object + AzureHardwareSpec20240805: + properties: + diskIOPS: + description: |- + Target throughput desired for storage attached to your Azure-provisioned cluster. Change this parameter if you: + + - set `"replicationSpecs[n].regionConfigs[m].providerName" : "Azure"`. + - set `"replicationSpecs[n].regionConfigs[m].electableSpecs.instanceSize" : "M40"` or greater not including `Mxx_NVME` tiers. + + The maximum input/output operations per second (IOPS) depend on the selected **.instanceSize** and **.diskSizeGB**. + This parameter defaults to the cluster tier's standard IOPS value. + Changing this value impacts cluster cost. + externalDocs: + description: Programmatic API Keys + url: https://www.mongodb.com/docs/atlas/customize-storage/#extend-iops-on-azure + format: int32 + type: integer + diskSizeGB: + description: |- + Storage capacity of instance data volumes expressed in gigabytes. Increase this number to add capacity. + + This value must be equal for all shards and node types. + + This value is not configurable on M0/M2/M5 clusters. + + MongoDB Cloud requires this parameter if you set **replicationSpecs**. + + If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value. + + Storage charge calculations depend on whether you choose the default value or a custom value. + + The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier. + format: double + maximum: 4096 + minimum: 10 + type: number + instanceSize: + description: Hardware specification for the instance sizes in this region in this shard. Each instance size has a default storage and memory capacity. Electable nodes and read-only nodes (known as "base nodes") within a single shard must use the same instance size. Analytics nodes can scale independently from base nodes within a shard. Both base nodes and analytics nodes can scale independently from their equivalents in other shards. + enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M90 + - M200 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - M60_NVME + - M80_NVME + - M200_NVME + - M300_NVME + - M400_NVME + - M600_NVME + title: Azure Instance Sizes + type: string + nodeCount: + description: Number of nodes of the given type for MongoDB Cloud to deploy to the region. + format: int32 + type: integer + type: object + AzureRegionConfig: + allOf: + - $ref: '#/components/schemas/CloudRegionConfig' + - properties: + analyticsAutoScaling: + $ref: '#/components/schemas/AdvancedAutoScalingSettings' + analyticsSpecs: + $ref: '#/components/schemas/DedicatedHardwareSpec' + autoScaling: + $ref: '#/components/schemas/AdvancedAutoScalingSettings' + readOnlySpecs: + $ref: '#/components/schemas/DedicatedHardwareSpec' + type: object + description: Details that explain how MongoDB Cloud replicates data in one region on the specified MongoDB database. + title: Azure Regional Replication Specifications + type: object + AzureRegionConfig20240805: + allOf: + - $ref: '#/components/schemas/CloudRegionConfig20240805' + - properties: + analyticsAutoScaling: + $ref: '#/components/schemas/AdvancedAutoScalingSettings' + analyticsSpecs: + $ref: '#/components/schemas/DedicatedHardwareSpec20240805' + autoScaling: + $ref: '#/components/schemas/AdvancedAutoScalingSettings' + readOnlySpecs: + $ref: '#/components/schemas/DedicatedHardwareSpec20240805' + type: object + description: Details that explain how MongoDB Cloud replicates data in one region on the specified MongoDB database. + title: Azure Regional Replication Specifications + type: object + BadRequestDetail: + description: Bad request detail. + properties: + fields: + description: Describes all violations in a client request. + items: + $ref: '#/components/schemas/FieldViolation' + type: array + readOnly: true + type: object + BaseCloudProviderInstanceSize: + description: 'Minimum instance size to which your cluster can automatically scale. MongoDB Cloud requires this parameter if `"replicationSpecs[n].regionConfigs[m].autoScaling.compute.scaleDownEnabled" : true`.' + oneOf: + - enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M100 + - M140 + - M200 + - M300 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - R700 + - M40_NVME + - M50_NVME + - M60_NVME + - M80_NVME + - M200_NVME + - M400_NVME + title: AWS Instance Sizes + type: string + - enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M90 + - M200 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - M60_NVME + - M80_NVME + - M200_NVME + - M300_NVME + - M400_NVME + - M600_NVME + title: Azure Instance Sizes + type: string + - enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M140 + - M200 + - M250 + - M300 + - M400 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - R600 + title: GCP Instance Sizes + type: string + type: object + BasicDBObject: + additionalProperties: + type: object + type: object + BiConnector: + description: Settings needed to configure the MongoDB Connector for Business Intelligence for this cluster. + externalDocs: + description: MongoDB Connector for Business Intelligence + url: https://docs.mongodb.com/bi-connector/current/ + properties: + enabled: + description: Flag that indicates whether MongoDB Connector for Business Intelligence is enabled on the specified cluster. + type: boolean + readPreference: + description: Data source node designated for the MongoDB Connector for Business Intelligence on MongoDB Cloud. The MongoDB Connector for Business Intelligence on MongoDB Cloud reads data from the primary, secondary, or analytics node based on your read preferences. Defaults to `ANALYTICS` node, or `SECONDARY` if there are no `ANALYTICS` nodes. + enum: + - PRIMARY + - SECONDARY + - ANALYTICS + externalDocs: + description: Read preferences for BI Connector + url: https://docs.atlas.mongodb.com/cluster-config/enable-bic/#std-label-bic-read-preferences + type: string + title: MongoDB Connector for Business Intelligence Settings + type: object + BillingInvoice: + properties: + amountBilledCents: + description: Sum of services that the specified organization consumed in the period covered in this invoice. This parameter expresses its value in cents (100ths of one US Dollar). + format: int64 + readOnly: true + type: integer + amountPaidCents: + description: Sum that the specified organization paid toward this invoice. This parameter expresses its value in cents (100ths of one US Dollar). + format: int64 + readOnly: true + type: integer + created: + description: Date and time when MongoDB Cloud created this invoice. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + creditsCents: + description: Sum that MongoDB credited the specified organization toward this invoice. This parameter expresses its value in cents (100ths of one US Dollar). + format: int64 + readOnly: true + type: integer + endDate: + description: Date and time when MongoDB Cloud finished the billing period that this invoice covers. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + id: + description: Unique 24-hexadecimal digit string that identifies the invoice submitted to the specified organization. Charges typically post the next day. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + lineItems: + description: List that contains individual services included in this invoice. + items: + $ref: '#/components/schemas/InvoiceLineItem' + readOnly: true + type: array + linkedInvoices: + description: List that contains the invoices for organizations linked to the paying organization. + items: + $ref: '#/components/schemas/BillingInvoice' + readOnly: true + type: array + 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 charged for services consumed from MongoDB Cloud. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + payments: + description: List that contains funds transferred to MongoDB to cover the specified service noted in this invoice. + items: + $ref: '#/components/schemas/BillingPayment' + readOnly: true + type: array + refunds: + description: List that contains payments that MongoDB returned to the organization for this invoice. + items: + $ref: '#/components/schemas/BillingRefund' + readOnly: true + type: array + salesTaxCents: + description: Sum of sales tax applied to this invoice. This parameter expresses its value in cents (100ths of one US Dollar). + format: int64 + readOnly: true + type: integer + startDate: + description: Date and time when MongoDB Cloud began the billing period that this invoice covers. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + startingBalanceCents: + description: Sum that the specified organization owed to MongoDB when MongoDB issued this invoice. This parameter expresses its value in US Dollars. + format: int64 + readOnly: true + type: integer + statusName: + description: | + Phase of payment processing in which this invoice exists when you made this request. Accepted phases include: + + | Phase Value | Reason | + |---|---| + | CLOSED | MongoDB finalized all charges in the billing cycle but has yet to charge the customer. | + | FAILED | MongoDB attempted to charge the provided credit card but charge for that amount failed. | + | FORGIVEN | Customer initiated payment which MongoDB later forgave. | + | FREE | All charges totalled zero so the customer won't be charged. | + | INVOICED | MongoDB handled these charges using elastic invoicing. | + | PAID | MongoDB succeeded in charging the provided credit card. | + | PENDING | Invoice includes charges for the current billing cycle. | + | PREPAID | Customer has a pre-paid plan so they won't be charged. | + enum: + - PENDING + - CLOSED + - FORGIVEN + - FAILED + - PAID + - FREE + - PREPAID + - INVOICED + type: string + subtotalCents: + description: Sum of all positive invoice line items contained in this invoice. This parameter expresses its value in cents (100ths of one US Dollar). + format: int64 + readOnly: true + type: integer + updated: + description: Date and time when MongoDB Cloud last updated the value of this payment. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + type: object + BillingInvoiceMetadata: + properties: + amountBilledCents: + description: Sum of services that the specified organization consumed in the period covered in this invoice. This parameter expresses its value in cents (100ths of one US Dollar). + format: int64 + readOnly: true + type: integer + amountPaidCents: + description: Sum that the specified organization paid toward this invoice. This parameter expresses its value in cents (100ths of one US Dollar). + format: int64 + readOnly: true + type: integer + created: + description: Date and time when MongoDB Cloud created this invoice. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + creditsCents: + description: Sum that MongoDB credited the specified organization toward this invoice. This parameter expresses its value in cents (100ths of one US Dollar). + format: int64 + readOnly: true + type: integer + endDate: + description: Date and time when MongoDB Cloud finished the billing period that this invoice covers. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + id: + description: Unique 24-hexadecimal digit string that identifies the invoice submitted to the specified organization. Charges typically post the next day. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + linkedInvoices: + description: List that contains the invoices for organizations linked to the paying organization. + items: + $ref: '#/components/schemas/BillingInvoiceMetadata' + readOnly: true + type: array + 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 charged for services consumed from MongoDB Cloud. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + salesTaxCents: + description: Sum of sales tax applied to this invoice. This parameter expresses its value in cents (100ths of one US Dollar). + format: int64 + readOnly: true + type: integer + startDate: + description: Date and time when MongoDB Cloud began the billing period that this invoice covers. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + startingBalanceCents: + description: Sum that the specified organization owed to MongoDB when MongoDB issued this invoice. This parameter expresses its value in US Dollars. + format: int64 + readOnly: true + type: integer + statusName: + description: | + Phase of payment processing in which this invoice exists when you made this request. Accepted phases include: + + | Phase Value | Reason | + |---|---| + | CLOSED | MongoDB finalized all charges in the billing cycle but has yet to charge the customer. | + | FAILED | MongoDB attempted to charge the provided credit card but charge for that amount failed. | + | FORGIVEN | Customer initiated payment which MongoDB later forgave. | + | FREE | All charges totalled zero so the customer won't be charged. | + | INVOICED | MongoDB handled these charges using elastic invoicing. | + | PAID | MongoDB succeeded in charging the provided credit card. | + | PENDING | Invoice includes charges for the current billing cycle. | + | PREPAID | Customer has a pre-paid plan so they won't be charged. | + enum: + - PENDING + - CLOSED + - FORGIVEN + - FAILED + - PAID + - FREE + - PREPAID + - INVOICED + type: string + subtotalCents: + description: Sum of all positive invoice line items contained in this invoice. This parameter expresses its value in cents (100ths of one US Dollar). + format: int64 + readOnly: true + type: integer + updated: + description: Date and time when MongoDB Cloud last updated the value of this payment. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + type: object + BillingPayment: + description: Funds transferred to MongoDB to cover the specified service in this invoice. + properties: + amountBilledCents: + description: Sum of services that the specified organization consumed in the period covered in this invoice. This parameter expresses its value in cents (100ths of one US Dollar). + format: int64 + readOnly: true + type: integer + amountPaidCents: + description: Sum that the specified organization paid toward the associated invoice. This parameter expresses its value in cents (100ths of one US Dollar). + format: int64 + readOnly: true + type: integer + created: + description: Date and time when the customer made this payment attempt. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + currency: + description: The currency in which payment was paid. This parameter expresses its value in 3-letter ISO 4217 currency code. + readOnly: true + type: string + id: + description: Unique 24-hexadecimal digit string that identifies this payment toward the associated invoice. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + salesTaxCents: + description: Sum of sales tax applied to this invoice. This parameter expresses its value in cents (100ths of one US Dollar). + format: int64 + readOnly: true + type: integer + statusName: + description: | + Phase of payment processing for the associated invoice when you made this request. + + These phases include: + + | Phase Value | Reason | + |---|---| + | `CANCELLED` | Customer or MongoDB cancelled the payment. | + | `ERROR` | Issue arose when attempting to complete payment. | + | `FAILED` | MongoDB tried to charge the credit card without success. | + | `FAILED_AUTHENTICATION` | Strong Customer Authentication has failed. Confirm that your payment method is authenticated. | + | `FORGIVEN` | Customer initiated payment which MongoDB later forgave. | + | `INVOICED` | MongoDB issued an invoice that included this line item. | + | `NEW` | Customer provided a method of payment, but MongoDB hasn't tried to charge the credit card. | + | `PAID` | Customer submitted a successful payment. | + | `PARTIAL_PAID` | Customer paid for part of this line item. | + enum: + - NEW + - FORGIVEN + - FAILED + - PAID + - PARTIAL_PAID + - CANCELLED + - INVOICED + - ERROR + - FAILED_AUTHENTICATION + - PROCESSING + - PENDING_REVERSAL + - REFUNDED + type: string + subtotalCents: + description: Sum of all positive invoice line items contained in this invoice. This parameter expresses its value in cents (100ths of one US Dollar). + format: int64 + readOnly: true + type: integer + unitPrice: + description: The unit price applied to amountBilledCents to compute total payment amount. This value is represented as a decimal string. + readOnly: true + type: string + updated: + description: Date and time when the customer made an update to this payment attempt. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + title: Payment + type: object + BillingRefund: + description: One payment that MongoDB returned to the organization for this invoice. + properties: + amountCents: + description: Sum of the funds returned to the specified organization expressed in cents (100th of US Dollar). + format: int64 + readOnly: true + type: integer + created: + description: Date and time when MongoDB Cloud created this refund. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + paymentId: + description: Unique 24-hexadecimal digit string that identifies the payment that the organization had made. + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + reason: + description: Justification that MongoDB accepted to return funds to the organization. + readOnly: true + type: string + title: Refund + type: object + CloudGCPProviderSettings: + allOf: + - $ref: '#/components/schemas/ClusterProviderSettings' + - properties: + autoScaling: + $ref: '#/components/schemas/CloudProviderGCPAutoScaling' + instanceSizeName: + description: Cluster tier, with a default storage and memory capacity, that applies to all the data-bearing hosts in your cluster. + enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M140 + - M200 + - M250 + - M300 + - M400 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - R600 + title: GCP Instance Sizes + type: string + regionName: + description: Google Compute Regions. + enum: + - EASTERN_US + - EASTERN_US_AW + - US_EAST_4 + - US_EAST_4_AW + - US_EAST_5 + - US_EAST_5_AW + - US_WEST_2 + - US_WEST_2_AW + - US_WEST_3 + - US_WEST_3_AW + - US_WEST_4 + - US_WEST_4_AW + - US_SOUTH_1 + - US_SOUTH_1_AW + - CENTRAL_US + - CENTRAL_US_AW + - WESTERN_US + - WESTERN_US_AW + - NORTH_AMERICA_NORTHEAST_1 + - NORTH_AMERICA_NORTHEAST_2 + - SOUTH_AMERICA_EAST_1 + - SOUTH_AMERICA_WEST_1 + - WESTERN_EUROPE + - EUROPE_NORTH_1 + - EUROPE_WEST_2 + - EUROPE_WEST_3 + - EUROPE_WEST_4 + - EUROPE_WEST_6 + - EUROPE_WEST_8 + - EUROPE_WEST_9 + - EUROPE_WEST_10 + - EUROPE_WEST_12 + - EUROPE_SOUTHWEST_1 + - EUROPE_CENTRAL_2 + - MIDDLE_EAST_CENTRAL_1 + - MIDDLE_EAST_CENTRAL_2 + - MIDDLE_EAST_WEST_1 + - AUSTRALIA_SOUTHEAST_1 + - AUSTRALIA_SOUTHEAST_2 + - EASTERN_ASIA_PACIFIC + - NORTHEASTERN_ASIA_PACIFIC + - SOUTHEASTERN_ASIA_PACIFIC + - ASIA_EAST_2 + - ASIA_NORTHEAST_2 + - ASIA_NORTHEAST_3 + - ASIA_SOUTH_1 + - ASIA_SOUTH_2 + - ASIA_SOUTHEAST_2 + externalDocs: + description: GCP + url: https://docs.atlas.mongodb.com/reference/google-gcp/ + title: GCP Regions + type: string + type: object + type: object + CloudProviderAWSAutoScaling: + description: Range of instance sizes to which your cluster can scale. + properties: + compute: + $ref: '#/components/schemas/AWSComputeAutoScaling' + type: object + CloudProviderAccessAWSIAMRole: + allOf: + - $ref: '#/components/schemas/CloudProviderAccessRole' + - properties: + atlasAWSAccountArn: + description: Amazon Resource Name that identifies the Amazon Web Services (AWS) user account that MongoDB Cloud uses when it assumes the Identity and Access Management (IAM) role. + example: arn:aws:iam::772401394250:role/my-test-aws-role + maxLength: 2048 + minLength: 20 + readOnly: true + type: string + atlasAssumedRoleExternalId: + description: Unique external ID that MongoDB Cloud uses when it assumes the IAM role in your Amazon Web Services (AWS) account. + format: uuid + readOnly: true + type: string + authorizedDate: + description: Date and time when someone authorized this role for the specified cloud service provider. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + createdDate: + description: Date and time when someone created this role for the specified cloud service provider. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + featureUsages: + description: List that contains application features associated with this Amazon Web Services (AWS) Identity and Access Management (IAM) role. + items: + $ref: '#/components/schemas/CloudProviderAccessFeatureUsage' + readOnly: true + type: array + iamAssumedRoleArn: + description: Amazon Resource Name (ARN) that identifies the Amazon Web Services (AWS) Identity and Access Management (IAM) role that MongoDB Cloud assumes when it accesses resources in your AWS account. + example: arn:aws:iam::123456789012:root + maxLength: 2048 + minLength: 20 + type: string + roleId: + description: Unique 24-hexadecimal digit string that identifies the role. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + type: object + description: Details that describe the features linked to the Amazon Web Services (AWS) Identity and Access Management (IAM) role. + required: + - providerName + type: object + CloudProviderAccessAWSIAMRoleRequestUpdate: + allOf: + - $ref: '#/components/schemas/CloudProviderAccessRoleRequestUpdate' + - properties: + atlasAWSAccountArn: + description: Amazon Resource Name that identifies the Amazon Web Services (AWS) user account that MongoDB Cloud uses when it assumes the Identity and Access Management (IAM) role. + example: arn:aws:iam::772401394250:role/my-test-aws-role + maxLength: 2048 + minLength: 20 + readOnly: true + type: string + atlasAssumedRoleExternalId: + description: Unique external ID that MongoDB Cloud uses when it assumes the IAM role in your Amazon Web Services (AWS) account. + format: uuid + readOnly: true + type: string + authorizedDate: + description: Date and time when someone authorized this role for the specified cloud service provider. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + createdDate: + description: Date and time when someone created this role for the specified cloud service provider. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + featureUsages: + description: List that contains application features associated with this Amazon Web Services (AWS) Identity and Access Management (IAM) role. + items: + $ref: '#/components/schemas/CloudProviderAccessFeatureUsage' + readOnly: true + type: array + iamAssumedRoleArn: + description: Amazon Resource Name (ARN) that identifies the Amazon Web Services (AWS) Identity and Access Management (IAM) role that MongoDB Cloud assumes when it accesses resources in your AWS account. + example: arn:aws:iam::123456789012:root + maxLength: 2048 + minLength: 20 + type: string + roleId: + description: Unique 24-hexadecimal digit string that identifies the role. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + type: object + description: Details that describe the features linked to the Amazon Web Services (AWS) Identity and Access Management (IAM) role. + required: + - providerName + type: object + CloudProviderAccessAzureServicePrincipal: + allOf: + - $ref: '#/components/schemas/CloudProviderAccessRole' + - properties: + _id: + description: Unique 24-hexadecimal digit string that identifies the role. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + atlasAzureAppId: + description: Azure Active Directory Application ID of Atlas. + maxLength: 36 + minLength: 32 + pattern: ^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$ + type: string + createdDate: + description: Date and time when this Azure Service Principal was created. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + featureUsages: + description: List that contains application features associated with this Azure Service Principal. + items: + $ref: '#/components/schemas/CloudProviderAccessFeatureUsage' + readOnly: true + type: array + lastUpdatedDate: + description: Date and time when this Azure Service Principal was last updated. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + servicePrincipalId: + description: UUID string that identifies the Azure Service Principal. + maxLength: 36 + minLength: 32 + pattern: ^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$ + type: string + tenantId: + description: UUID String that identifies the Azure Active Directory Tenant ID. + maxLength: 36 + minLength: 32 + pattern: ^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$ + type: string + type: object + description: Details that describe the features linked to the Azure Service Principal. + required: + - providerName + type: object + CloudProviderAccessAzureServicePrincipalRequestUpdate: + allOf: + - $ref: '#/components/schemas/CloudProviderAccessRoleRequestUpdate' + - properties: + _id: + description: Unique 24-hexadecimal digit string that identifies the role. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + atlasAzureAppId: + description: Azure Active Directory Application ID of Atlas. + maxLength: 36 + minLength: 32 + pattern: ^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$ + type: string + createdDate: + description: Date and time when this Azure Service Principal was created. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + featureUsages: + description: List that contains application features associated with this Azure Service Principal. + items: + $ref: '#/components/schemas/CloudProviderAccessFeatureUsage' + readOnly: true + type: array + lastUpdatedDate: + description: Date and time when this Azure Service Principal was last updated. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + servicePrincipalId: + description: UUID string that identifies the Azure Service Principal. + maxLength: 36 + minLength: 32 + pattern: ^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$ + type: string + tenantId: + description: UUID String that identifies the Azure Active Directory Tenant ID. + maxLength: 36 + minLength: 32 + pattern: ^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$ + type: string + type: object + description: Details that describe the features linked to the Azure Service Principal. + required: + - providerName + type: object + CloudProviderAccessDataLakeFeatureUsage: + allOf: + - $ref: '#/components/schemas/CloudProviderAccessFeatureUsage' + - properties: + featureId: + $ref: '#/components/schemas/CloudProviderAccessFeatureUsageDataLakeFeatureId' + type: object + description: Details that describe the Atlas Data Lakes linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role. + type: object + CloudProviderAccessEncryptionAtRestFeatureUsage: + allOf: + - $ref: '#/components/schemas/CloudProviderAccessFeatureUsage' + - properties: + featureId: + $ref: '#/components/schemas/ApiAtlasCloudProviderAccessFeatureUsageFeatureIdView' + type: object + description: Details that describe the Key Management Service (KMS) linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role. + type: object + CloudProviderAccessExportSnapshotFeatureUsage: + allOf: + - $ref: '#/components/schemas/CloudProviderAccessFeatureUsage' + - properties: + featureId: + $ref: '#/components/schemas/CloudProviderAccessFeatureUsageExportSnapshotFeatureId' + type: object + description: Details that describe the Amazon Web Services (AWS) Simple Storage Service (S3) export buckets linked to this AWS Identity and Access Management (IAM) role. + type: object + CloudProviderAccessFeatureUsage: + description: MongoDB Cloud features associated with this Amazon Web Services (AWS) Identity and Access Management (IAM) role. + discriminator: + mapping: + ATLAS_DATA_LAKE: '#/components/schemas/CloudProviderAccessDataLakeFeatureUsage' + ENCRYPTION_AT_REST: '#/components/schemas/CloudProviderAccessEncryptionAtRestFeatureUsage' + EXPORT_SNAPSHOT: '#/components/schemas/CloudProviderAccessExportSnapshotFeatureUsage' + PUSH_BASED_LOG_EXPORT: '#/components/schemas/CloudProviderAccessPushBasedLogExportFeatureUsage' + propertyName: featureType + properties: + featureType: + description: Human-readable label that describes one MongoDB Cloud feature linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role. + enum: + - ATLAS_DATA_LAKE + - ENCRYPTION_AT_REST + - EXPORT_SNAPSHOT + - PUSH_BASED_LOG_EXPORT + readOnly: true + type: string + type: object + CloudProviderAccessFeatureUsageDataLakeFeatureId: + description: Identifying characteristics about the data lake linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role. + properties: + groupId: + description: Unique 24-hexadecimal digit string that identifies your project. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + name: + description: Human-readable label that identifies the data lake. + type: string + type: object + CloudProviderAccessFeatureUsageExportSnapshotFeatureId: + description: Identifying characteristics about the Amazon Web Services (AWS) Simple Storage Service (S3) export bucket linked to this AWS Identity and Access Management (IAM) role. + properties: + exportBucketId: + description: Unique 24-hexadecimal digit string that identifies the AWS S3 bucket to which you export your snapshots. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + groupId: + description: Unique 24-hexadecimal digit string that identifies your project. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + type: object + CloudProviderAccessFeatureUsagePushBasedLogExportFeatureId: + description: Identifying characteristics about the Amazon Web Services (AWS) Simple Storage Service (S3) export bucket linked to this AWS Identity and Access Management (IAM) role. + properties: + bucketName: + description: Name of the AWS S3 bucket to which your logs will be exported to. + readOnly: true + type: string + groupId: + description: Unique 24-hexadecimal digit string that identifies your project. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + type: object + CloudProviderAccessGCPServiceAccount: + allOf: + - $ref: '#/components/schemas/CloudProviderAccessRole' + - properties: + createdDate: + description: Date and time when this Google Service Account was created. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + featureUsages: + description: List that contains application features associated with this Google Service Account. + items: + $ref: '#/components/schemas/CloudProviderAccessFeatureUsage' + readOnly: true + type: array + gcpServiceAccountForAtlas: + description: Email address for the Google Service Account created by Atlas. + maxLength: 82 + minLength: 57 + pattern: ^mongodb-atlas-[0-9a-z]{16}@p-[0-9a-z]{24}.iam.gserviceaccount.com$ + type: string + roleId: + description: Unique 24-hexadecimal digit string that identifies the role. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + type: object + description: Details that describe the features linked to the GCP Service Account. + required: + - providerName + type: object + CloudProviderAccessGCPServiceAccountRequestUpdate: + allOf: + - $ref: '#/components/schemas/CloudProviderAccessRoleRequestUpdate' + description: Details that describe the features linked to the GCP Service Account. + required: + - providerName + type: object + CloudProviderAccessPushBasedLogExportFeatureUsage: + allOf: + - $ref: '#/components/schemas/CloudProviderAccessFeatureUsage' + - properties: + featureId: + $ref: '#/components/schemas/CloudProviderAccessFeatureUsagePushBasedLogExportFeatureId' + type: object + description: Details that describe the Amazon Web Services (AWS) Simple Storage Service (S3) export buckets linked to this AWS Identity and Access Management (IAM) role. + type: object + CloudProviderAccessRole: + description: Cloud provider access role. + discriminator: + mapping: + AWS: '#/components/schemas/CloudProviderAccessAWSIAMRole' + AZURE: '#/components/schemas/CloudProviderAccessAzureServicePrincipal' + GCP: '#/components/schemas/CloudProviderAccessGCPServiceAccount' + propertyName: providerName + properties: + providerName: + description: Human-readable label that identifies the cloud provider of the role. + enum: + - AWS + - AZURE + - GCP + type: string + required: + - providerName + type: object + CloudProviderAccessRoleRequestUpdate: + description: Cloud provider access role. + discriminator: + mapping: + AWS: '#/components/schemas/CloudProviderAccessAWSIAMRoleRequestUpdate' + AZURE: '#/components/schemas/CloudProviderAccessAzureServicePrincipalRequestUpdate' + GCP: '#/components/schemas/CloudProviderAccessGCPServiceAccountRequestUpdate' + propertyName: providerName + properties: + providerName: + description: Human-readable label that identifies the cloud provider of the role. + enum: + - AWS + - AZURE + - GCP + type: string + required: + - providerName + type: object + CloudProviderAzureAutoScaling: + description: Range of instance sizes to which your cluster can scale. + properties: + compute: + $ref: '#/components/schemas/AzureComputeAutoScalingRules' + type: object + CloudProviderContainer: + description: Collection of settings that configures the network container for a virtual private connection on Amazon Web Services. + discriminator: + mapping: + AWS: '#/components/schemas/AWSCloudProviderContainer' + AZURE: '#/components/schemas/AzureCloudProviderContainer' + GCP: '#/components/schemas/GCPCloudProviderContainer' + propertyName: providerName + oneOf: + - $ref: '#/components/schemas/AzureCloudProviderContainer' + - $ref: '#/components/schemas/GCPCloudProviderContainer' + - $ref: '#/components/schemas/AWSCloudProviderContainer' + properties: + id: + description: Unique 24-hexadecimal digit string that identifies the network peering container. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + providerName: + description: Cloud service provider that serves the requested network peering containers. + enum: + - AWS + - GCP + - AZURE + - TENANT + - SERVERLESS + type: string + provisioned: + description: Flag that indicates whether MongoDB Cloud clusters exist in the specified network peering container. + readOnly: true + type: boolean + type: object + CloudProviderGCPAutoScaling: + description: Range of instance sizes to which your cluster can scale. + properties: + compute: + $ref: '#/components/schemas/GCPComputeAutoScaling' + type: object + CloudRegionConfig: + description: Cloud service provider on which MongoDB Cloud provisions the hosts. + discriminator: + mapping: + AWS: '#/components/schemas/AWSRegionConfig' + AZURE: '#/components/schemas/AzureRegionConfig' + GCP: '#/components/schemas/GCPRegionConfig' + TENANT: '#/components/schemas/TenantRegionConfig' + propertyName: providerName + oneOf: + - $ref: '#/components/schemas/AWSRegionConfig' + - $ref: '#/components/schemas/AzureRegionConfig' + - $ref: '#/components/schemas/GCPRegionConfig' + - $ref: '#/components/schemas/TenantRegionConfig' + properties: + electableSpecs: + $ref: '#/components/schemas/HardwareSpec' + priority: + description: |- + Precedence is given to this region when a primary election occurs. If your **regionConfigs** has only **readOnlySpecs**, **analyticsSpecs**, or both, set this value to `0`. If you have multiple **regionConfigs** objects (your cluster is multi-region or multi-cloud), they must have priorities in descending order. The highest priority is `7`. + + **Example:** If you have three regions, their priorities would be `7`, `6`, and `5` respectively. If you added two more regions for supporting electable nodes, the priorities of those regions would be `4` and `3` respectively. + format: int32 + maximum: 7 + minimum: 0 + type: integer + providerName: + description: Cloud service provider on which MongoDB Cloud provisions the hosts. Set dedicated clusters to `AWS`, `GCP`, `AZURE` or `TENANT`. + enum: + - AWS + - AZURE + - GCP + - TENANT + type: string + regionName: + description: Physical location of your MongoDB cluster nodes. The region you choose can affect network latency for clients accessing your databases. The region name is only returned in the response for single-region clusters. When MongoDB Cloud deploys a dedicated cluster, it checks if a VPC or VPC connection exists for that provider and region. If not, MongoDB Cloud creates them as part of the deployment. It assigns the VPC a Classless Inter-Domain Routing (CIDR) block. To limit a new VPC peering connection to one Classless Inter-Domain Routing (CIDR) block and region, create the connection first. Deploy the cluster after the connection starts. GCP Clusters and Multi-region clusters require one VPC peering connection for each region. MongoDB nodes can use only the peering connection that resides in the same region as the nodes to communicate with the peered VPC. + oneOf: + - description: Physical location where MongoDB Cloud deploys your AWS-hosted MongoDB cluster nodes. The region you choose can affect network latency for clients accessing your databases. When MongoDB Cloud deploys a dedicated cluster, it checks if a VPC or VPC connection exists for that provider and region. If not, MongoDB Cloud creates them as part of the deployment. MongoDB Cloud assigns the VPC a CIDR block. To limit a new VPC peering connection to one CIDR block and region, create the connection first. Deploy the cluster after the connection starts. + enum: + - US_GOV_WEST_1 + - US_GOV_EAST_1 + - US_EAST_1 + - US_EAST_2 + - US_WEST_1 + - US_WEST_2 + - CA_CENTRAL_1 + - EU_NORTH_1 + - EU_WEST_1 + - EU_WEST_2 + - EU_WEST_3 + - EU_CENTRAL_1 + - EU_CENTRAL_2 + - AP_EAST_1 + - AP_NORTHEAST_1 + - AP_NORTHEAST_2 + - AP_NORTHEAST_3 + - AP_SOUTHEAST_1 + - AP_SOUTHEAST_2 + - AP_SOUTHEAST_3 + - AP_SOUTHEAST_4 + - AP_SOUTH_1 + - AP_SOUTH_2 + - SA_EAST_1 + - CN_NORTH_1 + - CN_NORTHWEST_1 + - ME_SOUTH_1 + - ME_CENTRAL_1 + - AF_SOUTH_1 + - EU_SOUTH_1 + - EU_SOUTH_2 + - IL_CENTRAL_1 + - CA_WEST_1 + - GLOBAL + title: AWS Regions + type: string + - description: Microsoft Azure Regions. + enum: + - US_CENTRAL + - US_EAST + - US_EAST_2 + - US_NORTH_CENTRAL + - US_WEST + - US_SOUTH_CENTRAL + - EUROPE_NORTH + - EUROPE_WEST + - US_WEST_CENTRAL + - US_WEST_2 + - US_WEST_3 + - CANADA_EAST + - CANADA_CENTRAL + - BRAZIL_SOUTH + - BRAZIL_SOUTHEAST + - AUSTRALIA_CENTRAL + - AUSTRALIA_CENTRAL_2 + - AUSTRALIA_EAST + - AUSTRALIA_SOUTH_EAST + - GERMANY_CENTRAL + - GERMANY_NORTH_EAST + - GERMANY_WEST_CENTRAL + - GERMANY_NORTH + - SWEDEN_CENTRAL + - SWEDEN_SOUTH + - SWITZERLAND_NORTH + - SWITZERLAND_WEST + - UK_SOUTH + - UK_WEST + - NORWAY_EAST + - NORWAY_WEST + - INDIA_CENTRAL + - INDIA_SOUTH + - INDIA_WEST + - CHINA_EAST + - CHINA_NORTH + - ASIA_EAST + - JAPAN_EAST + - JAPAN_WEST + - ASIA_SOUTH_EAST + - KOREA_CENTRAL + - KOREA_SOUTH + - FRANCE_CENTRAL + - FRANCE_SOUTH + - SOUTH_AFRICA_NORTH + - SOUTH_AFRICA_WEST + - UAE_CENTRAL + - UAE_NORTH + - QATAR_CENTRAL + title: Azure Regions + type: string + - description: Google Compute Regions. + enum: + - EASTERN_US + - EASTERN_US_AW + - US_EAST_4 + - US_EAST_4_AW + - US_EAST_5 + - US_EAST_5_AW + - US_WEST_2 + - US_WEST_2_AW + - US_WEST_3 + - US_WEST_3_AW + - US_WEST_4 + - US_WEST_4_AW + - US_SOUTH_1 + - US_SOUTH_1_AW + - CENTRAL_US + - CENTRAL_US_AW + - WESTERN_US + - WESTERN_US_AW + - NORTH_AMERICA_NORTHEAST_1 + - NORTH_AMERICA_NORTHEAST_2 + - SOUTH_AMERICA_EAST_1 + - SOUTH_AMERICA_WEST_1 + - WESTERN_EUROPE + - EUROPE_NORTH_1 + - EUROPE_WEST_2 + - EUROPE_WEST_3 + - EUROPE_WEST_4 + - EUROPE_WEST_6 + - EUROPE_WEST_8 + - EUROPE_WEST_9 + - EUROPE_WEST_10 + - EUROPE_WEST_12 + - EUROPE_SOUTHWEST_1 + - EUROPE_CENTRAL_2 + - MIDDLE_EAST_CENTRAL_1 + - MIDDLE_EAST_CENTRAL_2 + - MIDDLE_EAST_WEST_1 + - AUSTRALIA_SOUTHEAST_1 + - AUSTRALIA_SOUTHEAST_2 + - EASTERN_ASIA_PACIFIC + - NORTHEASTERN_ASIA_PACIFIC + - SOUTHEASTERN_ASIA_PACIFIC + - ASIA_EAST_2 + - ASIA_NORTHEAST_2 + - ASIA_NORTHEAST_3 + - ASIA_SOUTH_1 + - ASIA_SOUTH_2 + - ASIA_SOUTHEAST_2 + title: GCP Regions + type: string + type: object + title: Cloud Service Provider Settings for Multi-Cloud Clusters + type: object + CloudRegionConfig20240805: + description: Cloud service provider on which MongoDB Cloud provisions the hosts. + discriminator: + mapping: + AWS: '#/components/schemas/AWSRegionConfig20240805' + AZURE: '#/components/schemas/AzureRegionConfig20240805' + GCP: '#/components/schemas/GCPRegionConfig20240805' + TENANT: '#/components/schemas/TenantRegionConfig20240805' + propertyName: providerName + oneOf: + - $ref: '#/components/schemas/AWSRegionConfig20240805' + - $ref: '#/components/schemas/AzureRegionConfig20240805' + - $ref: '#/components/schemas/GCPRegionConfig20240805' + - $ref: '#/components/schemas/TenantRegionConfig20240805' + properties: + electableSpecs: + $ref: '#/components/schemas/HardwareSpec20240805' + priority: + description: |- + Precedence is given to this region when a primary election occurs. If your **regionConfigs** has only **readOnlySpecs**, **analyticsSpecs**, or both, set this value to `0`. If you have multiple **regionConfigs** objects (your cluster is multi-region or multi-cloud), they must have priorities in descending order. The highest priority is `7`. + + **Example:** If you have three regions, their priorities would be `7`, `6`, and `5` respectively. If you added two more regions for supporting electable nodes, the priorities of those regions would be `4` and `3` respectively. + format: int32 + maximum: 7 + minimum: 0 + type: integer + providerName: + description: Cloud service provider on which MongoDB Cloud provisions the hosts. Set dedicated clusters to `AWS`, `GCP`, `AZURE` or `TENANT`. + enum: + - AWS + - AZURE + - GCP + - TENANT + type: string + regionName: + description: Physical location of your MongoDB cluster nodes. The region you choose can affect network latency for clients accessing your databases. The region name is only returned in the response for single-region clusters. When MongoDB Cloud deploys a dedicated cluster, it checks if a VPC or VPC connection exists for that provider and region. If not, MongoDB Cloud creates them as part of the deployment. It assigns the VPC a Classless Inter-Domain Routing (CIDR) block. To limit a new VPC peering connection to one Classless Inter-Domain Routing (CIDR) block and region, create the connection first. Deploy the cluster after the connection starts. GCP Clusters and Multi-region clusters require one VPC peering connection for each region. MongoDB nodes can use only the peering connection that resides in the same region as the nodes to communicate with the peered VPC. + oneOf: + - description: Physical location where MongoDB Cloud deploys your AWS-hosted MongoDB cluster nodes. The region you choose can affect network latency for clients accessing your databases. When MongoDB Cloud deploys a dedicated cluster, it checks if a VPC or VPC connection exists for that provider and region. If not, MongoDB Cloud creates them as part of the deployment. MongoDB Cloud assigns the VPC a CIDR block. To limit a new VPC peering connection to one CIDR block and region, create the connection first. Deploy the cluster after the connection starts. + enum: + - US_GOV_WEST_1 + - US_GOV_EAST_1 + - US_EAST_1 + - US_EAST_2 + - US_WEST_1 + - US_WEST_2 + - CA_CENTRAL_1 + - EU_NORTH_1 + - EU_WEST_1 + - EU_WEST_2 + - EU_WEST_3 + - EU_CENTRAL_1 + - EU_CENTRAL_2 + - AP_EAST_1 + - AP_NORTHEAST_1 + - AP_NORTHEAST_2 + - AP_NORTHEAST_3 + - AP_SOUTHEAST_1 + - AP_SOUTHEAST_2 + - AP_SOUTHEAST_3 + - AP_SOUTHEAST_4 + - AP_SOUTH_1 + - AP_SOUTH_2 + - SA_EAST_1 + - CN_NORTH_1 + - CN_NORTHWEST_1 + - ME_SOUTH_1 + - ME_CENTRAL_1 + - AF_SOUTH_1 + - EU_SOUTH_1 + - EU_SOUTH_2 + - IL_CENTRAL_1 + - CA_WEST_1 + - GLOBAL + title: AWS Regions + type: string + - description: Microsoft Azure Regions. + enum: + - US_CENTRAL + - US_EAST + - US_EAST_2 + - US_NORTH_CENTRAL + - US_WEST + - US_SOUTH_CENTRAL + - EUROPE_NORTH + - EUROPE_WEST + - US_WEST_CENTRAL + - US_WEST_2 + - US_WEST_3 + - CANADA_EAST + - CANADA_CENTRAL + - BRAZIL_SOUTH + - BRAZIL_SOUTHEAST + - AUSTRALIA_CENTRAL + - AUSTRALIA_CENTRAL_2 + - AUSTRALIA_EAST + - AUSTRALIA_SOUTH_EAST + - GERMANY_CENTRAL + - GERMANY_NORTH_EAST + - GERMANY_WEST_CENTRAL + - GERMANY_NORTH + - SWEDEN_CENTRAL + - SWEDEN_SOUTH + - SWITZERLAND_NORTH + - SWITZERLAND_WEST + - UK_SOUTH + - UK_WEST + - NORWAY_EAST + - NORWAY_WEST + - INDIA_CENTRAL + - INDIA_SOUTH + - INDIA_WEST + - CHINA_EAST + - CHINA_NORTH + - ASIA_EAST + - JAPAN_EAST + - JAPAN_WEST + - ASIA_SOUTH_EAST + - KOREA_CENTRAL + - KOREA_SOUTH + - FRANCE_CENTRAL + - FRANCE_SOUTH + - SOUTH_AFRICA_NORTH + - SOUTH_AFRICA_WEST + - UAE_CENTRAL + - UAE_NORTH + - QATAR_CENTRAL + title: Azure Regions + type: string + - description: Google Compute Regions. + enum: + - EASTERN_US + - EASTERN_US_AW + - US_EAST_4 + - US_EAST_4_AW + - US_EAST_5 + - US_EAST_5_AW + - US_WEST_2 + - US_WEST_2_AW + - US_WEST_3 + - US_WEST_3_AW + - US_WEST_4 + - US_WEST_4_AW + - US_SOUTH_1 + - US_SOUTH_1_AW + - CENTRAL_US + - CENTRAL_US_AW + - WESTERN_US + - WESTERN_US_AW + - NORTH_AMERICA_NORTHEAST_1 + - NORTH_AMERICA_NORTHEAST_2 + - SOUTH_AMERICA_EAST_1 + - SOUTH_AMERICA_WEST_1 + - WESTERN_EUROPE + - EUROPE_NORTH_1 + - EUROPE_WEST_2 + - EUROPE_WEST_3 + - EUROPE_WEST_4 + - EUROPE_WEST_6 + - EUROPE_WEST_8 + - EUROPE_WEST_9 + - EUROPE_WEST_10 + - EUROPE_WEST_12 + - EUROPE_SOUTHWEST_1 + - EUROPE_CENTRAL_2 + - MIDDLE_EAST_CENTRAL_1 + - MIDDLE_EAST_CENTRAL_2 + - MIDDLE_EAST_WEST_1 + - AUSTRALIA_SOUTHEAST_1 + - AUSTRALIA_SOUTHEAST_2 + - EASTERN_ASIA_PACIFIC + - NORTHEASTERN_ASIA_PACIFIC + - SOUTHEASTERN_ASIA_PACIFIC + - ASIA_EAST_2 + - ASIA_NORTHEAST_2 + - ASIA_NORTHEAST_3 + - ASIA_SOUTH_1 + - ASIA_SOUTH_2 + - ASIA_SOUTHEAST_2 + title: GCP Regions + type: string + type: object + title: Cloud Service Provider Settings + type: object + ClusterAutoScalingSettings: + description: Range of instance sizes to which your cluster can scale. + externalDocs: + description: Cluster Auto-Scaling + url: https://docs.atlas.mongodb.com/cluster-autoscaling/ + properties: + compute: + $ref: '#/components/schemas/ClusterComputeAutoScaling' + diskGBEnabled: + default: false + description: Flag that indicates whether someone enabled disk auto-scaling for this cluster. + type: boolean + title: Automatic Cluster Scaling Settings + type: object + ClusterComputeAutoScaling: + description: Collection of settings that configures how a cluster might scale its cluster tier and whether the cluster can scale down. Cluster tier auto-scaling is unavailable for clusters using Low CPU or NVME storage classes. + properties: + enabled: + default: false + description: Flag that indicates whether cluster tier auto-scaling is enabled. Set to `true` to enable cluster tier auto-scaling. If enabled, you must specify a value for **providerSettings.autoScaling.compute.maxInstanceSize** also. Set to `false` to disable cluster tier auto-scaling. + type: boolean + scaleDownEnabled: + default: false + description: Flag that indicates whether the cluster tier can scale down. This is required if **autoScaling.compute.enabled** is `true`. If you enable this option, specify a value for **providerSettings.autoScaling.compute.minInstanceSize**. + type: boolean + type: object + ClusterConnectionStrings: + description: Collection of Uniform Resource Locators that point to the MongoDB database. + externalDocs: + description: Connection string URI format. + url: https://docs.mongodb.com/manual/reference/connection-string/ + properties: + awsPrivateLink: + additionalProperties: + description: Private endpoint-aware connection strings that use AWS-hosted clusters with Amazon Web Services (AWS) PrivateLink. Each key identifies an Amazon Web Services (AWS) interface endpoint. Each value identifies the related `mongodb://` connection string that you use to connect to MongoDB Cloud through the interface endpoint that the key names. + externalDocs: + description: Network Peering Connection + url: https://docs.atlas.mongodb.com/security-vpc-peering/#std-label-vpc-peering/ + readOnly: true + type: string + description: Private endpoint-aware connection strings that use AWS-hosted clusters with Amazon Web Services (AWS) PrivateLink. Each key identifies an Amazon Web Services (AWS) interface endpoint. Each value identifies the related `mongodb://` connection string that you use to connect to MongoDB Cloud through the interface endpoint that the key names. + externalDocs: + description: Network Peering Connection + url: https://docs.atlas.mongodb.com/security-vpc-peering/#std-label-vpc-peering/ + readOnly: true + type: object + awsPrivateLinkSrv: + additionalProperties: + description: Private endpoint-aware connection strings that use AWS-hosted clusters with Amazon Web Services (AWS) PrivateLink. Each key identifies an Amazon Web Services (AWS) interface endpoint. Each value identifies the related `mongodb://` connection string that you use to connect to Atlas through the interface endpoint that the key names. If the cluster uses an optimized connection string, `awsPrivateLinkSrv` contains the optimized connection string. If the cluster has the non-optimized (legacy) connection string, `awsPrivateLinkSrv` contains the non-optimized connection string even if an optimized connection string is also present. + externalDocs: + description: Network Peering Connection + url: https://docs.atlas.mongodb.com/security-vpc-peering/#std-label-vpc-peering/ + readOnly: true + type: string + description: Private endpoint-aware connection strings that use AWS-hosted clusters with Amazon Web Services (AWS) PrivateLink. Each key identifies an Amazon Web Services (AWS) interface endpoint. Each value identifies the related `mongodb://` connection string that you use to connect to Atlas through the interface endpoint that the key names. If the cluster uses an optimized connection string, `awsPrivateLinkSrv` contains the optimized connection string. If the cluster has the non-optimized (legacy) connection string, `awsPrivateLinkSrv` contains the non-optimized connection string even if an optimized connection string is also present. + externalDocs: + description: Network Peering Connection + url: https://docs.atlas.mongodb.com/security-vpc-peering/#std-label-vpc-peering/ + readOnly: true + type: object + private: + description: Network peering connection strings for each interface Virtual Private Cloud (VPC) endpoint that you configured to connect to this cluster. This connection string uses the `mongodb+srv://` protocol. The resource returns this parameter once someone creates a network peering connection to this cluster. This protocol tells the application to look up the host seed list in the Domain Name System (DNS). This list synchronizes with the nodes in a cluster. If the connection string uses this Uniform Resource Identifier (URI) format, you don't need to append the seed list or change the URI if the nodes change. Use this URI format if your driver supports it. If it doesn't, use connectionStrings.private. For Amazon Web Services (AWS) clusters, this resource returns this parameter only if you enable custom DNS. + externalDocs: + description: Network Peering Connection + url: https://docs.atlas.mongodb.com/security-vpc-peering/#std-label-vpc-peering/ + readOnly: true + type: string + privateEndpoint: + description: List of private endpoint-aware connection strings that you can use to connect to this cluster through a private endpoint. This parameter returns only if you deployed a private endpoint to all regions to which you deployed this clusters' nodes. + items: + $ref: '#/components/schemas/ClusterDescriptionConnectionStringsPrivateEndpoint' + readOnly: true + type: array + privateSrv: + description: Network peering connection strings for each interface Virtual Private Cloud (VPC) endpoint that you configured to connect to this cluster. This connection string uses the `mongodb+srv://` protocol. The resource returns this parameter when someone creates a network peering connection to this cluster. This protocol tells the application to look up the host seed list in the Domain Name System (DNS). This list synchronizes with the nodes in a cluster. If the connection string uses this Uniform Resource Identifier (URI) format, you don't need to append the seed list or change the Uniform Resource Identifier (URI) if the nodes change. Use this Uniform Resource Identifier (URI) format if your driver supports it. If it doesn't, use `connectionStrings.private`. For Amazon Web Services (AWS) clusters, this parameter returns only if you [enable custom DNS](https://docs.atlas.mongodb.com/reference/api/aws-custom-dns-update/). + externalDocs: + description: Network Peering Connection + url: https://docs.atlas.mongodb.com/security-vpc-peering/#std-label-vpc-peering/ + readOnly: true + type: string + standard: + description: Public connection string that you can use to connect to this cluster. This connection string uses the `mongodb://` protocol. + externalDocs: + description: Connection String URI Format + url: https://docs.mongodb.com/manual/reference/connection-string/ + readOnly: true + type: string + standardSrv: + description: Public connection string that you can use to connect to this cluster. This connection string uses the `mongodb+srv://` protocol. + externalDocs: + description: Connection String URI Format + url: https://docs.mongodb.com/manual/reference/connection-string/ + readOnly: true + type: string + readOnly: true + title: Cluster Connection Strings + type: object + ClusterDescription20240805: + properties: + acceptDataRisksAndForceReplicaSetReconfig: + description: If reconfiguration is necessary to regain a primary due to a regional outage, submit this field alongside your topology reconfiguration to request a new regional outage resistant topology. Forced reconfigurations during an outage of the majority of electable nodes carry a risk of data loss if replicated writes (even majority committed writes) have not been replicated to the new primary node. MongoDB Atlas docs contain more information. To proceed with an operation which carries that risk, set **acceptDataRisksAndForceReplicaSetReconfig** to the current date. + externalDocs: + description: Reconfiguring a Replica Set during a regional outage + url: https://dochub.mongodb.org/core/regional-outage-reconfigure-replica-set + format: date-time + type: string + backupEnabled: + default: false + description: Flag that indicates whether the cluster can perform backups. If set to `true`, the cluster can perform backups. You must set this value to `true` for NVMe clusters. Backup uses [Cloud Backups](https://docs.atlas.mongodb.com/backup/cloud-backup/overview/) for dedicated clusters and [Shared Cluster Backups](https://docs.atlas.mongodb.com/backup/shared-tier/overview/) for tenant clusters. If set to `false`, the cluster doesn't use backups. + type: boolean + biConnector: + $ref: '#/components/schemas/BiConnector' + clusterType: + description: Configuration of nodes that comprise the cluster. + enum: + - REPLICASET + - SHARDED + - GEOSHARDED + type: string + configServerManagementMode: + default: ATLAS_MANAGED + description: |- + Config Server Management Mode for creating or updating a sharded cluster. + + When configured as ATLAS_MANAGED, atlas may automatically switch the cluster's config server type for optimal performance and savings. + + When configured as FIXED_TO_DEDICATED, the cluster will always use a dedicated config server. + enum: + - ATLAS_MANAGED + - FIXED_TO_DEDICATED + externalDocs: + description: MongoDB Sharded Cluster Config Servers + url: https://dochub.mongodb.org/docs/manual/core/sharded-cluster-config-servers + type: string + configServerType: + description: Describes a sharded cluster's config server type. + enum: + - DEDICATED + - EMBEDDED + externalDocs: + description: MongoDB Sharded Cluster Config Servers + url: https://dochub.mongodb.org/docs/manual/core/sharded-cluster-config-servers + readOnly: true + type: string + connectionStrings: + $ref: '#/components/schemas/ClusterConnectionStrings' + createDate: + description: Date and time when MongoDB Cloud created this cluster. This parameter expresses its value in ISO 8601 format in UTC. + format: date-time + readOnly: true + type: string + diskWarmingMode: + default: FULLY_WARMED + description: Disk warming mode selection. + enum: + - FULLY_WARMED + - VISIBLE_EARLIER + externalDocs: + description: Reduce Secondary Disk Warming Impact + url: https://docs.atlas.mongodb.com/reference/replica-set-tags/#reduce-secondary-disk-warming-impact + type: string + encryptionAtRestProvider: + description: 'Cloud service provider that manages your customer keys to provide an additional layer of encryption at rest for the cluster. To enable customer key management for encryption at rest, the cluster **replicationSpecs[n].regionConfigs[m].{type}Specs.instanceSize** setting must be `M10` or higher and `"backupEnabled" : false` or omitted entirely.' + enum: + - NONE + - AWS + - AZURE + - GCP + externalDocs: + description: Encryption at Rest using Customer Key Management + url: https://www.mongodb.com/docs/atlas/security-kms-encryption/ + type: string + featureCompatibilityVersion: + description: Feature compatibility version of the cluster. + readOnly: true + type: string + featureCompatibilityVersionExpirationDate: + description: Feature compatibility version expiration date. + format: date-time + readOnly: true + type: string + globalClusterSelfManagedSharding: + description: |- + Set this field to configure the Sharding Management Mode when creating a new Global Cluster. + + When set to false, the management mode is set to Atlas-Managed Sharding. This mode fully manages the sharding of your Global Cluster and is built to provide a seamless deployment experience. + + When set to true, the management mode is set to Self-Managed Sharding. This mode leaves the management of shards in your hands and is built to provide an advanced and flexible deployment experience. + + This setting cannot be changed once the cluster is deployed. + externalDocs: + description: Creating a Global Cluster + url: https://dochub.mongodb.org/core/global-cluster-management + type: boolean + groupId: + description: Unique 24-hexadecimal character string that identifies the project. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + id: + description: Unique 24-hexadecimal digit string that identifies the cluster. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + labels: + deprecated: true + description: |- + Collection of key-value pairs between 1 to 255 characters in length that tag and categorize the cluster. The MongoDB Cloud console doesn't display your labels. + + Cluster labels are deprecated and will be removed in a future release. We strongly recommend that you use [resource tags](https://dochub.mongodb.org/core/add-cluster-tag-atlas) instead. + items: + $ref: '#/components/schemas/ComponentLabel' + type: array + 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 + mongoDBEmployeeAccessGrant: + $ref: '#/components/schemas/EmployeeAccessGrantView' + mongoDBMajorVersion: + description: |- + MongoDB major version of the cluster. + + On creation: Choose from the available versions of MongoDB, or leave unspecified for the current recommended default in the MongoDB Cloud platform. The recommended version is a recent Long Term Support version. The default is not guaranteed to be the most recently released version throughout the entire release cycle. For versions available in a specific project, see the linked documentation or use the API endpoint for [project LTS versions endpoint](#tag/Projects/operation/getProjectLTSVersions). + + On update: Increase version only by 1 major version at a time. If the cluster is pinned to a MongoDB feature compatibility version exactly one major version below the current MongoDB version, the MongoDB version can be downgraded to the previous major version. + externalDocs: + description: Available MongoDB Versions in Atlas + url: https://www.mongodb.com/docs/atlas/reference/faq/database/#which-versions-of-mongodb-do-service-clusters-use- + type: string + mongoDBVersion: + description: Version of MongoDB that the cluster runs. + pattern: ([\d]+\.[\d]+\.[\d]+) + readOnly: true + type: string + name: + description: Human-readable label that identifies the cluster. + maxLength: 64 + minLength: 1 + pattern: ^([a-zA-Z0-9][a-zA-Z0-9-]*)?[a-zA-Z0-9]+$ + type: string + paused: + description: Flag that indicates whether the cluster is paused. + type: boolean + pitEnabled: + description: Flag that indicates whether the cluster uses continuous cloud backups. + externalDocs: + description: Continuous Cloud Backups + url: https://docs.atlas.mongodb.com/backup/cloud-backup/overview/ + type: boolean + redactClientLogData: + description: |- + Enable or disable log redaction. + + This setting configures the ``mongod`` or ``mongos`` to redact any document field contents from a message accompanying a given log event before logging. This prevents the program from writing potentially sensitive data stored on the database to the diagnostic log. Metadata such as error or operation codes, line numbers, and source file names are still visible in the logs. + + Use ``redactClientLogData`` in conjunction with Encryption at Rest and TLS/SSL (Transport Encryption) to assist compliance with regulatory requirements. + + *Note*: changing this setting on a cluster will trigger a rolling restart as soon as the cluster is updated. + externalDocs: + description: Log Redaction + url: https://www.mongodb.com/docs/manual/administration/monitoring/#log-redaction + type: boolean + replicaSetScalingStrategy: + default: WORKLOAD_TYPE + description: |- + Set this field to configure the replica set scaling mode for your cluster. + + By default, Atlas scales under WORKLOAD_TYPE. This mode allows Atlas to scale your analytics nodes in parallel to your operational nodes. + + When configured as SEQUENTIAL, Atlas scales all nodes sequentially. This mode is intended for steady-state workloads and applications performing latency-sensitive secondary reads. + + When configured as NODE_TYPE, Atlas scales your electable nodes in parallel with your read-only and analytics nodes. This mode is intended for large, dynamic workloads requiring frequent and timely cluster tier scaling. This is the fastest scaling strategy, but it might impact latency of workloads when performing extensive secondary reads. + enum: + - SEQUENTIAL + - WORKLOAD_TYPE + - NODE_TYPE + externalDocs: + description: Modify the Replica Set Scaling Mode + url: https://dochub.mongodb.org/core/scale-nodes + type: string + replicationSpecs: + description: List of settings that configure your cluster regions. This array has one object per shard representing node configurations in each shard. For replica sets there is only one object representing node configurations. + items: + $ref: '#/components/schemas/ReplicationSpec20240805' + type: array + rootCertType: + default: ISRGROOTX1 + description: Root Certificate Authority that MongoDB Cloud cluster uses. MongoDB Cloud supports Internet Security Research Group. + enum: + - ISRGROOTX1 + type: string + stateName: + description: Human-readable label that indicates the current operating condition of this cluster. + enum: + - IDLE + - CREATING + - UPDATING + - DELETING + - REPAIRING + readOnly: true + type: string + tags: + description: List that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. + externalDocs: + description: Resource Tags + url: https://dochub.mongodb.org/core/add-cluster-tag-atlas + items: + $ref: '#/components/schemas/ResourceTag' + type: array + terminationProtectionEnabled: + default: false + description: Flag that indicates whether termination protection is enabled on the cluster. If set to `true`, MongoDB Cloud won't delete the cluster. If set to `false`, MongoDB Cloud will delete the cluster. + type: boolean + versionReleaseSystem: + default: LTS + description: Method by which the cluster maintains the MongoDB versions. If value is `CONTINUOUS`, you must not specify **mongoDBMajorVersion**. + enum: + - LTS + - CONTINUOUS + type: string + type: object + ClusterDescriptionConnectionStringsPrivateEndpoint: + description: Private endpoint-aware connection string that you can use to connect to this cluster through a private endpoint. + externalDocs: + description: Private Endpoint for Dedicated Cluster + url: https://docs.atlas.mongodb.com/security-private-endpoint/ + properties: + connectionString: + description: Private endpoint-aware connection string that uses the `mongodb://` protocol to connect to MongoDB Cloud through a private endpoint. + readOnly: true + type: string + endpoints: + description: List that contains the private endpoints through which you connect to MongoDB Cloud when you use **connectionStrings.privateEndpoint[n].connectionString** or **connectionStrings.privateEndpoint[n].srvConnectionString**. + items: + $ref: '#/components/schemas/ClusterDescriptionConnectionStringsPrivateEndpointEndpoint' + readOnly: true + type: array + srvConnectionString: + description: Private endpoint-aware connection string that uses the `mongodb+srv://` protocol to connect to MongoDB Cloud through a private endpoint. The `mongodb+srv` protocol tells the driver to look up the seed list of hosts in the Domain Name System (DNS). This list synchronizes with the nodes in a cluster. If the connection string uses this Uniform Resource Identifier (URI) format, you don't need to append the seed list or change the Uniform Resource Identifier (URI) if the nodes change. Use this Uniform Resource Identifier (URI) format if your application supports it. If it doesn't, use connectionStrings.privateEndpoint[n].connectionString. + readOnly: true + type: string + srvShardOptimizedConnectionString: + description: Private endpoint-aware connection string optimized for sharded clusters that uses the `mongodb+srv://` protocol to connect to MongoDB Cloud through a private endpoint. If the connection string uses this Uniform Resource Identifier (URI) format, you don't need to change the Uniform Resource Identifier (URI) if the nodes change. Use this Uniform Resource Identifier (URI) format if your application and Atlas cluster supports it. If it doesn't, use and consult the documentation for connectionStrings.privateEndpoint[n].srvConnectionString. + readOnly: true + type: string + type: + description: MongoDB process type to which your application connects. Use `MONGOD` for replica sets and `MONGOS` for sharded clusters. + enum: + - MONGOD + - MONGOS + readOnly: true + type: string + title: Cluster Private Endpoint Connection String + type: object + ClusterDescriptionConnectionStringsPrivateEndpointEndpoint: + description: Details of a private endpoint deployed for this cluster. + properties: + endpointId: + description: Unique string that the cloud provider uses to identify the private endpoint. + readOnly: true + type: string + providerName: + description: Cloud provider in which MongoDB Cloud deploys the private endpoint. + enum: + - AWS + - AZURE + - GCP + readOnly: true + type: string + region: + description: Region where the private endpoint is deployed. + readOnly: true + type: string + title: Cluster Private Endpoint Connection Strings Endpoint + type: object + ClusterFreeAutoScaling: + description: Range of instance sizes to which your cluster can scale. + properties: + compute: + $ref: '#/components/schemas/FreeComputeAutoScalingRules' + type: object + ClusterFreeProviderSettings: + allOf: + - $ref: '#/components/schemas/ClusterProviderSettings' + - properties: + autoScaling: + $ref: '#/components/schemas/ClusterFreeAutoScaling' + backingProviderName: + description: Cloud service provider on which MongoDB Cloud provisioned the multi-tenant host. The resource returns this parameter when **providerSettings.providerName** is `TENANT` and **providerSetting.instanceSizeName** is `M0`, `M2` or `M5`. + enum: + - AWS + - GCP + - AZURE + type: string + instanceSizeName: + description: Cluster tier, with a default storage and memory capacity, that applies to all the data-bearing hosts in your cluster. You must set **providerSettings.providerName** to `TENANT` and specify the cloud service provider in **providerSettings.backingProviderName**. + enum: + - M0 + - M2 + - M5 + title: Tenant Instance Sizes + type: string + regionName: + description: Human-readable label that identifies the geographic location of your MongoDB cluster. The region you choose can affect network latency for clients accessing your databases. For a complete list of region names, see [AWS](https://docs.atlas.mongodb.com/reference/amazon-aws/#std-label-amazon-aws), [GCP](https://docs.atlas.mongodb.com/reference/google-gcp/), and [Azure](https://docs.atlas.mongodb.com/reference/microsoft-azure/). For multi-region clusters, see **replicationSpec.{region}**. + type: string + type: object + type: object + ClusterProviderSettings: + description: Group of cloud provider settings that configure the provisioned MongoDB hosts. + discriminator: + mapping: + AWS: '#/components/schemas/AWSCloudProviderSettings' + AZURE: '#/components/schemas/AzureCloudProviderSettings' + GCP: '#/components/schemas/CloudGCPProviderSettings' + TENANT: '#/components/schemas/ClusterFreeProviderSettings' + propertyName: providerName + oneOf: + - $ref: '#/components/schemas/AWSCloudProviderSettings' + - $ref: '#/components/schemas/AzureCloudProviderSettings' + - $ref: '#/components/schemas/CloudGCPProviderSettings' + - $ref: '#/components/schemas/ClusterFreeProviderSettings' + properties: + providerName: + type: string + required: + - providerName + title: Cloud Service Provider Settings for a Cluster + type: object + ClusterSearchIndex: + discriminator: + mapping: + search: '#/components/schemas/SearchIndex' + vectorSearch: '#/components/schemas/VectorSearchIndex' + propertyName: type + properties: + collectionName: + description: Human-readable label that identifies the collection that contains one or more Atlas Search indexes. + type: string + database: + description: Human-readable label that identifies the database that contains the collection with one or more Atlas Search indexes. + type: string + indexID: + description: Unique 24-hexadecimal digit string that identifies this Atlas Search index. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + name: + description: Human-readable label that identifies this index. Within each namespace, names of all indexes in the namespace must be unique. + type: string + status: + description: | + Condition of the search index when you made this request. + + | Status | Index Condition | + |---|---| + | 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. | + enum: + - IN_PROGRESS + - STEADY + - FAILED + - MIGRATING + - STALE + - PAUSED + readOnly: true + type: string + type: + description: Type of the index. Default type is search. + enum: + - search + - vectorSearch + type: string + required: + - collectionName + - database + - name + type: object + ComponentLabel: + description: Human-readable labels applied to this MongoDB Cloud component. + properties: + key: + description: Key applied to tag and categorize this component. + maxLength: 255 + minLength: 1 + type: string + value: + description: Value set to the Key applied to tag and categorize this component. + maxLength: 255 + minLength: 1 + type: string + title: Component Label + type: object + CreateAWSEndpointRequest: + allOf: + - $ref: '#/components/schemas/CreateEndpointRequest' + - properties: + id: + description: Unique string that identifies the private endpoint's network interface that someone added to this private endpoint service. + example: vpce-3bf78b0ddee411ba1 + pattern: ^vpce-[0-9a-f]{17}$ + type: string + writeOnly: true + type: object + description: Group of Private Endpoint settings. + required: + - id + title: AWS + type: object + CreateAzureEndpointRequest: + allOf: + - $ref: '#/components/schemas/CreateEndpointRequest' + - properties: + id: + description: Unique string that identifies the private endpoint's network interface that someone added to this private endpoint service. + example: /subscriptions/cba6d9c6-1d3f-3c11-03cb-c705d895e636/resourcegroups/qrRTqi4TSN)7yB5YLRjVDveH3.yLzpNR7Br0D3-SGrU3j0.0/providers/Microsoft.Network/privateEndpoints/pVP(vb(XeckpxtXzP0NaOsDjeWDbOK)DX8A2j2E_vBYL2.GEYIdln + type: string + writeOnly: true + privateEndpointIPAddress: + description: IPv4 address of the private endpoint in your Azure VNet that someone added to this private endpoint service. + pattern: ^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}|([0-9a-f]{1,4}:){7}[0-9a-f]{1,4}$ + type: string + type: object + description: Group of Private Endpoint settings. + required: + - id + - privateEndpointIPAddress + title: AZURE + type: object + CreateDataProcessRegionView: + description: Settings to configure the region where you wish to store your archived data. + discriminator: + mapping: + AWS: '#/components/schemas/AWSCreateDataProcessRegionView' + AZURE: '#/components/schemas/AzureCreateDataProcessRegionView' + GCP: '#/components/schemas/GCPCreateDataProcessRegionView' + propertyName: cloudProvider + properties: + cloudProvider: + description: Human-readable label that identifies the Cloud service provider where you wish to store your archived data. **AZURE** may be selected only if **AZURE** is the Cloud service provider for the cluster and no **AWS** online archive has been created for the cluster. + enum: + - AWS + - AZURE + type: string + type: object + writeOnly: true + CreateEndpointRequest: + oneOf: + - $ref: '#/components/schemas/CreateAWSEndpointRequest' + - $ref: '#/components/schemas/CreateAzureEndpointRequest' + - $ref: '#/components/schemas/CreateGCPEndpointGroupRequest' + type: object + CreateGCPEndpointGroupRequest: + allOf: + - $ref: '#/components/schemas/CreateEndpointRequest' + - properties: + endpointGroupName: + description: Human-readable label that identifies a set of endpoints. + type: string + writeOnly: true + endpoints: + description: List of individual private endpoints that comprise this endpoint group. + externalDocs: + description: Google Cloud Forwarding Rule Concepts + url: https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts + items: + $ref: '#/components/schemas/CreateGCPForwardingRuleRequest' + type: array + gcpProjectId: + description: Unique string that identifies the Google Cloud project in which you created the endpoints. + example: p-fdeeb3e43b8e733e5ab627b1 + externalDocs: + description: Google Cloud Creating and Managing Projects + url: https://cloud.google.com/resource-manager/docs/creating-managing-projects + pattern: ^p-[0-9a-z]{24}$ + type: string + writeOnly: true + type: object + description: Group of Private Endpoint settings. + required: + - endpointGroupName + - gcpProjectId + title: GCP + type: object + CreateGCPForwardingRuleRequest: + properties: + endpointName: + description: Human-readable label that identifies the Google Cloud consumer forwarding rule that you created. + externalDocs: + description: Google Cloud Forwarding Rule Concepts + url: https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts + type: string + writeOnly: true + ipAddress: + description: One Private Internet Protocol version 4 (IPv4) address to which this Google Cloud consumer forwarding rule resolves. + pattern: ^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}|([0-9a-f]{1,4}:){7}[0-9a-f]{1,4}$ + type: string + writeOnly: true + title: GCP Forwarding Rules + type: object + CriteriaView: + description: |- + Rules by which MongoDB Cloud archives data. + + Use the **criteria.type** field to choose how MongoDB Cloud selects data to archive. Choose data using the age of the data or a MongoDB query. + **"criteria.type": "DATE"** selects documents to archive based on a date. + **"criteria.type": "CUSTOM"** selects documents to archive based on a custom JSON query. MongoDB Cloud doesn't support **"criteria.type": "CUSTOM"** when **"collectionType": "TIMESERIES"**. + discriminator: + mapping: + CUSTOM: '#/components/schemas/CustomCriteriaView' + DATE: '#/components/schemas/DateCriteriaView' + propertyName: type + properties: + type: + description: |- + Means by which MongoDB Cloud selects data to archive. Data can be chosen using the age of the data or a MongoDB query. + **DATE** selects documents to archive based on a date. + **CUSTOM** selects documents to archive based on a custom JSON query. MongoDB Cloud doesn't support **CUSTOM** when `"collectionType": "TIMESERIES"`. + enum: + - DATE + - CUSTOM + type: string + type: object + CustomCriteriaView: + allOf: + - $ref: '#/components/schemas/CriteriaView' + - properties: + query: + description: 'MongoDB find query that selects documents to archive. The specified query follows the syntax of the `db.collection.find(query)` command. This query can''t use the empty document (`{}`) to return all documents. Set this parameter when **"criteria.type" : "CUSTOM"**.' + type: string + type: object + description: '**CUSTOM criteria.type**.' + required: + - query + title: Archival Criteria + type: object + DBRoleToExecute: + description: The name of a Built in or Custom DB Role to connect to an Atlas Cluster. + 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 + role: + description: The name of the role to use. Can be a built in role or a custom role. + type: string + type: + description: Type of the DB role. Can be either BuiltIn or Custom. + enum: + - BUILT_IN + - CUSTOM + title: DB Role Type + type: string + type: object + DLSIngestionSink: + allOf: + - $ref: '#/components/schemas/IngestionSink' + - properties: + metadataProvider: + description: Target cloud provider for this Data Lake Pipeline. + enum: + - AWS + type: string + metadataRegion: + description: Target cloud provider region for this Data Lake Pipeline. + externalDocs: + description: Supported cloud provider regions + url: https://www.mongodb.com/docs/datalake/limitations + type: string + partitionFields: + description: Ordered fields used to physically organize data in the destination. + items: + $ref: '#/components/schemas/DataLakePipelinesPartitionField' + type: array + type: object + description: Atlas Data Lake Storage as the destination for a Data Lake Pipeline. + title: DLS Ingestion Destination + type: object + DailyScheduleView: + allOf: + - $ref: '#/components/schemas/OnlineArchiveSchedule' + - properties: + endHour: + description: Hour of the day when the scheduled window to run one online archive ends. + format: int32 + maximum: 23 + minimum: 0 + type: integer + endMinute: + description: Minute of the hour when the scheduled window to run one online archive ends. + format: int32 + maximum: 59 + minimum: 0 + type: integer + startHour: + description: Hour of the day when the when the scheduled window to run one online archive starts. + format: int32 + maximum: 23 + minimum: 0 + type: integer + startMinute: + description: Minute of the hour when the scheduled window to run one online archive starts. + format: int32 + maximum: 59 + minimum: 0 + type: integer + type: object + required: + - type + type: object + DataLakeApiBase: + description: An aggregation pipeline that applies to the collection. + properties: + name: + description: Human-readable label that identifies the view, which corresponds to an aggregation pipeline on a collection. + type: string + pipeline: + description: Aggregation pipeline stages to apply to the source collection. + externalDocs: + description: Aggregation Pipelines + url: https://docs.mongodb.com/manual/core/aggregation-pipeline/ + type: string + source: + description: Human-readable label that identifies the source collection for the view. + type: string + type: object + DataLakeAtlasStoreInstance: + allOf: + - $ref: '#/components/schemas/DataLakeStoreSettings' + - properties: + clusterName: + description: Human-readable label of the MongoDB Cloud cluster on which the store is based. + type: string + projectId: + description: Unique 24-hexadecimal digit string that identifies the project. + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + readConcern: + $ref: '#/components/schemas/DataLakeAtlasStoreReadConcern' + readPreference: + $ref: '#/components/schemas/DataLakeAtlasStoreReadPreference' + type: object + type: object + DataLakeAtlasStoreReadConcern: + description: MongoDB Cloud cluster read concern, which determines the consistency and isolation properties of the data read from an Atlas cluster. + properties: + level: + description: Read Concern level that specifies the consistency and availability of the data read. + enum: + - LOCAL + - MAJORITY + - LINEARIZABLE + - SNAPSHOT + - AVAILABLE + externalDocs: + description: Read Concern Level + url: https://www.mongodb.com/docs/manual/reference/read-concern/#read-concern-levels + type: string + type: object + DataLakeAtlasStoreReadPreference: + description: MongoDB Cloud cluster read preference, which describes how to route read requests to the cluster. + properties: + maxStalenessSeconds: + description: Maximum replication lag, or **staleness**, for reads from secondaries. + format: int32 + type: integer + mode: + description: Read preference mode that specifies to which replica set member to route the read requests. + enum: + - primary + - primaryPreferred + - secondary + - secondaryPreferred + - nearest + externalDocs: + description: Read Preference Modes + url: https://docs.mongodb.com/manual/core/read-preference/#read-preference-modes + type: string + tagSets: + description: List that contains tag sets or tag specification documents. If specified, Atlas Data Lake routes read requests to replica set member or members that are associated with the specified tags. + externalDocs: + description: Read Preference Tag Set Lists + url: https://docs.mongodb.com/manual/core/read-preference-tags/ + items: + items: + $ref: '#/components/schemas/DataLakeAtlasStoreReadPreferenceTag' + type: array + type: array + type: object + DataLakeAtlasStoreReadPreferenceTag: + properties: + name: + description: Human-readable label of the tag. + type: string + value: + description: Value of the tag. + type: string + type: object + DataLakeAzureBlobStore: + allOf: + - $ref: '#/components/schemas/DataLakeStoreSettings' + - properties: + containerName: + description: Human-readable label that identifies the name of the container. + type: string + delimiter: + description: Delimiter. + type: string + prefix: + description: Prefix. + type: string + public: + default: false + description: Flag that indicates whether the blob store is public. If set to `true`, MongoDB Cloud doesn't use the configured Azure service principal to access the blob store. If set to `false`, the configured Azure service principal must include permissions to access the blob store. + type: boolean + region: + description: Microsoft Azure Regions. + enum: + - US_CENTRAL + - US_EAST + - US_EAST_2 + - US_NORTH_CENTRAL + - US_WEST + - US_SOUTH_CENTRAL + - EUROPE_NORTH + - EUROPE_WEST + - US_WEST_CENTRAL + - US_WEST_2 + - US_WEST_3 + - CANADA_EAST + - CANADA_CENTRAL + - BRAZIL_SOUTH + - BRAZIL_SOUTHEAST + - AUSTRALIA_CENTRAL + - AUSTRALIA_CENTRAL_2 + - AUSTRALIA_EAST + - AUSTRALIA_SOUTH_EAST + - GERMANY_CENTRAL + - GERMANY_NORTH_EAST + - GERMANY_WEST_CENTRAL + - GERMANY_NORTH + - SWEDEN_CENTRAL + - SWEDEN_SOUTH + - SWITZERLAND_NORTH + - SWITZERLAND_WEST + - UK_SOUTH + - UK_WEST + - NORWAY_EAST + - NORWAY_WEST + - INDIA_CENTRAL + - INDIA_SOUTH + - INDIA_WEST + - CHINA_EAST + - CHINA_NORTH + - ASIA_EAST + - JAPAN_EAST + - JAPAN_WEST + - ASIA_SOUTH_EAST + - KOREA_CENTRAL + - KOREA_SOUTH + - FRANCE_CENTRAL + - FRANCE_SOUTH + - SOUTH_AFRICA_NORTH + - SOUTH_AFRICA_WEST + - UAE_CENTRAL + - UAE_NORTH + - QATAR_CENTRAL + title: Azure Regions + type: string + replacementDelimiter: + description: Replacement Delimiter. + type: string + serviceURL: + description: Service URL. + type: string + type: object + type: object + DataLakeDLSAWSStore: + allOf: + - $ref: '#/components/schemas/DataLakeStoreSettings' + - properties: + region: + description: Physical location where MongoDB Cloud deploys your AWS-hosted MongoDB cluster nodes. The region you choose can affect network latency for clients accessing your databases. When MongoDB Cloud deploys a dedicated cluster, it checks if a VPC or VPC connection exists for that provider and region. If not, MongoDB Cloud creates them as part of the deployment. MongoDB Cloud assigns the VPC a CIDR block. To limit a new VPC peering connection to one CIDR block and region, create the connection first. Deploy the cluster after the connection starts. + enum: + - US_GOV_WEST_1 + - US_GOV_EAST_1 + - US_EAST_1 + - US_EAST_2 + - US_WEST_1 + - US_WEST_2 + - CA_CENTRAL_1 + - EU_NORTH_1 + - EU_WEST_1 + - EU_WEST_2 + - EU_WEST_3 + - EU_CENTRAL_1 + - EU_CENTRAL_2 + - AP_EAST_1 + - AP_NORTHEAST_1 + - AP_NORTHEAST_2 + - AP_NORTHEAST_3 + - AP_SOUTHEAST_1 + - AP_SOUTHEAST_2 + - AP_SOUTHEAST_3 + - AP_SOUTHEAST_4 + - AP_SOUTH_1 + - AP_SOUTH_2 + - SA_EAST_1 + - CN_NORTH_1 + - CN_NORTHWEST_1 + - ME_SOUTH_1 + - ME_CENTRAL_1 + - AF_SOUTH_1 + - EU_SOUTH_1 + - EU_SOUTH_2 + - IL_CENTRAL_1 + - CA_WEST_1 + - GLOBAL + title: AWS Regions + type: string + type: object + type: object + DataLakeDLSAzureStore: + allOf: + - $ref: '#/components/schemas/DataLakeStoreSettings' + - properties: + region: + description: Microsoft Azure Regions. + enum: + - US_CENTRAL + - US_EAST + - US_EAST_2 + - US_NORTH_CENTRAL + - US_WEST + - US_SOUTH_CENTRAL + - EUROPE_NORTH + - EUROPE_WEST + - US_WEST_CENTRAL + - US_WEST_2 + - US_WEST_3 + - CANADA_EAST + - CANADA_CENTRAL + - BRAZIL_SOUTH + - BRAZIL_SOUTHEAST + - AUSTRALIA_CENTRAL + - AUSTRALIA_CENTRAL_2 + - AUSTRALIA_EAST + - AUSTRALIA_SOUTH_EAST + - GERMANY_CENTRAL + - GERMANY_NORTH_EAST + - GERMANY_WEST_CENTRAL + - GERMANY_NORTH + - SWEDEN_CENTRAL + - SWEDEN_SOUTH + - SWITZERLAND_NORTH + - SWITZERLAND_WEST + - UK_SOUTH + - UK_WEST + - NORWAY_EAST + - NORWAY_WEST + - INDIA_CENTRAL + - INDIA_SOUTH + - INDIA_WEST + - CHINA_EAST + - CHINA_NORTH + - ASIA_EAST + - JAPAN_EAST + - JAPAN_WEST + - ASIA_SOUTH_EAST + - KOREA_CENTRAL + - KOREA_SOUTH + - FRANCE_CENTRAL + - FRANCE_SOUTH + - SOUTH_AFRICA_NORTH + - SOUTH_AFRICA_WEST + - UAE_CENTRAL + - UAE_NORTH + - QATAR_CENTRAL + title: Azure Regions + type: string + type: object + type: object + DataLakeDLSGCPStore: + allOf: + - $ref: '#/components/schemas/DataLakeStoreSettings' + - properties: + region: + description: Google Cloud Platform Regions. + enum: + - ASIA_EAST_2 + - ASIA_NORTHEAST_2 + - ASIA_NORTHEAST_3 + - ASIA_SOUTH_1 + - ASIA_SOUTH_2 + - ASIA_SOUTHEAST_2 + - AUSTRALIA_SOUTHEAST_1 + - AUSTRALIA_SOUTHEAST_2 + - CENTRAL_US + - EASTERN_ASIA_PACIFIC + - EASTERN_US + - EUROPE_CENTRAL_2 + - EUROPE_NORTH_1 + - EUROPE_WEST_2 + - EUROPE_WEST_3 + - EUROPE_WEST_4 + - EUROPE_WEST_6 + - EUROPE_WEST_10 + - EUROPE_WEST_12 + - MIDDLE_EAST_CENTRAL_1 + - MIDDLE_EAST_CENTRAL_2 + - MIDDLE_EAST_WEST_1 + - NORTH_AMERICA_NORTHEAST_1 + - NORTH_AMERICA_NORTHEAST_2 + - NORTHEASTERN_ASIA_PACIFIC + - SOUTH_AMERICA_EAST_1 + - SOUTH_AMERICA_WEST_1 + - SOUTHEASTERN_ASIA_PACIFIC + - US_EAST_4 + - US_EAST_5 + - US_WEST_2 + - US_WEST_3 + - US_WEST_4 + - US_SOUTH_1 + - WESTERN_EUROPE + - WESTERN_US + title: GCP Regions + type: string + type: object + type: object + DataLakeDatabaseCollection: + description: A collection and data sources that map to a ``stores`` data store. + properties: + dataSources: + description: Array that contains the data stores that map to a collection for this data lake. + items: + $ref: '#/components/schemas/DataLakeDatabaseDataSourceSettings' + type: array + name: + description: Human-readable label that identifies the collection to which MongoDB Cloud maps the data in the data stores. + type: string + type: object + DataLakeDatabaseDataSourceSettings: + description: Data store that maps to a collection for this data lake. + properties: + allowInsecure: + default: false + description: Flag that validates the scheme in the specified URLs. If `true`, allows insecure `HTTP` scheme, doesn't verify the server's certificate chain and hostname, and accepts any certificate with any hostname presented by the server. If `false`, allows secure `HTTPS` scheme only. + type: boolean + collection: + description: Human-readable label that identifies the collection in the database. For creating a wildcard (`*`) collection, you must omit this parameter. + type: string + collectionRegex: + description: Regex pattern to use for creating the wildcard (*) collection. To learn more about the regex syntax, see [Go programming language](https://pkg.go.dev/regexp). + type: string + database: + description: Human-readable label that identifies the database, which contains the collection in the cluster. You must omit this parameter to generate wildcard (`*`) collections for dynamically generated databases. + type: string + databaseRegex: + description: Regex pattern to use for creating the wildcard (*) database. To learn more about the regex syntax, see [Go programming language](https://pkg.go.dev/regexp). + type: string + datasetName: + description: Human-readable label that identifies the dataset that Atlas generates for an ingestion pipeline run or Online Archive. + example: v1$atlas$snapshot$Cluster0$myDatabase$myCollection$19700101T000000Z + type: string + datasetPrefix: + description: Human-readable label that matches against the dataset names for ingestion pipeline runs or Online Archives. + type: string + defaultFormat: + description: File format that MongoDB Cloud uses if it encounters a file without a file extension while searching **storeName**. + enum: + - .avro + - .avro.bz2 + - .avro.gz + - .bson + - .bson.bz2 + - .bson.gz + - .bsonx + - .csv + - .csv.bz2 + - .csv.gz + - .json + - .json.bz2 + - .json.gz + - .orc + - .parquet + - .tsv + - .tsv.bz2 + - .tsv.gz + type: string + path: + description: File path that controls how MongoDB Cloud searches for and parses files in the **storeName** before mapping them to a collection.Specify ``/`` to capture all files and folders from the ``prefix`` path. + type: string + provenanceFieldName: + description: Name for the field that includes the provenance of the documents in the results. MongoDB Cloud returns different fields in the results for each supported provider. + type: string + storeName: + description: Human-readable label that identifies the data store that MongoDB Cloud maps to the collection. + type: string + trimLevel: + description: Unsigned integer that specifies how many fields of the dataset name to trim from the left of the dataset name before mapping the remaining fields to a wildcard collection name. + format: int32 + type: integer + urls: + description: URLs of the publicly accessible data files. You can't specify URLs that require authentication. Atlas Data Lake creates a partition for each URL. If empty or omitted, Data Lake uses the URLs from the store specified in the **dataSources.storeName** parameter. + items: + type: string + type: array + type: object + DataLakeDatabaseInstance: + description: Database associated with this data lake. Databases contain collections and views. + properties: + collections: + description: Array of collections and data sources that map to a ``stores`` data store. + items: + $ref: '#/components/schemas/DataLakeDatabaseCollection' + type: array + maxWildcardCollections: + default: 100 + description: Maximum number of wildcard collections in the database. This only applies to S3 data sources. + format: int32 + maximum: 1000 + minimum: 1 + type: integer + name: + description: Human-readable label that identifies the database to which the data lake maps data. + type: string + views: + description: Array of aggregation pipelines that apply to the collection. This only applies to S3 data sources. + items: + $ref: '#/components/schemas/DataLakeApiBase' + type: array + type: object + DataLakeGoogleCloudStorageStore: + allOf: + - $ref: '#/components/schemas/DataLakeStoreSettings' + - properties: + bucket: + description: Human-readable label that identifies the Google Cloud Storage bucket. + type: string + delimiter: + description: Delimiter. + type: string + prefix: + description: Prefix. + type: string + public: + default: false + description: Flag that indicates whether the bucket is public. If set to `true`, MongoDB Cloud doesn't use the configured GCP service account to access the bucket. If set to `false`, the configured GCP service acccount must include permissions to access the bucket. + type: boolean + region: + description: Google Cloud Platform Regions. + enum: + - ASIA_EAST_2 + - ASIA_NORTHEAST_2 + - ASIA_NORTHEAST_3 + - ASIA_SOUTH_1 + - ASIA_SOUTH_2 + - ASIA_SOUTHEAST_2 + - AUSTRALIA_SOUTHEAST_1 + - AUSTRALIA_SOUTHEAST_2 + - CENTRAL_US + - EASTERN_ASIA_PACIFIC + - EASTERN_US + - EUROPE_CENTRAL_2 + - EUROPE_NORTH_1 + - EUROPE_WEST_2 + - EUROPE_WEST_3 + - EUROPE_WEST_4 + - EUROPE_WEST_6 + - EUROPE_WEST_10 + - EUROPE_WEST_12 + - MIDDLE_EAST_CENTRAL_1 + - MIDDLE_EAST_CENTRAL_2 + - MIDDLE_EAST_WEST_1 + - NORTH_AMERICA_NORTHEAST_1 + - NORTH_AMERICA_NORTHEAST_2 + - NORTHEASTERN_ASIA_PACIFIC + - SOUTH_AMERICA_EAST_1 + - SOUTH_AMERICA_WEST_1 + - SOUTHEASTERN_ASIA_PACIFIC + - US_EAST_4 + - US_EAST_5 + - US_WEST_2 + - US_WEST_3 + - US_WEST_4 + - US_SOUTH_1 + - WESTERN_EUROPE + - WESTERN_US + title: GCP Regions + type: string + replacementDelimiter: + description: Replacement Delimiter. + type: string + type: object + type: object + DataLakeHTTPStore: + allOf: + - $ref: '#/components/schemas/DataLakeStoreSettings' + - properties: + allowInsecure: + default: false + description: Flag that validates the scheme in the specified URLs. If `true`, allows insecure `HTTP` scheme, doesn't verify the server's certificate chain and hostname, and accepts any certificate with any hostname presented by the server. If `false`, allows secure `HTTPS` scheme only. + type: boolean + defaultFormat: + description: Default format that Data Lake assumes if it encounters a file without an extension while searching the `storeName`. If omitted, Data Lake attempts to detect the file type by processing a few bytes of the file. The specified format only applies to the URLs specified in the **databases.[n].collections.[n].dataSources** object. + type: string + urls: + description: Comma-separated list of publicly accessible HTTP URLs where data is stored. You can't specify URLs that require authentication. + items: + description: Comma-separated list of publicly accessible HTTP URLs where data is stored. You can't specify URLs that require authentication. + type: string + type: array + type: object + type: object + DataLakePipelinesPartitionField: + description: Partition Field in the Data Lake Storage provider for a Data Lake Pipeline. + properties: + fieldName: + description: Human-readable label that identifies the field name used to partition data. + maxLength: 700 + type: string + order: + default: 0 + description: Sequence in which MongoDB Cloud slices the collection data to create partitions. The resource expresses this sequence starting with zero. + format: int32 + type: integer + required: + - fieldName + - order + title: Partition Field + type: object + DataLakeS3StoreSettings: + allOf: + - $ref: '#/components/schemas/DataLakeStoreSettings' + - properties: + additionalStorageClasses: + description: Collection of AWS S3 [storage classes](https://aws.amazon.com/s3/storage-classes/). Atlas Data Lake includes the files in these storage classes in the query results. + items: + description: AWS S3 [storage class](https://aws.amazon.com/s3/storage-classes/) where the files to include in the results are stored. + enum: + - STANDARD + - INTELLIGENT_TIERING + - STANDARD_IA + type: string + type: array + bucket: + description: Human-readable label that identifies the AWS S3 bucket. This label must exactly match the name of an S3 bucket that the data lake can access with the configured AWS Identity and Access Management (IAM) credentials. + type: string + delimiter: + description: The delimiter that separates **databases.[n].collections.[n].dataSources.[n].path** segments in the data store. MongoDB Cloud uses the delimiter to efficiently traverse S3 buckets with a hierarchical directory structure. You can specify any character supported by the S3 object keys as the delimiter. For example, you can specify an underscore (_) or a plus sign (+) or multiple characters, such as double underscores (__) as the delimiter. If omitted, defaults to `/`. + type: string + includeTags: + default: false + description: Flag that indicates whether to use S3 tags on the files in the given path as additional partition attributes. If set to `true`, data lake adds the S3 tags as additional partition attributes and adds new top-level BSON elements associating each tag to each document. + type: boolean + prefix: + description: Prefix that MongoDB Cloud applies when searching for files in the S3 bucket. The data store prepends the value of prefix to the **databases.[n].collections.[n].dataSources.[n].path** to create the full path for files to ingest. If omitted, MongoDB Cloud searches all files from the root of the S3 bucket. + type: string + public: + default: false + description: Flag that indicates whether the bucket is public. If set to `true`, MongoDB Cloud doesn't use the configured AWS Identity and Access Management (IAM) role to access the S3 bucket. If set to `false`, the configured AWS IAM role must include permissions to access the S3 bucket. + type: boolean + region: + description: Physical location where MongoDB Cloud deploys your AWS-hosted MongoDB cluster nodes. The region you choose can affect network latency for clients accessing your databases. When MongoDB Cloud deploys a dedicated cluster, it checks if a VPC or VPC connection exists for that provider and region. If not, MongoDB Cloud creates them as part of the deployment. MongoDB Cloud assigns the VPC a CIDR block. To limit a new VPC peering connection to one CIDR block and region, create the connection first. Deploy the cluster after the connection starts. + enum: + - US_GOV_WEST_1 + - US_GOV_EAST_1 + - US_EAST_1 + - US_EAST_2 + - US_WEST_1 + - US_WEST_2 + - CA_CENTRAL_1 + - EU_NORTH_1 + - EU_WEST_1 + - EU_WEST_2 + - EU_WEST_3 + - EU_CENTRAL_1 + - EU_CENTRAL_2 + - AP_EAST_1 + - AP_NORTHEAST_1 + - AP_NORTHEAST_2 + - AP_NORTHEAST_3 + - AP_SOUTHEAST_1 + - AP_SOUTHEAST_2 + - AP_SOUTHEAST_3 + - AP_SOUTHEAST_4 + - AP_SOUTH_1 + - AP_SOUTH_2 + - SA_EAST_1 + - CN_NORTH_1 + - CN_NORTHWEST_1 + - ME_SOUTH_1 + - ME_CENTRAL_1 + - AF_SOUTH_1 + - EU_SOUTH_1 + - EU_SOUTH_2 + - IL_CENTRAL_1 + - CA_WEST_1 + - GLOBAL + title: AWS Regions + type: string + type: object + type: object + DataLakeStorage: + description: Configuration information for each data store and its mapping to MongoDB Cloud databases. + properties: + databases: + description: Array that contains the queryable databases and collections for this data lake. + items: + $ref: '#/components/schemas/DataLakeDatabaseInstance' + type: array + stores: + description: Array that contains the data stores for the data lake. + items: + $ref: '#/components/schemas/DataLakeStoreSettings' + type: array + type: object + DataLakeStoreSettings: + description: Group of settings that define where the data is stored. + discriminator: + mapping: + atlas: '#/components/schemas/DataLakeAtlasStoreInstance' + azure: '#/components/schemas/DataLakeAzureBlobStore' + dls:aws: '#/components/schemas/DataLakeDLSAWSStore' + dls:azure: '#/components/schemas/DataLakeDLSAzureStore' + dls:gcp: '#/components/schemas/DataLakeDLSGCPStore' + gcs: '#/components/schemas/DataLakeGoogleCloudStorageStore' + http: '#/components/schemas/DataLakeHTTPStore' + s3: '#/components/schemas/DataLakeS3StoreSettings' + propertyName: provider + oneOf: + - $ref: '#/components/schemas/DataLakeS3StoreSettings' + - $ref: '#/components/schemas/DataLakeDLSAWSStore' + - $ref: '#/components/schemas/DataLakeDLSAzureStore' + - $ref: '#/components/schemas/DataLakeDLSGCPStore' + - $ref: '#/components/schemas/DataLakeAtlasStoreInstance' + - $ref: '#/components/schemas/DataLakeHTTPStore' + - $ref: '#/components/schemas/DataLakeAzureBlobStore' + - $ref: '#/components/schemas/DataLakeGoogleCloudStorageStore' + properties: + name: + description: Human-readable label that identifies the data store. The **databases.[n].collections.[n].dataSources.[n].storeName** field references this values as part of the mapping configuration. To use MongoDB Cloud as a data store, the data lake requires a serverless instance or an `M10` or higher cluster. + type: string + provider: + type: string + required: + - provider + type: object + DataProcessRegionView: + description: Settings to configure the region where you wish to store your archived data. + discriminator: + mapping: + AWS: '#/components/schemas/AWSDataProcessRegionView' + AZURE: '#/components/schemas/AzureDataProcessRegionView' + GCP: '#/components/schemas/GCPDataProcessRegionView' + propertyName: cloudProvider + properties: + cloudProvider: + description: Human-readable label that identifies the Cloud service provider where you store your archived data. + enum: + - AWS + - AZURE + - GCP + readOnly: true + type: string + readOnly: true + type: object + DateCriteriaView: + allOf: + - $ref: '#/components/schemas/CriteriaView' + - properties: + dateField: + description: 'Indexed database parameter that stores the date that determines when data moves to the online archive. MongoDB Cloud archives the data when the current date exceeds the date in this database parameter plus the number of days specified through the **expireAfterDays** parameter. Set this parameter when you set `"criteria.type" : "DATE"`.' + type: string + dateFormat: + default: ISODATE + description: |- + Syntax used to write the date after which data moves to the online archive. Date can be expressed as ISO 8601 or Epoch timestamps. The Epoch timestamp can be expressed as nanoseconds, milliseconds, or seconds. Set this parameter when **"criteria.type" : "DATE"**. + You must set **"criteria.type" : "DATE"** if **"collectionType": "TIMESERIES"**. + enum: + - ISODATE + - EPOCH_SECONDS + - EPOCH_MILLIS + - EPOCH_NANOSECONDS + type: string + expireAfterDays: + description: 'Number of days after the value in the **criteria.dateField** when MongoDB Cloud archives data in the specified cluster. Set this parameter when you set **"criteria.type" : "DATE"**.' + format: int32 + type: integer + type: object + description: '**DATE criteria.type**.' + title: Archival Criteria + type: object + DedicatedHardwareSpec: + description: Hardware specifications for read-only nodes in the region. Read-only nodes can never become the primary member, but can enable local reads.If you don't specify this parameter, no read-only nodes are deployed to the region. + oneOf: + - $ref: '#/components/schemas/AWSHardwareSpec' + - $ref: '#/components/schemas/AzureHardwareSpec' + - $ref: '#/components/schemas/GCPHardwareSpec' + properties: + nodeCount: + description: Number of nodes of the given type for MongoDB Cloud to deploy to the region. + format: int32 + type: integer + type: object + DedicatedHardwareSpec20240805: + description: Hardware specifications for read-only nodes in the region. Read-only nodes can never become the primary member, but can enable local reads. If you don't specify this parameter, no read-only nodes are deployed to the region. + oneOf: + - $ref: '#/components/schemas/AWSHardwareSpec20240805' + - $ref: '#/components/schemas/AzureHardwareSpec20240805' + - $ref: '#/components/schemas/GCPHardwareSpec20240805' + properties: + diskSizeGB: + description: |- + Storage capacity of instance data volumes expressed in gigabytes. Increase this number to add capacity. + + This value must be equal for all shards and node types. + + This value is not configurable on M0/M2/M5 clusters. + + MongoDB Cloud requires this parameter if you set **replicationSpecs**. + + If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value. + + Storage charge calculations depend on whether you choose the default value or a custom value. + + The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier. + format: double + maximum: 4096 + minimum: 10 + type: number + nodeCount: + description: Number of nodes of the given type for MongoDB Cloud to deploy to the region. + format: int32 + type: integer + type: object + DefaultScheduleView: + allOf: + - $ref: '#/components/schemas/OnlineArchiveSchedule' + required: + - type + type: object + DiskBackupSnapshotAWSExportBucketRequest: + allOf: + - $ref: '#/components/schemas/DiskBackupSnapshotExportBucketRequest' + - properties: + iamRoleId: + description: Unique 24-hexadecimal character string that identifies the Unified AWS Access role ID that MongoDB Cloud uses to access the AWS S3 bucket. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + type: string + type: object + required: + - bucketName + - cloudProvider + - iamRoleId + type: object + DiskBackupSnapshotAWSExportBucketResponse: + properties: + _id: + description: Unique 24-hexadecimal character string that identifies the Export Bucket. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + type: string + bucketName: + description: The name of the AWS S3 Bucket or Azure Storage Container that Snapshots are exported to. + example: export-bucket + maxLength: 63 + minLength: 3 + type: string + cloudProvider: + description: Human-readable label that identifies the cloud provider that Snapshots will be exported to. + enum: + - AWS + - AZURE + type: string + iamRoleId: + description: Unique 24-hexadecimal character string that identifies the Unified AWS Access role ID that MongoDB Cloud uses to access the AWS S3 bucket. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + type: string + 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 + required: + - _id + - bucketName + - cloudProvider + - iamRoleId + type: object + DiskBackupSnapshotAzureExportBucketRequest: + allOf: + - $ref: '#/components/schemas/DiskBackupSnapshotExportBucketRequest' + - properties: + bucketName: + deprecated: true + description: 'The name of the Azure Storage Container to export to. Deprecated: provide the Container''s URL in serviceUrl instead.' + example: export-container + maxLength: 63 + minLength: 3 + type: string + roleId: + description: Unique 24-hexadecimal digit string that identifies the Azure Cloud Provider Access Role that MongoDB Cloud uses to access the Azure Blob Storage Container. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + type: string + serviceUrl: + description: 'URL of the Azure Storage Account to export to. For example: "https://examplestorageaccount.blob.core.windows.net". Only standard endpoints (with "blob.core.windows.net") are supported.' + example: https://examplestorageaccount.blob.core.windows.net + maxLength: 2048 + minLength: 33 + type: string + tenantId: + deprecated: true + description: 'UUID that identifies the Azure Active Directory Tenant ID. Deprecated: this field is ignored; the tenantId of the Cloud Provider Access role (from roleId) is used.' + example: 4297fc77-1592-4de8-a6d5-a8c32401df87 + maxLength: 36 + minLength: 36 + pattern: ^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$ + type: string + type: object + required: + - cloudProvider + - roleId + - serviceUrl + type: object + DiskBackupSnapshotAzureExportBucketResponse: + allOf: + - $ref: '#/components/schemas/DiskBackupSnapshotExportBucketResponse' + - properties: + roleId: + description: Unique 24-hexadecimal digit string that identifies the Azure Cloud Provider Access Role that MongoDB Cloud uses to access the Azure Blob Storage Container. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + type: string + serviceUrl: + description: URL of the Azure Storage Account to export to. Only standard endpoints (with "blob.core.windows.net") are supported. + example: https://examplestorageaccount.blob.core.windows.net + maxLength: 2048 + minLength: 33 + type: string + tenantId: + description: UUID that identifies the Azure Active Directory Tenant ID used during exports. + example: 4297fc77-1592-4de8-a6d5-a8c32401df87 + maxLength: 36 + minLength: 36 + pattern: ^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$ + type: string + type: object + required: + - _id + - bucketName + - cloudProvider + - roleId + - serviceUrl + - tenantId + type: object + DiskBackupSnapshotExportBucketRequest: + description: Disk backup snapshot Export Bucket Request. + discriminator: + mapping: + AWS: '#/components/schemas/DiskBackupSnapshotAWSExportBucketRequest' + AZURE: '#/components/schemas/DiskBackupSnapshotAzureExportBucketRequest' + propertyName: cloudProvider + oneOf: + - $ref: '#/components/schemas/DiskBackupSnapshotAWSExportBucketRequest' + - $ref: '#/components/schemas/DiskBackupSnapshotAzureExportBucketRequest' + properties: + bucketName: + description: Human-readable label that identifies the AWS S3 Bucket or Azure Storage Container that the role is authorized to export to. + example: export-bucket + maxLength: 63 + minLength: 3 + type: string + cloudProvider: + description: Human-readable label that identifies the cloud provider that Snapshots are exported to. + enum: + - AWS + - AZURE + type: string + 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 + required: + - bucketName + - cloudProvider + type: object + DiskBackupSnapshotExportBucketResponse: + description: Disk backup snapshot Export Bucket. + discriminator: + mapping: + AWS: '#/components/schemas/DiskBackupSnapshotAWSExportBucketResponse' + AZURE: '#/components/schemas/DiskBackupSnapshotAzureExportBucketResponse' + propertyName: cloudProvider + oneOf: + - $ref: '#/components/schemas/DiskBackupSnapshotAWSExportBucketResponse' + - $ref: '#/components/schemas/DiskBackupSnapshotAzureExportBucketResponse' + properties: + _id: + description: Unique 24-hexadecimal character string that identifies the Export Bucket. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + type: string + bucketName: + description: The name of the AWS S3 Bucket or Azure Storage Container that Snapshots are exported to. + example: export-bucket + maxLength: 63 + minLength: 3 + type: string + cloudProvider: + description: Human-readable label that identifies the cloud provider that Snapshots will be exported to. + enum: + - AWS + - AZURE + type: string + 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 + required: + - _id + - bucketName + - cloudProvider + type: object + DiskGBAutoScaling: + description: Setting that enables disk auto-scaling. + properties: + enabled: + description: Flag that indicates whether this cluster enables disk auto-scaling. The maximum memory allowed for the selected cluster tier and the oplog size can limit storage auto-scaling. + type: boolean + type: object + EmployeeAccessGrantView: + description: MongoDB employee granted access level and expiration for a cluster. + properties: + expirationTime: + description: Expiration date for the employee access grant. + format: date-time + type: string + grantType: + description: Level of access to grant to MongoDB Employees. + enum: + - CLUSTER_DATABASE_LOGS + - CLUSTER_INFRASTRUCTURE + - CLUSTER_INFRASTRUCTURE_AND_APP_SERVICES_SYNC_DATA + type: string + 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 + required: + - expirationTime + - grantType + type: object + FieldViolation: + properties: + description: + description: A description of why the request element is bad. + type: string + field: + description: A path that leads to a field in the request body. + type: string + required: + - description + - field + type: object + FreeComputeAutoScalingRules: + description: Collection of settings that configures how a cluster might scale its cluster tier and whether the cluster can scale down. + properties: + maxInstanceSize: + description: Maximum instance size to which your cluster can automatically scale. + enum: + - M0 + - M2 + - M5 + title: Tenant Instance Sizes + type: string + minInstanceSize: + description: Minimum instance size to which your cluster can automatically scale. + enum: + - M0 + - M2 + - M5 + title: Tenant Instance Sizes + type: string + title: Tenant + type: object + GCPCloudProviderContainer: + allOf: + - $ref: '#/components/schemas/CloudProviderContainer' + - properties: + atlasCidrBlock: + description: |- + IP addresses expressed in Classless Inter-Domain Routing (CIDR) notation that MongoDB Cloud uses for the network peering containers in your project. MongoDB Cloud assigns all of the project's clusters deployed to this cloud provider an IP address from this range. MongoDB Cloud locks this value if an M10 or greater cluster or a network peering connection exists in this project. + + These CIDR blocks must fall within the ranges reserved per RFC 1918. GCP further limits the block to a lower bound of the `/18` range. + + To modify the CIDR block, the target project cannot have: + + - Any M10 or greater clusters + - Any other VPC peering connections + + You can also create a new project and create a network peering connection to set the desired MongoDB Cloud network peering container CIDR block for that project. MongoDB Cloud limits the number of MongoDB nodes per network peering connection based on the CIDR block and the region selected for the project. + + **Example:** A project in an Google Cloud (GCP) region supporting three availability zones and an MongoDB CIDR network peering container block of limit of `/24` equals 27 three-node replica sets. + pattern: ^((([0-9]{1,3}\.){3}[0-9]{1,3})|(:{0,2}([0-9a-f]{1,4}:){0,7}[0-9a-f]{1,4}[:]{0,2}))((%2[fF]|/)[0-9]{1,3})+$ + type: string + gcpProjectId: + description: Unique string that identifies the GCP project in which MongoDB Cloud clusters in this network peering container exist. The response returns **null** if no clusters exist in this network peering container. + maxLength: 26 + minLength: 26 + pattern: ^p-[0-9a-z]{24}$ + readOnly: true + type: string + networkName: + description: Human-readable label that identifies the network in which MongoDB Cloud clusters in this network peering container exist. MongoDB Cloud returns **null** if no clusters exist in this network peering container. + maxLength: 36 + minLength: 36 + pattern: ^nt-[0-9a-f]{24}-[0-9a-z]{8}$ + readOnly: true + type: string + regions: + description: List of GCP regions to which you want to deploy this MongoDB Cloud network peering container. In this MongoDB Cloud project, you can deploy clusters only to the GCP regions in this list. To deploy MongoDB Cloud clusters to other GCP regions, create additional projects. + items: + description: List of GCP regions to which you want to deploy this MongoDB Cloud network peering container. In this MongoDB Cloud project, you can deploy clusters only to the GCP regions in this list. To deploy MongoDB Cloud clusters to other GCP regions, create additional projects. + enum: + - ASIA_EAST_2 + - ASIA_NORTHEAST_2 + - ASIA_NORTHEAST_3 + - ASIA_SOUTH_1 + - ASIA_SOUTH_2 + - ASIA_SOUTHEAST_2 + - AUSTRALIA_SOUTHEAST_1 + - AUSTRALIA_SOUTHEAST_2 + - CENTRAL_US + - EASTERN_ASIA_PACIFIC + - EASTERN_US + - EUROPE_CENTRAL_2 + - EUROPE_NORTH_1 + - EUROPE_WEST_2 + - EUROPE_WEST_3 + - EUROPE_WEST_4 + - EUROPE_WEST_6 + - EUROPE_WEST_10 + - EUROPE_WEST_12 + - MIDDLE_EAST_CENTRAL_1 + - MIDDLE_EAST_CENTRAL_2 + - MIDDLE_EAST_WEST_1 + - NORTH_AMERICA_NORTHEAST_1 + - NORTH_AMERICA_NORTHEAST_2 + - NORTHEASTERN_ASIA_PACIFIC + - SOUTH_AMERICA_EAST_1 + - SOUTH_AMERICA_WEST_1 + - SOUTHEASTERN_ASIA_PACIFIC + - US_EAST_4 + - US_EAST_5 + - US_WEST_2 + - US_WEST_3 + - US_WEST_4 + - US_SOUTH_1 + - WESTERN_EUROPE + - WESTERN_US + type: string + type: array + type: object + description: Collection of settings that configures the network container for a virtual private connection on Amazon Web Services. + required: + - atlasCidrBlock + title: GCP + type: object + GCPComputeAutoScaling: + description: Collection of settings that configures how a cluster might scale its cluster tier and whether the cluster can scale down. Cluster tier auto-scaling is unavailable for clusters using Low CPU or NVME storage classes. + properties: + maxInstanceSize: + description: Maximum instance size to which your cluster can automatically scale. + enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M140 + - M200 + - M250 + - M300 + - M400 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - R600 + title: GCP Instance Sizes + type: string + minInstanceSize: + description: Minimum instance size to which your cluster can automatically scale. + enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M140 + - M200 + - M250 + - M300 + - M400 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - R600 + title: GCP Instance Sizes + type: string + title: GCP + type: object + GCPCreateDataProcessRegionView: + allOf: + - $ref: '#/components/schemas/CreateDataProcessRegionView' + - properties: + region: + description: Human-readable label that identifies the geographic location of the region where you wish to store your archived data. + enum: + - CENTRAL_US + - WESTERN_EUROPE + type: string + type: object + type: object + GCPDataProcessRegionView: + allOf: + - $ref: '#/components/schemas/DataProcessRegionView' + - properties: + region: + description: Human-readable label that identifies the geographic location of the region where you store your archived data. + enum: + - CENTRAL_US + - WESTERN_EUROPE + readOnly: true + type: string + type: object + type: object + GCPHardwareSpec: + properties: + instanceSize: + description: Hardware specification for the instance sizes in this region. Each instance size has a default storage and memory capacity. The instance size you select applies to all the data-bearing hosts of the node type. + enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M140 + - M200 + - M250 + - M300 + - M400 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - R600 + title: GCP Instance Sizes + type: string + nodeCount: + description: Number of nodes of the given type for MongoDB Cloud to deploy to the region. + format: int32 + type: integer + type: object + GCPHardwareSpec20240805: + properties: + diskSizeGB: + description: |- + Storage capacity of instance data volumes expressed in gigabytes. Increase this number to add capacity. + + This value must be equal for all shards and node types. + + This value is not configurable on M0/M2/M5 clusters. + + MongoDB Cloud requires this parameter if you set **replicationSpecs**. + + If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value. + + Storage charge calculations depend on whether you choose the default value or a custom value. + + The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier. + format: double + maximum: 4096 + minimum: 10 + type: number + instanceSize: + description: Hardware specification for the instance sizes in this region in this shard. Each instance size has a default storage and memory capacity. Electable nodes and read-only nodes (known as "base nodes") within a single shard must use the same instance size. Analytics nodes can scale independently from base nodes within a shard. Both base nodes and analytics nodes can scale independently from their equivalents in other shards. + enum: + - M10 + - M20 + - M30 + - M40 + - M50 + - M60 + - M80 + - M140 + - M200 + - M250 + - M300 + - M400 + - R40 + - R50 + - R60 + - R80 + - R200 + - R300 + - R400 + - R600 + title: GCP Instance Sizes + type: string + nodeCount: + description: Number of nodes of the given type for MongoDB Cloud to deploy to the region. + format: int32 + type: integer + type: object + GCPRegionConfig: + allOf: + - $ref: '#/components/schemas/CloudRegionConfig' + - properties: + analyticsAutoScaling: + $ref: '#/components/schemas/AdvancedAutoScalingSettings' + analyticsSpecs: + $ref: '#/components/schemas/DedicatedHardwareSpec' + autoScaling: + $ref: '#/components/schemas/AdvancedAutoScalingSettings' + readOnlySpecs: + $ref: '#/components/schemas/DedicatedHardwareSpec' + type: object + description: Details that explain how MongoDB Cloud replicates data in one region on the specified MongoDB database. + title: GCP Regional Replication Specifications + type: object + GCPRegionConfig20240805: + allOf: + - $ref: '#/components/schemas/CloudRegionConfig20240805' + - properties: + analyticsAutoScaling: + $ref: '#/components/schemas/AdvancedAutoScalingSettings' + analyticsSpecs: + $ref: '#/components/schemas/DedicatedHardwareSpec20240805' + autoScaling: + $ref: '#/components/schemas/AdvancedAutoScalingSettings' + readOnlySpecs: + $ref: '#/components/schemas/DedicatedHardwareSpec20240805' + type: object + description: Details that explain how MongoDB Cloud replicates data in one region on the specified MongoDB database. + title: GCP Regional Replication Specifications + type: object + GroupRoleAssignment: + properties: + groupId: + description: Unique 24-hexadecimal digit string that identifies the project to which these roles belong. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + type: string + groupRoles: + description: One or more project level roles assigned to the MongoDB Cloud user. + items: + enum: + - GROUP_OWNER + - GROUP_CLUSTER_MANAGER + - GROUP_STREAM_PROCESSING_OWNER + - GROUP_DATA_ACCESS_ADMIN + - GROUP_DATA_ACCESS_READ_WRITE + - GROUP_DATA_ACCESS_READ_ONLY + - GROUP_READ_ONLY + - GROUP_SEARCH_INDEX_EDITOR + type: string + type: array + uniqueItems: true + type: object + HardwareSpec: + description: Hardware specifications for all electable nodes deployed in the region. Electable nodes can become the primary and can enable local reads. If you don't specify this option, MongoDB Cloud deploys no electable nodes to the region. + oneOf: + - $ref: '#/components/schemas/AWSHardwareSpec' + - $ref: '#/components/schemas/AzureHardwareSpec' + - $ref: '#/components/schemas/GCPHardwareSpec' + - $ref: '#/components/schemas/TenantHardwareSpec' + type: object + HardwareSpec20240805: + description: Hardware specifications for all electable nodes deployed in the region. Electable nodes can become the primary and can enable local reads. If you don't specify this option, MongoDB Cloud deploys no electable nodes to the region. + oneOf: + - $ref: '#/components/schemas/AWSHardwareSpec20240805' + - $ref: '#/components/schemas/AzureHardwareSpec20240805' + - $ref: '#/components/schemas/GCPHardwareSpec20240805' + - $ref: '#/components/schemas/TenantHardwareSpec20240805' + properties: + diskSizeGB: + description: |- + Storage capacity of instance data volumes expressed in gigabytes. Increase this number to add capacity. + + This value must be equal for all shards and node types. + + This value is not configurable on M0/M2/M5 clusters. + + MongoDB Cloud requires this parameter if you set **replicationSpecs**. + + If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value. + + Storage charge calculations depend on whether you choose the default value or a custom value. + + The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier. + format: double + maximum: 4096 + minimum: 10 + type: number + type: object + IngestionSink: + description: Ingestion destination of a Data Lake Pipeline. + discriminator: + mapping: + DLS: '#/components/schemas/DLSIngestionSink' + propertyName: type + properties: + type: + description: Type of ingestion destination of this Data Lake Pipeline. + enum: + - DLS + readOnly: true + type: string + title: Ingestion Destination + type: object + IngestionSource: + description: Ingestion Source of a Data Lake Pipeline. + discriminator: + mapping: + ON_DEMAND_CPS: '#/components/schemas/OnDemandCpsSnapshotSource' + PERIODIC_CPS: '#/components/schemas/PeriodicCpsSnapshotSource' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OnDemandCpsSnapshotSource' + - $ref: '#/components/schemas/PeriodicCpsSnapshotSource' + properties: + type: + description: Type of ingestion source of this Data Lake Pipeline. + enum: + - PERIODIC_CPS + - ON_DEMAND_CPS + type: string + title: Ingestion Source + type: object + InvoiceLineItem: + description: One service included in this invoice. + properties: + clusterName: + description: Human-readable label that identifies the cluster that incurred the charge. + maxLength: 64 + minLength: 1 + pattern: ^([a-zA-Z0-9][a-zA-Z0-9-]*)?[a-zA-Z0-9]+$ + readOnly: true + type: string + created: + description: Date and time when MongoDB Cloud created this line item. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + discountCents: + description: Sum by which MongoDB discounted this line item. MongoDB Cloud expresses this value in cents (100ths of one US Dollar). The resource returns this parameter when a discount applies. + format: int64 + readOnly: true + type: integer + endDate: + description: Date and time when when MongoDB Cloud finished charging for this line item. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + groupId: + description: Unique 24-hexadecimal digit string that identifies the project associated to this line item. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + groupName: + description: Human-readable label that identifies the project. + type: string + note: + description: Comment that applies to this line item. + readOnly: true + type: string + percentDiscount: + description: Percentage by which MongoDB discounted this line item. The resource returns this parameter when a discount applies. + format: float + readOnly: true + type: number + quantity: + description: Number of units included for the line item. These can be expressions of storage (GB), time (hours), or other units. + format: double + readOnly: true + type: number + sku: + description: Human-readable description of the service that this line item provided. This Stock Keeping Unit (SKU) could be the instance type, a support charge, advanced security, or another service. + enum: + - CLASSIC_BACKUP_OPLOG + - CLASSIC_BACKUP_STORAGE + - CLASSIC_BACKUP_SNAPSHOT_CREATE + - CLASSIC_BACKUP_DAILY_MINIMUM + - CLASSIC_BACKUP_FREE_TIER + - CLASSIC_COUPON + - BACKUP_STORAGE_FREE_TIER + - BACKUP_STORAGE + - FLEX_CONSULTING + - CLOUD_MANAGER_CLASSIC + - CLOUD_MANAGER_BASIC_FREE_TIER + - CLOUD_MANAGER_BASIC + - CLOUD_MANAGER_PREMIUM + - CLOUD_MANAGER_FREE_TIER + - CLOUD_MANAGER_STANDARD_FREE_TIER + - CLOUD_MANAGER_STANDARD_ANNUAL + - CLOUD_MANAGER_STANDARD + - CLOUD_MANAGER_FREE_TRIAL + - ATLAS_INSTANCE_M0 + - ATLAS_INSTANCE_M2 + - ATLAS_INSTANCE_M5 + - ATLAS_AWS_INSTANCE_M10 + - ATLAS_AWS_INSTANCE_M20 + - ATLAS_AWS_INSTANCE_M30 + - ATLAS_AWS_INSTANCE_M40 + - ATLAS_AWS_INSTANCE_M50 + - ATLAS_AWS_INSTANCE_M60 + - ATLAS_AWS_INSTANCE_M80 + - ATLAS_AWS_INSTANCE_M100 + - ATLAS_AWS_INSTANCE_M140 + - ATLAS_AWS_INSTANCE_M200 + - ATLAS_AWS_INSTANCE_M300 + - ATLAS_AWS_INSTANCE_M40_LOW_CPU + - ATLAS_AWS_INSTANCE_M50_LOW_CPU + - ATLAS_AWS_INSTANCE_M60_LOW_CPU + - ATLAS_AWS_INSTANCE_M80_LOW_CPU + - ATLAS_AWS_INSTANCE_M200_LOW_CPU + - ATLAS_AWS_INSTANCE_M300_LOW_CPU + - ATLAS_AWS_INSTANCE_M400_LOW_CPU + - ATLAS_AWS_INSTANCE_M700_LOW_CPU + - ATLAS_AWS_INSTANCE_M40_NVME + - ATLAS_AWS_INSTANCE_M50_NVME + - ATLAS_AWS_INSTANCE_M60_NVME + - ATLAS_AWS_INSTANCE_M80_NVME + - ATLAS_AWS_INSTANCE_M200_NVME + - ATLAS_AWS_INSTANCE_M400_NVME + - ATLAS_AWS_INSTANCE_M10_PAUSED + - ATLAS_AWS_INSTANCE_M20_PAUSED + - ATLAS_AWS_INSTANCE_M30_PAUSED + - ATLAS_AWS_INSTANCE_M40_PAUSED + - ATLAS_AWS_INSTANCE_M50_PAUSED + - ATLAS_AWS_INSTANCE_M60_PAUSED + - ATLAS_AWS_INSTANCE_M80_PAUSED + - ATLAS_AWS_INSTANCE_M100_PAUSED + - ATLAS_AWS_INSTANCE_M140_PAUSED + - ATLAS_AWS_INSTANCE_M200_PAUSED + - ATLAS_AWS_INSTANCE_M300_PAUSED + - ATLAS_AWS_INSTANCE_M40_LOW_CPU_PAUSED + - ATLAS_AWS_INSTANCE_M50_LOW_CPU_PAUSED + - ATLAS_AWS_INSTANCE_M60_LOW_CPU_PAUSED + - ATLAS_AWS_INSTANCE_M80_LOW_CPU_PAUSED + - ATLAS_AWS_INSTANCE_M200_LOW_CPU_PAUSED + - ATLAS_AWS_INSTANCE_M300_LOW_CPU_PAUSED + - ATLAS_AWS_INSTANCE_M400_LOW_CPU_PAUSED + - ATLAS_AWS_INSTANCE_M700_LOW_CPU_PAUSED + - ATLAS_AWS_SEARCH_INSTANCE_S20_COMPUTE_NVME + - ATLAS_AWS_SEARCH_INSTANCE_S30_COMPUTE_NVME + - ATLAS_AWS_SEARCH_INSTANCE_S40_COMPUTE_NVME + - ATLAS_AWS_SEARCH_INSTANCE_S50_COMPUTE_NVME + - ATLAS_AWS_SEARCH_INSTANCE_S60_COMPUTE_NVME + - ATLAS_AWS_SEARCH_INSTANCE_S70_COMPUTE_NVME + - ATLAS_AWS_SEARCH_INSTANCE_S80_COMPUTE_NVME + - ATLAS_AWS_SEARCH_INSTANCE_S30_MEMORY_NVME + - ATLAS_AWS_SEARCH_INSTANCE_S40_MEMORY_NVME + - ATLAS_AWS_SEARCH_INSTANCE_S50_MEMORY_NVME + - ATLAS_AWS_SEARCH_INSTANCE_S60_MEMORY_NVME + - ATLAS_AWS_SEARCH_INSTANCE_S80_MEMORY_NVME + - ATLAS_AWS_SEARCH_INSTANCE_S90_MEMORY_NVME + - ATLAS_AWS_SEARCH_INSTANCE_S100_MEMORY_NVME + - ATLAS_AWS_SEARCH_INSTANCE_S110_MEMORY_NVME + - ATLAS_AWS_STORAGE_PROVISIONED + - ATLAS_AWS_STORAGE_STANDARD + - ATLAS_AWS_STORAGE_STANDARD_GP3 + - ATLAS_AWS_STORAGE_IOPS + - ATLAS_AWS_DATA_TRANSFER_SAME_REGION + - ATLAS_AWS_DATA_TRANSFER_DIFFERENT_REGION + - ATLAS_AWS_DATA_TRANSFER_INTERNET + - ATLAS_AWS_BACKUP_SNAPSHOT_STORAGE + - ATLAS_AWS_BACKUP_DOWNLOAD_VM + - ATLAS_AWS_BACKUP_DOWNLOAD_VM_STORAGE + - ATLAS_AWS_BACKUP_DOWNLOAD_VM_STORAGE_IOPS + - ATLAS_AWS_PRIVATE_ENDPOINT + - ATLAS_AWS_PRIVATE_ENDPOINT_CAPACITY_UNITS + - ATLAS_GCP_SEARCH_INSTANCE_S20_COMPUTE_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S30_COMPUTE_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S40_COMPUTE_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S50_COMPUTE_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S60_COMPUTE_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S70_COMPUTE_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S80_COMPUTE_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S30_MEMORY_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S40_MEMORY_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S50_MEMORY_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S60_MEMORY_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S70_MEMORY_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S80_MEMORY_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S90_MEMORY_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S100_MEMORY_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S110_MEMORY_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S120_MEMORY_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S130_MEMORY_LOCALSSD + - ATLAS_GCP_SEARCH_INSTANCE_S140_MEMORY_LOCALSSD + - ATLAS_GCP_INSTANCE_M10 + - ATLAS_GCP_INSTANCE_M20 + - ATLAS_GCP_INSTANCE_M30 + - ATLAS_GCP_INSTANCE_M40 + - ATLAS_GCP_INSTANCE_M50 + - ATLAS_GCP_INSTANCE_M60 + - ATLAS_GCP_INSTANCE_M80 + - ATLAS_GCP_INSTANCE_M140 + - ATLAS_GCP_INSTANCE_M200 + - ATLAS_GCP_INSTANCE_M250 + - ATLAS_GCP_INSTANCE_M300 + - ATLAS_GCP_INSTANCE_M400 + - ATLAS_GCP_INSTANCE_M40_LOW_CPU + - ATLAS_GCP_INSTANCE_M50_LOW_CPU + - ATLAS_GCP_INSTANCE_M60_LOW_CPU + - ATLAS_GCP_INSTANCE_M80_LOW_CPU + - ATLAS_GCP_INSTANCE_M200_LOW_CPU + - ATLAS_GCP_INSTANCE_M300_LOW_CPU + - ATLAS_GCP_INSTANCE_M400_LOW_CPU + - ATLAS_GCP_INSTANCE_M600_LOW_CPU + - ATLAS_GCP_INSTANCE_M10_PAUSED + - ATLAS_GCP_INSTANCE_M20_PAUSED + - ATLAS_GCP_INSTANCE_M30_PAUSED + - ATLAS_GCP_INSTANCE_M40_PAUSED + - ATLAS_GCP_INSTANCE_M50_PAUSED + - ATLAS_GCP_INSTANCE_M60_PAUSED + - ATLAS_GCP_INSTANCE_M80_PAUSED + - ATLAS_GCP_INSTANCE_M140_PAUSED + - ATLAS_GCP_INSTANCE_M200_PAUSED + - ATLAS_GCP_INSTANCE_M250_PAUSED + - ATLAS_GCP_INSTANCE_M300_PAUSED + - ATLAS_GCP_INSTANCE_M400_PAUSED + - ATLAS_GCP_INSTANCE_M40_LOW_CPU_PAUSED + - ATLAS_GCP_INSTANCE_M50_LOW_CPU_PAUSED + - ATLAS_GCP_INSTANCE_M60_LOW_CPU_PAUSED + - ATLAS_GCP_INSTANCE_M80_LOW_CPU_PAUSED + - ATLAS_GCP_INSTANCE_M200_LOW_CPU_PAUSED + - ATLAS_GCP_INSTANCE_M300_LOW_CPU_PAUSED + - ATLAS_GCP_INSTANCE_M400_LOW_CPU_PAUSED + - ATLAS_GCP_INSTANCE_M600_LOW_CPU_PAUSED + - ATLAS_GCP_DATA_TRANSFER_INTERNET + - ATLAS_GCP_STORAGE_SSD + - ATLAS_GCP_DATA_TRANSFER_INTER_CONNECT + - ATLAS_GCP_DATA_TRANSFER_INTER_ZONE + - ATLAS_GCP_DATA_TRANSFER_INTER_REGION + - ATLAS_GCP_DATA_TRANSFER_GOOGLE + - ATLAS_GCP_BACKUP_SNAPSHOT_STORAGE + - ATLAS_GCP_BACKUP_DOWNLOAD_VM + - ATLAS_GCP_BACKUP_DOWNLOAD_VM_STORAGE + - ATLAS_GCP_PRIVATE_ENDPOINT + - ATLAS_GCP_PRIVATE_ENDPOINT_CAPACITY_UNITS + - ATLAS_GCP_SNAPSHOT_COPY_DATA_TRANSFER + - ATLAS_AZURE_INSTANCE_M10 + - ATLAS_AZURE_INSTANCE_M20 + - ATLAS_AZURE_INSTANCE_M30 + - ATLAS_AZURE_INSTANCE_M40 + - ATLAS_AZURE_INSTANCE_M50 + - ATLAS_AZURE_INSTANCE_M60 + - ATLAS_AZURE_INSTANCE_M80 + - ATLAS_AZURE_INSTANCE_M90 + - ATLAS_AZURE_INSTANCE_M200 + - ATLAS_AZURE_INSTANCE_R40 + - ATLAS_AZURE_INSTANCE_R50 + - ATLAS_AZURE_INSTANCE_R60 + - ATLAS_AZURE_INSTANCE_R80 + - ATLAS_AZURE_INSTANCE_R200 + - ATLAS_AZURE_INSTANCE_R300 + - ATLAS_AZURE_INSTANCE_R400 + - ATLAS_AZURE_INSTANCE_M60_NVME + - ATLAS_AZURE_INSTANCE_M80_NVME + - ATLAS_AZURE_INSTANCE_M200_NVME + - ATLAS_AZURE_INSTANCE_M300_NVME + - ATLAS_AZURE_INSTANCE_M400_NVME + - ATLAS_AZURE_INSTANCE_M600_NVME + - ATLAS_AZURE_INSTANCE_M10_PAUSED + - ATLAS_AZURE_INSTANCE_M20_PAUSED + - ATLAS_AZURE_INSTANCE_M30_PAUSED + - ATLAS_AZURE_INSTANCE_M40_PAUSED + - ATLAS_AZURE_INSTANCE_M50_PAUSED + - ATLAS_AZURE_INSTANCE_M60_PAUSED + - ATLAS_AZURE_INSTANCE_M80_PAUSED + - ATLAS_AZURE_INSTANCE_M90_PAUSED + - ATLAS_AZURE_INSTANCE_M200_PAUSED + - ATLAS_AZURE_INSTANCE_R40_PAUSED + - ATLAS_AZURE_INSTANCE_R50_PAUSED + - ATLAS_AZURE_INSTANCE_R60_PAUSED + - ATLAS_AZURE_INSTANCE_R80_PAUSED + - ATLAS_AZURE_INSTANCE_R200_PAUSED + - ATLAS_AZURE_INSTANCE_R300_PAUSED + - ATLAS_AZURE_INSTANCE_R400_PAUSED + - ATLAS_AZURE_SEARCH_INSTANCE_S20_COMPUTE_LOCALSSD + - ATLAS_AZURE_SEARCH_INSTANCE_S30_COMPUTE_LOCALSSD + - ATLAS_AZURE_SEARCH_INSTANCE_S40_COMPUTE_LOCALSSD + - ATLAS_AZURE_SEARCH_INSTANCE_S50_COMPUTE_LOCALSSD + - ATLAS_AZURE_SEARCH_INSTANCE_S60_COMPUTE_LOCALSSD + - ATLAS_AZURE_SEARCH_INSTANCE_S70_COMPUTE_LOCALSSD + - ATLAS_AZURE_SEARCH_INSTANCE_S80_COMPUTE_LOCALSSD + - ATLAS_AZURE_SEARCH_INSTANCE_S40_MEMORY_LOCALSSD + - ATLAS_AZURE_SEARCH_INSTANCE_S50_MEMORY_LOCALSSD + - ATLAS_AZURE_SEARCH_INSTANCE_S60_MEMORY_LOCALSSD + - ATLAS_AZURE_SEARCH_INSTANCE_S80_MEMORY_LOCALSSD + - ATLAS_AZURE_SEARCH_INSTANCE_S90_MEMORY_LOCALSSD + - ATLAS_AZURE_SEARCH_INSTANCE_S100_MEMORY_LOCALSSD + - ATLAS_AZURE_SEARCH_INSTANCE_S110_MEMORY_LOCALSSD + - ATLAS_AZURE_SEARCH_INSTANCE_S130_MEMORY_LOCALSSD + - ATLAS_AZURE_SEARCH_INSTANCE_S135_MEMORY_LOCALSSD + - ATLAS_AZURE_STORAGE_P2 + - ATLAS_AZURE_STORAGE_P3 + - ATLAS_AZURE_STORAGE_P4 + - ATLAS_AZURE_STORAGE_P6 + - ATLAS_AZURE_STORAGE_P10 + - ATLAS_AZURE_STORAGE_P15 + - ATLAS_AZURE_STORAGE_P20 + - ATLAS_AZURE_STORAGE_P30 + - ATLAS_AZURE_STORAGE_P40 + - ATLAS_AZURE_STORAGE_P50 + - ATLAS_AZURE_DATA_TRANSFER + - ATLAS_AZURE_DATA_TRANSFER_REGIONAL_VNET_IN + - ATLAS_AZURE_DATA_TRANSFER_REGIONAL_VNET_OUT + - ATLAS_AZURE_DATA_TRANSFER_GLOBAL_VNET_IN + - ATLAS_AZURE_DATA_TRANSFER_GLOBAL_VNET_OUT + - ATLAS_AZURE_DATA_TRANSFER_AVAILABILITY_ZONE_IN + - ATLAS_AZURE_DATA_TRANSFER_AVAILABILITY_ZONE_OUT + - ATLAS_AZURE_DATA_TRANSFER_INTER_REGION_INTRA_CONTINENT + - ATLAS_AZURE_DATA_TRANSFER_INTER_REGION_INTER_CONTINENT + - ATLAS_AZURE_BACKUP_SNAPSHOT_STORAGE + - ATLAS_AZURE_BACKUP_DOWNLOAD_VM + - ATLAS_AZURE_BACKUP_DOWNLOAD_VM_STORAGE_P2 + - ATLAS_AZURE_BACKUP_DOWNLOAD_VM_STORAGE_P3 + - ATLAS_AZURE_BACKUP_DOWNLOAD_VM_STORAGE_P4 + - ATLAS_AZURE_BACKUP_DOWNLOAD_VM_STORAGE_P6 + - ATLAS_AZURE_BACKUP_DOWNLOAD_VM_STORAGE_P10 + - ATLAS_AZURE_BACKUP_DOWNLOAD_VM_STORAGE_P15 + - ATLAS_AZURE_BACKUP_DOWNLOAD_VM_STORAGE_P20 + - ATLAS_AZURE_BACKUP_DOWNLOAD_VM_STORAGE_P30 + - ATLAS_AZURE_BACKUP_DOWNLOAD_VM_STORAGE_P40 + - ATLAS_AZURE_BACKUP_DOWNLOAD_VM_STORAGE_P50 + - ATLAS_AZURE_STANDARD_STORAGE + - ATLAS_AZURE_EXTENDED_STANDARD_IOPS + - ATLAS_AZURE_BACKUP_DOWNLOAD_VM_STORAGE + - ATLAS_AZURE_BACKUP_DOWNLOAD_VM_STORAGE_EXTENDED_IOPS + - ATLAS_AZURE_SNAPSHOT_EXPORT_VM_STORAGE + - ATLAS_AZURE_SNAPSHOT_EXPORT_VM_STORAGE_EXTENDED_IOPS + - ATLAS_BI_CONNECTOR + - ATLAS_ADVANCED_SECURITY + - ATLAS_ENTERPRISE_AUDITING + - ATLAS_FREE_SUPPORT + - ATLAS_SUPPORT + - STITCH_DATA_DOWNLOADED_FREE_TIER + - STITCH_DATA_DOWNLOADED + - STITCH_COMPUTE_FREE_TIER + - STITCH_COMPUTE + - CREDIT + - MINIMUM_CHARGE + - CHARTS_DATA_DOWNLOADED_FREE_TIER + - CHARTS_DATA_DOWNLOADED + - ATLAS_DATA_LAKE_AWS_DATA_RETURNED_SAME_REGION + - ATLAS_DATA_LAKE_AWS_DATA_RETURNED_DIFFERENT_REGION + - ATLAS_DATA_LAKE_AWS_DATA_RETURNED_INTERNET + - ATLAS_DATA_LAKE_AWS_DATA_SCANNED + - ATLAS_DATA_LAKE_AWS_DATA_TRANSFERRED_FROM_DIFFERENT_REGION + - ATLAS_NDS_AWS_DATA_LAKE_STORAGE_ACCESS + - ATLAS_NDS_AWS_DATA_LAKE_STORAGE + - ATLAS_DATA_FEDERATION_AZURE_DATA_RETURNED_SAME_REGION + - ATLAS_DATA_FEDERATION_AZURE_DATA_RETURNED_SAME_CONTINENT + - ATLAS_DATA_FEDERATION_AZURE_DATA_RETURNED_DIFFERENT_CONTINENT + - ATLAS_DATA_FEDERATION_AZURE_DATA_RETURNED_INTERNET + - ATLAS_DATA_FEDERATION_GCP_DATA_RETURNED_SAME_REGION + - ATLAS_DATA_FEDERATION_GCP_DATA_RETURNED_DIFFERENT_REGION + - ATLAS_DATA_FEDERATION_GCP_DATA_RETURNED_INTERNET + - ATLAS_DATA_FEDERATION_AZURE_DATA_SCANNED + - ATLAS_NDS_AZURE_DATA_LAKE_STORAGE_ACCESS + - ATLAS_NDS_AZURE_DATA_LAKE_STORAGE + - ATLAS_DATA_FEDERATION_GCP_DATA_SCANNED + - ATLAS_NDS_GCP_DATA_LAKE_STORAGE_ACCESS + - ATLAS_NDS_GCP_DATA_LAKE_STORAGE + - ATLAS_NDS_AWS_OBJECT_STORAGE_ACCESS + - ATLAS_NDS_AWS_COMPRESSED_OBJECT_STORAGE + - ATLAS_NDS_AZURE_OBJECT_STORAGE_ACCESS + - ATLAS_NDS_AZURE_OBJECT_STORAGE + - ATLAS_NDS_AZURE_COMPRESSED_OBJECT_STORAGE + - ATLAS_NDS_GCP_OBJECT_STORAGE_ACCESS + - ATLAS_NDS_GCP_OBJECT_STORAGE + - ATLAS_NDS_GCP_COMPRESSED_OBJECT_STORAGE + - ATLAS_ARCHIVE_ACCESS_PARTITION_LOCATE + - ATLAS_NDS_AWS_PIT_RESTORE_STORAGE_FREE_TIER + - ATLAS_NDS_AWS_PIT_RESTORE_STORAGE + - ATLAS_NDS_GCP_PIT_RESTORE_STORAGE_FREE_TIER + - ATLAS_NDS_GCP_PIT_RESTORE_STORAGE + - ATLAS_NDS_AZURE_PIT_RESTORE_STORAGE_FREE_TIER + - ATLAS_NDS_AZURE_PIT_RESTORE_STORAGE + - ATLAS_NDS_AZURE_PRIVATE_ENDPOINT_CAPACITY_UNITS + - ATLAS_NDS_AWS_OBJECT_STORAGE + - ATLAS_NDS_AWS_SNAPSHOT_EXPORT_UPLOAD + - ATLAS_NDS_AZURE_SNAPSHOT_EXPORT_UPLOAD + - ATLAS_NDS_AZURE_SNAPSHOT_EXPORT_VM + - ATLAS_NDS_AZURE_SNAPSHOT_EXPORT_VM_M40 + - ATLAS_NDS_AZURE_SNAPSHOT_EXPORT_VM_M50 + - ATLAS_NDS_AZURE_SNAPSHOT_EXPORT_VM_M60 + - ATLAS_NDS_AZURE_SNAPSHOT_EXPORT_VM_STORAGE_P2 + - ATLAS_NDS_AZURE_SNAPSHOT_EXPORT_VM_STORAGE_P3 + - ATLAS_NDS_AZURE_SNAPSHOT_EXPORT_VM_STORAGE_P4 + - ATLAS_NDS_AZURE_SNAPSHOT_EXPORT_VM_STORAGE_P6 + - ATLAS_NDS_AZURE_SNAPSHOT_EXPORT_VM_STORAGE_P10 + - ATLAS_NDS_AZURE_SNAPSHOT_EXPORT_VM_STORAGE_P15 + - ATLAS_NDS_AZURE_SNAPSHOT_EXPORT_VM_STORAGE_P20 + - ATLAS_NDS_AZURE_SNAPSHOT_EXPORT_VM_STORAGE_P30 + - ATLAS_NDS_AZURE_SNAPSHOT_EXPORT_VM_STORAGE_P40 + - ATLAS_NDS_AZURE_SNAPSHOT_EXPORT_VM_STORAGE_P50 + - ATLAS_NDS_AWS_SNAPSHOT_EXPORT_VM + - ATLAS_NDS_AWS_SNAPSHOT_EXPORT_VM_M40 + - ATLAS_NDS_AWS_SNAPSHOT_EXPORT_VM_M50 + - ATLAS_NDS_AWS_SNAPSHOT_EXPORT_VM_M60 + - ATLAS_NDS_AWS_SNAPSHOT_EXPORT_VM_STORAGE + - ATLAS_NDS_AWS_SNAPSHOT_EXPORT_VM_STORAGE_IOPS + - ATLAS_NDS_GCP_SNAPSHOT_EXPORT_VM + - ATLAS_NDS_GCP_SNAPSHOT_EXPORT_VM_M40 + - ATLAS_NDS_GCP_SNAPSHOT_EXPORT_VM_M50 + - ATLAS_NDS_GCP_SNAPSHOT_EXPORT_VM_M60 + - ATLAS_NDS_GCP_SNAPSHOT_EXPORT_VM_STORAGE + - ATLAS_NDS_AWS_SERVERLESS_RPU + - ATLAS_NDS_AWS_SERVERLESS_WPU + - ATLAS_NDS_AWS_SERVERLESS_STORAGE + - ATLAS_NDS_AWS_SERVERLESS_CONTINUOUS_BACKUP + - ATLAS_NDS_AWS_SERVERLESS_BACKUP_RESTORE_VM + - ATLAS_NDS_AWS_SERVERLESS_DATA_TRANSFER_PREVIEW + - ATLAS_NDS_AWS_SERVERLESS_DATA_TRANSFER + - ATLAS_NDS_AWS_SERVERLESS_DATA_TRANSFER_REGIONAL + - ATLAS_NDS_AWS_SERVERLESS_DATA_TRANSFER_CROSS_REGION + - ATLAS_NDS_AWS_SERVERLESS_DATA_TRANSFER_INTERNET + - ATLAS_NDS_GCP_SERVERLESS_RPU + - ATLAS_NDS_GCP_SERVERLESS_WPU + - ATLAS_NDS_GCP_SERVERLESS_STORAGE + - ATLAS_NDS_GCP_SERVERLESS_CONTINUOUS_BACKUP + - ATLAS_NDS_GCP_SERVERLESS_BACKUP_RESTORE_VM + - ATLAS_NDS_GCP_SERVERLESS_DATA_TRANSFER_PREVIEW + - ATLAS_NDS_GCP_SERVERLESS_DATA_TRANSFER + - ATLAS_NDS_GCP_SERVERLESS_DATA_TRANSFER_REGIONAL + - ATLAS_NDS_GCP_SERVERLESS_DATA_TRANSFER_CROSS_REGION + - ATLAS_NDS_GCP_SERVERLESS_DATA_TRANSFER_INTERNET + - ATLAS_NDS_AZURE_SERVERLESS_RPU + - ATLAS_NDS_AZURE_SERVERLESS_WPU + - ATLAS_NDS_AZURE_SERVERLESS_STORAGE + - ATLAS_NDS_AZURE_SERVERLESS_CONTINUOUS_BACKUP + - ATLAS_NDS_AZURE_SERVERLESS_BACKUP_RESTORE_VM + - ATLAS_NDS_AZURE_SERVERLESS_DATA_TRANSFER_PREVIEW + - ATLAS_NDS_AZURE_SERVERLESS_DATA_TRANSFER + - ATLAS_NDS_AZURE_SERVERLESS_DATA_TRANSFER_REGIONAL + - ATLAS_NDS_AZURE_SERVERLESS_DATA_TRANSFER_CROSS_REGION + - ATLAS_NDS_AZURE_SERVERLESS_DATA_TRANSFER_INTERNET + - REALM_APP_REQUESTS_FREE_TIER + - REALM_APP_REQUESTS + - REALM_APP_COMPUTE_FREE_TIER + - REALM_APP_COMPUTE + - REALM_APP_SYNC_FREE_TIER + - REALM_APP_SYNC + - REALM_APP_DATA_TRANSFER_FREE_TIER + - REALM_APP_DATA_TRANSFER + - GCP_SNAPSHOT_COPY_DISK + - ATLAS_AWS_STREAM_PROCESSING_INSTANCE_SP10 + - ATLAS_AWS_STREAM_PROCESSING_INSTANCE_SP30 + - ATLAS_AWS_STREAM_PROCESSING_INSTANCE_SP50 + - ATLAS_AZURE_STREAM_PROCESSING_INSTANCE_SP10 + - ATLAS_AZURE_STREAM_PROCESSING_INSTANCE_SP30 + - ATLAS_AZURE_STREAM_PROCESSING_INSTANCE_SP50 + - ATLAS_AWS_STREAM_PROCESSING_DATA_TRANSFER + - ATLAS_AZURE_STREAM_PROCESSING_DATA_TRANSFER + - ATLAS_AWS_STREAM_PROCESSING_VPC_PEERING + - ATLAS_AZURE_STREAM_PROCESSING_PRIVATELINK + - ATLAS_AWS_STREAM_PROCESSING_PRIVATELINK + - ATLAS_FLEX_AWS_100_USAGE_HOURS + - ATLAS_FLEX_AWS_200_USAGE_HOURS + - ATLAS_FLEX_AWS_300_USAGE_HOURS + - ATLAS_FLEX_AWS_400_USAGE_HOURS + - ATLAS_FLEX_AWS_500_USAGE_HOURS + - ATLAS_FLEX_AZURE_100_USAGE_HOURS + - ATLAS_FLEX_AZURE_200_USAGE_HOURS + - ATLAS_FLEX_AZURE_300_USAGE_HOURS + - ATLAS_FLEX_AZURE_400_USAGE_HOURS + - ATLAS_FLEX_AZURE_500_USAGE_HOURS + - ATLAS_FLEX_GCP_100_USAGE_HOURS + - ATLAS_FLEX_GCP_200_USAGE_HOURS + - ATLAS_FLEX_GCP_300_USAGE_HOURS + - ATLAS_FLEX_GCP_400_USAGE_HOURS + - ATLAS_FLEX_GCP_500_USAGE_HOURS + readOnly: true + type: string + startDate: + description: Date and time when MongoDB Cloud began charging for this line item. This parameter expresses its value in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + stitchAppName: + description: Human-readable label that identifies the Atlas App Services application associated with this line item. + externalDocs: + description: Create a new Atlas App Service + url: https://www.mongodb.com/docs/atlas/app-services/manage-apps/create/create-with-ui/ + readOnly: true + type: string + tags: + additionalProperties: + description: A map of key-value pairs corresponding to the tags associated with the line item resource. + items: + description: A map of key-value pairs corresponding to the tags associated with the line item resource. + readOnly: true + type: string + readOnly: true + type: array + description: A map of key-value pairs corresponding to the tags associated with the line item resource. + readOnly: true + type: object + tierLowerBound: + description: |- + Lower bound for usage amount range in current SKU tier. + + **NOTE**: **lineItems[n].tierLowerBound** appears only if your **lineItems[n].sku** is tiered. + format: double + readOnly: true + type: number + tierUpperBound: + description: |- + Upper bound for usage amount range in current SKU tier. + + **NOTE**: **lineItems[n].tierUpperBound** appears only if your **lineItems[n].sku** is tiered. + format: double + readOnly: true + type: number + totalPriceCents: + description: Sum of the cost set for this line item. MongoDB Cloud expresses this value in cents (100ths of one US Dollar) and calculates this value as **unitPriceDollars** × **quantity** × 100. + format: int64 + readOnly: true + type: integer + unit: + description: Element used to express what **quantity** this line item measures. This value can be elements of time, storage capacity, and the like. + readOnly: true + type: string + unitPriceDollars: + description: Value per **unit** for this line item expressed in US Dollars. + format: double + readOnly: true + type: number + title: Line Item + type: object + LegacyAtlasCluster: + description: Group of settings that configure a MongoDB cluster. + properties: + acceptDataRisksAndForceReplicaSetReconfig: + description: If reconfiguration is necessary to regain a primary due to a regional outage, submit this field alongside your topology reconfiguration to request a new regional outage resistant topology. Forced reconfigurations during an outage of the majority of electable nodes carry a risk of data loss if replicated writes (even majority committed writes) have not been replicated to the new primary node. MongoDB Atlas docs contain more information. To proceed with an operation which carries that risk, set **acceptDataRisksAndForceReplicaSetReconfig** to the current date. + externalDocs: + description: Reconfiguring a Replica Set during a regional outage + url: https://dochub.mongodb.org/core/regional-outage-reconfigure-replica-set + format: date-time + type: string + autoScaling: + $ref: '#/components/schemas/ClusterAutoScalingSettings' + backupEnabled: + description: Flag that indicates whether the cluster can perform backups. If set to `true`, the cluster can perform backups. You must set this value to `true` for NVMe clusters. Backup uses Cloud Backups for dedicated clusters and Shared Cluster Backups for tenant clusters. If set to `false`, the cluster doesn't use MongoDB Cloud backups. + type: boolean + biConnector: + $ref: '#/components/schemas/BiConnector' + clusterType: + description: Configuration of nodes that comprise the cluster. + enum: + - REPLICASET + - SHARDED + - GEOSHARDED + type: string + configServerManagementMode: + default: ATLAS_MANAGED + description: |- + Config Server Management Mode for creating or updating a sharded cluster. + + When configured as ATLAS_MANAGED, atlas may automatically switch the cluster's config server type for optimal performance and savings. + + When configured as FIXED_TO_DEDICATED, the cluster will always use a dedicated config server. + enum: + - ATLAS_MANAGED + - FIXED_TO_DEDICATED + externalDocs: + description: MongoDB Sharded Cluster Config Servers + url: https://dochub.mongodb.org/docs/manual/core/sharded-cluster-config-servers + type: string + configServerType: + description: Describes a sharded cluster's config server type. + enum: + - DEDICATED + - EMBEDDED + externalDocs: + description: MongoDB Sharded Cluster Config Servers + url: https://dochub.mongodb.org/docs/manual/core/sharded-cluster-config-servers + readOnly: true + type: string + connectionStrings: + $ref: '#/components/schemas/ClusterConnectionStrings' + createDate: + description: Date and time when MongoDB Cloud created this serverless instance. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC. + format: date-time + readOnly: true + type: string + diskSizeGB: + description: |- + Storage capacity of instance data volumes expressed in gigabytes. Increase this number to add capacity. + + This value is not configurable on M0/M2/M5 clusters. + + MongoDB Cloud requires this parameter if you set **replicationSpecs**. + + If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value. + + Storage charge calculations depend on whether you choose the default value or a custom value. + + The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier. + format: double + maximum: 4096 + minimum: 10 + type: number + diskWarmingMode: + default: FULLY_WARMED + description: Disk warming mode selection. + enum: + - FULLY_WARMED + - VISIBLE_EARLIER + externalDocs: + description: Reduce Secondary Disk Warming Impact + url: https://docs.atlas.mongodb.com/reference/replica-set-tags/#reduce-secondary-disk-warming-impact + type: string + encryptionAtRestProvider: + description: Cloud service provider that manages your customer keys to provide an additional layer of Encryption at Rest for the cluster. + enum: + - NONE + - AWS + - AZURE + - GCP + externalDocs: + description: Encryption at Rest using Customer Key Management + url: https://www.mongodb.com/docs/atlas/security-kms-encryption/ + type: string + featureCompatibilityVersion: + description: Feature compatibility version of the cluster. + readOnly: true + type: string + featureCompatibilityVersionExpirationDate: + description: Feature compatibility version expiration date. + format: date-time + readOnly: true + type: string + globalClusterSelfManagedSharding: + description: |- + Set this field to configure the Sharding Management Mode when creating a new Global Cluster. + + When set to false, the management mode is set to Atlas-Managed Sharding. This mode fully manages the sharding of your Global Cluster and is built to provide a seamless deployment experience. + + When set to true, the management mode is set to Self-Managed Sharding. This mode leaves the management of shards in your hands and is built to provide an advanced and flexible deployment experience. + + This setting cannot be changed once the cluster is deployed. + externalDocs: + description: Creating a Global Cluster + url: https://dochub.mongodb.org/core/global-cluster-management + type: boolean + groupId: + description: Unique 24-hexadecimal character string that identifies the project. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + id: + description: Unique 24-hexadecimal digit string that identifies the cluster. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + labels: + deprecated: true + description: |- + Collection of key-value pairs between 1 to 255 characters in length that tag and categorize the cluster. The MongoDB Cloud console doesn't display your labels. + + Cluster labels are deprecated and will be removed in a future release. We strongly recommend that you use [resource tags](https://dochub.mongodb.org/core/add-cluster-tag-atlas) instead. + items: + $ref: '#/components/schemas/ComponentLabel' + type: array + 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 + mongoDBEmployeeAccessGrant: + $ref: '#/components/schemas/EmployeeAccessGrantView' + mongoDBMajorVersion: + description: |- + MongoDB major version of the cluster. + + On creation: Choose from the available versions of MongoDB, or leave unspecified for the current recommended default in the MongoDB Cloud platform. The recommended version is a recent Long Term Support version. The default is not guaranteed to be the most recently released version throughout the entire release cycle. For versions available in a specific project, see the linked documentation or use the API endpoint for [project LTS versions endpoint](#tag/Projects/operation/getProjectLTSVersions). + + On update: Increase version only by 1 major version at a time. If the cluster is pinned to a MongoDB feature compatibility version exactly one major version below the current MongoDB version, the MongoDB version can be downgraded to the previous major version. + example: '5.0' + externalDocs: + description: Available MongoDB Versions in Atlas + url: https://www.mongodb.com/docs/atlas/reference/faq/database/#which-versions-of-mongodb-do-service-clusters-use- + type: string + mongoDBVersion: + description: Version of MongoDB that the cluster runs. + example: 5.0.25 + pattern: ([\d]+\.[\d]+\.[\d]+) + type: string + mongoURI: + description: Base connection string that you can use to connect to the cluster. MongoDB Cloud displays the string only after the cluster starts, not while it builds the cluster. + externalDocs: + description: Connection string URI format. + url: https://docs.mongodb.com/manual/reference/connection-string/ + readOnly: true + type: string + mongoURIUpdated: + description: Date and time when someone last updated the connection string. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC. + format: date-time + readOnly: true + type: string + mongoURIWithOptions: + description: Connection string that you can use to connect to the cluster including the `replicaSet`, `ssl`, and `authSource` query parameters with values appropriate for the cluster. You may need to add MongoDB database users. The response returns this parameter once the cluster can receive requests, not while it builds the cluster. + externalDocs: + description: Connection string URI format. + url: https://docs.mongodb.com/manual/reference/connection-string/ + readOnly: true + type: string + name: + description: Human-readable label that identifies the cluster. + maxLength: 64 + minLength: 1 + pattern: ^([a-zA-Z0-9][a-zA-Z0-9-]*)?[a-zA-Z0-9]+$ + type: string + numShards: + default: 1 + description: Number of shards up to 50 to deploy for a sharded cluster. The resource returns `1` to indicate a replica set and values of `2` and higher to indicate a sharded cluster. The returned value equals the number of shards in the cluster. + externalDocs: + description: Sharding + url: https://docs.mongodb.com/manual/sharding/ + format: int32 + maximum: 50 + minimum: 1 + type: integer + paused: + description: Flag that indicates whether the cluster is paused. + type: boolean + pitEnabled: + description: Flag that indicates whether the cluster uses continuous cloud backups. + externalDocs: + description: Continuous Cloud Backups + url: https://docs.atlas.mongodb.com/backup/cloud-backup/overview/ + type: boolean + providerBackupEnabled: + description: Flag that indicates whether the M10 or higher cluster can perform Cloud Backups. If set to `true`, the cluster can perform backups. If this and **backupEnabled** are set to `false`, the cluster doesn't use MongoDB Cloud backups. + type: boolean + providerSettings: + $ref: '#/components/schemas/ClusterProviderSettings' + replicaSetScalingStrategy: + default: WORKLOAD_TYPE + description: |- + Set this field to configure the replica set scaling mode for your cluster. + + By default, Atlas scales under WORKLOAD_TYPE. This mode allows Atlas to scale your analytics nodes in parallel to your operational nodes. + + When configured as SEQUENTIAL, Atlas scales all nodes sequentially. This mode is intended for steady-state workloads and applications performing latency-sensitive secondary reads. + + When configured as NODE_TYPE, Atlas scales your electable nodes in parallel with your read-only and analytics nodes. This mode is intended for large, dynamic workloads requiring frequent and timely cluster tier scaling. This is the fastest scaling strategy, but it might impact latency of workloads when performing extensive secondary reads. + enum: + - SEQUENTIAL + - WORKLOAD_TYPE + - NODE_TYPE + externalDocs: + description: Modify the Replica Set Scaling Mode + url: https://dochub.mongodb.org/core/scale-nodes + type: string + replicationFactor: + default: 3 + deprecated: true + description: Number of members that belong to the replica set. Each member retains a copy of your databases, providing high availability and data redundancy. Use **replicationSpecs** instead. + enum: + - 3 + - 5 + - 7 + format: int32 + type: integer + replicationSpec: + additionalProperties: + $ref: '#/components/schemas/RegionSpec' + description: Physical location where MongoDB Cloud provisions cluster nodes. + title: Region Configuration + type: object + replicationSpecs: + description: |- + List of settings that configure your cluster regions. + + - For Global Clusters, each object in the array represents one zone where MongoDB Cloud deploys your clusters nodes. + - For non-Global sharded clusters and replica sets, the single object represents where MongoDB Cloud deploys your clusters nodes. + items: + $ref: '#/components/schemas/LegacyReplicationSpec' + type: array + rootCertType: + default: ISRGROOTX1 + description: Root Certificate Authority that MongoDB Atlas clusters uses. MongoDB Cloud supports Internet Security Research Group. + enum: + - ISRGROOTX1 + type: string + srvAddress: + description: Connection string that you can use to connect to the cluster. The `+srv` modifier forces the connection to use Transport Layer Security (TLS). The `mongoURI` parameter lists additional options. + externalDocs: + description: Connection string URI format. + url: https://docs.mongodb.com/manual/reference/connection-string/ + readOnly: true + type: string + stateName: + description: Human-readable label that indicates the current operating condition of the cluster. + enum: + - IDLE + - CREATING + - UPDATING + - DELETING + - REPAIRING + readOnly: true + type: string + tags: + description: List that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. + externalDocs: + description: Resource Tags + url: https://dochub.mongodb.org/core/add-cluster-tag-atlas + items: + $ref: '#/components/schemas/ResourceTag' + type: array + terminationProtectionEnabled: + default: false + description: Flag that indicates whether termination protection is enabled on the cluster. If set to `true`, MongoDB Cloud won't delete the cluster. If set to `false`, MongoDB Cloud will delete the cluster. + type: boolean + versionReleaseSystem: + default: LTS + description: Method by which the cluster maintains the MongoDB versions. If value is `CONTINUOUS`, you must not specify **mongoDBMajorVersion**. + enum: + - LTS + - CONTINUOUS + type: string + title: Cluster Description + type: object + LegacyReplicationSpec: + properties: + id: + description: |- + Unique 24-hexadecimal digit string that identifies the replication object for a zone in a Global Cluster. + + - If you include existing zones in the request, you must specify this parameter. + + - If you add a new zone to an existing Global Cluster, you may specify this parameter. The request deletes any existing zones in a Global Cluster that you exclude from the request. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + type: string + numShards: + default: 1 + description: |- + Positive integer that specifies the number of shards to deploy in each specified zone If you set this value to `1` and **clusterType** is `SHARDED`, MongoDB Cloud deploys a single-shard sharded cluster. Don't create a sharded cluster with a single shard for production environments. Single-shard sharded clusters don't provide the same benefits as multi-shard configurations. + + If you are upgrading a replica set to a sharded cluster, you cannot increase the number of shards in the same update request. You should wait until after the cluster has completed upgrading to sharded and you have reconnected all application clients to the MongoDB router before adding additional shards. Otherwise, your data might become inconsistent once MongoDB Cloud begins distributing data across shards. + format: int32 + type: integer + regionsConfig: + additionalProperties: + $ref: '#/components/schemas/RegionSpec' + description: Physical location where MongoDB Cloud provisions cluster nodes. + title: Region Configuration + type: object + zoneName: + description: Human-readable label that identifies the zone in a Global Cluster. Provide this value only if **clusterType** is `GEOSHARDED`. + type: string + type: object + Link: + properties: + href: + description: Uniform Resource Locator (URL) that points another API resource to which this response has some relationship. This URL often begins with `https://cloud.mongodb.com/api/atlas`. + example: https://cloud.mongodb.com/api/atlas + type: string + rel: + description: Uniform Resource Locator (URL) that defines the semantic relationship between this resource and another API resource. This URL often begins with `https://cloud.mongodb.com/api/atlas`. + example: self + type: string + type: object + MonthlyScheduleView: + allOf: + - $ref: '#/components/schemas/OnlineArchiveSchedule' + - properties: + dayOfMonth: + description: Day of the month when the scheduled archive starts. + format: int32 + maximum: 31 + minimum: 1 + type: integer + endHour: + description: Hour of the day when the scheduled window to run one online archive ends. + format: int32 + maximum: 23 + minimum: 0 + type: integer + endMinute: + description: Minute of the hour when the scheduled window to run one online archive ends. + format: int32 + maximum: 59 + minimum: 0 + type: integer + startHour: + description: Hour of the day when the when the scheduled window to run one online archive starts. + format: int32 + maximum: 23 + minimum: 0 + type: integer + startMinute: + description: Minute of the hour when the scheduled window to run one online archive starts. + format: int32 + maximum: 59 + minimum: 0 + type: integer + type: object + required: + - type + type: object + OnDemandCpsSnapshotSource: + allOf: + - $ref: '#/components/schemas/IngestionSource' + - properties: + clusterName: + description: Human-readable name that identifies the cluster. + type: string + collectionName: + description: Human-readable name that identifies the collection. + type: string + databaseName: + description: Human-readable name that identifies the database. + type: string + groupId: + description: Unique 24-hexadecimal character string that identifies the project. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + type: object + description: On-Demand Cloud Provider Snapshots as Source for a Data Lake Pipeline. + title: On-Demand Cloud Provider Snapshot Source + type: object + OnlineArchiveSchedule: + description: Regular frequency and duration when archiving process occurs. + discriminator: + mapping: + DAILY: '#/components/schemas/DailyScheduleView' + DEFAULT: '#/components/schemas/DefaultScheduleView' + MONTHLY: '#/components/schemas/MonthlyScheduleView' + WEEKLY: '#/components/schemas/WeeklyScheduleView' + propertyName: type + oneOf: + - $ref: '#/components/schemas/DefaultScheduleView' + - $ref: '#/components/schemas/DailyScheduleView' + - $ref: '#/components/schemas/WeeklyScheduleView' + - $ref: '#/components/schemas/MonthlyScheduleView' + properties: + type: + description: Type of schedule. + enum: + - DEFAULT + - DAILY + - WEEKLY + - MONTHLY + type: string + required: + - type + title: Online Archive Schedule + type: object + OrgActiveUserResponse: + allOf: + - $ref: '#/components/schemas/OrgUserResponse' + - properties: + country: + description: Two alphabet characters that identifies MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format. + example: US + pattern: ^([A-Z]{2})$ + readOnly: true + type: string + createdAt: + description: Date and time when MongoDB Cloud created the current account. This value is in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + firstName: + description: First or given name that belongs to the MongoDB Cloud user. + example: John + readOnly: true + type: string + lastAuth: + description: Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC. + format: date-time + readOnly: true + type: string + lastName: + description: Last name, family name, or surname that belongs to the MongoDB Cloud user. + example: Doe + readOnly: true + type: string + mobileNumber: + description: Mobile phone number that belongs to the MongoDB Cloud user. + pattern: (?:(?:\\+?1\\s*(?:[.-]\\s*)?)?(?:(\\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\\s*)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\\s*(?:[.-]\\s*)?)([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\\s*(?:[.-]\\s*)?([0-9]{4})$ + readOnly: true + type: string + type: object + required: + - createdAt + - firstName + - id + - lastName + - orgMembershipStatus + - roles + - username + type: object + OrgPendingUserResponse: + allOf: + - $ref: '#/components/schemas/OrgUserResponse' + - properties: + invitationCreatedAt: + description: Date and time when MongoDB Cloud sent the invitation. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC. + format: date-time + readOnly: true + type: string + invitationExpiresAt: + description: Date and time when the invitation from MongoDB Cloud expires. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC. + format: date-time + readOnly: true + type: string + inviterUsername: + description: Username of the MongoDB Cloud user who sent the invitation to join the organization. + format: email + readOnly: true + type: string + type: object + required: + - id + - invitationCreatedAt + - invitationExpiresAt + - inviterUsername + - orgMembershipStatus + - roles + - username + type: object + OrgUserResponse: + discriminator: + mapping: + ACTIVE: '#/components/schemas/OrgActiveUserResponse' + PENDING: '#/components/schemas/OrgPendingUserResponse' + propertyName: orgMembershipStatus + oneOf: + - $ref: '#/components/schemas/OrgPendingUserResponse' + - $ref: '#/components/schemas/OrgActiveUserResponse' + properties: + id: + description: Unique 24-hexadecimal digit string that identifies the MongoDB Cloud user. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + orgMembershipStatus: + description: String enum that indicates whether the MongoDB Cloud user has a pending invitation to join the organization or they are already active in the organization. + enum: + - PENDING + - ACTIVE + readOnly: true + type: string + roles: + $ref: '#/components/schemas/OrgUserRolesResponse' + teamIds: + description: List of unique 24-hexadecimal digit strings that identifies the teams to which this MongoDB Cloud user belongs. + items: + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + type: string + readOnly: true + type: array + uniqueItems: true + username: + description: Email address that represents the username of the MongoDB Cloud user. + format: email + readOnly: true + type: string + required: + - id + - orgMembershipStatus + - roles + - username + type: object + OrgUserRolesResponse: + description: Organization and project level roles assigned to one MongoDB Cloud user within one organization. + properties: + groupRoleAssignments: + description: List of project level role assignments assigned to the MongoDB Cloud user. + items: + $ref: '#/components/schemas/GroupRoleAssignment' + type: array + orgRoles: + description: One or more organization level roles assigned to the MongoDB Cloud user. + items: + enum: + - ORG_OWNER + - ORG_GROUP_CREATOR + - ORG_BILLING_ADMIN + - ORG_BILLING_READ_ONLY + - ORG_READ_ONLY + - ORG_MEMBER + type: string + type: array + uniqueItems: true + readOnly: true + type: object + PeriodicCpsSnapshotSource: + allOf: + - $ref: '#/components/schemas/IngestionSource' + - properties: + clusterName: + description: Human-readable name that identifies the cluster. + type: string + collectionName: + description: Human-readable name that identifies the collection. + type: string + databaseName: + description: Human-readable name that identifies the database. + type: string + groupId: + description: Unique 24-hexadecimal character string that identifies the project. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + policyItemId: + description: Unique 24-hexadecimal character string that identifies a policy item. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + type: string + type: object + description: Scheduled Cloud Provider Snapshot as Source for a Data Lake Pipeline. + title: Periodic Cloud Provider Snapshot Source + type: object + RegionSpec: + description: Physical location where MongoDB Cloud provisions cluster nodes. + properties: + analyticsNodes: + description: Number of analytics nodes in the region. Analytics nodes handle analytic data such as reporting queries from MongoDB Connector for Business Intelligence on MongoDB Cloud. Analytics nodes are read-only, and can never become the primary. Use **replicationSpecs[n].{region}.analyticsNodes** instead. + format: int32 + type: integer + electableNodes: + description: Number of electable nodes to deploy in the specified region. Electable nodes can become the primary and can facilitate local reads. Use **replicationSpecs[n].{region}.electableNodes** instead. + enum: + - 0 + - 3 + - 5 + - 7 + format: int32 + type: integer + priority: + description: Number that indicates the election priority of the region. To identify the Preferred Region of the cluster, set this parameter to `7`. The primary node runs in the **Preferred Region**. To identify a read-only region, set this parameter to `0`. + format: int32 + maximum: 7 + minimum: 0 + type: integer + readOnlyNodes: + description: Number of read-only nodes in the region. Read-only nodes can never become the primary member, but can facilitate local reads. Use **replicationSpecs[n].{region}.readOnlyNodes** instead. + format: int32 + type: integer + title: Region Configuration + type: object + ReplicationSpec: + description: Details that explain how MongoDB Cloud replicates data on the specified MongoDB database. + properties: + id: + description: Unique 24-hexadecimal digit string that identifies the replication object for a zone in a Multi-Cloud Cluster. If you include existing zones in the request, you must specify this parameter. If you add a new zone to an existing Multi-Cloud Cluster, you may specify this parameter. The request deletes any existing zones in the Multi-Cloud Cluster that you exclude from the request. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + numShards: + description: |- + Positive integer that specifies the number of shards to deploy in each specified zone. If you set this value to `1` and **clusterType** is `SHARDED`, MongoDB Cloud deploys a single-shard sharded cluster. Don't create a sharded cluster with a single shard for production environments. Single-shard sharded clusters don't provide the same benefits as multi-shard configurations. + + If you are upgrading a replica set to a sharded cluster, you cannot increase the number of shards in the same update request. You should wait until after the cluster has completed upgrading to sharded and you have reconnected all application clients to the MongoDB router before adding additional shards. Otherwise, your data might become inconsistent once MongoDB Cloud begins distributing data across shards. + format: int32 + minimum: 1 + type: integer + regionConfigs: + description: |- + Hardware specifications for nodes set for a given region. Each **regionConfigs** object describes the region's priority in elections and the number and type of MongoDB nodes that MongoDB Cloud deploys to the region. Each **regionConfigs** object must have either an **analyticsSpecs** object, **electableSpecs** object, or **readOnlySpecs** object. Tenant clusters only require **electableSpecs. Dedicated** clusters can specify any of these specifications, but must have at least one **electableSpecs** object within a **replicationSpec**. Every hardware specification must use the same **instanceSize**. + + **Example:** + + If you set `"replicationSpecs[n].regionConfigs[m].analyticsSpecs.instanceSize" : "M30"`, set `"replicationSpecs[n].regionConfigs[m].electableSpecs.instanceSize" : `"M30"` if you have electable nodes and `"replicationSpecs[n].regionConfigs[m].readOnlySpecs.instanceSize" : `"M30"` if you have read-only nodes. + items: + $ref: '#/components/schemas/CloudRegionConfig' + type: array + zoneName: + description: 'Human-readable label that identifies the zone in a Global Cluster. Provide this value only if `"clusterType" : "GEOSHARDED"`.' + type: string + title: Replication Specifications + type: object + ReplicationSpec20240805: + description: Details that explain how MongoDB Cloud replicates data on the specified MongoDB database. + properties: + id: + description: Unique 24-hexadecimal digit string that identifies the replication object for a shard in a Cluster. If you include existing shard replication configurations in the request, you must specify this parameter. If you add a new shard to an existing Cluster, you may specify this parameter. The request deletes any existing shards in the Cluster that you exclude from the request. This corresponds to Shard ID displayed in the UI. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + regionConfigs: + description: |- + Hardware specifications for nodes set for a given region. Each **regionConfigs** object describes the region's priority in elections and the number and type of MongoDB nodes that MongoDB Cloud deploys to the region. Each **regionConfigs** object must have either an **analyticsSpecs** object, **electableSpecs** object, or **readOnlySpecs** object. Tenant clusters only require **electableSpecs. Dedicated** clusters can specify any of these specifications, but must have at least one **electableSpecs** object within a **replicationSpec**. + + **Example:** + + If you set `"replicationSpecs[n].regionConfigs[m].analyticsSpecs.instanceSize" : "M30"`, set `"replicationSpecs[n].regionConfigs[m].electableSpecs.instanceSize" : `"M30"` if you have electable nodes and `"replicationSpecs[n].regionConfigs[m].readOnlySpecs.instanceSize" : `"M30"` if you have read-only nodes. + items: + $ref: '#/components/schemas/CloudRegionConfig20240805' + type: array + zoneId: + description: Unique 24-hexadecimal digit string that identifies the zone in a Global Cluster. This value can be used to configure Global Cluster backup policies. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + readOnly: true + type: string + zoneName: + description: 'Human-readable label that describes the zone this shard belongs to in a Global Cluster. Provide this value only if "clusterType" : "GEOSHARDED" but not "selfManagedSharding" : true.' + type: string + title: Replication Specifications + type: object + ResourceTag: + description: 'Key-value pair that tags and categorizes a MongoDB Cloud organization, project, or cluster. For example, `environment : production`.' + properties: + key: + description: 'Constant that defines the set of the tag. For example, `environment` in the `environment : production` tag.' + maxLength: 255 + minLength: 1 + type: string + value: + description: 'Variable that belongs to the set of the tag. For example, `production` in the `environment : production` tag.' + maxLength: 255 + minLength: 1 + type: string + required: + - key + - value + title: Resource Tag + type: object + SearchHostStatusDetail: + properties: + hostname: + description: Hostname that corresponds to the status detail. + type: string + mainIndex: + $ref: '#/components/schemas/SearchMainIndexStatusDetail' + queryable: + description: Flag that indicates whether the index is queryable on the host. + type: boolean + stagedIndex: + $ref: '#/components/schemas/SearchStagedIndexStatusDetail' + status: + description: | + Condition of the search index when you made this request. + + | Status | Index Condition | + |---|---| + | DELETING | The index is being deleted. | + | FAILED | The index build failed. Indexes can enter the FAILED state due to an invalid index definition. | + | STALE | The index is queryable but has stopped replicating data from the indexed collection. Searches on the index may return out-of-date data. | + | PENDING | Atlas has not yet started building the index. | + | BUILDING | Atlas is building or re-building the index after an edit. | + | READY | The index is ready and can support queries. | + enum: + - DELETING + - FAILED + - STALE + - PENDING + - BUILDING + - READY + - DOES_NOT_EXIST + type: string + title: Search Host Status Detail + type: object + SearchIndex: + allOf: + - $ref: '#/components/schemas/ClusterSearchIndex' + - properties: + analyzer: + default: lucene.standard + description: |- + 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. + enum: + - lucene.standard + - lucene.simple + - lucene.whitespace + - lucene.keyword + - lucene.arabic + - lucene.armenian + - lucene.basque + - lucene.bengali + - lucene.brazilian + - lucene.bulgarian + - lucene.catalan + - lucene.chinese + - lucene.cjk + - lucene.czech + - lucene.danish + - lucene.dutch + - lucene.english + - lucene.finnish + - lucene.french + - lucene.galician + - lucene.german + - lucene.greek + - lucene.hindi + - lucene.hungarian + - lucene.indonesian + - lucene.irish + - lucene.italian + - lucene.japanese + - lucene.korean + - lucene.kuromoji + - lucene.latvian + - lucene.lithuanian + - lucene.morfologik + - lucene.nori + - lucene.norwegian + - lucene.persian + - lucene.portuguese + - lucene.romanian + - lucene.russian + - lucene.smartcn + - lucene.sorani + - lucene.spanish + - lucene.swedish + - lucene.thai + - lucene.turkish + - lucene.ukrainian + externalDocs: + description: Atlas Search Analyzers + url: https://dochub.mongodb.org/core/analyzers--fts + type: string + analyzers: + description: List of user-defined methods to convert database field text into searchable words. + externalDocs: + description: Custom Atlas Search Analyzers + url: https://dochub.mongodb.org/core/custom-fts + items: + $ref: '#/components/schemas/ApiAtlasFTSAnalyzersViewManual' + type: array + mappings: + $ref: '#/components/schemas/ApiAtlasFTSMappingsViewManual' + searchAnalyzer: + default: lucene.standard + description: Method applied to identify words when searching this index. + enum: + - lucene.standard + - lucene.simple + - lucene.whitespace + - lucene.keyword + - lucene.arabic + - lucene.armenian + - lucene.basque + - lucene.bengali + - lucene.brazilian + - lucene.bulgarian + - lucene.catalan + - lucene.chinese + - lucene.cjk + - lucene.czech + - lucene.danish + - lucene.dutch + - lucene.english + - lucene.finnish + - lucene.french + - lucene.galician + - lucene.german + - lucene.greek + - lucene.hindi + - lucene.hungarian + - lucene.indonesian + - lucene.irish + - lucene.italian + - lucene.japanese + - lucene.korean + - lucene.kuromoji + - lucene.latvian + - lucene.lithuanian + - lucene.morfologik + - lucene.nori + - lucene.norwegian + - lucene.persian + - lucene.portuguese + - lucene.romanian + - lucene.russian + - lucene.smartcn + - lucene.sorani + - lucene.spanish + - lucene.swedish + - lucene.thai + - 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: + description: Synonym Mapping + url: https://dochub.mongodb.org/core/fts-synonym-mappings + items: + $ref: '#/components/schemas/SearchSynonymMappingDefinition' + type: array + type: object + required: + - collectionName + - database + - name + type: object + SearchIndexCreateRequest: + discriminator: + mapping: + search: '#/components/schemas/TextSearchIndexCreateRequest' + vectorSearch: '#/components/schemas/VectorSearchIndexCreateRequest' + propertyName: type + properties: + collectionName: + description: Label that identifies the collection to create an Atlas Search index in. + type: string + database: + description: Label that identifies the database that contains the collection to create an Atlas Search index in. + type: string + name: + description: Label that identifies this index. Within each namespace, names of all indexes in the namespace must be unique. + type: string + type: + description: Type of the index. The default type is search. + enum: + - search + - vectorSearch + type: string + required: + - collectionName + - database + - name + type: object + SearchIndexDefinition: + description: The search index definition set by the user. + title: Search Index Definition + type: object + SearchIndexDefinitionVersion: + description: Object which includes the version number of the index definition and the time that the index definition was created. + properties: + createdAt: + description: The time at which this index definition was created. + format: date-time + type: string + version: + description: The version number associated with this index definition when it was created. + format: int64 + type: integer + title: Search Index Definition Version + type: object + SearchIndexResponse: + discriminator: + mapping: + search: '#/components/schemas/TextSearchIndexResponse' + vectorSearch: '#/components/schemas/VectorSearchIndexResponse' + propertyName: type + properties: + collectionName: + description: Label that identifies the collection that contains one or more Atlas Search indexes. + type: string + database: + description: Label that identifies the database that contains the collection with one or more Atlas Search indexes. + type: string + indexID: + description: Unique 24-hexadecimal digit string that identifies this Atlas Search index. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + type: string + latestDefinition: + $ref: '#/components/schemas/SearchIndexDefinition' + latestDefinitionVersion: + $ref: '#/components/schemas/SearchIndexDefinitionVersion' + name: + description: Label that identifies this index. Within each namespace, the names of all indexes must be unique. + type: string + queryable: + description: Flag that indicates whether the index is queryable on all hosts. + type: boolean + status: + description: | + Condition of the search index when you made this request. + + | Status | Index Condition | + |---|---| + | DELETING | The index is being deleted. | + | FAILED | The index build failed. Indexes can enter the FAILED state due to an invalid index definition. | + | STALE | The index is queryable but has stopped replicating data from the indexed collection. Searches on the index may return out-of-date data. | + | PENDING | Atlas has not yet started building the index. | + | BUILDING | Atlas is building or re-building the index after an edit. | + | READY | The index is ready and can support queries. | + enum: + - DELETING + - FAILED + - STALE + - PENDING + - BUILDING + - READY + - DOES_NOT_EXIST + type: string + statusDetail: + description: List of documents detailing index status on each host. + items: + $ref: '#/components/schemas/SearchHostStatusDetail' + type: array + type: + description: Type of the index. The default type is search. + enum: + - search + - vectorSearch + type: string + title: Search Index Response + type: object + SearchMainIndexStatusDetail: + description: Contains status information about the active index. + properties: + definition: + $ref: '#/components/schemas/SearchIndexDefinition' + definitionVersion: + $ref: '#/components/schemas/SearchIndexDefinitionVersion' + message: + description: Optional message describing an error. + type: string + queryable: + description: Flag that indicates whether the index generation is queryable on the host. + type: boolean + status: + description: | + Condition of the search index when you made this request. + + | Status | Index Condition | + |---|---| + | DELETING | The index is being deleted. | + | FAILED | The index build failed. Indexes can enter the FAILED state due to an invalid index definition. | + | STALE | The index is queryable but has stopped replicating data from the indexed collection. Searches on the index may return out-of-date data. | + | PENDING | Atlas has not yet started building the index. | + | BUILDING | Atlas is building or re-building the index after an edit. | + | READY | The index is ready and can support queries. | + enum: + - DELETING + - FAILED + - STALE + - PENDING + - BUILDING + - READY + - DOES_NOT_EXIST + type: string + title: Search Main Index Status Detail + type: object + SearchMappings: + description: Index specifications for the collection's fields. + properties: + dynamic: + description: Flag that indicates whether the index uses dynamic or static mappings. Required if **mappings.fields** is omitted. + externalDocs: + description: Dynamic or Static Mappings + url: https://dochub.mongodb.org/core/field-mapping-definition-fts#static-and-dynamic-mappings + type: boolean + fields: + additionalProperties: + description: One or more field specifications for the Atlas Search index. Required if **mappings.dynamic** is omitted or set to **false**. + externalDocs: + description: Atlas Search Index + url: https://dochub.mongodb.org/core/index-definitions-fts + type: object + x-additionalPropertiesName: Field Name + description: One or more field specifications for the Atlas Search index. Required if **mappings.dynamic** is omitted or set to **false**. + externalDocs: + description: Atlas Search Index + url: https://dochub.mongodb.org/core/index-definitions-fts + type: object + x-additionalPropertiesName: Field Name + title: Mappings + type: object + SearchStagedIndexStatusDetail: + description: Contains status information about an index building in the background. + properties: + definition: + $ref: '#/components/schemas/SearchIndexDefinition' + definitionVersion: + $ref: '#/components/schemas/SearchIndexDefinitionVersion' + message: + description: Optional message describing an error. + type: string + queryable: + description: Flag that indicates whether the index generation is queryable on the host. + type: boolean + status: + description: | + Condition of the search index when you made this request. + + | Status | Index Condition | + |---|---| + | DELETING | The index is being deleted. | + | FAILED | The index build failed. Indexes can enter the FAILED state due to an invalid index definition. | + | STALE | The index is queryable but has stopped replicating data from the indexed collection. Searches on the index may return out-of-date data. | + | PENDING | Atlas has not yet started building the index. | + | BUILDING | Atlas is building or re-building the index after an edit. | + | READY | The index is ready and can support queries. | + enum: + - DELETING + - FAILED + - STALE + - PENDING + - BUILDING + - READY + - DOES_NOT_EXIST + type: string + title: Search Staged Index Status Detail + type: object + SearchSynonymMappingDefinition: + description: Synonyms used for this full text index. + properties: + analyzer: + description: Specific pre-defined method chosen to apply to the synonyms to be searched. + enum: + - lucene.standard + - lucene.simple + - lucene.whitespace + - lucene.keyword + - lucene.arabic + - lucene.armenian + - lucene.basque + - lucene.bengali + - lucene.brazilian + - lucene.bulgarian + - lucene.catalan + - lucene.chinese + - lucene.cjk + - lucene.czech + - lucene.danish + - lucene.dutch + - lucene.english + - lucene.finnish + - lucene.french + - lucene.galician + - lucene.german + - lucene.greek + - lucene.hindi + - lucene.hungarian + - lucene.indonesian + - lucene.irish + - lucene.italian + - lucene.japanese + - lucene.korean + - lucene.kuromoji + - lucene.latvian + - lucene.lithuanian + - lucene.morfologik + - lucene.nori + - lucene.norwegian + - lucene.persian + - lucene.portuguese + - lucene.romanian + - lucene.russian + - lucene.smartcn + - lucene.sorani + - lucene.spanish + - lucene.swedish + - lucene.thai + - lucene.turkish + - lucene.ukrainian + type: string + name: + description: Label that identifies the synonym definition. Each **synonym.name** must be unique within the same index definition. + type: string + source: + $ref: '#/components/schemas/SynonymSource' + required: + - analyzer + - name + - source + title: Synonym Mapping Definition + type: object + ServerlessAWSTenantEndpointUpdate: + allOf: + - $ref: '#/components/schemas/ServerlessTenantEndpointUpdate' + - properties: + cloudProviderEndpointId: + description: Unique string that identifies the private endpoint's network interface. + pattern: ^vpce-[0-9a-f]{17}$ + type: string + writeOnly: true + type: object + description: Updates to a serverless AWS tenant endpoint. + required: + - providerName + title: AWS + type: object + ServerlessAzureTenantEndpointUpdate: + allOf: + - $ref: '#/components/schemas/ServerlessTenantEndpointUpdate' + - properties: + cloudProviderEndpointId: + description: Unique string that identifies the Azure private endpoint's network interface for this private endpoint service. + pattern: ^/subscriptions/[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}/resource[gG]roups/private[Ll]ink/providers/Microsoft\.Network/privateEndpoints/[-\w._()]+$ + type: string + writeOnly: true + privateEndpointIpAddress: + description: IPv4 address of the private endpoint in your Azure VNet that someone added to this private endpoint service. + pattern: ^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}|([0-9a-f]{1,4}:){7}[0-9a-f]{1,4}$ + type: string + writeOnly: true + type: object + description: Updates to a serverless Azure tenant endpoint. + required: + - providerName + title: AZURE + type: object + ServerlessTenantEndpointUpdate: + description: Update view for a serverless tenant endpoint. + discriminator: + mapping: + AWS: '#/components/schemas/ServerlessAWSTenantEndpointUpdate' + AZURE: '#/components/schemas/ServerlessAzureTenantEndpointUpdate' + propertyName: providerName + properties: + comment: + description: Human-readable comment associated with the private endpoint. + maxLength: 80 + type: string + writeOnly: true + providerName: + description: Human-readable label that identifies the cloud provider of the tenant endpoint. + enum: + - AWS + - AZURE + type: string + writeOnly: true + required: + - providerName + type: object + StreamsClusterConnection: + allOf: + - $ref: '#/components/schemas/StreamsConnection' + - properties: + clusterName: + description: Name of the cluster configured for this connection. + type: string + dbRoleToExecute: + $ref: '#/components/schemas/DBRoleToExecute' + type: object + type: object + StreamsConnection: + description: Settings that define a connection to an external data store. + discriminator: + mapping: + Cluster: '#/components/schemas/StreamsClusterConnection' + Kafka: '#/components/schemas/StreamsKafkaConnection' + Sample: '#/components/schemas/StreamsSampleConnection' + propertyName: type + oneOf: + - $ref: '#/components/schemas/StreamsSampleConnection' + - $ref: '#/components/schemas/StreamsClusterConnection' + - $ref: '#/components/schemas/StreamsKafkaConnection' + 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 + name: + description: Human-readable label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source. + type: string + type: + description: Type of the connection. Can be either Cluster or Kafka. + enum: + - Kafka + - Cluster + - Sample + type: string + readOnly: true + type: object + StreamsKafkaAuthentication: + description: User credentials required to connect to a Kafka Cluster. Includes the authentication type, as well as the parameters for that authentication mode. + 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 + mechanism: + description: Style of authentication. Can be one of PLAIN, SCRAM-256, or SCRAM-512. + type: string + password: + description: Password of the account to connect to the Kafka cluster. + format: password + type: string + writeOnly: true + username: + description: Username of the account to connect to the Kafka cluster. + type: string + type: object + StreamsKafkaConnection: + allOf: + - $ref: '#/components/schemas/StreamsConnection' + - properties: + authentication: + $ref: '#/components/schemas/StreamsKafkaAuthentication' + bootstrapServers: + description: Comma separated list of server addresses. + type: string + config: + additionalProperties: + description: A map of Kafka key-value pairs for optional configuration. This is a flat object, and keys can have '.' characters. + example: '{"group.protocol.type":"consumer","debug":"queue, msg, protocol"}' + type: string + description: A map of Kafka key-value pairs for optional configuration. This is a flat object, and keys can have '.' characters. + example: + debug: queue, msg, protocol + group.protocol.type: consumer + type: object + networking: + $ref: '#/components/schemas/StreamsKafkaNetworking' + security: + $ref: '#/components/schemas/StreamsKafkaSecurity' + type: object + type: object + StreamsKafkaNetworking: + description: Networking Access Type can either be 'PUBLIC' (default) or VPC. VPC type is in public preview, please file a support ticket to enable VPC Network Access + properties: + access: + $ref: '#/components/schemas/StreamsKafkaNetworkingAccess' + 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 + type: object + StreamsKafkaNetworkingAccess: + description: Information about the networking access. + properties: + connectionId: + description: Reserved. Will be used by PRIVATE_LINK connection type. + example: 32b6e34b3d91647abb20e7b8 + maxLength: 24 + minLength: 24 + pattern: ^([a-f0-9]{24})$ + type: string + 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 + name: + description: Reserved. Will be used by PRIVATE_LINK connection type. + type: string + type: + description: Selected networking type. Either PUBLIC, VPC or PRIVATE_LINK. Defaults to PUBLIC. For VPC, ensure that VPC peering exists and connectivity has been established between Atlas VPC and the VPC where Kafka cluster is hosted for the connection to function properly. PRIVATE_LINK support is coming soon. + enum: + - PUBLIC + - VPC + - PRIVATE_LINK + title: Networking Access Type + type: string + type: object + StreamsKafkaSecurity: + description: Properties for the secure transport connection to Kafka. For SSL, this can include the trusted certificate to use. + properties: + brokerPublicCertificate: + description: A trusted, public x509 certificate for connecting to Kafka over SSL. + type: string + 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 + protocol: + description: Describes the transport type. Can be either PLAINTEXT or SSL. + type: string + type: object + StreamsSampleConnection: + allOf: + - $ref: '#/components/schemas/StreamsConnection' + type: object + SynonymMappingStatusDetail: + description: Contains the status of the index's synonym mappings on each search host. This field (and its subfields) only appear if the index has synonyms defined. + properties: + message: + description: Optional message describing an error. + type: string + queryable: + description: Flag that indicates whether the synonym mapping is queryable on a host. + type: boolean + status: + description: Status that describes this index's synonym mappings. This status appears only if the index has synonyms defined. + enum: + - FAILED + - BUILDING + - READY + type: string + title: Synonym Mapping Status Detail + type: object + SynonymMappingStatusDetailMap: + additionalProperties: + $ref: '#/components/schemas/SynonymMappingStatusDetail' + type: object + x-additionalPropertiesName: Synonym Mapping Name + SynonymSource: + description: Data set that stores words and their applicable synonyms. + properties: + collection: + description: Label that identifies the MongoDB collection that stores words and their applicable synonyms. + type: string + required: + - collection + type: object + TenantHardwareSpec: + properties: + instanceSize: + description: Hardware specification for the instances in this M0/M2/M5 tier cluster. + enum: + - M0 + - M2 + - M5 + title: Tenant Instance Sizes + type: string + type: object + TenantHardwareSpec20240805: + properties: + diskSizeGB: + description: |- + Storage capacity of instance data volumes expressed in gigabytes. Increase this number to add capacity. + + This value must be equal for all shards and node types. + + This value is not configurable on M0/M2/M5 clusters. + + MongoDB Cloud requires this parameter if you set **replicationSpecs**. + + If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value. + + Storage charge calculations depend on whether you choose the default value or a custom value. + + The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier. + format: double + maximum: 4096 + minimum: 10 + type: number + instanceSize: + description: Hardware specification for the instances in this M0/M2/M5 tier cluster. + enum: + - M0 + - M2 + - M5 + title: Tenant Instance Sizes + type: string + type: object + TenantRegionConfig: + allOf: + - $ref: '#/components/schemas/CloudRegionConfig' + - properties: + backingProviderName: + description: Cloud service provider on which MongoDB Cloud provisioned the multi-tenant cluster. The resource returns this parameter when **providerName** is `TENANT` and **electableSpecs.instanceSize** is `M0`, `M2` or `M5`. + enum: + - AWS + - GCP + - AZURE + type: string + type: object + description: Details that explain how MongoDB Cloud replicates data in one region on the specified MongoDB database. + title: Tenant Regional Replication Specifications + type: object + TenantRegionConfig20240805: + allOf: + - $ref: '#/components/schemas/CloudRegionConfig20240805' + - properties: + backingProviderName: + description: Cloud service provider on which MongoDB Cloud provisioned the multi-tenant cluster. The resource returns this parameter when **providerName** is `TENANT` and **electableSpecs.instanceSize** is `M0`, `M2` or `M5`. + enum: + - AWS + - GCP + - AZURE + type: string + type: object + description: Details that explain how MongoDB Cloud replicates data in one region on the specified MongoDB database. + title: Tenant Regional Replication Specifications + type: object + TextSearchHostStatusDetail: + properties: + hostname: + description: Hostname that corresponds to the status detail. + type: string + mainIndex: + $ref: '#/components/schemas/TextSearchIndexStatusDetail' + queryable: + description: Flag that indicates whether the index is queryable on the host. + type: boolean + stagedIndex: + $ref: '#/components/schemas/TextSearchIndexStatusDetail' + status: + description: | + Condition of the search index when you made this request. + + | Status | Index Condition | + |---|---| + | DELETING | The index is being deleted. | + | FAILED | The index build failed. Indexes can enter the FAILED state due to an invalid index definition. | + | STALE | The index is queryable but has stopped replicating data from the indexed collection. Searches on the index may return out-of-date data. | + | PENDING | Atlas has not yet started building the index. | + | BUILDING | Atlas is building or re-building the index after an edit. | + | READY | The index is ready and can support queries. | + enum: + - DELETING + - FAILED + - STALE + - PENDING + - BUILDING + - READY + - DOES_NOT_EXIST + type: string + title: Text Search Host Status Detail + type: object + TextSearchIndexCreateRequest: + allOf: + - $ref: '#/components/schemas/SearchIndexCreateRequest' + - properties: + definition: + $ref: '#/components/schemas/TextSearchIndexDefinition' + type: object + description: Text Search Index Create Request + required: + - collectionName + - database + - definition + - name + type: object + TextSearchIndexDefinition: + description: The text search index definition set by the user. + properties: + analyzer: + default: lucene.standard + description: |- + 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 making the following changes 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 process you select to build the Atlas Search index. + enum: + - lucene.standard + - lucene.simple + - lucene.whitespace + - lucene.keyword + - lucene.arabic + - lucene.armenian + - lucene.basque + - lucene.bengali + - lucene.brazilian + - lucene.bulgarian + - lucene.catalan + - lucene.chinese + - lucene.cjk + - lucene.czech + - lucene.danish + - lucene.dutch + - lucene.english + - lucene.finnish + - lucene.french + - lucene.galician + - lucene.german + - lucene.greek + - lucene.hindi + - lucene.hungarian + - lucene.indonesian + - lucene.irish + - lucene.italian + - lucene.japanese + - lucene.korean + - lucene.kuromoji + - lucene.latvian + - lucene.lithuanian + - lucene.morfologik + - lucene.nori + - lucene.norwegian + - lucene.persian + - lucene.portuguese + - lucene.romanian + - lucene.russian + - lucene.smartcn + - lucene.sorani + - lucene.spanish + - lucene.swedish + - lucene.thai + - lucene.turkish + - lucene.ukrainian + externalDocs: + description: Atlas Search Analyzers + url: https://dochub.mongodb.org/core/analyzers--fts + type: string + analyzers: + description: List of user-defined methods to convert database field text into searchable words. + externalDocs: + description: Custom Atlas Search Analyzers + url: https://dochub.mongodb.org/core/custom-fts + items: + $ref: '#/components/schemas/AtlasSearchAnalyzer' + type: array + mappings: + $ref: '#/components/schemas/SearchMappings' + searchAnalyzer: + default: lucene.standard + description: Method applied to identify words when searching this index. + enum: + - lucene.standard + - lucene.simple + - lucene.whitespace + - lucene.keyword + - lucene.arabic + - lucene.armenian + - lucene.basque + - lucene.bengali + - lucene.brazilian + - lucene.bulgarian + - lucene.catalan + - lucene.chinese + - lucene.cjk + - lucene.czech + - lucene.danish + - lucene.dutch + - lucene.english + - lucene.finnish + - lucene.french + - lucene.galician + - lucene.german + - lucene.greek + - lucene.hindi + - lucene.hungarian + - lucene.indonesian + - lucene.irish + - lucene.italian + - lucene.japanese + - lucene.korean + - lucene.kuromoji + - lucene.latvian + - lucene.lithuanian + - lucene.morfologik + - lucene.nori + - lucene.norwegian + - lucene.persian + - lucene.portuguese + - lucene.romanian + - lucene.russian + - lucene.smartcn + - lucene.sorani + - lucene.spanish + - lucene.swedish + - lucene.thai + - 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 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 + synonyms: + description: Rule sets that map words to their synonyms in this index. + externalDocs: + description: Synonym Mapping + url: https://dochub.mongodb.org/core/fts-synonym-mappings + items: + $ref: '#/components/schemas/SearchSynonymMappingDefinition' + type: array + required: + - mappings + title: Text Search Index Definition + type: object + TextSearchIndexResponse: + allOf: + - $ref: '#/components/schemas/SearchIndexResponse' + - properties: + latestDefinition: + $ref: '#/components/schemas/TextSearchIndexDefinition' + statusDetail: + description: List of documents detailing index status on each host. + items: + $ref: '#/components/schemas/TextSearchHostStatusDetail' + type: array + synonymMappingStatus: + description: Status that describes this index's synonym mappings. This status appears only if the index has synonyms defined. + enum: + - FAILED + - BUILDING + - READY + type: string + synonymMappingStatusDetail: + description: A list of documents describing the status of the index's synonym mappings on each search host. Only appears if the index has synonyms defined. + items: + additionalProperties: + $ref: '#/components/schemas/SynonymMappingStatusDetail' + type: object + type: array + type: object + title: Text Search Index Response + type: object + TextSearchIndexStatusDetail: + description: Contains status information about a text search index. + properties: + definition: + $ref: '#/components/schemas/TextSearchIndexDefinition' + definitionVersion: + $ref: '#/components/schemas/SearchIndexDefinitionVersion' + message: + description: Optional message describing an error. + type: string + queryable: + description: Flag that indicates whether the index generation is queryable on the host. + type: boolean + status: + description: | + Condition of the search index when you made this request. + + | Status | Index Condition | + |---|---| + | DELETING | The index is being deleted. | + | FAILED | The index build failed. Indexes can enter the FAILED state due to an invalid index definition. | + | STALE | The index is queryable but has stopped replicating data from the indexed collection. Searches on the index may return out-of-date data. | + | PENDING | Atlas has not yet started building the index. | + | BUILDING | Atlas is building or re-building the index after an edit. | + | READY | The index is ready and can support queries. | + enum: + - DELETING + - FAILED + - STALE + - PENDING + - BUILDING + - READY + - DOES_NOT_EXIST + type: string + synonymMappingStatus: + description: Status that describes this index's synonym mappings. This status appears only if the index has synonyms defined. + enum: + - FAILED + - BUILDING + - READY + type: string + synonymMappingStatusDetail: + description: List of synonym statuses by mapping. + items: + $ref: '#/components/schemas/SynonymMappingStatusDetailMap' + type: array + title: Text Search Index Status Detail + type: object + TokenFilterEnglishPossessive: + description: Filter that removes possessives (trailing 's) from words. + properties: + type: + description: Human-readable label that identifies this token filter type. + enum: + - englishPossessive + type: string + required: + - type + title: englishPossessive + type: object + TokenFilterFlattenGraph: + description: Filter that transforms a token filter graph, such as the token filter graph that the wordDelimiterGraph token filter produces, into a flat form suitable for indexing. + properties: + type: + description: Human-readable label that identifies this token filter type. + enum: + - flattenGraph + type: string + required: + - type + title: flattenGraph + type: object + TokenFilterPorterStemming: + description: Filter that uses the porter stemming algorithm to remove the common morphological and inflectional suffixes from words in English. It expects lowercase text and doesn't work as expected for uppercase text. + properties: + type: + description: Human-readable label that identifies this token filter type. + enum: + - porterStemming + type: string + required: + - type + title: porterStemming + type: object + TokenFilterSpanishPluralStemming: + description: Filter that stems Spanish plural words. It expects lowercase text. + properties: + type: + description: Human-readable label that identifies this token filter type. + enum: + - spanishPluralStemming + type: string + required: + - type + title: spanishPluralStemming + type: object + TokenFilterStempel: + description: Filter that uses Lucene's default Polish stemmer table to stem words in the Polish language. It expects lowercase text. + externalDocs: + description: Default Polish stemmer table + url: https://lucene.apache.org/core/9_2_0/analysis/stempel/org/apache/lucene/analysis/pl/PolishAnalyzer.html#DEFAULT_STEMMER_FILE + properties: + type: + description: Human-readable label that identifies this token filter type. + enum: + - stempel + type: string + required: + - type + title: stempel + type: object + TokenFilterWordDelimiterGraph: + description: Filter that splits tokens into sub-tokens based on configured rules. + properties: + delimiterOptions: + description: Object that contains the rules that determine how to split words into sub-words. + properties: + concatenateAll: + default: false + description: Flag that indicates whether to concatenate runs. + type: boolean + concatenateNumbers: + default: false + description: Flag that indicates whether to concatenate runs of sub-numbers. + type: boolean + concatenateWords: + default: false + description: Flag that indicates whether to concatenate runs of sub-words. + type: boolean + generateNumberParts: + default: true + description: Flag that indicates whether to split tokens based on sub-numbers. For example, if `true`, this option splits `100-2` into `100` and `2`. + type: boolean + generateWordParts: + default: true + description: Flag that indicates whether to split tokens based on sub-words. + type: boolean + ignoreKeywords: + default: false + description: Flag that indicates whether to skip tokens with the `keyword` attribute set to `true` + type: boolean + preserveOriginal: + default: true + description: Flag that indicates whether to generate tokens of the original words. + type: boolean + splitOnCaseChange: + default: true + description: Flag that indicates whether to split tokens based on letter-case transitions. + type: boolean + splitOnNumerics: + default: true + description: Flag that indicates whether to split tokens based on letter-number transitions. + type: boolean + stemEnglishPossessive: + default: true + description: Flag that indicates whether to remove trailing possessives from each sub-word. + type: boolean + type: object + protectedWords: + description: Object that contains options for protected words. + properties: + ignoreCase: + default: true + description: Flag that indicates whether to ignore letter case sensitivity for protected words. + type: boolean + words: + description: List that contains the tokens to protect from delimination. + items: + type: string + type: array + required: + - words + type: object + type: + description: Human-readable label that identifies this token filter type. + enum: + - wordDelimiterGraph + type: string + required: + - type + title: wordDelimiterGraph + type: object + TokenFilterkStemming: + description: Filter that combines algorithmic stemming with a built-in dictionary for the English language to stem words. + properties: + type: + description: Human-readable label that identifies this token filter type. + enum: + - kStemming + type: string + required: + - type + title: kStemming + type: object + VectorSearchHostStatusDetail: + properties: + hostname: + description: Hostname that corresponds to the status detail. + type: string + mainIndex: + $ref: '#/components/schemas/VectorSearchIndexStatusDetail' + queryable: + description: Flag that indicates whether the index is queryable on the host. + type: boolean + stagedIndex: + $ref: '#/components/schemas/VectorSearchIndexStatusDetail' + status: + description: | + Condition of the search index when you made this request. + + | Status | Index Condition | + |---|---| + | DELETING | The index is being deleted. | + | FAILED | The index build failed. Indexes can enter the FAILED state due to an invalid index definition. | + | STALE | The index is queryable but has stopped replicating data from the indexed collection. Searches on the index may return out-of-date data. | + | PENDING | Atlas has not yet started building the index. | + | BUILDING | Atlas is building or re-building the index after an edit. | + | READY | The index is ready and can support queries. | + enum: + - DELETING + - FAILED + - STALE + - PENDING + - BUILDING + - READY + - DOES_NOT_EXIST + type: string + title: Vector Search Host Status Detail + type: object + VectorSearchIndex: + allOf: + - $ref: '#/components/schemas/ClusterSearchIndex' + - properties: + fields: + description: 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. + externalDocs: + description: Vector Search Fields + url: https://dochub.mongodb.org/core/avs-vector-type + items: + $ref: '#/components/schemas/BasicDBObject' + type: array + type: object + required: + - collectionName + - database + - name + type: object + VectorSearchIndexCreateRequest: + allOf: + - $ref: '#/components/schemas/SearchIndexCreateRequest' + - properties: + definition: + $ref: '#/components/schemas/VectorSearchIndexDefinition' + type: object + description: Vector Search Index Create Request + required: + - collectionName + - database + - definition + - name + type: object + VectorSearchIndexDefinition: + description: The vector search index definition set by the user. + properties: + fields: + description: 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. + externalDocs: + description: Vector Search Fields + url: https://dochub.mongodb.org/core/avs-vector-type + items: + $ref: '#/components/schemas/BasicDBObject' + type: array + title: Vector Search Index Definition + type: object + VectorSearchIndexResponse: + allOf: + - $ref: '#/components/schemas/SearchIndexResponse' + - properties: + latestDefinition: + $ref: '#/components/schemas/VectorSearchIndexDefinition' + statusDetail: + description: List of documents detailing index status on each host. + items: + $ref: '#/components/schemas/VectorSearchHostStatusDetail' + type: array + type: object + title: Vector Search Index Response + type: object + VectorSearchIndexStatusDetail: + description: Contains status information about a vector search index. + properties: + definition: + $ref: '#/components/schemas/VectorSearchIndexDefinition' + definitionVersion: + $ref: '#/components/schemas/SearchIndexDefinitionVersion' + message: + description: Optional message describing an error. + type: string + queryable: + description: Flag that indicates whether the index generation is queryable on the host. + type: boolean + status: + description: | + Condition of the search index when you made this request. + + | Status | Index Condition | + |---|---| + | DELETING | The index is being deleted. | + | FAILED | The index build failed. Indexes can enter the FAILED state due to an invalid index definition. | + | STALE | The index is queryable but has stopped replicating data from the indexed collection. Searches on the index may return out-of-date data. | + | PENDING | Atlas has not yet started building the index. | + | BUILDING | Atlas is building or re-building the index after an edit. | + | READY | The index is ready and can support queries. | + enum: + - DELETING + - FAILED + - STALE + - PENDING + - BUILDING + - READY + - DOES_NOT_EXIST + type: string + title: Vector Search Index Status Detail + type: object + WeeklyScheduleView: + allOf: + - $ref: '#/components/schemas/OnlineArchiveSchedule' + - properties: + dayOfWeek: + description: Day of the week when the scheduled archive starts. The week starts with Monday (`1`) and ends with Sunday (`7`). + format: int32 + maximum: 7 + minimum: 1 + type: integer + endHour: + description: Hour of the day when the scheduled window to run one online archive ends. + format: int32 + maximum: 23 + minimum: 0 + type: integer + endMinute: + description: Minute of the hour when the scheduled window to run one online archive ends. + format: int32 + maximum: 59 + minimum: 0 + type: integer + startHour: + description: Hour of the day when the when the scheduled window to run one online archive starts. + format: int32 + maximum: 23 + minimum: 0 + type: integer + startMinute: + description: Minute of the hour when the scheduled window to run one online archive starts. + format: int32 + maximum: 59 + minimum: 0 + type: integer + type: object + required: + - type + type: object + charFilterhtmlStrip: + description: Filter that strips out HTML constructs. + properties: + ignoredTags: + description: The HTML tags that you want to exclude from filtering. + items: + type: string + type: array + type: + description: Human-readable label that identifies this character filter type. + enum: + - htmlStrip + type: string + required: + - type + title: htmlStrip + type: object + charFiltericuNormalize: + description: Filter that processes normalized text with the ICU Normalizer. It is based on Lucene's ICUNormalizer2CharFilter. + externalDocs: + description: ICUNormalizer2CharFilter + url: https://lucene.apache.org/core/8_3_0/analyzers-icu/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.html + properties: + type: + description: Human-readable label that identifies this character filter type. + enum: + - icuNormalize + type: string + required: + - type + title: icuNormalize + type: object + charFiltermapping: + description: Filter that applies normalization mappings that you specify to characters. + properties: + mappings: + description: |- + Comma-separated list of mappings. A mapping indicates that one character or group of characters should be substituted for another, using the following format: + + ` : ` + properties: + additionalProperties: + type: string + type: object + type: + description: Human-readable label that identifies this character filter type. + enum: + - mapping + type: string + required: + - mappings + - type + title: mapping + type: object + charFilterpersian: + description: Filter that replaces instances of a zero-width non-joiner with an ordinary space. It is based on Lucene's PersianCharFilter. + externalDocs: + description: PersianCharFilter + url: https://lucene.apache.org/core/8_0_0/analyzers-common/org/apache/lucene/analysis/fa/PersianCharFilter.html + properties: + type: + description: Human-readable label that identifies this character filter type. + enum: + - persian + type: string + required: + - type + title: persian + type: object + tokenFilterasciiFolding: + description: Filter that converts alphabetic, numeric, and symbolic Unicode characters that are not in the Basic Latin Unicode block to their ASCII equivalents, if available. + externalDocs: + description: Basic Latin Unicode block + url: https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block) + properties: + originalTokens: + default: omit + description: |- + Value that indicates whether to include or omit the original tokens in the output of the token filter. + + Choose `include` if you want to support queries on both the original tokens as well as the converted forms. + + Choose `omit` if you want to query only on the converted forms of the original tokens. + enum: + - omit + - include + type: string + type: + description: Human-readable label that identifies this token filter type. + enum: + - asciiFolding + type: string + required: + - type + title: asciiFolding + type: object + tokenFilterdaitchMokotoffSoundex: + description: |- + Filter that creates tokens for words that sound the same based on the Daitch-Mokotoff Soundex phonetic algorithm. This filter can generate multiple encodings for each input, where each encoded token is a 6 digit number. + + **NOTE**: Don't use the **daitchMokotoffSoundex** token filter in: + + -Synonym or autocomplete mapping definitions + - Operators where **fuzzy** is enabled. Atlas Search supports the **fuzzy** option only for the **autocomplete**, **term**, and **text** operators. + externalDocs: + description: Daitch-Mokotoff Soundex phonetic algorithm + url: https://en.wikipedia.org/wiki/Daitch%E2%80%93Mokotoff_Soundex + properties: + originalTokens: + default: include + description: |- + Value that indicates whether to include or omit the original tokens in the output of the token filter. + + Choose `include` if you want to support queries on both the original tokens as well as the converted forms. + + Choose `omit` if you want to query only on the converted forms of the original tokens. + enum: + - omit + - include + type: string + type: + description: Human-readable label that identifies this token filter type. + enum: + - daitchMokotoffSoundex + type: string + required: + - type + title: daitchMokotoffSoundex + type: object + tokenFilteredgeGram: + description: Filter that tokenizes input from the left side, or "edge", of a text input into n-grams of configured sizes. You can't use this token filter in synonym or autocomplete mapping definitions. + properties: + maxGram: + description: Value that specifies the maximum length of generated n-grams. This value must be greater than or equal to **minGram**. + type: integer + minGram: + description: Value that specifies the minimum length of generated n-grams. This value must be less than or equal to **maxGram**. + type: integer + termNotInBounds: + default: omit + description: Value that indicates whether to index tokens shorter than **minGram** or longer than **maxGram**. + enum: + - omit + - include + type: string + type: + description: Human-readable label that identifies this token filter type. + enum: + - edgeGram + type: string + required: + - maxGram + - minGram + - type + title: edgeGram + type: object + tokenFiltericuFolding: + description: 'Filter that applies character folding from Unicode Technical Report #30.' + externalDocs: + description: 'Unicode Technical Report #30' + url: http://www.unicode.org/reports/tr30/tr30-4.html + properties: + type: + description: Human-readable label that identifies this token filter type. + enum: + - icuFolding + type: string + required: + - type + title: icuFolding + type: object + tokenFiltericuNormalizer: + description: Filter that normalizes tokens using a standard Unicode Normalization Mode. + externalDocs: + description: Unicode Normalization Mode + url: https://unicode.org/reports/tr15/ + properties: + normalizationForm: + default: nfc + description: Normalization form to apply. + enum: + - nfd + - nfc + - nfkd + - nfkc + type: string + type: + description: Human-readable label that identifies this token filter type. + enum: + - icuNormalizer + type: string + required: + - type + title: icuNormalizer + type: object + tokenFilterlength: + description: Filter that removes tokens that are too short or too long. + properties: + max: + default: 255 + description: Number that specifies the maximum length of a token. Value must be greater than or equal to **min**. + type: integer + min: + default: 0 + description: Number that specifies the minimum length of a token. This value must be less than or equal to **max**. + type: integer + type: + description: Human-readable label that identifies this token filter type. + enum: + - length + type: string + required: + - type + title: length + type: object + tokenFilterlowercase: + description: Filter that normalizes token text to lowercase. + properties: + type: + description: Human-readable label that identifies this token filter type. + enum: + - lowercase + type: string + required: + - type + title: lowercase + type: object + tokenFilternGram: + description: Filter that tokenizes input into n-grams of configured sizes. You can't use this token filter in synonym or autocomplete mapping definitions. + properties: + maxGram: + description: Value that specifies the maximum length of generated n-grams. This value must be greater than or equal to **minGram**. + type: integer + minGram: + description: Value that specifies the minimum length of generated n-grams. This value must be less than or equal to **maxGram**. + type: integer + termNotInBounds: + default: omit + description: Value that indicates whether to index tokens shorter than **minGram** or longer than **maxGram**. + enum: + - omit + - include + type: string + type: + description: Human-readable label that identifies this token filter type. + enum: + - nGram + type: string + required: + - maxGram + - minGram + - type + title: nGram + type: object + tokenFilterregex: + description: Filter that applies a regular expression to each token, replacing matches with a specified string. + properties: + matches: + description: Value that indicates whether to replace only the first matching pattern or all matching patterns. + enum: + - all + - first + type: string + pattern: + description: Regular expression pattern to apply to each token. + type: string + replacement: + description: Replacement string to substitute wherever a matching pattern occurs. + type: string + type: + description: Human-readable label that identifies this token filter type. + enum: + - regex + type: string + required: + - matches + - pattern + - replacement + - type + title: regex + type: object + tokenFilterreverse: + description: Filter that reverses each string token. + properties: + type: + description: Human-readable label that identifies this token filter type. + enum: + - reverse + type: string + required: + - type + title: reverse + type: object + tokenFiltershingle: + description: Filter that constructs shingles (token n-grams) from a series of tokens. You can't use this token filter in synonym or autocomplete mapping definitions. + properties: + maxShingleSize: + description: Value that specifies the maximum number of tokens per shingle. This value must be greater than or equal to **minShingleSize**. + type: integer + minShingleSize: + description: Value that specifies the minimum number of tokens per shingle. This value must be less than or equal to **maxShingleSize**. + type: integer + type: + description: Human-readable label that identifies this token filter type. + enum: + - shingle + type: string + required: + - maxShingleSize + - minShingleSize + - type + title: shingle + type: object + tokenFiltersnowballStemming: + description: Filter that stems tokens using a Snowball-generated stemmer. + externalDocs: + description: Snowball-generated stemmer + url: https://snowballstem.org/ + properties: + stemmerName: + description: Snowball-generated stemmer to use. + enum: + - arabic + - armenian + - basque + - catalan + - danish + - dutch + - english + - finnish + - french + - german + - german2 + - hungarian + - irish + - italian + - kp + - lithuanian + - lovins + - norwegian + - porter + - portuguese + - romanian + - russian + - spanish + - swedish + - turkish + type: string + type: + description: Human-readable label that identifies this token filter type. + enum: + - snowballStemming + type: string + required: + - stemmerName + - type + title: snowballStemming + type: object + tokenFilterstopword: + description: Filter that removes tokens that correspond to the specified stop words. This token filter doesn't analyze the stop words that you specify. + properties: + ignoreCase: + default: true + description: Flag that indicates whether to ignore the case of stop words when filtering the tokens to remove. + type: boolean + tokens: + description: The stop words that correspond to the tokens to remove. Value must be one or more stop words. + items: + type: string + type: array + type: + description: Human-readable label that identifies this token filter type. + enum: + - stopword + type: string + required: + - tokens + - type + title: stopword + type: object + tokenFiltertrim: + description: Filter that trims leading and trailing whitespace from tokens. + properties: + type: + description: Human-readable label that identifies this token filter type. + enum: + - trim + type: string + required: + - type + title: trim + type: object + tokenizeredgeGram: + description: Tokenizer that splits input from the left side, or "edge", of a text input into n-grams of given sizes. You can't use the edgeGram tokenizer in synonym or autocomplete mapping definitions. + properties: + maxGram: + description: Characters to include in the longest token that Atlas Search creates. + type: integer + minGram: + description: Characters to include in the shortest token that Atlas Search creates. + type: integer + type: + description: Human-readable label that identifies this tokenizer type. + enum: + - edgeGram + type: string + required: + - maxGram + - minGram + - type + title: edgeGram + type: object + tokenizerkeyword: + description: Tokenizer that combines the entire input as a single token. + properties: + type: + description: Human-readable label that identifies this tokenizer type. + enum: + - keyword + type: string + required: + - type + title: keyword + type: object + tokenizernGram: + description: Tokenizer that splits input into text chunks, or "n-grams", of into given sizes. You can't use the nGram tokenizer in synonym or autocomplete mapping definitions. + properties: + maxGram: + description: Characters to include in the longest token that Atlas Search creates. + type: integer + minGram: + description: Characters to include in the shortest token that Atlas Search creates. + type: integer + type: + description: Human-readable label that identifies this tokenizer type. + enum: + - edgeGram + type: string + required: + - maxGram + - minGram + - type + title: nGram + type: object + tokenizerregexCaptureGroup: + description: Tokenizer that uses a regular expression pattern to extract tokens. + properties: + group: + description: Index of the character group within the matching expression to extract into tokens. Use `0` to extract all character groups. + type: integer + pattern: + description: Regular expression to match against. + type: string + type: + description: Human-readable label that identifies this tokenizer type. + enum: + - regexCaptureGroup + type: string + required: + - group + - pattern + - type + title: regexCaptureGroup + type: object + tokenizerregexSplit: + description: Tokenizer that splits tokens using a regular-expression based delimiter. + properties: + pattern: + description: Regular expression to match against. + type: string + type: + description: Human-readable label that identifies this tokenizer type. + enum: + - regexSplit + type: string + required: + - pattern + - type + title: regexSplit + type: object + tokenizerstandard: + description: Tokenizer that splits tokens based on word break rules from the Unicode Text Segmentation algorithm. + externalDocs: + description: Unicode Text Segmentation Algorithm + url: https://www.unicode.org/L2/L2019/19034-uax29-34-draft.pdf + properties: + maxTokenLength: + default: 255 + description: Maximum number of characters in a single token. Tokens greater than this length are split at this length into multiple tokens. + type: integer + type: + description: Human-readable label that identifies this tokenizer type. + enum: + - standard + type: string + required: + - type + title: standard + type: object + tokenizeruaxUrlEmail: + description: Tokenizer that creates tokens from URLs and email addresses. Although this tokenizer uses word break rules from the Unicode Text Segmentation algorithm, we recommend using it only when the indexed field value includes URLs and email addresses. For fields that don't include URLs or email addresses, use the **standard** tokenizer to create tokens based on word break rules. + externalDocs: + description: Unicode Text Segmentation Algorithm + url: https://www.unicode.org/L2/L2019/19034-uax29-34-draft.pdf + properties: + maxTokenLength: + default: 255 + description: Maximum number of characters in a single token. Tokens greater than this length are split at this length into multiple tokens. + type: integer + type: + description: Human-readable label that identifies this tokenizer type. + enum: + - uaxUrlEmail + type: string + required: + - type + title: uaxUrlEmail + type: object + tokenizerwhitespace: + description: Tokenizer that creates tokens based on occurrences of whitespace between words. + properties: + maxTokenLength: + default: 255 + description: Maximum number of characters in a single token. Tokens greater than this length are split at this length into multiple tokens. + type: integer + type: + description: Human-readable label that identifies this tokenizer type. + enum: + - whitespace + type: string + required: + - type + title: whitespace + type: object + securitySchemes: + DigestAuth: + scheme: digest + type: http diff --git a/tools/api-generator/fixtures/05-spec-with-overlay.yaml.overlay.yaml b/tools/api-generator/fixtures/05-spec-with-overlay.yaml.overlay.yaml new file mode 100644 index 0000000000..1ae0058c6d --- /dev/null +++ b/tools/api-generator/fixtures/05-spec-with-overlay.yaml.overlay.yaml @@ -0,0 +1,23 @@ +overlay: 1.0.0 +info: + title: Fix up API description + version: 1.0.1 +actions: + - target: $.paths['/api/atlas/v2/groups/{groupId}/clusters'].post + update: + x-xgen-atlascli: + override: + description: OVERRIDDEN + operationId: createClusterX + - target: $.paths['/api/atlas/v2/groups/{groupId}/clusters'].post.parameters[?(@['$ref'] == '#/components/parameters/groupId')] + update: + x-xgen-atlascli: + override: + description: OVERRIDDEN + name: groupIdX + - target: $.components.parameters.groupId + update: + x-xgen-atlascli: + override: + description: OVERRIDDEN + name: groupIdX diff --git a/tools/api-generator/main.go b/tools/api-generator/main.go index 1a0dae11cb..913785b922 100644 --- a/tools/api-generator/main.go +++ b/tools/api-generator/main.go @@ -22,29 +22,37 @@ import ( "go/format" "io" "os" + "path/filepath" + "strings" "text/template" "time" "github.com/getkin/kin-openapi/openapi3" "github.com/mongodb/mongodb-atlas-cli/atlascli/internal/api" + "github.com/speakeasy-api/openapi-overlay/pkg/overlay" "github.com/spf13/cobra" + "gopkg.in/yaml.v3" ) //go:embed commands.go.tmpl var templateContent string func main() { - var specPath string + var ( + specPath string + overlayPath string + ) var rootCmd = &cobra.Command{ Use: "api-generator", Short: "CLI which generates api command definitions from a OpenAPI spec", RunE: func(command *cobra.Command, _ []string) error { - return run(command.Context(), specPath, command.OutOrStdout()) + return run(command.Context(), specPath, overlayPath, command.OutOrStdout()) }, } rootCmd.Flags().StringVar(&specPath, "spec", "", "Path to spec file") + rootCmd.Flags().StringVar(&overlayPath, "overlay", "", "Path to overlay folder") _ = rootCmd.MarkFlagRequired("spec") _ = rootCmd.MarkFlagFilename("spec") @@ -54,7 +62,7 @@ func main() { } } -func run(ctx context.Context, specPath string, w io.Writer) error { +func run(ctx context.Context, specPath, overlayPath string, w io.Writer) error { specFile, err := os.OpenFile(specPath, os.O_RDONLY, os.ModePerm) if err != nil { return err @@ -62,11 +70,76 @@ func run(ctx context.Context, specPath string, w io.Writer) error { defer specFile.Close() - return convertSpecToAPICommands(ctx, specFile, w) + files, err := os.ReadDir(overlayPath) + if err != nil { + return err + } + + overlayFiles := make([]io.Reader, 0, len(files)) + + for _, file := range files { + if !strings.HasSuffix(file.Name(), ".yaml") || !strings.HasSuffix(file.Name(), ".yml") { + continue + } + + fileName := filepath.Join(overlayPath, file.Name()) + + overlayFile, err := os.OpenFile(fileName, os.O_RDONLY, os.ModePerm) + if err != nil { + return err + } + + defer overlayFile.Close() //nolint // required + + overlayFiles = append(overlayFiles, overlayFile) + } + + return convertSpecToAPICommands(ctx, specFile, overlayFiles, w) } -func convertSpecToAPICommands(ctx context.Context, r io.Reader, w io.Writer) error { - spec, err := loadSpec(r) +func applyOverlays(r io.Reader, overlayFiles []io.Reader) (io.Reader, error) { + if len(overlayFiles) == 0 { + return r, nil + } + + var spec yaml.Node + err := yaml.NewDecoder(r).Decode(&spec) + if err != nil { + return nil, err + } + + for _, overlayFile := range overlayFiles { + var o overlay.Overlay + dec := yaml.NewDecoder(overlayFile) + + if err := dec.Decode(&o); err != nil { + return nil, err + } + + if err := o.Validate(); err != nil { + return nil, err + } + + if err = o.ApplyTo(&spec); err != nil { + return nil, err + } + } + + buf, err := yaml.Marshal(&spec) + if err != nil { + return nil, err + } + + return bytes.NewBuffer(buf), nil +} + +func convertSpecToAPICommands(ctx context.Context, r io.Reader, overlayFiles []io.Reader, w io.Writer) error { + overlaySpec, err := applyOverlays(r, overlayFiles) + if err != nil { + return fmt.Errorf("failed to apply overlays, error: %w", err) + } + + spec, err := loadSpec(overlaySpec) if err != nil { return fmt.Errorf("failed to load spec, error: %w", err) } diff --git a/tools/api-generator/main_test.go b/tools/api-generator/main_test.go index c45f17aaf0..1c01a69def 100644 --- a/tools/api-generator/main_test.go +++ b/tools/api-generator/main_test.go @@ -17,12 +17,13 @@ package main import ( "bytes" "context" + "io" "os" "path/filepath" + "strings" "testing" "github.com/bradleyjkemp/cupaloy/v2" - "github.com/stretchr/testify/require" ) func testSpec(t *testing.T, name, specPath string) { @@ -31,20 +32,28 @@ func testSpec(t *testing.T, name, specPath string) { specFile, err := os.OpenFile(specPath, os.O_RDONLY, os.ModePerm) if err != nil { - t.Errorf("failed to load '%s', error: %s", specPath, err) - t.FailNow() + t.Fatalf("failed to load '%s', error: %s", specPath, err) } defer specFile.Close() + overlayPath := specPath + ".overlay.yaml" + var overlays []io.Reader + if _, err = os.Stat(overlayPath); err == nil { + overlayFile, err := os.OpenFile(overlayPath, os.O_RDONLY, os.ModePerm) + if err != nil { + t.Fatalf("failed to load '%s', error: %s", overlayPath, err) + } + defer overlayFile.Close() + overlays = []io.Reader{overlayFile} + } + buf := &bytes.Buffer{} - if err := convertSpecToAPICommands(context.Background(), specFile, buf); err != nil { - t.Errorf("failed to convert spec into commmands, error: %s", err) - t.FailNow() + if err := convertSpecToAPICommands(context.Background(), specFile, overlays, buf); err != nil { + t.Fatalf("failed to convert spec into commmands, error: %s", err) } if err := snapshotter.SnapshotWithName(name, buf.String()); err != nil { - t.Errorf("unexpected result %s", err) - t.FailNow() + t.Fatalf("unexpected result %s", err) } } @@ -52,10 +61,15 @@ func testSpec(t *testing.T, name, specPath string) { func TestSnapshots(t *testing.T) { const FixtureDirectory = "./fixtures/" files, err := os.ReadDir(FixtureDirectory) - require.NoError(t, err, "failed to load fixtures") + if err != nil { + t.Fatalf("failed to load fixtures: %s", err) + } for _, file := range files { fileName := file.Name() + if strings.HasSuffix(fileName, ".overlay.yaml") { + continue + } fullPath := filepath.Join(FixtureDirectory, fileName) t.Run(fileName, func(t *testing.T) { testSpec(t, fileName, fullPath) diff --git a/tools/api-generator/overlays/.gitkeep b/tools/api-generator/overlays/.gitkeep new file mode 100644 index 0000000000..e69de29bb2