Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions sdk/mongocluster/azure-resourcemanager-mongocluster/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
# Release History

## 1.1.0-beta.1 (Unreleased)
## 1.1.0-beta.1 (2025-04-15)

- Azure Resource Manager Mongo Cluster client library for Java. This package contains Microsoft Azure SDK for Mongo Cluster Management SDK. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure Cosmos DB for MongoDB vCore resources including clusters and firewall rules. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

### Breaking Changes
* `models.DataApiMode` was added

* `models.DataApiProperties` was added

### Bugs Fixed
#### `models.MongoClusterProperties` was modified

* `withDataApi(models.DataApiProperties)` was added
* `dataApi()` was added

#### `models.MongoClusterUpdateProperties` was modified

### Other Changes
* `dataApi()` was added
* `withDataApi(models.DataApiProperties)` was added

## 1.0.0 (2024-09-25)

Expand Down
25 changes: 11 additions & 14 deletions sdk/mongocluster/azure-resourcemanager-mongocluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
MongoClusterManager manager = MongoClusterManager
.authenticate(credential, profile);
```

The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.

See [Authentication][authenticate] for more options.

Expand All @@ -75,16 +75,15 @@ mongoCluster = mongoClusterManager.mongoClusters()
.define(clusterName)
.withRegion(REGION)
.withExistingResourceGroup(resourceGroupName)
.withProperties(
new MongoClusterProperties()
.withAdministrator(new AdministratorProperties().withUserName(loginUser).withPassword(loginPwd))
.withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
.withStorage(new StorageProperties().withSizeGb(128L))
.withCompute(new ComputeProperties().withTier("M30"))
.withHighAvailability(new HighAvailabilityProperties().withTargetMode(HighAvailabilityMode.DISABLED))
.withSharding(new ShardingProperties().withShardCount(1))
.withServerVersion("7.0")
)
.withProperties(new MongoClusterProperties()
.withAdministrator(new AdministratorProperties().withUserName(loginUser).withPassword(loginPwd))
.withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
.withStorage(new StorageProperties().withSizeGb(128L))
.withCompute(new ComputeProperties().withTier("M30"))
.withHighAvailability(
new HighAvailabilityProperties().withTargetMode(HighAvailabilityMode.DISABLED))
.withSharding(new ShardingProperties().withShardCount(1))
.withServerVersion("7.0"))
.create();
```
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mongocluster/azure-resourcemanager-mongocluster/SAMPLE.md)
Expand Down Expand Up @@ -117,5 +116,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/


Loading