diff --git a/sdk/mongocluster/arm-mongocluster/CHANGELOG.md b/sdk/mongocluster/arm-mongocluster/CHANGELOG.md index 6ac8dbc51e37..730d2ca3f486 100644 --- a/sdk/mongocluster/arm-mongocluster/CHANGELOG.md +++ b/sdk/mongocluster/arm-mongocluster/CHANGELOG.md @@ -1,5 +1,61 @@ # Release History +## 1.1.0-beta.2 (2025-09-29) +Compared with version 1.0.1 + +### Features Added + - Added operation group UsersOperations + - Added Interface AuthConfigProperties + - Added Interface CustomerManagedKeyEncryptionProperties + - Added Interface DataApiProperties + - Added Interface DatabaseRole + - Added Interface EncryptionProperties + - Added Interface EntraIdentityProvider + - Added Interface EntraIdentityProviderProperties + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponse + - Added Interface IdentityProvider + - Added Interface KeyEncryptionKeyIdentity + - Added Interface ManagedServiceIdentity + - Added Interface User + - Added Interface UserAssignedIdentity + - Added Interface UserProperties + - Added Interface UsersCreateOrUpdateOptionalParams + - Added Interface UsersDeleteOptionalParams + - Added Interface UsersGetOptionalParams + - Added Interface UsersListByMongoClusterOptionalParams + - Interface MongoCluster has a new optional parameter identity + - Interface MongoClusterManagementClientOptionalParams has a new optional parameter cloudSetting + - Interface MongoClusterProperties has a new optional parameter authConfig + - Interface MongoClusterProperties has a new optional parameter dataApi + - Interface MongoClusterProperties has a new optional parameter encryption + - Interface MongoClusterUpdate has a new optional parameter identity + - Interface MongoClusterUpdateProperties has a new optional parameter authConfig + - Interface MongoClusterUpdateProperties has a new optional parameter dataApi + - Interface MongoClusterUpdateProperties has a new optional parameter encryption + - Interface StorageProperties has a new optional parameter type + - Added Type Alias AuthenticationMode + - Added Type Alias AzureSupportedClouds + - Added Type Alias DataApiMode + - Added Type Alias EntraPrincipalType + - Added Type Alias IdentityProviderType + - Added Type Alias IdentityProviderUnion + - Added Type Alias KeyEncryptionKeyIdentityType + - Added Type Alias ManagedServiceIdentityType + - Added Type Alias StorageType + - Added Type Alias UserRole + - Added Enum AzureClouds + - Added Enum KnownAuthenticationMode + - Added Enum KnownDataApiMode + - Added Enum KnownEntraPrincipalType + - Added Enum KnownIdentityProviderType + - Added Enum KnownKeyEncryptionKeyIdentityType + - Added Enum KnownManagedServiceIdentityType + - Added Enum KnownStorageType + - Added Enum KnownUserRole + - Added Enum KnownVersions + ## 1.1.0-beta.1 (2025-07-23) Compared with version 1.0.1 diff --git a/sdk/mongocluster/arm-mongocluster/metadata.json b/sdk/mongocluster/arm-mongocluster/metadata.json index fbab9d4d9394..e3fb37895a73 100644 --- a/sdk/mongocluster/arm-mongocluster/metadata.json +++ b/sdk/mongocluster/arm-mongocluster/metadata.json @@ -1,4 +1,118 @@ { - "apiVersion": "2025-07-01-preview", - "emitterVersion": "0.42.0" + "apiVersion": "2025-08-01-preview", + "emitterVersion": "0.44.1", + "crossLanguageDefinitions": { + "CrossLanguagePackageId": "Microsoft.DocumentDB", + "CrossLanguageDefinitionId": { + "@azure/arm-mongocluster!OperationListResult:interface": "Azure.ResourceManager.CommonTypes.OperationListResult", + "@azure/arm-mongocluster!Operation:interface": "Azure.ResourceManager.CommonTypes.Operation", + "@azure/arm-mongocluster!OperationDisplay:interface": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "@azure/arm-mongocluster!ErrorResponse:interface": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "@azure/arm-mongocluster!ErrorDetail:interface": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "@azure/arm-mongocluster!ErrorAdditionalInfo:interface": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "@azure/arm-mongocluster!MongoCluster:interface": "Microsoft.DocumentDB.MongoCluster", + "@azure/arm-mongocluster!MongoClusterProperties:interface": "Microsoft.DocumentDB.MongoClusterProperties", + "@azure/arm-mongocluster!MongoClusterRestoreParameters:interface": "Microsoft.DocumentDB.MongoClusterRestoreParameters", + "@azure/arm-mongocluster!MongoClusterReplicaParameters:interface": "Microsoft.DocumentDB.MongoClusterReplicaParameters", + "@azure/arm-mongocluster!AdministratorProperties:interface": "Microsoft.DocumentDB.AdministratorProperties", + "@azure/arm-mongocluster!HighAvailabilityProperties:interface": "Microsoft.DocumentDB.HighAvailabilityProperties", + "@azure/arm-mongocluster!StorageProperties:interface": "Microsoft.DocumentDB.StorageProperties", + "@azure/arm-mongocluster!ShardingProperties:interface": "Microsoft.DocumentDB.ShardingProperties", + "@azure/arm-mongocluster!ComputeProperties:interface": "Microsoft.DocumentDB.ComputeProperties", + "@azure/arm-mongocluster!BackupProperties:interface": "Microsoft.DocumentDB.BackupProperties", + "@azure/arm-mongocluster!DataApiProperties:interface": "Microsoft.DocumentDB.DataApiProperties", + "@azure/arm-mongocluster!PrivateEndpointConnection:interface": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnection", + "@azure/arm-mongocluster!PrivateEndpointConnectionProperties:interface": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties", + "@azure/arm-mongocluster!PrivateEndpoint:interface": "Azure.ResourceManager.CommonTypes.PrivateEndpoint", + "@azure/arm-mongocluster!PrivateLinkServiceConnectionState:interface": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState", + "@azure/arm-mongocluster!Resource:interface": "Azure.ResourceManager.CommonTypes.Resource", + "@azure/arm-mongocluster!SystemData:interface": "Azure.ResourceManager.CommonTypes.SystemData", + "@azure/arm-mongocluster!ReplicationProperties:interface": "Microsoft.DocumentDB.ReplicationProperties", + "@azure/arm-mongocluster!AuthConfigProperties:interface": "Microsoft.DocumentDB.AuthConfigProperties", + "@azure/arm-mongocluster!EncryptionProperties:interface": "Microsoft.DocumentDB.EncryptionProperties", + "@azure/arm-mongocluster!CustomerManagedKeyEncryptionProperties:interface": "Microsoft.DocumentDB.CustomerManagedKeyEncryptionProperties", + "@azure/arm-mongocluster!KeyEncryptionKeyIdentity:interface": "Microsoft.DocumentDB.KeyEncryptionKeyIdentity", + "@azure/arm-mongocluster!ManagedServiceIdentity:interface": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "@azure/arm-mongocluster!UserAssignedIdentity:interface": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "@azure/arm-mongocluster!TrackedResource:interface": "Azure.ResourceManager.CommonTypes.TrackedResource", + "@azure/arm-mongocluster!MongoClusterUpdate:interface": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "@azure/arm-mongocluster!MongoClusterUpdateProperties:interface": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "@azure/arm-mongocluster!ArmOperationStatusResourceProvisioningState:interface": "Azure.ResourceManager.ArmOperationStatus", + "@azure/arm-mongocluster!MongoClusterListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-mongocluster!ListConnectionStringsResult:interface": "Microsoft.DocumentDB.ListConnectionStringsResult", + "@azure/arm-mongocluster!ConnectionString:interface": "Microsoft.DocumentDB.ConnectionString", + "@azure/arm-mongocluster!CheckNameAvailabilityRequest:interface": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityRequest", + "@azure/arm-mongocluster!CheckNameAvailabilityResponse:interface": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse", + "@azure/arm-mongocluster!PromoteReplicaRequest:interface": "Microsoft.DocumentDB.PromoteReplicaRequest", + "@azure/arm-mongocluster!FirewallRule:interface": "Microsoft.DocumentDB.FirewallRule", + "@azure/arm-mongocluster!FirewallRuleProperties:interface": "Microsoft.DocumentDB.FirewallRuleProperties", + "@azure/arm-mongocluster!ProxyResource:interface": "Azure.ResourceManager.CommonTypes.ProxyResource", + "@azure/arm-mongocluster!FirewallRuleListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-mongocluster!PrivateEndpointConnectionResourceListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-mongocluster!PrivateEndpointConnectionResource:interface": "Microsoft.DocumentDB.PrivateEndpointConnectionResource", + "@azure/arm-mongocluster!PrivateLinkResourceListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-mongocluster!PrivateLinkResource:interface": "Microsoft.DocumentDB.PrivateLinkResource", + "@azure/arm-mongocluster!PrivateLinkResourceProperties:interface": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties", + "@azure/arm-mongocluster!ReplicaListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-mongocluster!Replica:interface": "Microsoft.DocumentDB.Replica", + "@azure/arm-mongocluster!User:interface": "Microsoft.DocumentDB.User", + "@azure/arm-mongocluster!UserProperties:interface": "Microsoft.DocumentDB.UserProperties", + "@azure/arm-mongocluster!IdentityProvider:interface": "Microsoft.DocumentDB.IdentityProvider", + "@azure/arm-mongocluster!EntraIdentityProvider:interface": "Microsoft.DocumentDB.EntraIdentityProvider", + "@azure/arm-mongocluster!EntraIdentityProviderProperties:interface": "Microsoft.DocumentDB.EntraIdentityProviderProperties", + "@azure/arm-mongocluster!DatabaseRole:interface": "Microsoft.DocumentDB.DatabaseRole", + "@azure/arm-mongocluster!UserListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-mongocluster!KnownOrigin:enum": "Azure.ResourceManager.CommonTypes.Origin", + "@azure/arm-mongocluster!KnownActionType:enum": "Azure.ResourceManager.CommonTypes.ActionType", + "@azure/arm-mongocluster!KnownCreateMode:enum": "Microsoft.DocumentDB.CreateMode", + "@azure/arm-mongocluster!KnownProvisioningState:enum": "Microsoft.DocumentDB.ProvisioningState", + "@azure/arm-mongocluster!KnownMongoClusterStatus:enum": "Microsoft.DocumentDB.MongoClusterStatus", + "@azure/arm-mongocluster!KnownPublicNetworkAccess:enum": "Microsoft.DocumentDB.PublicNetworkAccess", + "@azure/arm-mongocluster!KnownHighAvailabilityMode:enum": "Microsoft.DocumentDB.HighAvailabilityMode", + "@azure/arm-mongocluster!KnownStorageType:enum": "Microsoft.DocumentDB.StorageType", + "@azure/arm-mongocluster!KnownDataApiMode:enum": "Microsoft.DocumentDB.DataApiMode", + "@azure/arm-mongocluster!KnownPrivateEndpointServiceConnectionStatus:enum": "Azure.ResourceManager.CommonTypes.PrivateEndpointServiceConnectionStatus", + "@azure/arm-mongocluster!KnownPrivateEndpointConnectionProvisioningState:enum": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProvisioningState", + "@azure/arm-mongocluster!KnowncreatedByType:enum": "Azure.ResourceManager.CommonTypes.createdByType", + "@azure/arm-mongocluster!KnownPreviewFeature:enum": "Microsoft.DocumentDB.PreviewFeature", + "@azure/arm-mongocluster!KnownReplicationRole:enum": "Microsoft.DocumentDB.ReplicationRole", + "@azure/arm-mongocluster!KnownReplicationState:enum": "Microsoft.DocumentDB.ReplicationState", + "@azure/arm-mongocluster!KnownAuthenticationMode:enum": "Microsoft.DocumentDB.AuthenticationMode", + "@azure/arm-mongocluster!KnownKeyEncryptionKeyIdentityType:enum": "Microsoft.DocumentDB.KeyEncryptionKeyIdentityType", + "@azure/arm-mongocluster!KnownManagedServiceIdentityType:enum": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "@azure/arm-mongocluster!KnownResourceProvisioningState:enum": "Azure.ResourceManager.ResourceProvisioningState", + "@azure/arm-mongocluster!KnownCheckNameAvailabilityReason:enum": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityReason", + "@azure/arm-mongocluster!KnownPromoteOption:enum": "Microsoft.DocumentDB.PromoteOption", + "@azure/arm-mongocluster!KnownPromoteMode:enum": "Microsoft.DocumentDB.PromoteMode", + "@azure/arm-mongocluster!KnownIdentityProviderType:enum": "Microsoft.DocumentDB.IdentityProviderType", + "@azure/arm-mongocluster!KnownEntraPrincipalType:enum": "Microsoft.DocumentDB.EntraPrincipalType", + "@azure/arm-mongocluster!KnownUserRole:enum": "Microsoft.DocumentDB.UserRole", + "@azure/arm-mongocluster!KnownVersions:enum": "Microsoft.DocumentDB.Versions", + "@azure/arm-mongocluster!ManagedServiceIdentityUserAssignedIdentity:type": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentity.anonymous", + "@azure/arm-mongocluster!UsersOperations#listByMongoCluster:member": "Microsoft.DocumentDB.Users.listByMongoCluster", + "@azure/arm-mongocluster!UsersOperations#delete:member": "Microsoft.DocumentDB.Users.delete", + "@azure/arm-mongocluster!UsersOperations#createOrUpdate:member": "Microsoft.DocumentDB.Users.createOrUpdate", + "@azure/arm-mongocluster!UsersOperations#get:member": "Microsoft.DocumentDB.Users.get", + "@azure/arm-mongocluster!ReplicasOperations#listByParent:member": "Microsoft.DocumentDB.Replicas.listByParent", + "@azure/arm-mongocluster!PrivateLinksOperations#listByMongoCluster:member": "Microsoft.DocumentDB.PrivateLinks.listByMongoCluster", + "@azure/arm-mongocluster!PrivateEndpointConnectionsOperations#delete:member": "Microsoft.DocumentDB.PrivateEndpointConnections.delete", + "@azure/arm-mongocluster!PrivateEndpointConnectionsOperations#create:member": "Microsoft.DocumentDB.PrivateEndpointConnections.create", + "@azure/arm-mongocluster!PrivateEndpointConnectionsOperations#get:member": "Microsoft.DocumentDB.PrivateEndpointConnections.get", + "@azure/arm-mongocluster!PrivateEndpointConnectionsOperations#listByMongoCluster:member": "Microsoft.DocumentDB.PrivateEndpointConnections.listByMongoCluster", + "@azure/arm-mongocluster!FirewallRulesOperations#listByMongoCluster:member": "Microsoft.DocumentDB.FirewallRules.listByMongoCluster", + "@azure/arm-mongocluster!FirewallRulesOperations#delete:member": "Microsoft.DocumentDB.FirewallRules.delete", + "@azure/arm-mongocluster!FirewallRulesOperations#createOrUpdate:member": "Microsoft.DocumentDB.FirewallRules.createOrUpdate", + "@azure/arm-mongocluster!FirewallRulesOperations#get:member": "Microsoft.DocumentDB.FirewallRules.get", + "@azure/arm-mongocluster!MongoClustersOperations#promote:member": "Microsoft.DocumentDB.MongoClusters.promote", + "@azure/arm-mongocluster!MongoClustersOperations#checkNameAvailability:member": "Microsoft.DocumentDB.MongoClusters.checkNameAvailability", + "@azure/arm-mongocluster!MongoClustersOperations#listConnectionStrings:member": "Microsoft.DocumentDB.MongoClusters.listConnectionStrings", + "@azure/arm-mongocluster!MongoClustersOperations#list:member": "Microsoft.DocumentDB.MongoClusters.list", + "@azure/arm-mongocluster!MongoClustersOperations#listByResourceGroup:member": "Microsoft.DocumentDB.MongoClusters.listByResourceGroup", + "@azure/arm-mongocluster!MongoClustersOperations#delete:member": "Microsoft.DocumentDB.MongoClusters.delete", + "@azure/arm-mongocluster!MongoClustersOperations#update:member": "Microsoft.DocumentDB.MongoClusters.update", + "@azure/arm-mongocluster!MongoClustersOperations#createOrUpdate:member": "Microsoft.DocumentDB.MongoClusters.createOrUpdate", + "@azure/arm-mongocluster!MongoClustersOperations#get:member": "Microsoft.DocumentDB.MongoClusters.get", + "@azure/arm-mongocluster!OperationsOperations#list:member": "Azure.ResourceManager.Operations.list" + } + } } diff --git a/sdk/mongocluster/arm-mongocluster/package.json b/sdk/mongocluster/arm-mongocluster/package.json index c421993015b6..83b9ee09f928 100644 --- a/sdk/mongocluster/arm-mongocluster/package.json +++ b/sdk/mongocluster/arm-mongocluster/package.json @@ -1,6 +1,6 @@ { "name": "@azure/arm-mongocluster", - "version": "1.1.0-beta.1", + "version": "1.1.0-beta.2", "description": "A generated SDK for MongoClusterManagementClient.", "engines": { "node": ">=20.0.0" @@ -77,35 +77,36 @@ "tslib": "^2.8.1" }, "devDependencies": { - "@azure-tools/test-credential": "workspace:^", - "@azure-tools/test-recorder": "workspace:^", - "@azure-tools/test-utils-vitest": "workspace:^", - "@azure/dev-tool": "workspace:^", - "@azure/eslint-plugin-azure-sdk": "workspace:^", - "@azure/identity": "catalog:internal", - "@types/node": "catalog:", - "eslint": "catalog:", - "@vitest/browser": "catalog:testing", - "@vitest/coverage-istanbul": "catalog:testing", - "dotenv": "catalog:testing", - "playwright": "catalog:testing", - "typescript": "catalog:", - "vitest": "catalog:testing" + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", + "@azure/dev-tool": "^1.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@azure/identity": "^4.9.0", + "@types/node": "^20.0.0", + "eslint": "^9.9.0", + "@vitest/browser": "^3.0.9", + "@vitest/coverage-istanbul": "^3.0.9", + "dotenv": "^16.0.0", + "playwright": "^1.52.0", + "typescript": "~5.8.2", + "vitest": "^3.0.9" }, "scripts": { - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "extract-api": "dev-tool run vendored rimraf review && dev-tool run extract-api", - "pack": "pnpm pack 2>&1", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "extract-api": "rimraf review && dev-tool run extract-api", + "pack": "npm pack 2>&1", "lint": "echo skipped", "lint:fix": "echo skipped", - "build:samples": "tsc -p tsconfig.samples.json", - "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", + "build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f", + "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", "execute:samples": "dev-tool samples run samples-dev", - "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", + "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", "generate:client": "echo skipped", "test:browser": "dev-tool run build-test && dev-tool run test:vitest --browser", "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", - "test:node": "dev-tool run build-test --no-browser-test && dev-tool run test:vitest", + "test:node": "dev-tool run test:vitest", + "test:node:esm": "dev-tool run test:vitest --esm", "test": "npm run test:node && npm run test:browser", "update-snippets": "dev-tool run update-snippets" }, diff --git a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-firewallRules-node.api.md b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-firewallRules-node.api.md index fde17cedfd1b..9d8c9db96fe3 100644 --- a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-firewallRules-node.api.md +++ b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-firewallRules-node.api.md @@ -4,10 +4,10 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; -import { OperationState } from '@azure/core-lro'; -import { PollerLike } from '@azure/core-lro'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PollerLike } from '@azure/core-lro'; // @public export function $delete(context: MongoClusterManagementContext, resourceGroupName: string, mongoClusterName: string, firewallRuleName: string, options?: FirewallRulesDeleteOptionalParams): PollerLike, void>; diff --git a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-mongoClusters-node.api.md b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-mongoClusters-node.api.md index 0bc55db51b67..518a1e0fbf46 100644 --- a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-mongoClusters-node.api.md +++ b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-mongoClusters-node.api.md @@ -4,10 +4,10 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; -import { OperationState } from '@azure/core-lro'; -import { PollerLike } from '@azure/core-lro'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PollerLike } from '@azure/core-lro'; // @public export function $delete(context: MongoClusterManagementContext, resourceGroupName: string, mongoClusterName: string, options?: MongoClustersDeleteOptionalParams): PollerLike, void>; diff --git a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-node.api.md b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-node.api.md index 1014b1d4920f..b65649a9493b 100644 --- a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-node.api.md +++ b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-node.api.md @@ -4,9 +4,9 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { ClientOptions } from '@azure-rest/core-client'; -import { TokenCredential } from '@azure/core-auth'; +import type { Client } from '@azure-rest/core-client'; +import type { ClientOptions } from '@azure-rest/core-client'; +import type { TokenCredential } from '@azure/core-auth'; // @public export function createMongoClusterManagement(credential: TokenCredential, subscriptionId: string, options?: MongoClusterManagementClientOptionalParams): MongoClusterManagementContext; @@ -14,6 +14,7 @@ export function createMongoClusterManagement(credential: TokenCredential, subscr // @public export interface MongoClusterManagementClientOptionalParams extends ClientOptions { apiVersion?: string; + cloudSetting?: AzureSupportedClouds; } // @public diff --git a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-operations-node.api.md b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-operations-node.api.md index cd2a0c8aab84..40f958ec64a5 100644 --- a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-operations-node.api.md +++ b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-operations-node.api.md @@ -4,8 +4,8 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; // @public export function list(context: MongoClusterManagementContext, options?: OperationsListOptionalParams): PagedAsyncIterableIterator; diff --git a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-privateEndpointConnections-node.api.md b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-privateEndpointConnections-node.api.md index 8a76a9cb14b8..c936ea39fbd4 100644 --- a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-privateEndpointConnections-node.api.md +++ b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-privateEndpointConnections-node.api.md @@ -4,10 +4,10 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; -import { OperationState } from '@azure/core-lro'; -import { PollerLike } from '@azure/core-lro'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PollerLike } from '@azure/core-lro'; // @public export function $delete(context: MongoClusterManagementContext, resourceGroupName: string, mongoClusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): PollerLike, void>; diff --git a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-privateLinks-node.api.md b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-privateLinks-node.api.md index db3fdb65e49c..f5699b969bcd 100644 --- a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-privateLinks-node.api.md +++ b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-privateLinks-node.api.md @@ -4,8 +4,8 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; // @public export function listByMongoCluster(context: MongoClusterManagementContext, resourceGroupName: string, mongoClusterName: string, options?: PrivateLinksListByMongoClusterOptionalParams): PagedAsyncIterableIterator; diff --git a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-replicas-node.api.md b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-replicas-node.api.md index b3095511c09a..715b31f21256 100644 --- a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-replicas-node.api.md +++ b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-replicas-node.api.md @@ -4,8 +4,8 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; // @public export function listByParent(context: MongoClusterManagementContext, resourceGroupName: string, mongoClusterName: string, options?: ReplicasListByParentOptionalParams): PagedAsyncIterableIterator; diff --git a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-users-node.api.md b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-users-node.api.md index db1fa152e028..a42ee947a0f5 100644 --- a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-users-node.api.md +++ b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-api-users-node.api.md @@ -4,10 +4,10 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; -import { OperationState } from '@azure/core-lro'; -import { PollerLike } from '@azure/core-lro'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PollerLike } from '@azure/core-lro'; // @public export function $delete(context: MongoClusterManagementContext, resourceGroupName: string, mongoClusterName: string, userName: string, options?: UsersDeleteOptionalParams): PollerLike, void>; diff --git a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-models-node.api.md b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-models-node.api.md index 9aafb2222f41..456373372556 100644 --- a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-models-node.api.md +++ b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-models-node.api.md @@ -62,8 +62,8 @@ export type CreateMode = string; // @public export interface CustomerManagedKeyEncryptionProperties { - keyEncryptionKeyIdentity: KeyEncryptionKeyIdentity; - keyEncryptionKeyUrl: string; + keyEncryptionKeyIdentity?: KeyEncryptionKeyIdentity; + keyEncryptionKeyUrl?: string; } // @public @@ -152,8 +152,8 @@ export type IdentityProviderUnion = EntraIdentityProvider | IdentityProvider; // @public export interface KeyEncryptionKeyIdentity { - identityType: KeyEncryptionKeyIdentityType; - userAssignedIdentityResourceId: string; + identityType?: KeyEncryptionKeyIdentityType; + userAssignedIdentityResourceId?: string; } // @public @@ -328,7 +328,8 @@ export enum KnownVersions { V20240701 = "2024-07-01", V20241001Preview = "2024-10-01-preview", V20250401Preview = "2025-04-01-preview", - V20250701Preview = "2025-07-01-preview" + V20250701Preview = "2025-07-01-preview", + V20250801Preview = "2025-08-01-preview" } // @public @@ -407,6 +408,7 @@ export interface MongoClusterUpdateProperties { backup?: BackupProperties; compute?: ComputeProperties; dataApi?: DataApiProperties; + encryption?: EncryptionProperties; highAvailability?: HighAvailabilityProperties; previewFeatures?: PreviewFeature[]; publicNetworkAccess?: PublicNetworkAccess; @@ -541,9 +543,7 @@ export interface ShardingProperties { // @public export interface StorageProperties { - iops?: number; sizeGb?: number; - throughput?: number; type?: StorageType; } diff --git a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-node.api.md b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-node.api.md index 61f3ffaee253..3106d1f8b55e 100644 --- a/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-node.api.md +++ b/sdk/mongocluster/arm-mongocluster/review/arm-mongocluster-node.api.md @@ -4,14 +4,14 @@ ```ts -import { AbortSignalLike } from '@azure/abort-controller'; -import { ClientOptions } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; -import { OperationState } from '@azure/core-lro'; -import { PathUncheckedResponse } from '@azure-rest/core-client'; -import { Pipeline } from '@azure/core-rest-pipeline'; -import { PollerLike } from '@azure/core-lro'; -import { TokenCredential } from '@azure/core-auth'; +import type { AbortSignalLike } from '@azure/abort-controller'; +import type { ClientOptions } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PathUncheckedResponse } from '@azure-rest/core-client'; +import type { Pipeline } from '@azure/core-rest-pipeline'; +import type { PollerLike } from '@azure/core-lro'; +import type { TokenCredential } from '@azure/core-auth'; // @public export type ActionType = string; @@ -30,6 +30,16 @@ export interface AuthConfigProperties { // @public export type AuthenticationMode = string; +// @public +export enum AzureClouds { + AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD", + AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD", + AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT" +} + +// @public +export type AzureSupportedClouds = `${AzureClouds}`; + // @public export interface BackupProperties { readonly earliestRestoreTime?: string; @@ -76,8 +86,8 @@ export type CreateMode = string; // @public export interface CustomerManagedKeyEncryptionProperties { - keyEncryptionKeyIdentity: KeyEncryptionKeyIdentity; - keyEncryptionKeyUrl: string; + keyEncryptionKeyIdentity?: KeyEncryptionKeyIdentity; + keyEncryptionKeyUrl?: string; } // @public @@ -192,8 +202,8 @@ export type IdentityProviderUnion = EntraIdentityProvider | IdentityProvider; // @public export interface KeyEncryptionKeyIdentity { - identityType: KeyEncryptionKeyIdentityType; - userAssignedIdentityResourceId: string; + identityType?: KeyEncryptionKeyIdentityType; + userAssignedIdentityResourceId?: string; } // @public @@ -368,7 +378,8 @@ export enum KnownVersions { V20240701 = "2024-07-01", V20241001Preview = "2024-10-01-preview", V20250401Preview = "2025-04-01-preview", - V20250701Preview = "2025-07-01-preview" + V20250701Preview = "2025-07-01-preview", + V20250801Preview = "2025-08-01-preview" } // @public @@ -409,6 +420,7 @@ export class MongoClusterManagementClient { // @public export interface MongoClusterManagementClientOptionalParams extends ClientOptions { apiVersion?: string; + cloudSetting?: AzureSupportedClouds; } // @public @@ -518,6 +530,7 @@ export interface MongoClusterUpdateProperties { backup?: BackupProperties; compute?: ComputeProperties; dataApi?: DataApiProperties; + encryption?: EncryptionProperties; highAvailability?: HighAvailabilityProperties; previewFeatures?: PreviewFeature[]; publicNetworkAccess?: PublicNetworkAccess; @@ -727,9 +740,7 @@ export interface ShardingProperties { // @public export interface StorageProperties { - iops?: number; sizeGb?: number; - throughput?: number; type?: StorageType; } diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/firewallRulesCreateOrUpdateSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/firewallRulesCreateOrUpdateSample.ts index 245ed24c319b..bde3a345896b 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/firewallRulesCreateOrUpdateSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/firewallRulesCreateOrUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to creates a new firewall rule or updates an existing firewall rule on a mongo cluster. * * @summary creates a new firewall rule or updates an existing firewall rule on a mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleCreate.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleCreate.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function createsAFirewallRuleOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/firewallRulesDeleteSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/firewallRulesDeleteSample.ts index e555fab67097..c27e1b6f4943 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/firewallRulesDeleteSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/firewallRulesDeleteSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to deletes a mongo cluster firewall rule. * * @summary deletes a mongo cluster firewall rule. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleDelete.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleDelete.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function deletesAFirewallRuleOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/firewallRulesGetSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/firewallRulesGetSample.ts index e84082f36d51..2ebb57a603c5 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/firewallRulesGetSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/firewallRulesGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to gets information about a mongo cluster firewall rule. * * @summary gets information about a mongo cluster firewall rule. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleGet.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleGet.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getsAFirewallRuleOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/firewallRulesListByMongoClusterSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/firewallRulesListByMongoClusterSample.ts index 2cd36a784075..6f6583486c9f 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/firewallRulesListByMongoClusterSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/firewallRulesListByMongoClusterSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to list all the firewall rules in a given mongo cluster. * * @summary list all the firewall rules in a given mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleList.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleList.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listTheFirewallRulesOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersCheckNameAvailabilitySample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersCheckNameAvailabilitySample.ts index 9e4e0ddfdb6b..ca2da67dfa4b 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersCheckNameAvailabilitySample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersCheckNameAvailabilitySample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to check if mongo cluster name is available for use. * * @summary check if mongo cluster name is available for use. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_NameAvailability.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_NameAvailability.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function checksAndConfirmsTheMongoClusterNameIsAvailabilityForUse(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; @@ -26,7 +25,7 @@ async function checksAndConfirmsTheMongoClusterNameIsAvailabilityForUse(): Promi * This sample demonstrates how to check if mongo cluster name is available for use. * * @summary check if mongo cluster name is available for use. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_NameAvailability_AlreadyExists.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_NameAvailability_AlreadyExists.json */ async function checksAndReturnsThatTheMongoClusterNameIsAlreadyInUse(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersCreateOrUpdateSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersCreateOrUpdateSample.ts index 734f6612a688..482c738c9973 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersCreateOrUpdateSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersCreateOrUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Create.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Create.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function createsANewMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; @@ -34,7 +33,7 @@ async function createsANewMongoClusterResource(): Promise { * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_CreateGeoReplica.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_CreateGeoReplica.json */ async function createsAReplicaMongoClusterResourceFromASourceResource(): Promise { const credential = new DefaultAzureCredential(); @@ -62,7 +61,7 @@ async function createsAReplicaMongoClusterResourceFromASourceResource(): Promise * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_CreateGeoReplica_CMK.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_CreateGeoReplica_CMK.json */ async function createsAReplicaMongoClusterResourceWithCustomerManagedKeyEncryptionFromASourceResource(): Promise { const credential = new DefaultAzureCredential(); @@ -107,7 +106,7 @@ async function createsAReplicaMongoClusterResourceWithCustomerManagedKeyEncrypti * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_CreatePITR.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_CreatePITR.json */ async function createsAMongoClusterResourceFromAPointInTimeRestore(): Promise { const credential = new DefaultAzureCredential(); @@ -117,6 +116,7 @@ async function createsAMongoClusterResourceFromAPointInTimeRestore(): Promise { const credential = new DefaultAzureCredential(); @@ -172,7 +172,32 @@ async function createsAMongoClusterResourceWithCustomerManagedKeyEncryptionFromA * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Create_CMK.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_CreatePITR_EntraAuth.json + */ +async function createsAMongoClusterResourceFromAPointInTimeRestoreWithMicrosoftEntraIDAuthenticationModeEnabled(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const client = new MongoClusterManagementClient(credential, subscriptionId); + const result = await client.mongoClusters.createOrUpdate("TestResourceGroup", "myMongoCluster", { + location: "westus2", + properties: { + createMode: "PointInTimeRestore", + authConfig: { allowedModes: ["MicrosoftEntraID"] }, + restoreParameters: { + pointInTimeUTC: new Date("2023-01-13T20:07:35Z"), + sourceResourceId: + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myOtherMongoCluster", + }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. + * + * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Create_CMK.json */ async function createsANewMongoClusterResourceWithCustomerManagedKeyEncryption(): Promise { const credential = new DefaultAzureCredential(); @@ -212,7 +237,7 @@ async function createsANewMongoClusterResourceWithCustomerManagedKeyEncryption() * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Create_SSDv2.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Create_SSDv2.json */ async function createsANewMongoClusterResourceWithPremiumSSDv2Storage(): Promise { const credential = new DefaultAzureCredential(); @@ -224,12 +249,7 @@ async function createsANewMongoClusterResourceWithPremiumSSDv2Storage(): Promise administrator: { userName: "mongoAdmin", password: "password" }, authConfig: { allowedModes: ["NativeAuth"] }, serverVersion: "5.0", - storage: { - sizeGb: 32, - type: "PremiumSSDv2", - iops: 3000, - throughput: 125, - }, + storage: { sizeGb: 32, type: "PremiumSSDv2" }, compute: { tier: "M30" }, sharding: { shardCount: 1 }, highAvailability: { targetMode: "ZoneRedundantPreferred" }, @@ -244,6 +264,7 @@ async function main(): Promise { await createsAReplicaMongoClusterResourceWithCustomerManagedKeyEncryptionFromASourceResource(); await createsAMongoClusterResourceFromAPointInTimeRestore(); await createsAMongoClusterResourceWithCustomerManagedKeyEncryptionFromAPointInTimeRestore(); + await createsAMongoClusterResourceFromAPointInTimeRestoreWithMicrosoftEntraIDAuthenticationModeEnabled(); await createsANewMongoClusterResourceWithCustomerManagedKeyEncryption(); await createsANewMongoClusterResourceWithPremiumSSDv2Storage(); } diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersDeleteSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersDeleteSample.ts index d25c213e895d..c7528645eb70 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersDeleteSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersDeleteSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to deletes a mongo cluster. * * @summary deletes a mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Delete.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Delete.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function deletesAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersGetSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersGetSample.ts index f37eac80d725..b9ed4e38a403 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersGetSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to gets information about a mongo cluster. * * @summary gets information about a mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Get.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Get.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getsAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersListByResourceGroupSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersListByResourceGroupSample.ts index 7bd3907498bd..2a72d35d0b92 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersListByResourceGroupSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersListByResourceGroupSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to list all the mongo clusters in a given resource group. * * @summary list all the mongo clusters in a given resource group. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_ListByResourceGroup.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_ListByResourceGroup.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listsTheMongoClusterResourcesInAResourceGroup(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersListConnectionStringsSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersListConnectionStringsSample.ts index b2066c5da473..1f78a67f3311 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersListConnectionStringsSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersListConnectionStringsSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to list mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster. * * @summary list mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_ListConnectionStrings.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_ListConnectionStrings.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listTheAvailableConnectionStringsForTheMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersListSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersListSample.ts index 1c949524382b..13d3d8051cfd 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersListSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersListSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to list all the mongo clusters in a given subscription. * * @summary list all the mongo clusters in a given subscription. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_List.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_List.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listsTheMongoClusterResourcesInASubscription(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersPromoteSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersPromoteSample.ts index 450f91789d0b..13a13f5778c1 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersPromoteSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersPromoteSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to promotes a replica mongo cluster to a primary role. * * @summary promotes a replica mongo cluster to a primary role. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_ForcePromoteReplica.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_ForcePromoteReplica.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function promotesAReplicaMongoClusterResourceToAPrimaryRole(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersUpdateSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersUpdateSample.ts index e550d247b889..ff778869503e 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersUpdateSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/mongoClustersUpdateSample.ts @@ -1,16 +1,49 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchDataApi.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchCMK.json */ +async function updatesTheCustomerManagedEncryptionKeyOnAMongoClusterResource(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const client = new MongoClusterManagementClient(credential, subscriptionId); + const result = await client.mongoClusters.update("TestResourceGroup", "myMongoCluster", { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity2": + {}, + }, + }, + properties: { + encryption: { + customerManagedKeyEncryption: { + keyEncryptionKeyIdentity: { + identityType: "UserAssignedIdentity", + userAssignedIdentityResourceId: + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity2", + }, + keyEncryptionKeyUrl: "https://myVault.vault.azure.net/keys/myKey2", + }, + }, + }, + }); + console.log(result); +} -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - +/** + * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. + * + * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchDataApi.json + */ async function enablesDataAPIOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; @@ -25,7 +58,23 @@ async function enablesDataAPIOnAMongoClusterResource(): Promise { * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchDiskSize.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchDisableNativeAuth.json + */ +async function updatesTheAllowedAuthenticationModesToRemoveNativeAuthentication(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const client = new MongoClusterManagementClient(credential, subscriptionId); + const result = await client.mongoClusters.update("TestResourceGroup", "myMongoCluster", { + properties: { authConfig: { allowedModes: ["MicrosoftEntraID"] } }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. + * + * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchDiskSize.json */ async function updatesTheDiskSizeOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); @@ -41,7 +90,7 @@ async function updatesTheDiskSizeOnAMongoClusterResource(): Promise { * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchEnableEntraIDAuth.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchEnableEntraIDAuth.json */ async function updatesTheAllowedAuthenticationModesToIncludeMicrosoftEntraIDAuthentication(): Promise { const credential = new DefaultAzureCredential(); @@ -59,7 +108,7 @@ async function updatesTheAllowedAuthenticationModesToIncludeMicrosoftEntraIDAuth * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchPrivateNetworkAccess.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchPrivateNetworkAccess.json */ async function disablesPublicNetworkAccessOnAMongoClusterResourceWithAPrivateEndpointConnection(): Promise { const credential = new DefaultAzureCredential(); @@ -75,21 +124,14 @@ async function disablesPublicNetworkAccessOnAMongoClusterResourceWithAPrivateEnd * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchSSDv2.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchSSDv2.json */ -async function updatesThePremiumSSDv2SizeIopsAndThroughputOnAMongoClusterResource(): Promise { +async function updatesThePremiumSSDv2SizeOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; const client = new MongoClusterManagementClient(credential, subscriptionId); const result = await client.mongoClusters.update("TestResourceGroup", "myMongoCluster", { - properties: { - storage: { - sizeGb: 128, - type: "PremiumSSDv2", - iops: 5000, - throughput: 1000, - }, - }, + properties: { storage: { sizeGb: 128, type: "PremiumSSDv2" } }, }); console.log(result); } @@ -98,7 +140,7 @@ async function updatesThePremiumSSDv2SizeIopsAndThroughputOnAMongoClusterResourc * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_ResetPassword.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_ResetPassword.json */ async function resetsTheAdministratorLoginPassword(): Promise { const credential = new DefaultAzureCredential(); @@ -116,7 +158,7 @@ async function resetsTheAdministratorLoginPassword(): Promise { * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Update.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Update.json */ async function updatesAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); @@ -140,11 +182,13 @@ async function updatesAMongoClusterResource(): Promise { } async function main(): Promise { + await updatesTheCustomerManagedEncryptionKeyOnAMongoClusterResource(); await enablesDataAPIOnAMongoClusterResource(); + await updatesTheAllowedAuthenticationModesToRemoveNativeAuthentication(); await updatesTheDiskSizeOnAMongoClusterResource(); await updatesTheAllowedAuthenticationModesToIncludeMicrosoftEntraIDAuthentication(); await disablesPublicNetworkAccessOnAMongoClusterResourceWithAPrivateEndpointConnection(); - await updatesThePremiumSSDv2SizeIopsAndThroughputOnAMongoClusterResource(); + await updatesThePremiumSSDv2SizeOnAMongoClusterResource(); await resetsTheAdministratorLoginPassword(); await updatesAMongoClusterResource(); } diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/operationsListSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/operationsListSample.ts index 13c86378d528..5efe8808b0b2 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/operationsListSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/operationsListSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to list the operations for the provider * * @summary list the operations for the provider - * x-ms-original-file: 2025-07-01-preview/Operations_List.json + * x-ms-original-file: 2025-08-01-preview/Operations_List.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function operationsList(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/privateEndpointConnectionsCreateSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/privateEndpointConnectionsCreateSample.ts index 626cc3a582cd..a40f1711aa6a 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/privateEndpointConnectionsCreateSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/privateEndpointConnectionsCreateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to create a Private endpoint connection * * @summary create a Private endpoint connection - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionPut.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionPut.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function approvesAPrivateEndpointConnectionOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/privateEndpointConnectionsDeleteSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/privateEndpointConnectionsDeleteSample.ts index 49584c6cc8a9..fbeda01b1027 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/privateEndpointConnectionsDeleteSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to delete the private endpoint connection * * @summary delete the private endpoint connection - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionDelete.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionDelete.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function deleteAPrivateEndpointConnectionOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/privateEndpointConnectionsGetSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/privateEndpointConnectionsGetSample.ts index e8fee04fca86..1db996d4b1dc 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/privateEndpointConnectionsGetSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/privateEndpointConnectionsGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to get a specific private connection * * @summary get a specific private connection - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionGet.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionGet.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getAPrivateEndpointConnectionOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/privateEndpointConnectionsListByMongoClusterSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/privateEndpointConnectionsListByMongoClusterSample.ts index bbf0f92ab761..15882cd6aa99 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/privateEndpointConnectionsListByMongoClusterSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/privateEndpointConnectionsListByMongoClusterSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to list existing private connections * * @summary list existing private connections - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionList.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionList.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listsThePrivateEndpointConnectionResourcesOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/privateLinksListByMongoClusterSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/privateLinksListByMongoClusterSample.ts index aacc5f927650..b6c493d11955 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/privateLinksListByMongoClusterSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/privateLinksListByMongoClusterSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to list private links on the given resource * * @summary list private links on the given resource - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateLinkResourceList.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateLinkResourceList.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listsThePrivateLinkResourcesAvailableOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/replicasListByParentSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/replicasListByParentSample.ts index b4f3ad5e0ddc..6c4332ec3d1f 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/replicasListByParentSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/replicasListByParentSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to list all the replicas for the mongo cluster. * * @summary list all the replicas for the mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_ReplicaList.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_ReplicaList.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listTheReplicasLinkedToAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/usersCreateOrUpdateSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/usersCreateOrUpdateSample.ts index 9eac475cf79e..eeac3addd243 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/usersCreateOrUpdateSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/usersCreateOrUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to creates a new user or updates an existing user on a mongo cluster. * * @summary creates a new user or updates an existing user on a mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_UserCreateOrUpdate.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_UserCreateOrUpdate.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function createsAUserOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/usersDeleteSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/usersDeleteSample.ts index f5b8368f7102..1ce6193d65f7 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/usersDeleteSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/usersDeleteSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to deletes a mongo cluster user. * * @summary deletes a mongo cluster user. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_UserDelete.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_UserDelete.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function deletesAUserOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/usersGetSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/usersGetSample.ts index de65d6f1711a..c068b2924628 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/usersGetSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/usersGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to gets the defintion of a Mongo cluster user. * * @summary gets the defintion of a Mongo cluster user. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_UserGet.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_UserGet.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getsAUserOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples-dev/usersListByMongoClusterSample.ts b/sdk/mongocluster/arm-mongocluster/samples-dev/usersListByMongoClusterSample.ts index f183bad0028f..0f9426bfe28e 100644 --- a/sdk/mongocluster/arm-mongocluster/samples-dev/usersListByMongoClusterSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples-dev/usersListByMongoClusterSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to list all the users on a mongo cluster. * * @summary list all the users on a mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_UserList.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_UserList.json */ - -import { MongoClusterManagementClient } from "@azure/arm-mongocluster"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listTheUsersOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/README.md b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/README.md index b672eea9c2f5..a55713b121e6 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/README.md +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/README.md @@ -4,30 +4,30 @@ These sample programs show how to use the JavaScript client libraries for @azure | **File Name** | **Description** | | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [firewallRulesCreateOrUpdateSample.js][firewallrulescreateorupdatesample] | creates a new firewall rule or updates an existing firewall rule on a mongo cluster. x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleCreate.json | -| [firewallRulesDeleteSample.js][firewallrulesdeletesample] | deletes a mongo cluster firewall rule. x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleDelete.json | -| [firewallRulesGetSample.js][firewallrulesgetsample] | gets information about a mongo cluster firewall rule. x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleGet.json | -| [firewallRulesListByMongoClusterSample.js][firewallruleslistbymongoclustersample] | list all the firewall rules in a given mongo cluster. x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleList.json | -| [mongoClustersCheckNameAvailabilitySample.js][mongoclusterschecknameavailabilitysample] | check if mongo cluster name is available for use. x-ms-original-file: 2025-07-01-preview/MongoClusters_NameAvailability.json | -| [mongoClustersCreateOrUpdateSample.js][mongoclusterscreateorupdatesample] | create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. x-ms-original-file: 2025-07-01-preview/MongoClusters_Create.json | -| [mongoClustersDeleteSample.js][mongoclustersdeletesample] | deletes a mongo cluster. x-ms-original-file: 2025-07-01-preview/MongoClusters_Delete.json | -| [mongoClustersGetSample.js][mongoclustersgetsample] | gets information about a mongo cluster. x-ms-original-file: 2025-07-01-preview/MongoClusters_Get.json | -| [mongoClustersListByResourceGroupSample.js][mongoclusterslistbyresourcegroupsample] | list all the mongo clusters in a given resource group. x-ms-original-file: 2025-07-01-preview/MongoClusters_ListByResourceGroup.json | -| [mongoClustersListConnectionStringsSample.js][mongoclusterslistconnectionstringssample] | list mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster. x-ms-original-file: 2025-07-01-preview/MongoClusters_ListConnectionStrings.json | -| [mongoClustersListSample.js][mongoclusterslistsample] | list all the mongo clusters in a given subscription. x-ms-original-file: 2025-07-01-preview/MongoClusters_List.json | -| [mongoClustersPromoteSample.js][mongoclusterspromotesample] | promotes a replica mongo cluster to a primary role. x-ms-original-file: 2025-07-01-preview/MongoClusters_ForcePromoteReplica.json | -| [mongoClustersUpdateSample.js][mongoclustersupdatesample] | updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchDataApi.json | -| [operationsListSample.js][operationslistsample] | list the operations for the provider x-ms-original-file: 2025-07-01-preview/Operations_List.json | -| [privateEndpointConnectionsCreateSample.js][privateendpointconnectionscreatesample] | create a Private endpoint connection x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionPut.json | -| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | delete the private endpoint connection x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionDelete.json | -| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | get a specific private connection x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionGet.json | -| [privateEndpointConnectionsListByMongoClusterSample.js][privateendpointconnectionslistbymongoclustersample] | list existing private connections x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionList.json | -| [privateLinksListByMongoClusterSample.js][privatelinkslistbymongoclustersample] | list private links on the given resource x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateLinkResourceList.json | -| [replicasListByParentSample.js][replicaslistbyparentsample] | list all the replicas for the mongo cluster. x-ms-original-file: 2025-07-01-preview/MongoClusters_ReplicaList.json | -| [usersCreateOrUpdateSample.js][userscreateorupdatesample] | creates a new user or updates an existing user on a mongo cluster. x-ms-original-file: 2025-07-01-preview/MongoClusters_UserCreateOrUpdate.json | -| [usersDeleteSample.js][usersdeletesample] | deletes a mongo cluster user. x-ms-original-file: 2025-07-01-preview/MongoClusters_UserDelete.json | -| [usersGetSample.js][usersgetsample] | gets the defintion of a Mongo cluster user. x-ms-original-file: 2025-07-01-preview/MongoClusters_UserGet.json | -| [usersListByMongoClusterSample.js][userslistbymongoclustersample] | list all the users on a mongo cluster. x-ms-original-file: 2025-07-01-preview/MongoClusters_UserList.json | +| [firewallRulesCreateOrUpdateSample.js][firewallrulescreateorupdatesample] | creates a new firewall rule or updates an existing firewall rule on a mongo cluster. x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleCreate.json | +| [firewallRulesDeleteSample.js][firewallrulesdeletesample] | deletes a mongo cluster firewall rule. x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleDelete.json | +| [firewallRulesGetSample.js][firewallrulesgetsample] | gets information about a mongo cluster firewall rule. x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleGet.json | +| [firewallRulesListByMongoClusterSample.js][firewallruleslistbymongoclustersample] | list all the firewall rules in a given mongo cluster. x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleList.json | +| [mongoClustersCheckNameAvailabilitySample.js][mongoclusterschecknameavailabilitysample] | check if mongo cluster name is available for use. x-ms-original-file: 2025-08-01-preview/MongoClusters_NameAvailability.json | +| [mongoClustersCreateOrUpdateSample.js][mongoclusterscreateorupdatesample] | create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. x-ms-original-file: 2025-08-01-preview/MongoClusters_Create.json | +| [mongoClustersDeleteSample.js][mongoclustersdeletesample] | deletes a mongo cluster. x-ms-original-file: 2025-08-01-preview/MongoClusters_Delete.json | +| [mongoClustersGetSample.js][mongoclustersgetsample] | gets information about a mongo cluster. x-ms-original-file: 2025-08-01-preview/MongoClusters_Get.json | +| [mongoClustersListByResourceGroupSample.js][mongoclusterslistbyresourcegroupsample] | list all the mongo clusters in a given resource group. x-ms-original-file: 2025-08-01-preview/MongoClusters_ListByResourceGroup.json | +| [mongoClustersListConnectionStringsSample.js][mongoclusterslistconnectionstringssample] | list mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster. x-ms-original-file: 2025-08-01-preview/MongoClusters_ListConnectionStrings.json | +| [mongoClustersListSample.js][mongoclusterslistsample] | list all the mongo clusters in a given subscription. x-ms-original-file: 2025-08-01-preview/MongoClusters_List.json | +| [mongoClustersPromoteSample.js][mongoclusterspromotesample] | promotes a replica mongo cluster to a primary role. x-ms-original-file: 2025-08-01-preview/MongoClusters_ForcePromoteReplica.json | +| [mongoClustersUpdateSample.js][mongoclustersupdatesample] | updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchCMK.json | +| [operationsListSample.js][operationslistsample] | list the operations for the provider x-ms-original-file: 2025-08-01-preview/Operations_List.json | +| [privateEndpointConnectionsCreateSample.js][privateendpointconnectionscreatesample] | create a Private endpoint connection x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionPut.json | +| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | delete the private endpoint connection x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionDelete.json | +| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | get a specific private connection x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionGet.json | +| [privateEndpointConnectionsListByMongoClusterSample.js][privateendpointconnectionslistbymongoclustersample] | list existing private connections x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionList.json | +| [privateLinksListByMongoClusterSample.js][privatelinkslistbymongoclustersample] | list private links on the given resource x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateLinkResourceList.json | +| [replicasListByParentSample.js][replicaslistbyparentsample] | list all the replicas for the mongo cluster. x-ms-original-file: 2025-08-01-preview/MongoClusters_ReplicaList.json | +| [usersCreateOrUpdateSample.js][userscreateorupdatesample] | creates a new user or updates an existing user on a mongo cluster. x-ms-original-file: 2025-08-01-preview/MongoClusters_UserCreateOrUpdate.json | +| [usersDeleteSample.js][usersdeletesample] | deletes a mongo cluster user. x-ms-original-file: 2025-08-01-preview/MongoClusters_UserDelete.json | +| [usersGetSample.js][usersgetsample] | gets the defintion of a Mongo cluster user. x-ms-original-file: 2025-08-01-preview/MongoClusters_UserGet.json | +| [usersListByMongoClusterSample.js][userslistbymongoclustersample] | list all the users on a mongo cluster. x-ms-original-file: 2025-08-01-preview/MongoClusters_UserList.json | ## Prerequisites diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/firewallRulesCreateOrUpdateSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/firewallRulesCreateOrUpdateSample.js index 084637f3bbac..9880d1a8ed7a 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/firewallRulesCreateOrUpdateSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/firewallRulesCreateOrUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to creates a new firewall rule or updates an existing firewall rule on a mongo cluster. * * @summary creates a new firewall rule or updates an existing firewall rule on a mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleCreate.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleCreate.json */ async function createsAFirewallRuleOnAMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/firewallRulesDeleteSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/firewallRulesDeleteSample.js index 099a854453ee..94fcc9a578f4 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/firewallRulesDeleteSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/firewallRulesDeleteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to deletes a mongo cluster firewall rule. * * @summary deletes a mongo cluster firewall rule. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleDelete.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleDelete.json */ async function deletesAFirewallRuleOnAMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/firewallRulesGetSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/firewallRulesGetSample.js index 6360dec0050f..026390dbb3ee 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/firewallRulesGetSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/firewallRulesGetSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to gets information about a mongo cluster firewall rule. * * @summary gets information about a mongo cluster firewall rule. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleGet.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleGet.json */ async function getsAFirewallRuleOnAMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/firewallRulesListByMongoClusterSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/firewallRulesListByMongoClusterSample.js index 09f1141a9844..fa069065d3fc 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/firewallRulesListByMongoClusterSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/firewallRulesListByMongoClusterSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list all the firewall rules in a given mongo cluster. * * @summary list all the firewall rules in a given mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleList.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleList.json */ async function listTheFirewallRulesOnAMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersCheckNameAvailabilitySample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersCheckNameAvailabilitySample.js index cee8ff7b0479..96600d50970a 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersCheckNameAvailabilitySample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersCheckNameAvailabilitySample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to check if mongo cluster name is available for use. * * @summary check if mongo cluster name is available for use. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_NameAvailability.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_NameAvailability.json */ async function checksAndConfirmsTheMongoClusterNameIsAvailabilityForUse() { const credential = new DefaultAzureCredential(); @@ -25,7 +25,7 @@ async function checksAndConfirmsTheMongoClusterNameIsAvailabilityForUse() { * This sample demonstrates how to check if mongo cluster name is available for use. * * @summary check if mongo cluster name is available for use. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_NameAvailability_AlreadyExists.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_NameAvailability_AlreadyExists.json */ async function checksAndReturnsThatTheMongoClusterNameIsAlreadyInUse() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersCreateOrUpdateSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersCreateOrUpdateSample.js index 931e5dceda00..0d798953ee77 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersCreateOrUpdateSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersCreateOrUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Create.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Create.json */ async function createsANewMongoClusterResource() { const credential = new DefaultAzureCredential(); @@ -33,7 +33,7 @@ async function createsANewMongoClusterResource() { * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_CreateGeoReplica.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_CreateGeoReplica.json */ async function createsAReplicaMongoClusterResourceFromASourceResource() { const credential = new DefaultAzureCredential(); @@ -61,7 +61,7 @@ async function createsAReplicaMongoClusterResourceFromASourceResource() { * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_CreateGeoReplica_CMK.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_CreateGeoReplica_CMK.json */ async function createsAReplicaMongoClusterResourceWithCustomerManagedKeyEncryptionFromASourceResource() { const credential = new DefaultAzureCredential(); @@ -106,7 +106,7 @@ async function createsAReplicaMongoClusterResourceWithCustomerManagedKeyEncrypti * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_CreatePITR.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_CreatePITR.json */ async function createsAMongoClusterResourceFromAPointInTimeRestore() { const credential = new DefaultAzureCredential(); @@ -116,6 +116,7 @@ async function createsAMongoClusterResourceFromAPointInTimeRestore() { location: "westus2", properties: { createMode: "PointInTimeRestore", + administrator: { userName: "mongoAdmin", password: "password" }, restoreParameters: { pointInTimeUTC: new Date("2023-01-13T20:07:35Z"), sourceResourceId: @@ -130,7 +131,7 @@ async function createsAMongoClusterResourceFromAPointInTimeRestore() { * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_CreatePITR_CMK.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_CreatePITR_CMK.json */ async function createsAMongoClusterResourceWithCustomerManagedKeyEncryptionFromAPointInTimeRestore() { const credential = new DefaultAzureCredential(); @@ -171,7 +172,32 @@ async function createsAMongoClusterResourceWithCustomerManagedKeyEncryptionFromA * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Create_CMK.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_CreatePITR_EntraAuth.json + */ +async function createsAMongoClusterResourceFromAPointInTimeRestoreWithMicrosoftEntraIDAuthenticationModeEnabled() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const client = new MongoClusterManagementClient(credential, subscriptionId); + const result = await client.mongoClusters.createOrUpdate("TestResourceGroup", "myMongoCluster", { + location: "westus2", + properties: { + createMode: "PointInTimeRestore", + authConfig: { allowedModes: ["MicrosoftEntraID"] }, + restoreParameters: { + pointInTimeUTC: new Date("2023-01-13T20:07:35Z"), + sourceResourceId: + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myOtherMongoCluster", + }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. + * + * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Create_CMK.json */ async function createsANewMongoClusterResourceWithCustomerManagedKeyEncryption() { const credential = new DefaultAzureCredential(); @@ -211,7 +237,7 @@ async function createsANewMongoClusterResourceWithCustomerManagedKeyEncryption() * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Create_SSDv2.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Create_SSDv2.json */ async function createsANewMongoClusterResourceWithPremiumSSDv2Storage() { const credential = new DefaultAzureCredential(); @@ -223,12 +249,7 @@ async function createsANewMongoClusterResourceWithPremiumSSDv2Storage() { administrator: { userName: "mongoAdmin", password: "password" }, authConfig: { allowedModes: ["NativeAuth"] }, serverVersion: "5.0", - storage: { - sizeGb: 32, - type: "PremiumSSDv2", - iops: 3000, - throughput: 125, - }, + storage: { sizeGb: 32, type: "PremiumSSDv2" }, compute: { tier: "M30" }, sharding: { shardCount: 1 }, highAvailability: { targetMode: "ZoneRedundantPreferred" }, @@ -243,6 +264,7 @@ async function main() { await createsAReplicaMongoClusterResourceWithCustomerManagedKeyEncryptionFromASourceResource(); await createsAMongoClusterResourceFromAPointInTimeRestore(); await createsAMongoClusterResourceWithCustomerManagedKeyEncryptionFromAPointInTimeRestore(); + await createsAMongoClusterResourceFromAPointInTimeRestoreWithMicrosoftEntraIDAuthenticationModeEnabled(); await createsANewMongoClusterResourceWithCustomerManagedKeyEncryption(); await createsANewMongoClusterResourceWithPremiumSSDv2Storage(); } diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersDeleteSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersDeleteSample.js index c7bfb6a5e846..1b79292c4d74 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersDeleteSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersDeleteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to deletes a mongo cluster. * * @summary deletes a mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Delete.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Delete.json */ async function deletesAMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersGetSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersGetSample.js index ff201d358794..38d773c5b522 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersGetSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersGetSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to gets information about a mongo cluster. * * @summary gets information about a mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Get.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Get.json */ async function getsAMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersListByResourceGroupSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersListByResourceGroupSample.js index 321dd6ddce1f..5a6a6820e244 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersListByResourceGroupSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersListByResourceGroupSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list all the mongo clusters in a given resource group. * * @summary list all the mongo clusters in a given resource group. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_ListByResourceGroup.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_ListByResourceGroup.json */ async function listsTheMongoClusterResourcesInAResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersListConnectionStringsSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersListConnectionStringsSample.js index 012dcced9695..8fc943d93660 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersListConnectionStringsSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersListConnectionStringsSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster. * * @summary list mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_ListConnectionStrings.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_ListConnectionStrings.json */ async function listTheAvailableConnectionStringsForTheMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersListSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersListSample.js index b5aee1f5a780..d2ae12a026b3 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersListSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersListSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list all the mongo clusters in a given subscription. * * @summary list all the mongo clusters in a given subscription. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_List.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_List.json */ async function listsTheMongoClusterResourcesInASubscription() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersPromoteSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersPromoteSample.js index ebc24aa37d9a..4507bc7d8799 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersPromoteSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersPromoteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to promotes a replica mongo cluster to a primary role. * * @summary promotes a replica mongo cluster to a primary role. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_ForcePromoteReplica.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_ForcePromoteReplica.json */ async function promotesAReplicaMongoClusterResourceToAPrimaryRole() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersUpdateSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersUpdateSample.js index 510403805dde..835f39980c1a 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersUpdateSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/mongoClustersUpdateSample.js @@ -8,7 +8,41 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchDataApi.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchCMK.json + */ +async function updatesTheCustomerManagedEncryptionKeyOnAMongoClusterResource() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const client = new MongoClusterManagementClient(credential, subscriptionId); + const result = await client.mongoClusters.update("TestResourceGroup", "myMongoCluster", { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity2": + {}, + }, + }, + properties: { + encryption: { + customerManagedKeyEncryption: { + keyEncryptionKeyIdentity: { + identityType: "UserAssignedIdentity", + userAssignedIdentityResourceId: + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity2", + }, + keyEncryptionKeyUrl: "https://myVault.vault.azure.net/keys/myKey2", + }, + }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. + * + * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchDataApi.json */ async function enablesDataAPIOnAMongoClusterResource() { const credential = new DefaultAzureCredential(); @@ -24,7 +58,23 @@ async function enablesDataAPIOnAMongoClusterResource() { * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchDiskSize.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchDisableNativeAuth.json + */ +async function updatesTheAllowedAuthenticationModesToRemoveNativeAuthentication() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const client = new MongoClusterManagementClient(credential, subscriptionId); + const result = await client.mongoClusters.update("TestResourceGroup", "myMongoCluster", { + properties: { authConfig: { allowedModes: ["MicrosoftEntraID"] } }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. + * + * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchDiskSize.json */ async function updatesTheDiskSizeOnAMongoClusterResource() { const credential = new DefaultAzureCredential(); @@ -40,7 +90,7 @@ async function updatesTheDiskSizeOnAMongoClusterResource() { * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchEnableEntraIDAuth.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchEnableEntraIDAuth.json */ async function updatesTheAllowedAuthenticationModesToIncludeMicrosoftEntraIDAuthentication() { const credential = new DefaultAzureCredential(); @@ -58,7 +108,7 @@ async function updatesTheAllowedAuthenticationModesToIncludeMicrosoftEntraIDAuth * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchPrivateNetworkAccess.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchPrivateNetworkAccess.json */ async function disablesPublicNetworkAccessOnAMongoClusterResourceWithAPrivateEndpointConnection() { const credential = new DefaultAzureCredential(); @@ -74,21 +124,14 @@ async function disablesPublicNetworkAccessOnAMongoClusterResourceWithAPrivateEnd * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchSSDv2.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchSSDv2.json */ -async function updatesThePremiumSSDv2SizeIopsAndThroughputOnAMongoClusterResource() { +async function updatesThePremiumSSDv2SizeOnAMongoClusterResource() { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; const client = new MongoClusterManagementClient(credential, subscriptionId); const result = await client.mongoClusters.update("TestResourceGroup", "myMongoCluster", { - properties: { - storage: { - sizeGb: 128, - type: "PremiumSSDv2", - iops: 5000, - throughput: 1000, - }, - }, + properties: { storage: { sizeGb: 128, type: "PremiumSSDv2" } }, }); console.log(result); } @@ -97,7 +140,7 @@ async function updatesThePremiumSSDv2SizeIopsAndThroughputOnAMongoClusterResourc * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_ResetPassword.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_ResetPassword.json */ async function resetsTheAdministratorLoginPassword() { const credential = new DefaultAzureCredential(); @@ -115,7 +158,7 @@ async function resetsTheAdministratorLoginPassword() { * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Update.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Update.json */ async function updatesAMongoClusterResource() { const credential = new DefaultAzureCredential(); @@ -139,11 +182,13 @@ async function updatesAMongoClusterResource() { } async function main() { + await updatesTheCustomerManagedEncryptionKeyOnAMongoClusterResource(); await enablesDataAPIOnAMongoClusterResource(); + await updatesTheAllowedAuthenticationModesToRemoveNativeAuthentication(); await updatesTheDiskSizeOnAMongoClusterResource(); await updatesTheAllowedAuthenticationModesToIncludeMicrosoftEntraIDAuthentication(); await disablesPublicNetworkAccessOnAMongoClusterResourceWithAPrivateEndpointConnection(); - await updatesThePremiumSSDv2SizeIopsAndThroughputOnAMongoClusterResource(); + await updatesThePremiumSSDv2SizeOnAMongoClusterResource(); await resetsTheAdministratorLoginPassword(); await updatesAMongoClusterResource(); } diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/operationsListSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/operationsListSample.js index 184530c3921a..535fc0515b24 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/operationsListSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/operationsListSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list the operations for the provider * * @summary list the operations for the provider - * x-ms-original-file: 2025-07-01-preview/Operations_List.json + * x-ms-original-file: 2025-08-01-preview/Operations_List.json */ async function operationsList() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateEndpointConnectionsCreateSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateEndpointConnectionsCreateSample.js index 5dd030e9a3ae..b092c3464acc 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateEndpointConnectionsCreateSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateEndpointConnectionsCreateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to create a Private endpoint connection * * @summary create a Private endpoint connection - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionPut.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionPut.json */ async function approvesAPrivateEndpointConnectionOnAMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateEndpointConnectionsDeleteSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateEndpointConnectionsDeleteSample.js index c49721cb8cd5..d90e2d8edb95 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateEndpointConnectionsDeleteSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateEndpointConnectionsDeleteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to delete the private endpoint connection * * @summary delete the private endpoint connection - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionDelete.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionDelete.json */ async function deleteAPrivateEndpointConnectionOnAMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateEndpointConnectionsGetSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateEndpointConnectionsGetSample.js index a99f8257e505..a5f4440f06c1 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateEndpointConnectionsGetSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateEndpointConnectionsGetSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get a specific private connection * * @summary get a specific private connection - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionGet.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionGet.json */ async function getAPrivateEndpointConnectionOnAMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateEndpointConnectionsListByMongoClusterSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateEndpointConnectionsListByMongoClusterSample.js index 0d289858fc6c..095aeb8bbcd1 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateEndpointConnectionsListByMongoClusterSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateEndpointConnectionsListByMongoClusterSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list existing private connections * * @summary list existing private connections - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionList.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionList.json */ async function listsThePrivateEndpointConnectionResourcesOnAMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateLinksListByMongoClusterSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateLinksListByMongoClusterSample.js index 22e87d78f742..e012b465f6ea 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateLinksListByMongoClusterSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/privateLinksListByMongoClusterSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list private links on the given resource * * @summary list private links on the given resource - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateLinkResourceList.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateLinkResourceList.json */ async function listsThePrivateLinkResourcesAvailableOnAMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/replicasListByParentSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/replicasListByParentSample.js index 58ed77bb79e1..1dd20884a9fd 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/replicasListByParentSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/replicasListByParentSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list all the replicas for the mongo cluster. * * @summary list all the replicas for the mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_ReplicaList.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_ReplicaList.json */ async function listTheReplicasLinkedToAMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/usersCreateOrUpdateSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/usersCreateOrUpdateSample.js index 02fe5123d5c4..093ab76caea5 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/usersCreateOrUpdateSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/usersCreateOrUpdateSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to creates a new user or updates an existing user on a mongo cluster. * * @summary creates a new user or updates an existing user on a mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_UserCreateOrUpdate.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_UserCreateOrUpdate.json */ async function createsAUserOnAMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/usersDeleteSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/usersDeleteSample.js index 56975a0b6b79..273338abb075 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/usersDeleteSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/usersDeleteSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to deletes a mongo cluster user. * * @summary deletes a mongo cluster user. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_UserDelete.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_UserDelete.json */ async function deletesAUserOnAMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/usersGetSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/usersGetSample.js index c8b4bc51c380..cc6f24960504 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/usersGetSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/usersGetSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to gets the defintion of a Mongo cluster user. * * @summary gets the defintion of a Mongo cluster user. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_UserGet.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_UserGet.json */ async function getsAUserOnAMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/usersListByMongoClusterSample.js b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/usersListByMongoClusterSample.js index 8f84611b5fbd..fbbddf60d2d9 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/usersListByMongoClusterSample.js +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/javascript/usersListByMongoClusterSample.js @@ -8,7 +8,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to list all the users on a mongo cluster. * * @summary list all the users on a mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_UserList.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_UserList.json */ async function listTheUsersOnAMongoClusterResource() { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/README.md b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/README.md index d7eec797480d..bde631d0a486 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/README.md +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/README.md @@ -4,30 +4,30 @@ These sample programs show how to use the TypeScript client libraries for @azure | **File Name** | **Description** | | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [firewallRulesCreateOrUpdateSample.ts][firewallrulescreateorupdatesample] | creates a new firewall rule or updates an existing firewall rule on a mongo cluster. x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleCreate.json | -| [firewallRulesDeleteSample.ts][firewallrulesdeletesample] | deletes a mongo cluster firewall rule. x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleDelete.json | -| [firewallRulesGetSample.ts][firewallrulesgetsample] | gets information about a mongo cluster firewall rule. x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleGet.json | -| [firewallRulesListByMongoClusterSample.ts][firewallruleslistbymongoclustersample] | list all the firewall rules in a given mongo cluster. x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleList.json | -| [mongoClustersCheckNameAvailabilitySample.ts][mongoclusterschecknameavailabilitysample] | check if mongo cluster name is available for use. x-ms-original-file: 2025-07-01-preview/MongoClusters_NameAvailability.json | -| [mongoClustersCreateOrUpdateSample.ts][mongoclusterscreateorupdatesample] | create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. x-ms-original-file: 2025-07-01-preview/MongoClusters_Create.json | -| [mongoClustersDeleteSample.ts][mongoclustersdeletesample] | deletes a mongo cluster. x-ms-original-file: 2025-07-01-preview/MongoClusters_Delete.json | -| [mongoClustersGetSample.ts][mongoclustersgetsample] | gets information about a mongo cluster. x-ms-original-file: 2025-07-01-preview/MongoClusters_Get.json | -| [mongoClustersListByResourceGroupSample.ts][mongoclusterslistbyresourcegroupsample] | list all the mongo clusters in a given resource group. x-ms-original-file: 2025-07-01-preview/MongoClusters_ListByResourceGroup.json | -| [mongoClustersListConnectionStringsSample.ts][mongoclusterslistconnectionstringssample] | list mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster. x-ms-original-file: 2025-07-01-preview/MongoClusters_ListConnectionStrings.json | -| [mongoClustersListSample.ts][mongoclusterslistsample] | list all the mongo clusters in a given subscription. x-ms-original-file: 2025-07-01-preview/MongoClusters_List.json | -| [mongoClustersPromoteSample.ts][mongoclusterspromotesample] | promotes a replica mongo cluster to a primary role. x-ms-original-file: 2025-07-01-preview/MongoClusters_ForcePromoteReplica.json | -| [mongoClustersUpdateSample.ts][mongoclustersupdatesample] | updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchDataApi.json | -| [operationsListSample.ts][operationslistsample] | list the operations for the provider x-ms-original-file: 2025-07-01-preview/Operations_List.json | -| [privateEndpointConnectionsCreateSample.ts][privateendpointconnectionscreatesample] | create a Private endpoint connection x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionPut.json | -| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | delete the private endpoint connection x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionDelete.json | -| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | get a specific private connection x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionGet.json | -| [privateEndpointConnectionsListByMongoClusterSample.ts][privateendpointconnectionslistbymongoclustersample] | list existing private connections x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionList.json | -| [privateLinksListByMongoClusterSample.ts][privatelinkslistbymongoclustersample] | list private links on the given resource x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateLinkResourceList.json | -| [replicasListByParentSample.ts][replicaslistbyparentsample] | list all the replicas for the mongo cluster. x-ms-original-file: 2025-07-01-preview/MongoClusters_ReplicaList.json | -| [usersCreateOrUpdateSample.ts][userscreateorupdatesample] | creates a new user or updates an existing user on a mongo cluster. x-ms-original-file: 2025-07-01-preview/MongoClusters_UserCreateOrUpdate.json | -| [usersDeleteSample.ts][usersdeletesample] | deletes a mongo cluster user. x-ms-original-file: 2025-07-01-preview/MongoClusters_UserDelete.json | -| [usersGetSample.ts][usersgetsample] | gets the defintion of a Mongo cluster user. x-ms-original-file: 2025-07-01-preview/MongoClusters_UserGet.json | -| [usersListByMongoClusterSample.ts][userslistbymongoclustersample] | list all the users on a mongo cluster. x-ms-original-file: 2025-07-01-preview/MongoClusters_UserList.json | +| [firewallRulesCreateOrUpdateSample.ts][firewallrulescreateorupdatesample] | creates a new firewall rule or updates an existing firewall rule on a mongo cluster. x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleCreate.json | +| [firewallRulesDeleteSample.ts][firewallrulesdeletesample] | deletes a mongo cluster firewall rule. x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleDelete.json | +| [firewallRulesGetSample.ts][firewallrulesgetsample] | gets information about a mongo cluster firewall rule. x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleGet.json | +| [firewallRulesListByMongoClusterSample.ts][firewallruleslistbymongoclustersample] | list all the firewall rules in a given mongo cluster. x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleList.json | +| [mongoClustersCheckNameAvailabilitySample.ts][mongoclusterschecknameavailabilitysample] | check if mongo cluster name is available for use. x-ms-original-file: 2025-08-01-preview/MongoClusters_NameAvailability.json | +| [mongoClustersCreateOrUpdateSample.ts][mongoclusterscreateorupdatesample] | create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. x-ms-original-file: 2025-08-01-preview/MongoClusters_Create.json | +| [mongoClustersDeleteSample.ts][mongoclustersdeletesample] | deletes a mongo cluster. x-ms-original-file: 2025-08-01-preview/MongoClusters_Delete.json | +| [mongoClustersGetSample.ts][mongoclustersgetsample] | gets information about a mongo cluster. x-ms-original-file: 2025-08-01-preview/MongoClusters_Get.json | +| [mongoClustersListByResourceGroupSample.ts][mongoclusterslistbyresourcegroupsample] | list all the mongo clusters in a given resource group. x-ms-original-file: 2025-08-01-preview/MongoClusters_ListByResourceGroup.json | +| [mongoClustersListConnectionStringsSample.ts][mongoclusterslistconnectionstringssample] | list mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster. x-ms-original-file: 2025-08-01-preview/MongoClusters_ListConnectionStrings.json | +| [mongoClustersListSample.ts][mongoclusterslistsample] | list all the mongo clusters in a given subscription. x-ms-original-file: 2025-08-01-preview/MongoClusters_List.json | +| [mongoClustersPromoteSample.ts][mongoclusterspromotesample] | promotes a replica mongo cluster to a primary role. x-ms-original-file: 2025-08-01-preview/MongoClusters_ForcePromoteReplica.json | +| [mongoClustersUpdateSample.ts][mongoclustersupdatesample] | updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchCMK.json | +| [operationsListSample.ts][operationslistsample] | list the operations for the provider x-ms-original-file: 2025-08-01-preview/Operations_List.json | +| [privateEndpointConnectionsCreateSample.ts][privateendpointconnectionscreatesample] | create a Private endpoint connection x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionPut.json | +| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | delete the private endpoint connection x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionDelete.json | +| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | get a specific private connection x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionGet.json | +| [privateEndpointConnectionsListByMongoClusterSample.ts][privateendpointconnectionslistbymongoclustersample] | list existing private connections x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionList.json | +| [privateLinksListByMongoClusterSample.ts][privatelinkslistbymongoclustersample] | list private links on the given resource x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateLinkResourceList.json | +| [replicasListByParentSample.ts][replicaslistbyparentsample] | list all the replicas for the mongo cluster. x-ms-original-file: 2025-08-01-preview/MongoClusters_ReplicaList.json | +| [usersCreateOrUpdateSample.ts][userscreateorupdatesample] | creates a new user or updates an existing user on a mongo cluster. x-ms-original-file: 2025-08-01-preview/MongoClusters_UserCreateOrUpdate.json | +| [usersDeleteSample.ts][usersdeletesample] | deletes a mongo cluster user. x-ms-original-file: 2025-08-01-preview/MongoClusters_UserDelete.json | +| [usersGetSample.ts][usersgetsample] | gets the defintion of a Mongo cluster user. x-ms-original-file: 2025-08-01-preview/MongoClusters_UserGet.json | +| [usersListByMongoClusterSample.ts][userslistbymongoclustersample] | list all the users on a mongo cluster. x-ms-original-file: 2025-08-01-preview/MongoClusters_UserList.json | ## Prerequisites diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/firewallRulesCreateOrUpdateSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/firewallRulesCreateOrUpdateSample.ts index 7568eb46e0c5..bde3a345896b 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/firewallRulesCreateOrUpdateSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/firewallRulesCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to creates a new firewall rule or updates an existing firewall rule on a mongo cluster. * * @summary creates a new firewall rule or updates an existing firewall rule on a mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleCreate.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleCreate.json */ async function createsAFirewallRuleOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/firewallRulesDeleteSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/firewallRulesDeleteSample.ts index a1bcb87e3a76..c27e1b6f4943 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/firewallRulesDeleteSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/firewallRulesDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to deletes a mongo cluster firewall rule. * * @summary deletes a mongo cluster firewall rule. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleDelete.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleDelete.json */ async function deletesAFirewallRuleOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/firewallRulesGetSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/firewallRulesGetSample.ts index 704eaf06f3c5..2ebb57a603c5 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/firewallRulesGetSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/firewallRulesGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to gets information about a mongo cluster firewall rule. * * @summary gets information about a mongo cluster firewall rule. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleGet.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleGet.json */ async function getsAFirewallRuleOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/firewallRulesListByMongoClusterSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/firewallRulesListByMongoClusterSample.ts index bce510d72392..6f6583486c9f 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/firewallRulesListByMongoClusterSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/firewallRulesListByMongoClusterSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list all the firewall rules in a given mongo cluster. * * @summary list all the firewall rules in a given mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_FirewallRuleList.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_FirewallRuleList.json */ async function listTheFirewallRulesOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersCheckNameAvailabilitySample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersCheckNameAvailabilitySample.ts index 258ffd9c7f4e..ca2da67dfa4b 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersCheckNameAvailabilitySample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersCheckNameAvailabilitySample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to check if mongo cluster name is available for use. * * @summary check if mongo cluster name is available for use. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_NameAvailability.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_NameAvailability.json */ async function checksAndConfirmsTheMongoClusterNameIsAvailabilityForUse(): Promise { const credential = new DefaultAzureCredential(); @@ -25,7 +25,7 @@ async function checksAndConfirmsTheMongoClusterNameIsAvailabilityForUse(): Promi * This sample demonstrates how to check if mongo cluster name is available for use. * * @summary check if mongo cluster name is available for use. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_NameAvailability_AlreadyExists.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_NameAvailability_AlreadyExists.json */ async function checksAndReturnsThatTheMongoClusterNameIsAlreadyInUse(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersCreateOrUpdateSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersCreateOrUpdateSample.ts index 3f08d0d5915e..482c738c9973 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersCreateOrUpdateSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Create.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Create.json */ async function createsANewMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); @@ -33,7 +33,7 @@ async function createsANewMongoClusterResource(): Promise { * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_CreateGeoReplica.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_CreateGeoReplica.json */ async function createsAReplicaMongoClusterResourceFromASourceResource(): Promise { const credential = new DefaultAzureCredential(); @@ -61,7 +61,7 @@ async function createsAReplicaMongoClusterResourceFromASourceResource(): Promise * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_CreateGeoReplica_CMK.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_CreateGeoReplica_CMK.json */ async function createsAReplicaMongoClusterResourceWithCustomerManagedKeyEncryptionFromASourceResource(): Promise { const credential = new DefaultAzureCredential(); @@ -106,7 +106,7 @@ async function createsAReplicaMongoClusterResourceWithCustomerManagedKeyEncrypti * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_CreatePITR.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_CreatePITR.json */ async function createsAMongoClusterResourceFromAPointInTimeRestore(): Promise { const credential = new DefaultAzureCredential(); @@ -116,6 +116,7 @@ async function createsAMongoClusterResourceFromAPointInTimeRestore(): Promise { const credential = new DefaultAzureCredential(); @@ -171,7 +172,32 @@ async function createsAMongoClusterResourceWithCustomerManagedKeyEncryptionFromA * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Create_CMK.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_CreatePITR_EntraAuth.json + */ +async function createsAMongoClusterResourceFromAPointInTimeRestoreWithMicrosoftEntraIDAuthenticationModeEnabled(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const client = new MongoClusterManagementClient(credential, subscriptionId); + const result = await client.mongoClusters.createOrUpdate("TestResourceGroup", "myMongoCluster", { + location: "westus2", + properties: { + createMode: "PointInTimeRestore", + authConfig: { allowedModes: ["MicrosoftEntraID"] }, + restoreParameters: { + pointInTimeUTC: new Date("2023-01-13T20:07:35Z"), + sourceResourceId: + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DocumentDB/mongoClusters/myOtherMongoCluster", + }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. + * + * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Create_CMK.json */ async function createsANewMongoClusterResourceWithCustomerManagedKeyEncryption(): Promise { const credential = new DefaultAzureCredential(); @@ -211,7 +237,7 @@ async function createsANewMongoClusterResourceWithCustomerManagedKeyEncryption() * This sample demonstrates how to create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. * * @summary create or update a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Create_SSDv2.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Create_SSDv2.json */ async function createsANewMongoClusterResourceWithPremiumSSDv2Storage(): Promise { const credential = new DefaultAzureCredential(); @@ -223,12 +249,7 @@ async function createsANewMongoClusterResourceWithPremiumSSDv2Storage(): Promise administrator: { userName: "mongoAdmin", password: "password" }, authConfig: { allowedModes: ["NativeAuth"] }, serverVersion: "5.0", - storage: { - sizeGb: 32, - type: "PremiumSSDv2", - iops: 3000, - throughput: 125, - }, + storage: { sizeGb: 32, type: "PremiumSSDv2" }, compute: { tier: "M30" }, sharding: { shardCount: 1 }, highAvailability: { targetMode: "ZoneRedundantPreferred" }, @@ -243,6 +264,7 @@ async function main(): Promise { await createsAReplicaMongoClusterResourceWithCustomerManagedKeyEncryptionFromASourceResource(); await createsAMongoClusterResourceFromAPointInTimeRestore(); await createsAMongoClusterResourceWithCustomerManagedKeyEncryptionFromAPointInTimeRestore(); + await createsAMongoClusterResourceFromAPointInTimeRestoreWithMicrosoftEntraIDAuthenticationModeEnabled(); await createsANewMongoClusterResourceWithCustomerManagedKeyEncryption(); await createsANewMongoClusterResourceWithPremiumSSDv2Storage(); } diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersDeleteSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersDeleteSample.ts index 8804e7e94244..c7528645eb70 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersDeleteSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to deletes a mongo cluster. * * @summary deletes a mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Delete.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Delete.json */ async function deletesAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersGetSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersGetSample.ts index 92bbc9587dce..b9ed4e38a403 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersGetSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to gets information about a mongo cluster. * * @summary gets information about a mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Get.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Get.json */ async function getsAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersListByResourceGroupSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersListByResourceGroupSample.ts index b2d96bee0cca..2a72d35d0b92 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersListByResourceGroupSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersListByResourceGroupSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list all the mongo clusters in a given resource group. * * @summary list all the mongo clusters in a given resource group. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_ListByResourceGroup.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_ListByResourceGroup.json */ async function listsTheMongoClusterResourcesInAResourceGroup(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersListConnectionStringsSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersListConnectionStringsSample.ts index 87bd1f8fce54..1f78a67f3311 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersListConnectionStringsSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersListConnectionStringsSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster. * * @summary list mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_ListConnectionStrings.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_ListConnectionStrings.json */ async function listTheAvailableConnectionStringsForTheMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersListSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersListSample.ts index 7637def68d8d..13d3d8051cfd 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersListSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersListSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list all the mongo clusters in a given subscription. * * @summary list all the mongo clusters in a given subscription. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_List.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_List.json */ async function listsTheMongoClusterResourcesInASubscription(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersPromoteSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersPromoteSample.ts index f7c0176cb5c2..13a13f5778c1 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersPromoteSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersPromoteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to promotes a replica mongo cluster to a primary role. * * @summary promotes a replica mongo cluster to a primary role. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_ForcePromoteReplica.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_ForcePromoteReplica.json */ async function promotesAReplicaMongoClusterResourceToAPrimaryRole(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersUpdateSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersUpdateSample.ts index dc74a0acbce2..ff778869503e 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersUpdateSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/mongoClustersUpdateSample.ts @@ -8,7 +8,41 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchDataApi.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchCMK.json + */ +async function updatesTheCustomerManagedEncryptionKeyOnAMongoClusterResource(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const client = new MongoClusterManagementClient(credential, subscriptionId); + const result = await client.mongoClusters.update("TestResourceGroup", "myMongoCluster", { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity2": + {}, + }, + }, + properties: { + encryption: { + customerManagedKeyEncryption: { + keyEncryptionKeyIdentity: { + identityType: "UserAssignedIdentity", + userAssignedIdentityResourceId: + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity2", + }, + keyEncryptionKeyUrl: "https://myVault.vault.azure.net/keys/myKey2", + }, + }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. + * + * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchDataApi.json */ async function enablesDataAPIOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); @@ -24,7 +58,23 @@ async function enablesDataAPIOnAMongoClusterResource(): Promise { * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchDiskSize.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchDisableNativeAuth.json + */ +async function updatesTheAllowedAuthenticationModesToRemoveNativeAuthentication(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + const client = new MongoClusterManagementClient(credential, subscriptionId); + const result = await client.mongoClusters.update("TestResourceGroup", "myMongoCluster", { + properties: { authConfig: { allowedModes: ["MicrosoftEntraID"] } }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. + * + * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchDiskSize.json */ async function updatesTheDiskSizeOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); @@ -40,7 +90,7 @@ async function updatesTheDiskSizeOnAMongoClusterResource(): Promise { * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchEnableEntraIDAuth.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchEnableEntraIDAuth.json */ async function updatesTheAllowedAuthenticationModesToIncludeMicrosoftEntraIDAuthentication(): Promise { const credential = new DefaultAzureCredential(); @@ -58,7 +108,7 @@ async function updatesTheAllowedAuthenticationModesToIncludeMicrosoftEntraIDAuth * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchPrivateNetworkAccess.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchPrivateNetworkAccess.json */ async function disablesPublicNetworkAccessOnAMongoClusterResourceWithAPrivateEndpointConnection(): Promise { const credential = new DefaultAzureCredential(); @@ -74,21 +124,14 @@ async function disablesPublicNetworkAccessOnAMongoClusterResourceWithAPrivateEnd * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PatchSSDv2.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PatchSSDv2.json */ -async function updatesThePremiumSSDv2SizeIopsAndThroughputOnAMongoClusterResource(): Promise { +async function updatesThePremiumSSDv2SizeOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; const client = new MongoClusterManagementClient(credential, subscriptionId); const result = await client.mongoClusters.update("TestResourceGroup", "myMongoCluster", { - properties: { - storage: { - sizeGb: 128, - type: "PremiumSSDv2", - iops: 5000, - throughput: 1000, - }, - }, + properties: { storage: { sizeGb: 128, type: "PremiumSSDv2" } }, }); console.log(result); } @@ -97,7 +140,7 @@ async function updatesThePremiumSSDv2SizeIopsAndThroughputOnAMongoClusterResourc * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_ResetPassword.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_ResetPassword.json */ async function resetsTheAdministratorLoginPassword(): Promise { const credential = new DefaultAzureCredential(); @@ -115,7 +158,7 @@ async function resetsTheAdministratorLoginPassword(): Promise { * This sample demonstrates how to updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. * * @summary updates an existing mongo cluster. The request body can contain one to many of the properties present in the normal mongo cluster definition. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_Update.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_Update.json */ async function updatesAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); @@ -139,11 +182,13 @@ async function updatesAMongoClusterResource(): Promise { } async function main(): Promise { + await updatesTheCustomerManagedEncryptionKeyOnAMongoClusterResource(); await enablesDataAPIOnAMongoClusterResource(); + await updatesTheAllowedAuthenticationModesToRemoveNativeAuthentication(); await updatesTheDiskSizeOnAMongoClusterResource(); await updatesTheAllowedAuthenticationModesToIncludeMicrosoftEntraIDAuthentication(); await disablesPublicNetworkAccessOnAMongoClusterResourceWithAPrivateEndpointConnection(); - await updatesThePremiumSSDv2SizeIopsAndThroughputOnAMongoClusterResource(); + await updatesThePremiumSSDv2SizeOnAMongoClusterResource(); await resetsTheAdministratorLoginPassword(); await updatesAMongoClusterResource(); } diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/operationsListSample.ts index 8703d32308f8..5efe8808b0b2 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/operationsListSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/operationsListSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list the operations for the provider * * @summary list the operations for the provider - * x-ms-original-file: 2025-07-01-preview/Operations_List.json + * x-ms-original-file: 2025-08-01-preview/Operations_List.json */ async function operationsList(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateEndpointConnectionsCreateSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateEndpointConnectionsCreateSample.ts index 52ba3e93f1c1..a40f1711aa6a 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateEndpointConnectionsCreateSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateEndpointConnectionsCreateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create a Private endpoint connection * * @summary create a Private endpoint connection - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionPut.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionPut.json */ async function approvesAPrivateEndpointConnectionOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts index df69a9dcec01..fbeda01b1027 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete the private endpoint connection * * @summary delete the private endpoint connection - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionDelete.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionDelete.json */ async function deleteAPrivateEndpointConnectionOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateEndpointConnectionsGetSample.ts index 31a3f673d792..1db996d4b1dc 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateEndpointConnectionsGetSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateEndpointConnectionsGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a specific private connection * * @summary get a specific private connection - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionGet.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionGet.json */ async function getAPrivateEndpointConnectionOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateEndpointConnectionsListByMongoClusterSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateEndpointConnectionsListByMongoClusterSample.ts index 507db59865e4..15882cd6aa99 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateEndpointConnectionsListByMongoClusterSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateEndpointConnectionsListByMongoClusterSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list existing private connections * * @summary list existing private connections - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateEndpointConnectionList.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateEndpointConnectionList.json */ async function listsThePrivateEndpointConnectionResourcesOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateLinksListByMongoClusterSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateLinksListByMongoClusterSample.ts index 7a901107175f..b6c493d11955 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateLinksListByMongoClusterSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/privateLinksListByMongoClusterSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list private links on the given resource * * @summary list private links on the given resource - * x-ms-original-file: 2025-07-01-preview/MongoClusters_PrivateLinkResourceList.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_PrivateLinkResourceList.json */ async function listsThePrivateLinkResourcesAvailableOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/replicasListByParentSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/replicasListByParentSample.ts index 039f6faa5456..6c4332ec3d1f 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/replicasListByParentSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/replicasListByParentSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list all the replicas for the mongo cluster. * * @summary list all the replicas for the mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_ReplicaList.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_ReplicaList.json */ async function listTheReplicasLinkedToAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/usersCreateOrUpdateSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/usersCreateOrUpdateSample.ts index e81830fd8373..eeac3addd243 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/usersCreateOrUpdateSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/usersCreateOrUpdateSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to creates a new user or updates an existing user on a mongo cluster. * * @summary creates a new user or updates an existing user on a mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_UserCreateOrUpdate.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_UserCreateOrUpdate.json */ async function createsAUserOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/usersDeleteSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/usersDeleteSample.ts index 718c24e39299..1ce6193d65f7 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/usersDeleteSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/usersDeleteSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to deletes a mongo cluster user. * * @summary deletes a mongo cluster user. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_UserDelete.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_UserDelete.json */ async function deletesAUserOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/usersGetSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/usersGetSample.ts index d68e6f7ae459..c068b2924628 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/usersGetSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/usersGetSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to gets the defintion of a Mongo cluster user. * * @summary gets the defintion of a Mongo cluster user. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_UserGet.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_UserGet.json */ async function getsAUserOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/usersListByMongoClusterSample.ts b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/usersListByMongoClusterSample.ts index 2c0284dbb643..0f9426bfe28e 100644 --- a/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/usersListByMongoClusterSample.ts +++ b/sdk/mongocluster/arm-mongocluster/samples/v1-beta/typescript/src/usersListByMongoClusterSample.ts @@ -8,7 +8,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to list all the users on a mongo cluster. * * @summary list all the users on a mongo cluster. - * x-ms-original-file: 2025-07-01-preview/MongoClusters_UserList.json + * x-ms-original-file: 2025-08-01-preview/MongoClusters_UserList.json */ async function listTheUsersOnAMongoClusterResource(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/mongocluster/arm-mongocluster/src/api/firewallRules/operations.ts b/sdk/mongocluster/arm-mongocluster/src/api/firewallRules/operations.ts index f84002d0e66d..64a34d816393 100644 --- a/sdk/mongocluster/arm-mongocluster/src/api/firewallRules/operations.ts +++ b/sdk/mongocluster/arm-mongocluster/src/api/firewallRules/operations.ts @@ -1,34 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { MongoClusterManagementContext as Client } from "../index.js"; +import type { MongoClusterManagementContext as Client } from "../index.js"; +import type { FirewallRule, _FirewallRuleListResult } from "../../models/models.js"; import { errorResponseDeserializer, - FirewallRule, firewallRuleSerializer, firewallRuleDeserializer, - _FirewallRuleListResult, _firewallRuleListResultDeserializer, } from "../../models/models.js"; -import { +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { FirewallRulesListByMongoClusterOptionalParams, FirewallRulesDeleteOptionalParams, FirewallRulesCreateOrUpdateOptionalParams, FirewallRulesGetOptionalParams, } from "./options.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { PollerLike, OperationState } from "@azure/core-lro"; export function _listByMongoClusterSend( context: Client, @@ -110,13 +103,7 @@ export function _$deleteSend( allowReserved: options?.requestOptions?.skipUrlEncoding, }, ); - return context.path(path).delete({ - ...operationOptionsToRequestParameters(options), - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, - }); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); } export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { diff --git a/sdk/mongocluster/arm-mongocluster/src/api/firewallRules/options.ts b/sdk/mongocluster/arm-mongocluster/src/api/firewallRules/options.ts index 880bcc22c8a3..4d37f2850c6c 100644 --- a/sdk/mongocluster/arm-mongocluster/src/api/firewallRules/options.ts +++ b/sdk/mongocluster/arm-mongocluster/src/api/firewallRules/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface FirewallRulesListByMongoClusterOptionalParams extends OperationOptions {} diff --git a/sdk/mongocluster/arm-mongocluster/src/api/mongoClusterManagementContext.ts b/sdk/mongocluster/arm-mongocluster/src/api/mongoClusterManagementContext.ts index 80066a0dd161..91627215503d 100644 --- a/sdk/mongocluster/arm-mongocluster/src/api/mongoClusterManagementContext.ts +++ b/sdk/mongocluster/arm-mongocluster/src/api/mongoClusterManagementContext.ts @@ -3,8 +3,11 @@ import { logger } from "../logger.js"; import { KnownVersions } from "../models/models.js"; -import { Client, ClientOptions, getClient } from "@azure-rest/core-client"; -import { TokenCredential } from "@azure/core-auth"; +import type { AzureSupportedClouds } from "../static-helpers/cloudSettingHelpers.js"; +import { getArmEndpoint } from "../static-helpers/cloudSettingHelpers.js"; +import type { Client, ClientOptions } from "@azure-rest/core-client"; +import { getClient } from "@azure-rest/core-client"; +import type { TokenCredential } from "@azure/core-auth"; /** 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. */ export interface MongoClusterManagementContext extends Client { @@ -20,6 +23,8 @@ export interface MongoClusterManagementClientOptionalParams extends ClientOption /** The API version to use for this operation. */ /** Known values of {@link KnownVersions} that the service accepts. */ apiVersion?: string; + /** Specifies the Azure cloud environment for the client. */ + cloudSetting?: AzureSupportedClouds; } /** 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. */ @@ -28,9 +33,10 @@ export function createMongoClusterManagement( subscriptionId: string, options: MongoClusterManagementClientOptionalParams = {}, ): MongoClusterManagementContext { - const endpointUrl = options.endpoint ?? "https://management.azure.com"; + const endpointUrl = + options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? "https://management.azure.com"; const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; - const userAgentInfo = `azsdk-js-arm-mongocluster/1.1.0-beta.1`; + const userAgentInfo = `azsdk-js-arm-mongocluster/1.1.0-beta.2`; const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` : `azsdk-js-api ${userAgentInfo}`; @@ -44,7 +50,7 @@ export function createMongoClusterManagement( }; const clientContext = getClient(endpointUrl, credential, updatedOptions); clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" }); - const apiVersion = options.apiVersion ?? "2025-07-01-preview"; + const apiVersion = options.apiVersion ?? "2025-08-01-preview"; clientContext.pipeline.addPolicy({ name: "ClientApiVersionPolicy", sendRequest: (req, next) => { diff --git a/sdk/mongocluster/arm-mongocluster/src/api/mongoClusters/operations.ts b/sdk/mongocluster/arm-mongocluster/src/api/mongoClusters/operations.ts index 0e024a9ab9f2..d51a4ed890d8 100644 --- a/sdk/mongocluster/arm-mongocluster/src/api/mongoClusters/operations.ts +++ b/sdk/mongocluster/arm-mongocluster/src/api/mongoClusters/operations.ts @@ -1,26 +1,32 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { MongoClusterManagementContext as Client } from "../index.js"; +import type { MongoClusterManagementContext as Client } from "../index.js"; +import type { + MongoCluster, + MongoClusterUpdate, + _MongoClusterListResult, + ListConnectionStringsResult, + CheckNameAvailabilityRequest, + CheckNameAvailabilityResponse, + PromoteReplicaRequest, +} from "../../models/models.js"; import { errorResponseDeserializer, - MongoCluster, mongoClusterSerializer, mongoClusterDeserializer, - MongoClusterUpdate, mongoClusterUpdateSerializer, - _MongoClusterListResult, _mongoClusterListResultDeserializer, - ListConnectionStringsResult, listConnectionStringsResultDeserializer, - CheckNameAvailabilityRequest, checkNameAvailabilityRequestSerializer, - CheckNameAvailabilityResponse, checkNameAvailabilityResponseDeserializer, - PromoteReplicaRequest, promoteReplicaRequestSerializer, } from "../../models/models.js"; -import { +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { MongoClustersPromoteOptionalParams, MongoClustersCheckNameAvailabilityOptionalParams, MongoClustersListConnectionStringsOptionalParams, @@ -31,19 +37,9 @@ import { MongoClustersCreateOrUpdateOptionalParams, MongoClustersGetOptionalParams, } from "./options.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { PollerLike, OperationState } from "@azure/core-lro"; export function _promoteSend( context: Client, @@ -67,10 +63,6 @@ export function _promoteSend( return context.path(path).post({ ...operationOptionsToRequestParameters(options), contentType: "application/json", - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, body: promoteReplicaRequestSerializer(body), }); } @@ -344,13 +336,7 @@ export function _$deleteSend( allowReserved: options?.requestOptions?.skipUrlEncoding, }, ); - return context.path(path).delete({ - ...operationOptionsToRequestParameters(options), - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, - }); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); } export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { diff --git a/sdk/mongocluster/arm-mongocluster/src/api/mongoClusters/options.ts b/sdk/mongocluster/arm-mongocluster/src/api/mongoClusters/options.ts index ad206ae81f09..9aab221976d3 100644 --- a/sdk/mongocluster/arm-mongocluster/src/api/mongoClusters/options.ts +++ b/sdk/mongocluster/arm-mongocluster/src/api/mongoClusters/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface MongoClustersPromoteOptionalParams extends OperationOptions { diff --git a/sdk/mongocluster/arm-mongocluster/src/api/operations/operations.ts b/sdk/mongocluster/arm-mongocluster/src/api/operations/operations.ts index a7e51caa292b..ec9c7ceaa1e0 100644 --- a/sdk/mongocluster/arm-mongocluster/src/api/operations/operations.ts +++ b/sdk/mongocluster/arm-mongocluster/src/api/operations/operations.ts @@ -1,25 +1,18 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { MongoClusterManagementContext as Client } from "../index.js"; +import type { MongoClusterManagementContext as Client } from "../index.js"; +import type { _OperationListResult, Operation } from "../../models/models.js"; import { - _OperationListResult, _operationListResultDeserializer, - Operation, errorResponseDeserializer, } from "../../models/models.js"; -import { OperationsListOptionalParams } from "./options.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; +import type { OperationsListOptionalParams } from "./options.js"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; export function _listSend( context: Client, diff --git a/sdk/mongocluster/arm-mongocluster/src/api/operations/options.ts b/sdk/mongocluster/arm-mongocluster/src/api/operations/options.ts index c461016ad1c5..b9a3fd9758a3 100644 --- a/sdk/mongocluster/arm-mongocluster/src/api/operations/options.ts +++ b/sdk/mongocluster/arm-mongocluster/src/api/operations/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface OperationsListOptionalParams extends OperationOptions {} diff --git a/sdk/mongocluster/arm-mongocluster/src/api/privateEndpointConnections/operations.ts b/sdk/mongocluster/arm-mongocluster/src/api/privateEndpointConnections/operations.ts index 38861a662a26..788b8d216880 100644 --- a/sdk/mongocluster/arm-mongocluster/src/api/privateEndpointConnections/operations.ts +++ b/sdk/mongocluster/arm-mongocluster/src/api/privateEndpointConnections/operations.ts @@ -1,34 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { MongoClusterManagementContext as Client } from "../index.js"; +import type { MongoClusterManagementContext as Client } from "../index.js"; +import type { + _PrivateEndpointConnectionResourceListResult, + PrivateEndpointConnectionResource, +} from "../../models/models.js"; import { errorResponseDeserializer, - _PrivateEndpointConnectionResourceListResult, _privateEndpointConnectionResourceListResultDeserializer, - PrivateEndpointConnectionResource, privateEndpointConnectionResourceSerializer, privateEndpointConnectionResourceDeserializer, } from "../../models/models.js"; -import { +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { PrivateEndpointConnectionsDeleteOptionalParams, PrivateEndpointConnectionsCreateOptionalParams, PrivateEndpointConnectionsGetOptionalParams, PrivateEndpointConnectionsListByMongoClusterOptionalParams, } from "./options.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { PollerLike, OperationState } from "@azure/core-lro"; export function _$deleteSend( context: Client, @@ -52,13 +48,7 @@ export function _$deleteSend( allowReserved: options?.requestOptions?.skipUrlEncoding, }, ); - return context.path(path).delete({ - ...operationOptionsToRequestParameters(options), - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, - }); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); } export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { diff --git a/sdk/mongocluster/arm-mongocluster/src/api/privateEndpointConnections/options.ts b/sdk/mongocluster/arm-mongocluster/src/api/privateEndpointConnections/options.ts index 9c5c26cb12f2..1047b0e98719 100644 --- a/sdk/mongocluster/arm-mongocluster/src/api/privateEndpointConnections/options.ts +++ b/sdk/mongocluster/arm-mongocluster/src/api/privateEndpointConnections/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface PrivateEndpointConnectionsDeleteOptionalParams extends OperationOptions { diff --git a/sdk/mongocluster/arm-mongocluster/src/api/privateLinks/operations.ts b/sdk/mongocluster/arm-mongocluster/src/api/privateLinks/operations.ts index 968850d88585..435338162dd3 100644 --- a/sdk/mongocluster/arm-mongocluster/src/api/privateLinks/operations.ts +++ b/sdk/mongocluster/arm-mongocluster/src/api/privateLinks/operations.ts @@ -1,25 +1,18 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { MongoClusterManagementContext as Client } from "../index.js"; +import type { MongoClusterManagementContext as Client } from "../index.js"; +import type { _PrivateLinkResourceListResult, PrivateLinkResource } from "../../models/models.js"; import { errorResponseDeserializer, - _PrivateLinkResourceListResult, _privateLinkResourceListResultDeserializer, - PrivateLinkResource, } from "../../models/models.js"; -import { PrivateLinksListByMongoClusterOptionalParams } from "./options.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; +import type { PrivateLinksListByMongoClusterOptionalParams } from "./options.js"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; export function _listByMongoClusterSend( context: Client, diff --git a/sdk/mongocluster/arm-mongocluster/src/api/privateLinks/options.ts b/sdk/mongocluster/arm-mongocluster/src/api/privateLinks/options.ts index 3442107f394d..14e4be153753 100644 --- a/sdk/mongocluster/arm-mongocluster/src/api/privateLinks/options.ts +++ b/sdk/mongocluster/arm-mongocluster/src/api/privateLinks/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface PrivateLinksListByMongoClusterOptionalParams extends OperationOptions {} diff --git a/sdk/mongocluster/arm-mongocluster/src/api/replicas/operations.ts b/sdk/mongocluster/arm-mongocluster/src/api/replicas/operations.ts index 50fdeef6971a..ad0f0377f7b8 100644 --- a/sdk/mongocluster/arm-mongocluster/src/api/replicas/operations.ts +++ b/sdk/mongocluster/arm-mongocluster/src/api/replicas/operations.ts @@ -1,25 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { MongoClusterManagementContext as Client } from "../index.js"; -import { - errorResponseDeserializer, - _ReplicaListResult, - _replicaListResultDeserializer, - Replica, -} from "../../models/models.js"; -import { ReplicasListByParentOptionalParams } from "./options.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; +import type { MongoClusterManagementContext as Client } from "../index.js"; +import type { _ReplicaListResult, Replica } from "../../models/models.js"; +import { errorResponseDeserializer, _replicaListResultDeserializer } from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; +import type { ReplicasListByParentOptionalParams } from "./options.js"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; export function _listByParentSend( context: Client, diff --git a/sdk/mongocluster/arm-mongocluster/src/api/replicas/options.ts b/sdk/mongocluster/arm-mongocluster/src/api/replicas/options.ts index 7fc9ec653282..a49e5bd8ae20 100644 --- a/sdk/mongocluster/arm-mongocluster/src/api/replicas/options.ts +++ b/sdk/mongocluster/arm-mongocluster/src/api/replicas/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface ReplicasListByParentOptionalParams extends OperationOptions {} diff --git a/sdk/mongocluster/arm-mongocluster/src/api/users/operations.ts b/sdk/mongocluster/arm-mongocluster/src/api/users/operations.ts index 442181f98633..a25b448b79da 100644 --- a/sdk/mongocluster/arm-mongocluster/src/api/users/operations.ts +++ b/sdk/mongocluster/arm-mongocluster/src/api/users/operations.ts @@ -1,34 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { MongoClusterManagementContext as Client } from "../index.js"; +import type { MongoClusterManagementContext as Client } from "../index.js"; +import type { User, _UserListResult } from "../../models/models.js"; import { errorResponseDeserializer, - User, userSerializer, userDeserializer, - _UserListResult, _userListResultDeserializer, } from "../../models/models.js"; -import { +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { UsersListByMongoClusterOptionalParams, UsersDeleteOptionalParams, UsersCreateOrUpdateOptionalParams, UsersGetOptionalParams, } from "./options.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { PollerLike, OperationState } from "@azure/core-lro"; export function _listByMongoClusterSend( context: Client, @@ -106,13 +99,7 @@ export function _$deleteSend( allowReserved: options?.requestOptions?.skipUrlEncoding, }, ); - return context.path(path).delete({ - ...operationOptionsToRequestParameters(options), - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, - }); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); } export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { diff --git a/sdk/mongocluster/arm-mongocluster/src/api/users/options.ts b/sdk/mongocluster/arm-mongocluster/src/api/users/options.ts index 12248bd41abd..ea655218c424 100644 --- a/sdk/mongocluster/arm-mongocluster/src/api/users/options.ts +++ b/sdk/mongocluster/arm-mongocluster/src/api/users/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface UsersListByMongoClusterOptionalParams extends OperationOptions {} diff --git a/sdk/mongocluster/arm-mongocluster/src/classic/firewallRules/index.ts b/sdk/mongocluster/arm-mongocluster/src/classic/firewallRules/index.ts index f3a1cc3c7259..9026beb0345e 100644 --- a/sdk/mongocluster/arm-mongocluster/src/classic/firewallRules/index.ts +++ b/sdk/mongocluster/arm-mongocluster/src/classic/firewallRules/index.ts @@ -1,22 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { MongoClusterManagementContext } from "../../api/mongoClusterManagementContext.js"; -import { FirewallRule } from "../../models/models.js"; -import { - FirewallRulesListByMongoClusterOptionalParams, - FirewallRulesDeleteOptionalParams, - FirewallRulesCreateOrUpdateOptionalParams, - FirewallRulesGetOptionalParams, -} from "../../api/firewallRules/options.js"; +import type { MongoClusterManagementContext } from "../../api/mongoClusterManagementContext.js"; import { listByMongoCluster, $delete, createOrUpdate, get, } from "../../api/firewallRules/operations.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { + FirewallRulesListByMongoClusterOptionalParams, + FirewallRulesDeleteOptionalParams, + FirewallRulesCreateOrUpdateOptionalParams, + FirewallRulesGetOptionalParams, +} from "../../api/firewallRules/options.js"; +import type { FirewallRule } from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { PollerLike, OperationState } from "@azure/core-lro"; /** Interface representing a FirewallRules operations. */ export interface FirewallRulesOperations { diff --git a/sdk/mongocluster/arm-mongocluster/src/classic/mongoClusters/index.ts b/sdk/mongocluster/arm-mongocluster/src/classic/mongoClusters/index.ts index ecd3658ee478..29cf978c3e07 100644 --- a/sdk/mongocluster/arm-mongocluster/src/classic/mongoClusters/index.ts +++ b/sdk/mongocluster/arm-mongocluster/src/classic/mongoClusters/index.ts @@ -1,26 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { MongoClusterManagementContext } from "../../api/mongoClusterManagementContext.js"; -import { - MongoCluster, - MongoClusterUpdate, - ListConnectionStringsResult, - CheckNameAvailabilityRequest, - CheckNameAvailabilityResponse, - PromoteReplicaRequest, -} from "../../models/models.js"; -import { - MongoClustersPromoteOptionalParams, - MongoClustersCheckNameAvailabilityOptionalParams, - MongoClustersListConnectionStringsOptionalParams, - MongoClustersListOptionalParams, - MongoClustersListByResourceGroupOptionalParams, - MongoClustersDeleteOptionalParams, - MongoClustersUpdateOptionalParams, - MongoClustersCreateOrUpdateOptionalParams, - MongoClustersGetOptionalParams, -} from "../../api/mongoClusters/options.js"; +import type { MongoClusterManagementContext } from "../../api/mongoClusterManagementContext.js"; import { promote, checkNameAvailability, @@ -32,8 +13,27 @@ import { createOrUpdate, get, } from "../../api/mongoClusters/operations.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { + MongoClustersPromoteOptionalParams, + MongoClustersCheckNameAvailabilityOptionalParams, + MongoClustersListConnectionStringsOptionalParams, + MongoClustersListOptionalParams, + MongoClustersListByResourceGroupOptionalParams, + MongoClustersDeleteOptionalParams, + MongoClustersUpdateOptionalParams, + MongoClustersCreateOrUpdateOptionalParams, + MongoClustersGetOptionalParams, +} from "../../api/mongoClusters/options.js"; +import type { + MongoCluster, + MongoClusterUpdate, + ListConnectionStringsResult, + CheckNameAvailabilityRequest, + CheckNameAvailabilityResponse, + PromoteReplicaRequest, +} from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { PollerLike, OperationState } from "@azure/core-lro"; /** Interface representing a MongoClusters operations. */ export interface MongoClustersOperations { diff --git a/sdk/mongocluster/arm-mongocluster/src/classic/operations/index.ts b/sdk/mongocluster/arm-mongocluster/src/classic/operations/index.ts index ab4d4eb9d81a..0628e9dd6439 100644 --- a/sdk/mongocluster/arm-mongocluster/src/classic/operations/index.ts +++ b/sdk/mongocluster/arm-mongocluster/src/classic/operations/index.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { MongoClusterManagementContext } from "../../api/mongoClusterManagementContext.js"; -import { Operation } from "../../models/models.js"; -import { OperationsListOptionalParams } from "../../api/operations/options.js"; +import type { MongoClusterManagementContext } from "../../api/mongoClusterManagementContext.js"; import { list } from "../../api/operations/operations.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { OperationsListOptionalParams } from "../../api/operations/options.js"; +import type { Operation } from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; /** Interface representing a Operations operations. */ export interface OperationsOperations { diff --git a/sdk/mongocluster/arm-mongocluster/src/classic/privateEndpointConnections/index.ts b/sdk/mongocluster/arm-mongocluster/src/classic/privateEndpointConnections/index.ts index 0e7a337b6e93..c17326c8a8cd 100644 --- a/sdk/mongocluster/arm-mongocluster/src/classic/privateEndpointConnections/index.ts +++ b/sdk/mongocluster/arm-mongocluster/src/classic/privateEndpointConnections/index.ts @@ -1,22 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { MongoClusterManagementContext } from "../../api/mongoClusterManagementContext.js"; -import { PrivateEndpointConnectionResource } from "../../models/models.js"; -import { - PrivateEndpointConnectionsDeleteOptionalParams, - PrivateEndpointConnectionsCreateOptionalParams, - PrivateEndpointConnectionsGetOptionalParams, - PrivateEndpointConnectionsListByMongoClusterOptionalParams, -} from "../../api/privateEndpointConnections/options.js"; +import type { MongoClusterManagementContext } from "../../api/mongoClusterManagementContext.js"; import { $delete, create, get, listByMongoCluster, } from "../../api/privateEndpointConnections/operations.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { + PrivateEndpointConnectionsDeleteOptionalParams, + PrivateEndpointConnectionsCreateOptionalParams, + PrivateEndpointConnectionsGetOptionalParams, + PrivateEndpointConnectionsListByMongoClusterOptionalParams, +} from "../../api/privateEndpointConnections/options.js"; +import type { PrivateEndpointConnectionResource } from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { PollerLike, OperationState } from "@azure/core-lro"; /** Interface representing a PrivateEndpointConnections operations. */ export interface PrivateEndpointConnectionsOperations { diff --git a/sdk/mongocluster/arm-mongocluster/src/classic/privateLinks/index.ts b/sdk/mongocluster/arm-mongocluster/src/classic/privateLinks/index.ts index 70880c7a8ee0..7a722fff967b 100644 --- a/sdk/mongocluster/arm-mongocluster/src/classic/privateLinks/index.ts +++ b/sdk/mongocluster/arm-mongocluster/src/classic/privateLinks/index.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { MongoClusterManagementContext } from "../../api/mongoClusterManagementContext.js"; -import { PrivateLinkResource } from "../../models/models.js"; -import { PrivateLinksListByMongoClusterOptionalParams } from "../../api/privateLinks/options.js"; +import type { MongoClusterManagementContext } from "../../api/mongoClusterManagementContext.js"; import { listByMongoCluster } from "../../api/privateLinks/operations.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { PrivateLinksListByMongoClusterOptionalParams } from "../../api/privateLinks/options.js"; +import type { PrivateLinkResource } from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; /** Interface representing a PrivateLinks operations. */ export interface PrivateLinksOperations { diff --git a/sdk/mongocluster/arm-mongocluster/src/classic/replicas/index.ts b/sdk/mongocluster/arm-mongocluster/src/classic/replicas/index.ts index d3d97dda1ad5..532e738d63b9 100644 --- a/sdk/mongocluster/arm-mongocluster/src/classic/replicas/index.ts +++ b/sdk/mongocluster/arm-mongocluster/src/classic/replicas/index.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { MongoClusterManagementContext } from "../../api/mongoClusterManagementContext.js"; -import { Replica } from "../../models/models.js"; -import { ReplicasListByParentOptionalParams } from "../../api/replicas/options.js"; +import type { MongoClusterManagementContext } from "../../api/mongoClusterManagementContext.js"; import { listByParent } from "../../api/replicas/operations.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { ReplicasListByParentOptionalParams } from "../../api/replicas/options.js"; +import type { Replica } from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; /** Interface representing a Replicas operations. */ export interface ReplicasOperations { diff --git a/sdk/mongocluster/arm-mongocluster/src/classic/users/index.ts b/sdk/mongocluster/arm-mongocluster/src/classic/users/index.ts index 70ba8b1d5df1..731620919b15 100644 --- a/sdk/mongocluster/arm-mongocluster/src/classic/users/index.ts +++ b/sdk/mongocluster/arm-mongocluster/src/classic/users/index.ts @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { MongoClusterManagementContext } from "../../api/mongoClusterManagementContext.js"; -import { User } from "../../models/models.js"; -import { +import type { MongoClusterManagementContext } from "../../api/mongoClusterManagementContext.js"; +import { listByMongoCluster, $delete, createOrUpdate, get } from "../../api/users/operations.js"; +import type { UsersListByMongoClusterOptionalParams, UsersDeleteOptionalParams, UsersCreateOrUpdateOptionalParams, UsersGetOptionalParams, } from "../../api/users/options.js"; -import { listByMongoCluster, $delete, createOrUpdate, get } from "../../api/users/operations.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { User } from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { PollerLike, OperationState } from "@azure/core-lro"; /** Interface representing a Users operations. */ export interface UsersOperations { diff --git a/sdk/mongocluster/arm-mongocluster/src/index.ts b/sdk/mongocluster/arm-mongocluster/src/index.ts index 462df21a02a0..8ed4f0795726 100644 --- a/sdk/mongocluster/arm-mongocluster/src/index.ts +++ b/sdk/mongocluster/arm-mongocluster/src/index.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { AzureClouds, AzureSupportedClouds } from "./static-helpers/cloudSettingHelpers.js"; import { PageSettings, ContinuablePage, @@ -154,3 +155,4 @@ export { UsersOperations, } from "./classic/index.js"; export { PageSettings, ContinuablePage, PagedAsyncIterableIterator }; +export { AzureClouds, AzureSupportedClouds }; diff --git a/sdk/mongocluster/arm-mongocluster/src/models/models.ts b/sdk/mongocluster/arm-mongocluster/src/models/models.ts index cca24802209f..846efaf2bd7e 100644 --- a/sdk/mongocluster/arm-mongocluster/src/models/models.ts +++ b/sdk/mongocluster/arm-mongocluster/src/models/models.ts @@ -557,27 +557,16 @@ export interface StorageProperties { sizeGb?: number; /** The type of storage to provision the cluster servers with. */ type?: StorageType; - /** The IOPs of the storage assigned to each server. Only applicable if the type is 'PremiumSSDv2'. */ - iops?: number; - /** The throughput of the storage assigned to each server. Only applicable if the type is 'PremiumSSDv2'. */ - throughput?: number; } export function storagePropertiesSerializer(item: StorageProperties): any { - return { - sizeGb: item["sizeGb"], - type: item["type"], - iops: item["iops"], - throughput: item["throughput"], - }; + return { sizeGb: item["sizeGb"], type: item["type"] }; } export function storagePropertiesDeserializer(item: any): StorageProperties { return { sizeGb: item["sizeGb"], type: item["type"], - iops: item["iops"], - throughput: item["throughput"], }; } @@ -997,16 +986,18 @@ export function encryptionPropertiesDeserializer(item: any): EncryptionPropertie /** Customer managed key encryption settings. */ export interface CustomerManagedKeyEncryptionProperties { /** The identity used to access the key encryption key. */ - keyEncryptionKeyIdentity: KeyEncryptionKeyIdentity; + keyEncryptionKeyIdentity?: KeyEncryptionKeyIdentity; /** The URI of the key vault key used for encryption. */ - keyEncryptionKeyUrl: string; + keyEncryptionKeyUrl?: string; } export function customerManagedKeyEncryptionPropertiesSerializer( item: CustomerManagedKeyEncryptionProperties, ): any { return { - keyEncryptionKeyIdentity: keyEncryptionKeyIdentitySerializer(item["keyEncryptionKeyIdentity"]), + keyEncryptionKeyIdentity: !item["keyEncryptionKeyIdentity"] + ? item["keyEncryptionKeyIdentity"] + : keyEncryptionKeyIdentitySerializer(item["keyEncryptionKeyIdentity"]), keyEncryptionKeyUrl: item["keyEncryptionKeyUrl"], }; } @@ -1015,9 +1006,9 @@ export function customerManagedKeyEncryptionPropertiesDeserializer( item: any, ): CustomerManagedKeyEncryptionProperties { return { - keyEncryptionKeyIdentity: keyEncryptionKeyIdentityDeserializer( - item["keyEncryptionKeyIdentity"], - ), + keyEncryptionKeyIdentity: !item["keyEncryptionKeyIdentity"] + ? item["keyEncryptionKeyIdentity"] + : keyEncryptionKeyIdentityDeserializer(item["keyEncryptionKeyIdentity"]), keyEncryptionKeyUrl: item["keyEncryptionKeyUrl"], }; } @@ -1025,9 +1016,9 @@ export function customerManagedKeyEncryptionPropertiesDeserializer( /** The identity used for key encryption key. */ export interface KeyEncryptionKeyIdentity { /** The type of identity. Only 'UserAssignedIdentity' is supported. */ - identityType: KeyEncryptionKeyIdentityType; + identityType?: KeyEncryptionKeyIdentityType; /** The user assigned identity resource id. */ - userAssignedIdentityResourceId: string; + userAssignedIdentityResourceId?: string; } export function keyEncryptionKeyIdentitySerializer(item: KeyEncryptionKeyIdentity): any { @@ -1200,7 +1191,7 @@ export enum KnownCreatedByType { /** * The kind of entity that created the resource. \ - * {@link KnowncreatedByType} can be used interchangeably with createdByType, + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, * this enum contains the known values that the service supports. * ### Known values supported by the service * **User**: The entity was created by a user. \ @@ -1281,6 +1272,8 @@ export interface MongoClusterUpdateProperties { previewFeatures?: PreviewFeature[]; /** The authentication configuration for the cluster. */ authConfig?: AuthConfigProperties; + /** The encryption configuration for the cluster. Depends on identity being configured. */ + encryption?: EncryptionProperties; } export function mongoClusterUpdatePropertiesSerializer(item: MongoClusterUpdateProperties): any { @@ -1306,6 +1299,9 @@ export function mongoClusterUpdatePropertiesSerializer(item: MongoClusterUpdateP authConfig: !item["authConfig"] ? item["authConfig"] : authConfigPropertiesSerializer(item["authConfig"]), + encryption: !item["encryption"] + ? item["encryption"] + : encryptionPropertiesSerializer(item["encryption"]), }; } @@ -2000,4 +1996,6 @@ export enum KnownVersions { V20250401Preview = "2025-04-01-preview", /** Azure Cosmos DB for Mongo vCore clusters api version 2025-07-01-preview. */ V20250701Preview = "2025-07-01-preview", + /** Azure Cosmos DB for Mongo vCore clusters api version 2025-08-01-preview. */ + V20250801Preview = "2025-08-01-preview", } diff --git a/sdk/mongocluster/arm-mongocluster/src/mongoClusterManagementClient.ts b/sdk/mongocluster/arm-mongocluster/src/mongoClusterManagementClient.ts index 5cb1e968e5ff..7bf373aefacd 100644 --- a/sdk/mongocluster/arm-mongocluster/src/mongoClusterManagementClient.ts +++ b/sdk/mongocluster/arm-mongocluster/src/mongoClusterManagementClient.ts @@ -1,32 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - createMongoClusterManagement, +import type { MongoClusterManagementContext, MongoClusterManagementClientOptionalParams, } from "./api/index.js"; -import { UsersOperations, _getUsersOperations } from "./classic/users/index.js"; -import { ReplicasOperations, _getReplicasOperations } from "./classic/replicas/index.js"; -import { - PrivateLinksOperations, - _getPrivateLinksOperations, -} from "./classic/privateLinks/index.js"; -import { - PrivateEndpointConnectionsOperations, - _getPrivateEndpointConnectionsOperations, -} from "./classic/privateEndpointConnections/index.js"; -import { - FirewallRulesOperations, - _getFirewallRulesOperations, -} from "./classic/firewallRules/index.js"; -import { - MongoClustersOperations, - _getMongoClustersOperations, -} from "./classic/mongoClusters/index.js"; -import { OperationsOperations, _getOperationsOperations } from "./classic/operations/index.js"; -import { Pipeline } from "@azure/core-rest-pipeline"; -import { TokenCredential } from "@azure/core-auth"; +import { createMongoClusterManagement } from "./api/index.js"; +import type { FirewallRulesOperations } from "./classic/firewallRules/index.js"; +import { _getFirewallRulesOperations } from "./classic/firewallRules/index.js"; +import type { MongoClustersOperations } from "./classic/mongoClusters/index.js"; +import { _getMongoClustersOperations } from "./classic/mongoClusters/index.js"; +import type { OperationsOperations } from "./classic/operations/index.js"; +import { _getOperationsOperations } from "./classic/operations/index.js"; +import type { PrivateEndpointConnectionsOperations } from "./classic/privateEndpointConnections/index.js"; +import { _getPrivateEndpointConnectionsOperations } from "./classic/privateEndpointConnections/index.js"; +import type { PrivateLinksOperations } from "./classic/privateLinks/index.js"; +import { _getPrivateLinksOperations } from "./classic/privateLinks/index.js"; +import type { ReplicasOperations } from "./classic/replicas/index.js"; +import { _getReplicasOperations } from "./classic/replicas/index.js"; +import type { UsersOperations } from "./classic/users/index.js"; +import { _getUsersOperations } from "./classic/users/index.js"; +import type { TokenCredential } from "@azure/core-auth"; +import type { Pipeline } from "@azure/core-rest-pipeline"; export { MongoClusterManagementClientOptionalParams } from "./api/mongoClusterManagementContext.js"; diff --git a/sdk/mongocluster/arm-mongocluster/src/restorePollerHelpers.ts b/sdk/mongocluster/arm-mongocluster/src/restorePollerHelpers.ts index 6c272230f36c..7ed08759fa9b 100644 --- a/sdk/mongocluster/arm-mongocluster/src/restorePollerHelpers.ts +++ b/sdk/mongocluster/arm-mongocluster/src/restorePollerHelpers.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { MongoClusterManagementClient } from "./mongoClusterManagementClient.js"; +import type { MongoClusterManagementClient } from "./mongoClusterManagementClient.js"; import { _$deleteDeserialize, _createOrUpdateDeserialize } from "./api/users/operations.js"; import { _$deleteDeserialize as _$deleteDeserializePrivateEndpointConnections, @@ -18,14 +18,10 @@ import { _createOrUpdateDeserialize as _createOrUpdateDeserializeMongoClusters, } from "./api/mongoClusters/operations.js"; import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js"; -import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client"; -import { AbortSignalLike } from "@azure/abort-controller"; -import { - PollerLike, - OperationState, - deserializeState, - ResourceLocationConfig, -} from "@azure/core-lro"; +import type { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client"; +import type { AbortSignalLike } from "@azure/abort-controller"; +import type { PollerLike, OperationState, ResourceLocationConfig } from "@azure/core-lro"; +import { deserializeState } from "@azure/core-lro"; export interface RestorePollerOptions< TResult, @@ -85,6 +81,7 @@ export function restorePoller( } interface DeserializationHelper { + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type deserializer: Function; expectedStatuses: string[]; } diff --git a/sdk/mongocluster/arm-mongocluster/src/static-helpers/cloudSettingHelpers.ts b/sdk/mongocluster/arm-mongocluster/src/static-helpers/cloudSettingHelpers.ts new file mode 100644 index 000000000000..613112c6e397 --- /dev/null +++ b/sdk/mongocluster/arm-mongocluster/src/static-helpers/cloudSettingHelpers.ts @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * An enum to describe Azure Cloud environments. + * @enum {string} + */ +export enum AzureClouds { + /** Azure public cloud, which is the default cloud for Azure SDKs. */ + AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD", + /** Azure China cloud */ + AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD", + /** Azure US government cloud */ + AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT", +} + +/** The supported values for cloud setting as a string literal type */ +export type AzureSupportedClouds = `${AzureClouds}`; + +/** + * Gets the Azure Resource Manager endpoint URL for the specified cloud setting. + * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values. + * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined. + * @throws {Error} Throws an error if an unknown cloud setting is provided. + */ +export function getArmEndpoint(cloudSetting?: AzureSupportedClouds): string | undefined { + if (cloudSetting === undefined) { + return undefined; + } + const cloudEndpoints: Record = { + AZURE_CHINA_CLOUD: "https://management.chinacloudapi.cn/", + AZURE_US_GOVERNMENT: "https://management.usgovcloudapi.net/", + AZURE_PUBLIC_CLOUD: "https://management.azure.com/", + }; + if (cloudSetting in cloudEndpoints) { + return cloudEndpoints[cloudSetting]; + } else { + throw new Error( + `Unknown cloud setting: ${cloudSetting}. Please refer to the enum AzureClouds for possible values.`, + ); + } +} diff --git a/sdk/mongocluster/arm-mongocluster/src/static-helpers/pagingHelpers.ts b/sdk/mongocluster/arm-mongocluster/src/static-helpers/pagingHelpers.ts index ce33af5f4178..11248b3804e4 100644 --- a/sdk/mongocluster/arm-mongocluster/src/static-helpers/pagingHelpers.ts +++ b/sdk/mongocluster/arm-mongocluster/src/static-helpers/pagingHelpers.ts @@ -1,7 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; +import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError } from "@azure-rest/core-client"; import { RestError } from "@azure/core-rest-pipeline"; /** diff --git a/sdk/mongocluster/arm-mongocluster/src/static-helpers/pollingHelpers.ts b/sdk/mongocluster/arm-mongocluster/src/static-helpers/pollingHelpers.ts index f01c41bab69d..63b3c201e5a8 100644 --- a/sdk/mongocluster/arm-mongocluster/src/static-helpers/pollingHelpers.ts +++ b/sdk/mongocluster/arm-mongocluster/src/static-helpers/pollingHelpers.ts @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { +import type { PollerLike, OperationState, ResourceLocationConfig, RunningOperation, - createHttpPoller, OperationResponse, } from "@azure/core-lro"; +import { createHttpPoller } from "@azure/core-lro"; -import { Client, PathUncheckedResponse, createRestError } from "@azure-rest/core-client"; -import { AbortSignalLike } from "@azure/abort-controller"; +import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError } from "@azure-rest/core-client"; +import type { AbortSignalLike } from "@azure/abort-controller"; export interface GetLongRunningPollerOptions { /** Delay to wait until next poll, in milliseconds. */ diff --git a/sdk/mongocluster/arm-mongocluster/src/static-helpers/urlTemplate.ts b/sdk/mongocluster/arm-mongocluster/src/static-helpers/urlTemplate.ts index 9aac558fb377..657898dd38ff 100644 --- a/sdk/mongocluster/arm-mongocluster/src/static-helpers/urlTemplate.ts +++ b/sdk/mongocluster/arm-mongocluster/src/static-helpers/urlTemplate.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -//--------------------- +// --------------------- // interfaces -//--------------------- +// --------------------- interface ValueOptions { isFirst: boolean; // is first value in the expression op?: string; // operator @@ -21,27 +21,27 @@ export interface UrlTemplateOptions { // --------------------- // helpers // --------------------- -function encodeComponent(val: string, reserved?: boolean, op?: string) { +function encodeComponent(val: string, reserved?: boolean, op?: string): string { return (reserved ?? op === "+") || op === "#" ? encodeReservedComponent(val) : encodeRFC3986URIComponent(val); } -function encodeReservedComponent(str: string) { +function encodeReservedComponent(str: string): string { return str .split(/(%[0-9A-Fa-f]{2})/g) .map((part) => (!/%[0-9A-Fa-f]/.test(part) ? encodeURI(part) : part)) .join(""); } -function encodeRFC3986URIComponent(str: string) { +function encodeRFC3986URIComponent(str: string): string { return encodeURIComponent(str).replace( /[!'()*]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, ); } -function isDefined(val: any) { +function isDefined(val: any): boolean { return val !== undefined && val !== null; } @@ -49,7 +49,7 @@ function getNamedAndIfEmpty(op?: string): [boolean, string] { return [!!op && [";", "?", "&"].includes(op), !!op && ["?", "&"].includes(op) ? "=" : ""]; } -function getFirstOrSep(op?: string, isFirst = false) { +function getFirstOrSep(op?: string, isFirst = false): string { if (isFirst) { return !op || op === "+" ? "" : op; } else if (!op || op === "+" || op === "#") { @@ -61,7 +61,7 @@ function getFirstOrSep(op?: string, isFirst = false) { } } -function getExpandedValue(option: ValueOptions) { +function getExpandedValue(option: ValueOptions): string { let isFirst = option.isFirst; const { op, varName, varValue: value, reserved } = option; const vals: string[] = []; @@ -73,7 +73,11 @@ function getExpandedValue(option: ValueOptions) { vals.push(`${getFirstOrSep(op, isFirst)}`); if (named && varName) { vals.push(`${encodeURIComponent(varName)}`); - val === "" ? vals.push(ifEmpty) : vals.push("="); + if (val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } } vals.push(encodeComponent(val, reserved, op)); isFirst = false; @@ -88,7 +92,11 @@ function getExpandedValue(option: ValueOptions) { vals.push(`${getFirstOrSep(op, isFirst)}`); if (key) { vals.push(`${encodeURIComponent(key)}`); - named && val === "" ? vals.push(ifEmpty) : vals.push("="); + if (named && val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } } vals.push(encodeComponent(val, reserved, op)); isFirst = false; @@ -97,7 +105,7 @@ function getExpandedValue(option: ValueOptions) { return vals.join(""); } -function getNonExpandedValue(option: ValueOptions) { +function getNonExpandedValue(option: ValueOptions): string | undefined { const { op, varName, varValue: value, isFirst, reserved } = option; const vals: string[] = []; const first = getFirstOrSep(op, isFirst); @@ -143,7 +151,11 @@ function getVarValue(option: ValueOptions): string | undefined { if (named && varName) { // No need to encode varName considering it is already encoded vals.push(varName); - val === "" ? vals.push(ifEmpty) : vals.push("="); + if (val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } } if (modifier && modifier !== "*") { val = val.substring(0, parseInt(modifier, 10)); @@ -165,18 +177,19 @@ export function expandUrlTemplate( context: Record, option?: UrlTemplateOptions, ): string { - return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, (_, expr, text) => { + return template.replace(/\{([^{}]+)\}|([^{}]+)/g, (_, expr, text) => { if (!expr) { return encodeReservedComponent(text); } let op; if (["+", "#", ".", "/", ";", "?", "&"].includes(expr[0])) { - ((op = expr[0]), (expr = expr.slice(1))); + op = expr[0]; + expr = expr.slice(1); } const varList = expr.split(/,/g); const result = []; for (const varSpec of varList) { - const varMatch = /([^:\*]*)(?::(\d+)|(\*))?/.exec(varSpec); + const varMatch = /([^:*]*)(?::(\d+)|(\*))?/.exec(varSpec); if (!varMatch || !varMatch[1]) { continue; } diff --git a/sdk/mongocluster/arm-mongocluster/tsconfig.json b/sdk/mongocluster/arm-mongocluster/tsconfig.json index d466f1460665..0e57dbd186e5 100644 --- a/sdk/mongocluster/arm-mongocluster/tsconfig.json +++ b/sdk/mongocluster/arm-mongocluster/tsconfig.json @@ -12,6 +12,5 @@ { "path": "./tsconfig.snippets.json" } - ], - "files": [] + ] } diff --git a/sdk/mongocluster/arm-mongocluster/tsconfig.test.json b/sdk/mongocluster/arm-mongocluster/tsconfig.test.json index 42798ad68913..290ca214aebc 100644 --- a/sdk/mongocluster/arm-mongocluster/tsconfig.test.json +++ b/sdk/mongocluster/arm-mongocluster/tsconfig.test.json @@ -1,14 +1,3 @@ { - "references": [ - { - "path": "./tsconfig.test.node.json" - }, - { - "path": "./tsconfig.browser.config.json" - } - ], - "compilerOptions": { - "composite": true - }, - "files": [] + "extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] } diff --git a/sdk/mongocluster/arm-mongocluster/tsconfig.test.node.json b/sdk/mongocluster/arm-mongocluster/tsconfig.test.node.json deleted file mode 100644 index 31d5981ba097..000000000000 --- a/sdk/mongocluster/arm-mongocluster/tsconfig.test.node.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.test.node.base.json", - "compilerOptions": { - "paths": { - "@azure/arm-mongocluster": ["./src/index.ts"], - "@azure/arm-mongocluster/*": ["./src/*"], - "$internal/*": ["./src/*"] - } - } -} diff --git a/sdk/mongocluster/arm-mongocluster/tsp-location.yaml b/sdk/mongocluster/arm-mongocluster/tsp-location.yaml index 285a938caccb..13b0029c67f1 100644 --- a/sdk/mongocluster/arm-mongocluster/tsp-location.yaml +++ b/sdk/mongocluster/arm-mongocluster/tsp-location.yaml @@ -1,4 +1,4 @@ -directory: specification/mongocluster/DocumentDB.MongoCluster.Management -commit: e6d42354fa0c04d56c2e5e5c061453e76ba788cb +directory: specification/mongocluster/resource-manager/Microsoft.DocumentDB/MongoCluster +commit: 0b778f1cf2309de4b59bef1c532fc341c9af9925 repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/mongocluster/arm-mongocluster/vitest.esm.config.ts b/sdk/mongocluster/arm-mongocluster/vitest.esm.config.ts new file mode 100644 index 000000000000..5e9735e9b144 --- /dev/null +++ b/sdk/mongocluster/arm-mongocluster/vitest.esm.config.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig(vitestConfig, vitestEsmConfig);