---
title: "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}"
method: PATCH
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}"
tags: ["MongoClusters"]
---

# PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}

`PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{mongoClusterName}`

Updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition.

## Path parameters

- `mongoClusterName` string, required

## Parameters

- `../../../../../../common-types/resource-management/v5/types.json#/components/parameters/ApiVersionParameter` — unresolved $ref
- `../../../../../../common-types/resource-management/v5/types.json#/components/parameters/SubscriptionIdParameter` — unresolved $ref
- `../../../../../../common-types/resource-management/v5/types.json#/components/parameters/ResourceGroupNameParameter` — unresolved $ref

## Request body

- MongoClusterUpdate — The type used for update operations of the MongoCluster.
  - `identity` ManagedServiceIdentity — unresolved $ref
  - `tags` object — Resource tags.
  - `properties` MongoClusterUpdateProperties — The updatable properties of the MongoCluster.
    - `administrator` AdministratorProperties — The local administrator login properties.
      - `userName` string — The administrator user name.
      - `password` string, password — The administrator password.
    - `serverVersion` string — The Mongo DB server version. Defaults to the latest available version if not specified.
    - `publicNetworkAccess` 'Enabled' | 'Disabled' — Whether or not public endpoint access is allowed for this Mongo cluster. Value is optional and default value is 'Enabled'
    - `highAvailability` HighAvailabilityProperties — The high availability properties of the cluster.
      - `targetMode` 'Disabled' | 'SameZone' | 'ZoneRedundantPreferred' — The high availability modes for a cluster.
    - `storage` StorageProperties — The storage properties of the cluster. This includes the data storage size and scaling applied to servers in the cluster.
      - `sizeGb` integer — The size of the data disk assigned to each server.
      - `type` 'PremiumSSD' | 'PremiumSSDv2' — The type of storage that a mongo cluster can be provisioned with.
    - `sharding` ShardingProperties — The sharding properties of the cluster. This includes the shard count and scaling options for the cluster.
      - `shardCount` integer — Number of shards to provision on the cluster.
    - `compute` ComputeProperties — The compute properties of the cluster. This includes the virtual-cores/memory and scaling options applied to servers in the cluster.
      - `tier` string — The compute tier to assign to the cluster, where each tier maps to a virtual-core and memory size. Example values: 'M30', 'M40'.
    - `backup` BackupProperties — The backup properties of the cluster. This includes the earliest restore time and retention settings.
      - `earliestRestoreTime` string — Earliest restore timestamp in UTC ISO8601 format.
    - `dataApi` DataApiProperties — Data API properties.
      - `mode` 'Enabled' | 'Disabled' — The mode to apply to the Mongo Data API.
    - `previewFeatures` PreviewFeature[] — List of private endpoint connections.
    - `authConfig` AuthConfigProperties — The authentication configuration for the Mongo cluster.
      - `allowedModes` AuthenticationMode[] — Allowed authentication modes for data access on the cluster.
    - `encryption` EncryptionProperties — The encryption configuration for the mongo cluster.
      - `customerManagedKeyEncryption` CustomerManagedKeyEncryptionProperties — Customer managed key encryption settings.
        - `keyEncryptionKeyIdentity` KeyEncryptionKeyIdentity — The identity used for key encryption key.
          - `identityType` 'UserAssignedIdentity' — The type of identity for key encryption key.
          - `userAssignedIdentityResourceId` string — The user assigned identity resource id.
        - `keyEncryptionKeyUrl` string — The URI of the key vault key used for encryption.
    - `networkBypassMode` 'None' | 'AzureCosmosDB' — The network bypass mode for the Mongo cluster.

## Response `200`

Azure operation completed successfully.

- MongoCluster — unresolved $ref

## Other responses

- `202` — Resource update request accepted.
- `default` — An unexpected error response.

---

[API](https://skmtc.dev/azure/apis/mongocluster-microsoft-documentdb-mongocluster.md) · [All operations](https://skmtc.dev/azure/apis/mongocluster-microsoft-documentdb-mongocluster/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/mongocluster-microsoft-documentdb-mongocluster/revisions/2d8659f23e60/schema)
