{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/mongodb/main/json-schema/mongodb-geo-sharding20240805-schema.json", "title": "GeoSharding20240805", "x-generated": "2026-10-03", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/mongodb-global-clusters-api-openapi.yml#/components/schemas/GeoSharding20240805", "properties": { "customZoneMapping": { "additionalProperties": { "description": "List that contains comma-separated key value pairs to map zones to geographic regions. These pairs map an ISO 3166-1a2 location code, with an ISO 3166-2 subdivision code when possible, to a unique 24-hexadecimal string that identifies the custom zone.\n\n The 24-hexadecimal string corresponds to a `Replication Specifications` `zoneId` property.\n\nThis parameter returns an empty object if no custom zones exist.\n\nExample: `{\"US-VA\": \"6716c5a804f4ce77e899bf99\", \"DE\": \"6716c5a804f4ce77e899bf9a\"}`.", "pattern": "^([a-f0-9]{24})$", "readOnly": true, "type": "string" }, "description": "List that contains comma-separated key value pairs to map zones to geographic regions. These pairs map an ISO 3166-1a2 location code, with an ISO 3166-2 subdivision code when possible, to a unique 24-hexadecimal string that identifies the custom zone.\n\n The 24-hexadecimal string corresponds to a `Replication Specifications` `zoneId` property.\n\nThis parameter returns an empty object if no custom zones exist.\n\nExample: `{\"US-VA\": \"6716c5a804f4ce77e899bf99\", \"DE\": \"6716c5a804f4ce77e899bf9a\"}`.", "readOnly": true, "type": "object" }, "managedNamespaces": { "description": "List that contains a namespace for a Global Cluster. MongoDB Cloud manages this cluster.", "items": { "$ref": "#/$defs/ManagedNamespaces" }, "readOnly": true, "type": "array" }, "selfManagedSharding": { "description": "Boolean that controls which management mode the Global Cluster is operating under. If this parameter is true Self-Managed Sharding is enabled and users are in control of the zone sharding within the Global Cluster. If this parameter is false Atlas-Managed Sharding is enabled and Atlas is control of zone sharding within the Global Cluster.", "readOnly": true, "type": "boolean" } }, "type": "object", "$defs": { "ManagedNamespaces": { "properties": { "collection": { "description": "Human-readable label of the collection to manage for this Global Cluster.", "type": "string" }, "customShardKey": { "description": "Database parameter used to divide the *collection* into shards. Global clusters require a compound shard key. This compound shard key combines the location parameter and the user-selected custom key.", "type": "string" }, "db": { "description": "Human-readable label of the database to manage for this Global Cluster.", "type": "string" }, "isCustomShardKeyHashed": { "default": false, "description": "Flag that indicates whether someone hashed the custom shard key for the specified collection. If you set this value to `false`, MongoDB Cloud uses ranged sharding.", "type": "boolean" }, "isShardKeyUnique": { "default": false, "description": "Flag that indicates whether someone [hashed](https://www.mongodb.com/docs/manual/reference/method/sh.shardCollection/#hashed-shard-keys) the custom shard key. If this parameter returns `false`, this cluster uses [ranged sharding](https://www.mongodb.com/docs/manual/core/ranged-sharding/).", "type": "boolean" }, "numInitialChunks": { "description": "Minimum number of chunks to create initially when sharding an empty collection with a [hashed shard key](https://www.mongodb.com/docs/manual/core/hashed-sharding/).", "format": "int64", "maximum": 8192, "type": "integer" }, "presplitHashedZones": { "default": false, "description": "Flag that indicates whether MongoDB Cloud should create and distribute initial chunks for an empty or non-existing collection. MongoDB Cloud distributes data based on the defined zones and zone ranges for the collection.", "type": "boolean" } }, "required": [ "collection", "customShardKey", "db" ], "type": "object" } } }