Skip to content

[AutoPR @azure/arm-mongocluster] Add Microsoft.DocumentDB/mongoClusters API verison 2025-04-01-preview #15578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
52 changes: 43 additions & 9 deletions sdk/mongocluster/arm-mongocluster/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,49 @@
# Release History

## 1.0.2 (Unreleased)


## 1.1.0-beta.1 (2025-05-12)
Compared with version 1.0.1

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

- Added operation group UsersOperations
- Added Interface AuthConfigProperties
- Added Interface DataApiProperties
- Added Interface DatabaseRole
- Added Interface EntraIdentityProvider
- Added Interface EntraIdentityProviderProperties
- Added Interface ErrorAdditionalInfo
- Added Interface ErrorDetail
- Added Interface ErrorResponse
- Added Interface IdentityProvider
- Added Interface User
- Added Interface UserProperties
- Added Interface UsersCreateOrUpdateOptionalParams
- Added Interface UsersDeleteOptionalParams
- Added Interface UsersGetOptionalParams
- Added Interface UsersListByMongoClusterOptionalParams
- Added Type Alias AuthenticationMode
- Added Type Alias DataApiMode
- Added Type Alias EntraPrincipalType
- Added Type Alias IdentityProviderType
- Added Type Alias IdentityProviderUnion
- Added Type Alias StorageType
- Added Type Alias UserRole
- Interface MongoClusterProperties has a new optional parameter authConfig
- Interface MongoClusterProperties has a new optional parameter dataApi
- Interface MongoClusterUpdateProperties has a new optional parameter authConfig
- Interface MongoClusterUpdateProperties has a new optional parameter dataApi
- Interface StorageProperties has a new optional parameter iops
- Interface StorageProperties has a new optional parameter throughput
- Interface StorageProperties has a new optional parameter type
- Added Enum KnownAuthenticationMode
- Added Enum KnownDataApiMode
- Added Enum KnownEntraPrincipalType
- Added Enum KnownIdentityProviderType
- Added Enum KnownStorageType
- Added Enum KnownUserRole
- Added Enum KnownVersions


## 1.0.1 (2024-10-14)

### Bugs Fixed
Expand Down
2 changes: 1 addition & 1 deletion sdk/mongocluster/arm-mongocluster/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
35 changes: 20 additions & 15 deletions sdk/mongocluster/arm-mongocluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f

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.

[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mongocluster/arm-mongocluster) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-mongocluster) |
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-mongocluster?view=azure-node-preview) |
Key links:

- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mongocluster/arm-mongocluster)
- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-mongocluster)
- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-mongocluster?view=azure-node-preview)
- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mongocluster/arm-mongocluster/samples)

## Getting started

Expand All @@ -29,7 +32,7 @@ Install the Azure MongoClusterManagement client library for JavaScript with `npm
npm install @azure/arm-mongocluster
```

### Create and authenticate a `MongoClusterManagementClient`
### Create and authenticate a `DocumentDBClient`

To create a client object to access the Azure MongoClusterManagement API, you will need the `endpoint` of your Azure MongoClusterManagement resource and a `credential`. The Azure MongoClusterManagement client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure MongoClusterManagement resource in the [Azure Portal][azure_portal].
Expand All @@ -43,43 +46,41 @@ npm install @azure/identity
```

You will also need to **register a new AAD application and grant access to Azure MongoClusterManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.

For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).

Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client.

```ts snippet:ReadmeSampleCreateClient_Node
import { MongoClusterManagementClient } from "@azure/arm-mongocluster";
import { DocumentDBClient } from "@azure/arm-mongocluster";
import { DefaultAzureCredential } from "@azure/identity";

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new MongoClusterManagementClient(new DefaultAzureCredential(), subscriptionId);
const client = new DocumentDBClient(new DefaultAzureCredential(), subscriptionId);
```

For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.

```ts snippet:ReadmeSampleCreateClient_Browser
import { InteractiveBrowserCredential } from "@azure/identity";
import { MongoClusterManagementClient } from "@azure/arm-mongocluster";
import { DocumentDBClient } from "@azure/arm-mongocluster";

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new InteractiveBrowserCredential({
tenantId: "<YOUR_TENANT_ID>",
clientId: "<YOUR_CLIENT_ID>",
});
const client = new MongoClusterManagementClient(credential, subscriptionId);
clientId: "<YOUR_CLIENT_ID>"
});
const client = new DocumentDBClient(credential, subscriptionId);
```

### JavaScript Bundle

### JavaScript Bundle
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).

## Key concepts

### MongoClusterManagementClient
### DocumentDBClient

`MongoClusterManagementClient` is the primary interface for developers using the Azure MongoClusterManagement client library. Explore the methods on this client object to understand the different features of the Azure MongoClusterManagement service that you can access.
`DocumentDBClient` is the primary interface for developers using the Azure MongoClusterManagement client library. Explore the methods on this client object to understand the different features of the Azure MongoClusterManagement service that you can access.

## Troubleshooting

Expand All @@ -95,6 +96,10 @@ setLogLevel("info");

For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).

## Next steps

Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mongocluster/arm-mongocluster/samples) directory for detailed examples on how to use this library.

## Contributing

If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
Expand Down
6 changes: 0 additions & 6 deletions sdk/mongocluster/arm-mongocluster/assets.json

This file was deleted.

14 changes: 14 additions & 0 deletions sdk/mongocluster/arm-mongocluster/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"@azure/azure-sdk/ts-package-json-files-required": "off",
"@azure/azure-sdk/ts-package-json-main-is-cjs": "off",
"tsdoc/syntax": "warn",
},
},
]);
Loading