From 5edf93d65ff9505577cba0e802012cc22b202c0b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 10 Nov 2022 07:17:40 +0000 Subject: [PATCH] CodeGen from PR 20768 in Azure/azure-rest-api-specs AAD Domain Services: add 09-01-2022 API version (#20768) * Add new API folder * Add new API 2022-09-01 * Fixed casing and naming issues * Fixing Swagger Violations * Fix date-time invalid format * Fix DateTime attempt 2 * Fix DateTime attempt 3 * Fix Prettier Check * Fixing Swagger Violations for LRO --- common/config/rush/pnpm-lock.yaml | 15 +-- .../arm-domainservices/CHANGELOG.md | 27 +++-- .../arm-domainservices/_meta.json | 10 +- .../arm-domainservices/package.json | 29 ++--- .../review/arm-domainservices.api.md | 104 +++++++++--------- .../src/domainServicesResourceProvider.ts | 75 ++++++++++--- .../arm-domainservices/src/models/index.ts | 102 ++++++++++++++++- .../arm-domainservices/src/models/mappers.ts | 20 ++++ .../src/models/parameters.ts | 2 +- .../arm-domainservices/test/sampleTest.ts | 39 +++---- .../arm-domainservices/tsconfig.json | 10 +- 11 files changed, 287 insertions(+), 146 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 0b247bb758e2..9553de12b531 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3880,7 +3880,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.0.0-dev.20221109 + typescript: 5.0.0-dev.20221110 dev: false /downlevel-dts/0.8.0: @@ -8828,8 +8828,8 @@ packages: hasBin: true dev: false - /typescript/5.0.0-dev.20221109: - resolution: {integrity: sha512-DAVRpl2535lb8CL7WjpHAb0dnhsbsTUVLQW5jBxS4RyRYA5Tq17kDGYQTvT0JryOwp6PksgjDdUKG2B9ElU5wg==} + /typescript/5.0.0-dev.20221110: + resolution: {integrity: sha512-2ErQCfMJ/il4ipW6NRIqJdQvJ84k8nafDIXGCpjaedCdnF/ejRmtHAhPuS5m54AKhRz/uc31LxzKpcSOxVuJHQ==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -11933,7 +11933,7 @@ packages: dev: false file:projects/arm-domainservices.tgz: - resolution: {integrity: sha512-TnoDmTbnyO6PMUnxcUHH8lYFRf2s9WUBnQDAg5oD8HpOkQE7BtFoII+5+tsfjtgVghwRfJGM8SsiSHxHUCX5oQ==, tarball: file:projects/arm-domainservices.tgz} + resolution: {integrity: sha512-kgkGE47pQtJKL7j1ikjRlfPDbvN+Pn4eJ9RGeAE27LiSI1J1iLHvloNfXX+G/IdoYaOcNkXcHWOBSvoFXp0gEw==, tarball: file:projects/arm-domainservices.tgz} name: '@rush-temp/arm-domainservices' version: 0.0.0 dependencies: @@ -11944,6 +11944,8 @@ packages: '@rollup/plugin-json': 4.1.0_rollup@2.79.1 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 + '@types/chai': 4.3.3 + chai: 4.3.6 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 @@ -11951,11 +11953,10 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_rollup@2.79.1 tslib: 2.4.1 - typescript: 4.2.4 + typescript: 4.6.4 uglify-js: 3.17.4 transitivePeerDependencies: - '@types/node' - - encoding - supports-color dev: false @@ -12720,7 +12721,7 @@ packages: dev: false file:projects/arm-links.tgz: - resolution: {integrity: sha512-dA1SMN8GHZj+2vmT2rgeid6pvkP3DUoWQdzbhxPrJ5QgAgjA1dZ4yckeIgZEo8z93ZWD9LP8/QJVWHccEEdwVA==, tarball: file:projects/arm-links.tgz} + resolution: {integrity: sha512-Vdb/Dd+9IFLd8/yto66fCWhX5yjLE+N/v5pxRCYm6PaaUfLPJLXLxHgnqRlEAl++bMBr5CF0qRZPPBo3X/TNLQ==, tarball: file:projects/arm-links.tgz} name: '@rush-temp/arm-links' version: 0.0.0 dependencies: diff --git a/sdk/domainservices/arm-domainservices/CHANGELOG.md b/sdk/domainservices/arm-domainservices/CHANGELOG.md index 3412a914cfbc..611b342bade7 100644 --- a/sdk/domainservices/arm-domainservices/CHANGELOG.md +++ b/sdk/domainservices/arm-domainservices/CHANGELOG.md @@ -1,15 +1,20 @@ # Release History - -## 4.0.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + +## 4.1.0 (2022-11-10) + +**Features** + + - Added Interface DomainService + - Added Interface OuContainer + - Added Type Alias ChannelBinding + - Added Type Alias LdapSigning + - Added Type Alias SyncScope + - Interface DomainSecuritySettings has a new optional parameter channelBinding + - Interface DomainSecuritySettings has a new optional parameter ldapSigning + - Added Enum KnownChannelBinding + - Added Enum KnownLdapSigning + - Added Enum KnownSyncScope + ## 4.0.1 (2022-04-18) **features** diff --git a/sdk/domainservices/arm-domainservices/_meta.json b/sdk/domainservices/arm-domainservices/_meta.json index 200b460b7905..917a9ead9788 100644 --- a/sdk/domainservices/arm-domainservices/_meta.json +++ b/sdk/domainservices/arm-domainservices/_meta.json @@ -1,8 +1,8 @@ { - "commit": "1f1d5b0b9ce6cc94605b2fd619dce374fb6e033a", - "readme": "specification\\domainservices\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\domainservices\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "commit": "8a20cee044fafde7ae0364edab45a577aa80d20f", + "readme": "specification/domainservices/resource-manager/readme.md", + "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/domainservices/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.2", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.1", + "use": "@autorest/typescript@6.0.0-rc.2" } \ No newline at end of file diff --git a/sdk/domainservices/arm-domainservices/package.json b/sdk/domainservices/arm-domainservices/package.json index 991ea9f038d9..1033ddd82b2b 100644 --- a/sdk/domainservices/arm-domainservices/package.json +++ b/sdk/domainservices/arm-domainservices/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for DomainServicesResourceProvider.", - "version": "4.0.2", + "version": "4.1.0", "engines": { "node": ">=14.0.0" }, @@ -36,13 +36,17 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.2.0", + "typescript": "~4.6.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2" + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/domainservices/arm-domainservices", "repository": { @@ -93,9 +97,8 @@ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", - "integration-test:browser": "echo skipped", - "docs": "echo skipped" + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped" }, "sideEffects": false, "//metadata": { @@ -106,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-domainservices?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/domainservices/arm-domainservices/review/arm-domainservices.api.md b/sdk/domainservices/arm-domainservices/review/arm-domainservices.api.md index ea8f70127aa3..9b6b62a8ca7a 100644 --- a/sdk/domainservices/arm-domainservices/review/arm-domainservices.api.md +++ b/sdk/domainservices/arm-domainservices/review/arm-domainservices.api.md @@ -10,6 +10,9 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { PollerLike } from '@azure/core-lro'; import { PollOperationState } from '@azure/core-lro'; +// @public +export type ChannelBinding = string; + // @public export interface CloudError { error?: CloudErrorBody; @@ -55,8 +58,10 @@ export type CreatedByType = string; // @public export interface DomainSecuritySettings { + channelBinding?: ChannelBinding; kerberosArmoring?: KerberosArmoring; kerberosRc4Encryption?: KerberosRc4Encryption; + ldapSigning?: LdapSigning; ntlmV1?: NtlmV1; syncKerberosPasswords?: SyncKerberosPasswords; syncNtlmPasswords?: SyncNtlmPasswords; @@ -65,24 +70,25 @@ export interface DomainSecuritySettings { } // @public -export type DomainService = Resource & { - readonly version?: number; - readonly tenantId?: string; - domainName?: string; +export interface DomainService extends Resource { + configDiagnostics?: ConfigDiagnostics; readonly deploymentId?: string; - readonly syncOwner?: string; - replicaSets?: ReplicaSet[]; - ldapsSettings?: LdapsSettings; - resourceForestSettings?: ResourceForestSettings; - domainSecuritySettings?: DomainSecuritySettings; domainConfigurationType?: string; - sku?: string; + domainName?: string; + domainSecuritySettings?: DomainSecuritySettings; filteredSync?: FilteredSync; - notificationSettings?: NotificationSettings; + ldapsSettings?: LdapsSettings; readonly migrationProperties?: MigrationProperties; + notificationSettings?: NotificationSettings; readonly provisioningState?: string; - configDiagnostics?: ConfigDiagnostics; -}; + replicaSets?: ReplicaSet[]; + resourceForestSettings?: ResourceForestSettings; + sku?: string; + readonly syncOwner?: string; + syncScope?: SyncScope; + readonly tenantId?: string; + readonly version?: number; +} // @public export interface DomainServiceListResult { @@ -246,133 +252,120 @@ export type KerberosArmoring = string; // @public export type KerberosRc4Encryption = string; +// @public +export enum KnownChannelBinding { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownCreatedByType { - // (undocumented) Application = "Application", - // (undocumented) Key = "Key", - // (undocumented) ManagedIdentity = "ManagedIdentity", - // (undocumented) User = "User" } // @public export enum KnownExternalAccess { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } // @public export enum KnownFilteredSync { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } // @public export enum KnownKerberosArmoring { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } // @public export enum KnownKerberosRc4Encryption { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } // @public export enum KnownLdaps { - // (undocumented) Disabled = "Disabled", - // (undocumented) + Enabled = "Enabled" +} + +// @public +export enum KnownLdapSigning { + Disabled = "Disabled", Enabled = "Enabled" } // @public export enum KnownNotifyDcAdmins { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } // @public export enum KnownNotifyGlobalAdmins { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } // @public export enum KnownNtlmV1 { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } // @public export enum KnownStatus { - // (undocumented) Failure = "Failure", - // (undocumented) None = "None", - // (undocumented) OK = "OK", - // (undocumented) Running = "Running", - // (undocumented) Skipped = "Skipped", - // (undocumented) Warning = "Warning" } // @public export enum KnownSyncKerberosPasswords { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } // @public export enum KnownSyncNtlmPasswords { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } // @public export enum KnownSyncOnPremPasswords { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } +// @public +export enum KnownSyncScope { + All = "All", + CloudOnly = "CloudOnly" +} + // @public export enum KnownTlsV1 { - // (undocumented) Disabled = "Disabled", - // (undocumented) Enabled = "Enabled" } // @public export type Ldaps = string; +// @public +export type LdapSigning = string; + // @public export interface LdapsSettings { readonly certificateNotAfter?: Date; @@ -435,16 +428,16 @@ export interface OperationEntityListResult { } // @public -export type OuContainer = Resource & { - readonly tenantId?: string; - readonly domainName?: string; - readonly deploymentId?: string; - readonly containerId?: string; +export interface OuContainer extends Resource { accounts?: ContainerAccount[]; - readonly serviceStatus?: string; + readonly containerId?: string; + readonly deploymentId?: string; readonly distinguishedName?: string; + readonly domainName?: string; readonly provisioningState?: string; -}; + readonly serviceStatus?: string; + readonly tenantId?: string; +} // @public export interface OuContainerCreateOptionalParams extends coreClient.OperationOptions { @@ -573,6 +566,9 @@ export type SyncNtlmPasswords = string; // @public export type SyncOnPremPasswords = string; +// @public +export type SyncScope = string; + // @public export interface SystemData { createdAt?: Date; diff --git a/sdk/domainservices/arm-domainservices/src/domainServicesResourceProvider.ts b/sdk/domainservices/arm-domainservices/src/domainServicesResourceProvider.ts index 6215428eb137..d0b4704946f8 100644 --- a/sdk/domainservices/arm-domainservices/src/domainServicesResourceProvider.ts +++ b/sdk/domainservices/arm-domainservices/src/domainServicesResourceProvider.ts @@ -8,6 +8,11 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { DomainServiceOperationsImpl, @@ -56,7 +61,7 @@ export class DomainServicesResourceProvider extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-domainservices/4.0.2`; + const packageDetails = `azsdk-js-arm-domainservices/4.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -76,38 +81,74 @@ export class DomainServicesResourceProvider extends coreClient.ServiceClient { }; super(optionsWithDefaults); + let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName ); - if (!bearerTokenAuthenticationPolicyFound) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - scopes: `${optionsWithDefaults.baseUri}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); - } + } + if ( + !options || + !options.pipeline || + options.pipeline.getOrderedPolicies().length == 0 || + !bearerTokenAuthenticationPolicyFound + ) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential: credentials, + scopes: `${optionsWithDefaults.credentialScopes}`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); } // Parameter assignments this.subscriptionId = subscriptionId; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-05-01"; + this.apiVersion = options.apiVersion || "2022-09-01"; this.domainServiceOperations = new DomainServiceOperationsImpl(this); this.domainServices = new DomainServicesImpl(this); this.ouContainerOperations = new OuContainerOperationsImpl(this); this.ouContainerOperationGrp = new OuContainerOperationGrpImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); } domainServiceOperations: DomainServiceOperations; diff --git a/sdk/domainservices/arm-domainservices/src/models/index.ts b/sdk/domainservices/arm-domainservices/src/models/index.ts index 1330414d82a0..75672f6d8e2d 100644 --- a/sdk/domainservices/arm-domainservices/src/models/index.ts +++ b/sdk/domainservices/arm-domainservices/src/models/index.ts @@ -241,6 +241,10 @@ export interface DomainSecuritySettings { kerberosRc4Encryption?: KerberosRc4Encryption; /** A flag to determine whether or not KerberosArmoring is enabled or disabled. */ kerberosArmoring?: KerberosArmoring; + /** A flag to determine whether or not LdapSigning is enabled or disabled. */ + ldapSigning?: LdapSigning; + /** A flag to determine whether or not ChannelBinding is enabled or disabled. */ + channelBinding?: ChannelBinding; } /** Settings for notification */ @@ -376,7 +380,7 @@ export interface ContainerAccount { } /** Domain service. */ -export type DomainService = Resource & { +export interface DomainService extends Resource { /** * Data Model Version * NOTE: This property will not be serialized. It can only be populated by the server. @@ -413,6 +417,8 @@ export type DomainService = Resource & { sku?: string; /** Enabled or Disabled flag to turn on Group-based filtered sync */ filteredSync?: FilteredSync; + /** All or CloudOnly, All users in AAD are synced to AAD DS domain or only users actively syncing in the cloud */ + syncScope?: SyncScope; /** Notification Settings */ notificationSettings?: NotificationSettings; /** @@ -427,10 +433,10 @@ export type DomainService = Resource & { readonly provisioningState?: string; /** Configuration diagnostics data containing latest execution from client. */ configDiagnostics?: ConfigDiagnostics; -}; +} /** Resource for OuContainer. */ -export type OuContainer = Resource & { +export interface OuContainer extends Resource { /** * Azure Active Directory tenant id * NOTE: This property will not be serialized. It can only be populated by the server. @@ -468,11 +474,13 @@ export type OuContainer = Resource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; -}; +} /** Known values of {@link Ldaps} that the service accepts. */ export enum KnownLdaps { + /** Enabled */ Enabled = "Enabled", + /** Disabled */ Disabled = "Disabled" } @@ -488,7 +496,9 @@ export type Ldaps = string; /** Known values of {@link ExternalAccess} that the service accepts. */ export enum KnownExternalAccess { + /** Enabled */ Enabled = "Enabled", + /** Disabled */ Disabled = "Disabled" } @@ -504,7 +514,9 @@ export type ExternalAccess = string; /** Known values of {@link NtlmV1} that the service accepts. */ export enum KnownNtlmV1 { + /** Enabled */ Enabled = "Enabled", + /** Disabled */ Disabled = "Disabled" } @@ -520,7 +532,9 @@ export type NtlmV1 = string; /** Known values of {@link TlsV1} that the service accepts. */ export enum KnownTlsV1 { + /** Enabled */ Enabled = "Enabled", + /** Disabled */ Disabled = "Disabled" } @@ -536,7 +550,9 @@ export type TlsV1 = string; /** Known values of {@link SyncNtlmPasswords} that the service accepts. */ export enum KnownSyncNtlmPasswords { + /** Enabled */ Enabled = "Enabled", + /** Disabled */ Disabled = "Disabled" } @@ -552,7 +568,9 @@ export type SyncNtlmPasswords = string; /** Known values of {@link SyncKerberosPasswords} that the service accepts. */ export enum KnownSyncKerberosPasswords { + /** Enabled */ Enabled = "Enabled", + /** Disabled */ Disabled = "Disabled" } @@ -568,7 +586,9 @@ export type SyncKerberosPasswords = string; /** Known values of {@link SyncOnPremPasswords} that the service accepts. */ export enum KnownSyncOnPremPasswords { + /** Enabled */ Enabled = "Enabled", + /** Disabled */ Disabled = "Disabled" } @@ -584,7 +604,9 @@ export type SyncOnPremPasswords = string; /** Known values of {@link KerberosRc4Encryption} that the service accepts. */ export enum KnownKerberosRc4Encryption { + /** Enabled */ Enabled = "Enabled", + /** Disabled */ Disabled = "Disabled" } @@ -600,7 +622,9 @@ export type KerberosRc4Encryption = string; /** Known values of {@link KerberosArmoring} that the service accepts. */ export enum KnownKerberosArmoring { + /** Enabled */ Enabled = "Enabled", + /** Disabled */ Disabled = "Disabled" } @@ -614,9 +638,47 @@ export enum KnownKerberosArmoring { */ export type KerberosArmoring = string; +/** Known values of {@link LdapSigning} that the service accepts. */ +export enum KnownLdapSigning { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" +} + +/** + * Defines values for LdapSigning. \ + * {@link KnownLdapSigning} can be used interchangeably with LdapSigning, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type LdapSigning = string; + +/** Known values of {@link ChannelBinding} that the service accepts. */ +export enum KnownChannelBinding { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" +} + +/** + * Defines values for ChannelBinding. \ + * {@link KnownChannelBinding} can be used interchangeably with ChannelBinding, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type ChannelBinding = string; + /** Known values of {@link FilteredSync} that the service accepts. */ export enum KnownFilteredSync { + /** Enabled */ Enabled = "Enabled", + /** Disabled */ Disabled = "Disabled" } @@ -630,9 +692,29 @@ export enum KnownFilteredSync { */ export type FilteredSync = string; +/** Known values of {@link SyncScope} that the service accepts. */ +export enum KnownSyncScope { + /** All */ + All = "All", + /** CloudOnly */ + CloudOnly = "CloudOnly" +} + +/** + * Defines values for SyncScope. \ + * {@link KnownSyncScope} can be used interchangeably with SyncScope, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **All** \ + * **CloudOnly** + */ +export type SyncScope = string; + /** Known values of {@link NotifyGlobalAdmins} that the service accepts. */ export enum KnownNotifyGlobalAdmins { + /** Enabled */ Enabled = "Enabled", + /** Disabled */ Disabled = "Disabled" } @@ -648,7 +730,9 @@ export type NotifyGlobalAdmins = string; /** Known values of {@link NotifyDcAdmins} that the service accepts. */ export enum KnownNotifyDcAdmins { + /** Enabled */ Enabled = "Enabled", + /** Disabled */ Disabled = "Disabled" } @@ -664,11 +748,17 @@ export type NotifyDcAdmins = string; /** Known values of {@link Status} that the service accepts. */ export enum KnownStatus { + /** None */ None = "None", + /** Running */ Running = "Running", + /** OK */ OK = "OK", + /** Failure */ Failure = "Failure", + /** Warning */ Warning = "Warning", + /** Skipped */ Skipped = "Skipped" } @@ -688,9 +778,13 @@ export type Status = string; /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { + /** User */ User = "User", + /** Application */ Application = "Application", + /** ManagedIdentity */ ManagedIdentity = "ManagedIdentity", + /** Key */ Key = "Key" } diff --git a/sdk/domainservices/arm-domainservices/src/models/mappers.ts b/sdk/domainservices/arm-domainservices/src/models/mappers.ts index 4f3eea7f17ff..fc7edf6649cb 100644 --- a/sdk/domainservices/arm-domainservices/src/models/mappers.ts +++ b/sdk/domainservices/arm-domainservices/src/models/mappers.ts @@ -537,6 +537,20 @@ export const DomainSecuritySettings: coreClient.CompositeMapper = { type: { name: "String" } + }, + ldapSigning: { + defaultValue: "Disabled", + serializedName: "ldapSigning", + type: { + name: "String" + } + }, + channelBinding: { + defaultValue: "Disabled", + serializedName: "channelBinding", + type: { + name: "String" + } } } } @@ -965,6 +979,12 @@ export const DomainService: coreClient.CompositeMapper = { name: "String" } }, + syncScope: { + serializedName: "properties.syncScope", + type: { + name: "String" + } + }, notificationSettings: { serializedName: "properties.notificationSettings", type: { diff --git a/sdk/domainservices/arm-domainservices/src/models/parameters.ts b/sdk/domainservices/arm-domainservices/src/models/parameters.ts index 69de521bfcd9..30299792b9ce 100644 --- a/sdk/domainservices/arm-domainservices/src/models/parameters.ts +++ b/sdk/domainservices/arm-domainservices/src/models/parameters.ts @@ -43,7 +43,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-05-01", + defaultValue: "2022-09-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/domainservices/arm-domainservices/test/sampleTest.ts b/sdk/domainservices/arm-domainservices/test/sampleTest.ts index 7ed89b043e1b..25aeb3ebcc36 100644 --- a/sdk/domainservices/arm-domainservices/test/sampleTest.ts +++ b/sdk/domainservices/arm-domainservices/test/sampleTest.ts @@ -7,35 +7,30 @@ */ import { - env, - record, - RecorderEnvironmentSetup, - Recorder + Recorder, + RecorderStartOptions, + env } from "@azure-tools/test-recorder"; -import * as assert from "assert"; +import { assert } from "chai"; +import { Context } from "mocha"; -const recorderEnvSetup: RecorderEnvironmentSetup = { - replaceableVariables: { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" - }, - customizationsOnRecordings: [ - (recording: any): any => - recording.replace( - /"access_token":"[^"]*"/g, - `"access_token":"access_token"` - ) - ], - queryParametersToSkip: [] +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables }; describe("My test", () => { let recorder: Recorder; - beforeEach(async function() { - recorder = record(this, recorderEnvSetup); + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); }); afterEach(async function() { diff --git a/sdk/domainservices/arm-domainservices/tsconfig.json b/sdk/domainservices/arm-domainservices/tsconfig.json index b5a74cbfe488..3e6ae96443f3 100644 --- a/sdk/domainservices/arm-domainservices/tsconfig.json +++ b/sdk/domainservices/arm-domainservices/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-domainservices": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"