Skip to content

Commit 778db02

Browse files
author
SDKAuto
committed
CodeGen from PR 25219 in Azure/azure-rest-api-specs
Merge 0a6d8fa2d06e786f86d8e138f0f3413fe522ec99 into 2735b620aeb695c106fecd9bf28d719aa0b75b43
1 parent 092094d commit 778db02

19 files changed

+4855
-4466
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 4537 additions & 4309 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/domainservices/arm-domainservices/CHANGELOG.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
# Release History
2+
3+
## 5.0.0 (2023-08-09)
4+
5+
**Features**
26

3-
## 4.1.1 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
7+
- Added Type Alias ChannelBinding
8+
- Added Type Alias LdapSigning
9+
- Added Type Alias SyncScope
10+
- Interface DomainSecuritySettings has a new optional parameter channelBinding
11+
- Interface DomainSecuritySettings has a new optional parameter ldapSigning
12+
- Interface DomainService has a new optional parameter syncApplicationId
13+
- Interface DomainService has a new optional parameter syncScope
14+
- Added Enum KnownChannelBinding
15+
- Added Enum KnownLdapSigning
16+
- Added Enum KnownSyncScope
1017

11-
### Other Changes
18+
**Breaking Changes**
1219

20+
- Class DomainServicesResourceProvider has a new signature
21+
22+
1323
## 4.1.0 (2022-11-22)
1424

1525
**Features**

sdk/domainservices/arm-domainservices/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2022 Microsoft
3+
Copyright (c) 2023 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "1f1d5b0b9ce6cc94605b2fd619dce374fb6e033a",
3-
"readme": "specification\\domainservices\\resource-manager\\readme.md",
4-
"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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\domainservices\\resource-manager\\readme.md --use=@autorest/[email protected].0-rc.3.20221108.1 --generate-sample=true",
2+
"commit": "4d0de992bd7359a53502aff4fddf297e26f86916",
3+
"readme": "specification/domainservices/resource-manager/readme.md",
4+
"autorest_command": "autorest --version=3.9.3 --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.4",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.2",
7-
"use": "@autorest/[email protected].0-rc.3.20221108.1"
6+
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.1",
7+
"use": "@autorest/typescript@^6.0.4"
88
}

sdk/domainservices/arm-domainservices/package.json

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for DomainServicesResourceProvider.",
6-
"version": "4.1.1",
6+
"version": "5.0.0",
77
"engines": {
88
"node": ">=14.0.0"
99
},
1010
"dependencies": {
11-
"@azure/core-lro": "^2.2.0",
11+
"@azure/core-lro": "^2.5.4",
1212
"@azure/abort-controller": "^1.0.0",
1313
"@azure/core-paging": "^1.2.0",
14-
"@azure/core-client": "^1.6.1",
14+
"@azure/core-client": "^1.7.0",
1515
"@azure/core-auth": "^1.3.0",
1616
"@azure/core-rest-pipeline": "^1.8.0",
1717
"tslib": "^2.2.0"
@@ -33,12 +33,13 @@
3333
"@rollup/plugin-json": "^6.0.0",
3434
"@rollup/plugin-multi-entry": "^6.0.0",
3535
"@rollup/plugin-node-resolve": "^13.1.3",
36-
"mkdirp": "^1.0.4",
36+
"mkdirp": "^2.1.2",
3737
"rollup": "^2.66.1",
3838
"rollup-plugin-sourcemaps": "^0.6.3",
3939
"typescript": "~5.0.0",
4040
"uglify-js": "^3.4.9",
4141
"rimraf": "^3.0.0",
42+
"dotenv": "^16.0.0",
4243
"@azure/identity": "^2.0.1",
4344
"@azure-tools/test-recorder": "^3.0.0",
4445
"@azure-tools/test-credential": "^1.0.0",
@@ -49,7 +50,6 @@
4950
"@types/node": "^14.0.0",
5051
"@azure/dev-tool": "^1.0.0"
5152
},
52-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/domainservices/arm-domainservices",
5353
"repository": {
5454
"type": "git",
5555
"url": "https://github.com/Azure/azure-sdk-for-js.git"
@@ -111,12 +111,5 @@
111111
]
112112
},
113113
"autoPublish": true,
114-
"//sampleConfiguration": {
115-
"productName": "",
116-
"productSlugs": [
117-
"azure"
118-
],
119-
"disableDocsMs": true,
120-
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-domainservices?view=azure-node-preview"
121-
}
122-
}
114+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/domainservices/arm-domainservices"
115+
}

sdk/domainservices/arm-domainservices/review/arm-domainservices.api.md

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66

77
import * as coreAuth from '@azure/core-auth';
88
import * as coreClient from '@azure/core-client';
9+
import { OperationState } from '@azure/core-lro';
910
import { PagedAsyncIterableIterator } from '@azure/core-paging';
10-
import { PollerLike } from '@azure/core-lro';
11-
import { PollOperationState } from '@azure/core-lro';
11+
import { SimplePollerLike } from '@azure/core-lro';
12+
13+
// @public
14+
export type ChannelBinding = string;
1215

1316
// @public
1417
export interface CloudError {
@@ -55,8 +58,10 @@ export type CreatedByType = string;
5558

5659
// @public
5760
export interface DomainSecuritySettings {
61+
channelBinding?: ChannelBinding;
5862
kerberosArmoring?: KerberosArmoring;
5963
kerberosRc4Encryption?: KerberosRc4Encryption;
64+
ldapSigning?: LdapSigning;
6065
ntlmV1?: NtlmV1;
6166
syncKerberosPasswords?: SyncKerberosPasswords;
6267
syncNtlmPasswords?: SyncNtlmPasswords;
@@ -79,7 +84,9 @@ export interface DomainService extends Resource {
7984
replicaSets?: ReplicaSet[];
8085
resourceForestSettings?: ResourceForestSettings;
8186
sku?: string;
87+
readonly syncApplicationId?: string;
8288
readonly syncOwner?: string;
89+
syncScope?: SyncScope;
8390
readonly tenantId?: string;
8491
readonly version?: number;
8592
}
@@ -111,11 +118,11 @@ export type DomainServiceOperationsListResponse = OperationEntityListResult;
111118

112119
// @public
113120
export interface DomainServices {
114-
beginCreateOrUpdate(resourceGroupName: string, domainServiceName: string, domainService: DomainService, options?: DomainServicesCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<DomainServicesCreateOrUpdateResponse>, DomainServicesCreateOrUpdateResponse>>;
121+
beginCreateOrUpdate(resourceGroupName: string, domainServiceName: string, domainService: DomainService, options?: DomainServicesCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<DomainServicesCreateOrUpdateResponse>, DomainServicesCreateOrUpdateResponse>>;
115122
beginCreateOrUpdateAndWait(resourceGroupName: string, domainServiceName: string, domainService: DomainService, options?: DomainServicesCreateOrUpdateOptionalParams): Promise<DomainServicesCreateOrUpdateResponse>;
116-
beginDelete(resourceGroupName: string, domainServiceName: string, options?: DomainServicesDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
123+
beginDelete(resourceGroupName: string, domainServiceName: string, options?: DomainServicesDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
117124
beginDeleteAndWait(resourceGroupName: string, domainServiceName: string, options?: DomainServicesDeleteOptionalParams): Promise<void>;
118-
beginUpdate(resourceGroupName: string, domainServiceName: string, domainService: DomainService, options?: DomainServicesUpdateOptionalParams): Promise<PollerLike<PollOperationState<DomainServicesUpdateResponse>, DomainServicesUpdateResponse>>;
125+
beginUpdate(resourceGroupName: string, domainServiceName: string, domainService: DomainService, options?: DomainServicesUpdateOptionalParams): Promise<SimplePollerLike<OperationState<DomainServicesUpdateResponse>, DomainServicesUpdateResponse>>;
119126
beginUpdateAndWait(resourceGroupName: string, domainServiceName: string, domainService: DomainService, options?: DomainServicesUpdateOptionalParams): Promise<DomainServicesUpdateResponse>;
120127
get(resourceGroupName: string, domainServiceName: string, options?: DomainServicesGetOptionalParams): Promise<DomainServicesGetResponse>;
121128
list(options?: DomainServicesListOptionalParams): PagedAsyncIterableIterator<DomainService>;
@@ -177,6 +184,7 @@ export class DomainServicesResourceProvider extends coreClient.ServiceClient {
177184
// (undocumented)
178185
$host: string;
179186
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: DomainServicesResourceProviderOptionalParams);
187+
constructor(credentials: coreAuth.TokenCredential, options?: DomainServicesResourceProviderOptionalParams);
180188
// (undocumented)
181189
apiVersion: string;
182190
// (undocumented)
@@ -188,7 +196,7 @@ export class DomainServicesResourceProvider extends coreClient.ServiceClient {
188196
// (undocumented)
189197
ouContainerOperations: OuContainerOperations;
190198
// (undocumented)
191-
subscriptionId: string;
199+
subscriptionId?: string;
192200
}
193201

194202
// @public
@@ -249,6 +257,12 @@ export type KerberosArmoring = string;
249257
// @public
250258
export type KerberosRc4Encryption = string;
251259

260+
// @public
261+
export enum KnownChannelBinding {
262+
Disabled = "Disabled",
263+
Enabled = "Enabled"
264+
}
265+
252266
// @public
253267
export enum KnownCreatedByType {
254268
Application = "Application",
@@ -287,6 +301,12 @@ export enum KnownLdaps {
287301
Enabled = "Enabled"
288302
}
289303

304+
// @public
305+
export enum KnownLdapSigning {
306+
Disabled = "Disabled",
307+
Enabled = "Enabled"
308+
}
309+
290310
// @public
291311
export enum KnownNotifyDcAdmins {
292312
Disabled = "Disabled",
@@ -333,6 +353,12 @@ export enum KnownSyncOnPremPasswords {
333353
Enabled = "Enabled"
334354
}
335355

356+
// @public
357+
export enum KnownSyncScope {
358+
All = "All",
359+
CloudOnly = "CloudOnly"
360+
}
361+
336362
// @public
337363
export enum KnownTlsV1 {
338364
Disabled = "Disabled",
@@ -342,6 +368,9 @@ export enum KnownTlsV1 {
342368
// @public
343369
export type Ldaps = string;
344370

371+
// @public
372+
export type LdapSigning = string;
373+
345374
// @public
346375
export interface LdapsSettings {
347376
readonly certificateNotAfter?: Date;
@@ -459,11 +488,11 @@ export interface OuContainerListResult {
459488

460489
// @public
461490
export interface OuContainerOperationGrp {
462-
beginCreate(resourceGroupName: string, domainServiceName: string, ouContainerName: string, containerAccount: ContainerAccount, options?: OuContainerCreateOptionalParams): Promise<PollerLike<PollOperationState<OuContainerCreateResponse>, OuContainerCreateResponse>>;
491+
beginCreate(resourceGroupName: string, domainServiceName: string, ouContainerName: string, containerAccount: ContainerAccount, options?: OuContainerCreateOptionalParams): Promise<SimplePollerLike<OperationState<OuContainerCreateResponse>, OuContainerCreateResponse>>;
463492
beginCreateAndWait(resourceGroupName: string, domainServiceName: string, ouContainerName: string, containerAccount: ContainerAccount, options?: OuContainerCreateOptionalParams): Promise<OuContainerCreateResponse>;
464-
beginDelete(resourceGroupName: string, domainServiceName: string, ouContainerName: string, options?: OuContainerDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
493+
beginDelete(resourceGroupName: string, domainServiceName: string, ouContainerName: string, options?: OuContainerDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
465494
beginDeleteAndWait(resourceGroupName: string, domainServiceName: string, ouContainerName: string, options?: OuContainerDeleteOptionalParams): Promise<void>;
466-
beginUpdate(resourceGroupName: string, domainServiceName: string, ouContainerName: string, containerAccount: ContainerAccount, options?: OuContainerUpdateOptionalParams): Promise<PollerLike<PollOperationState<OuContainerUpdateResponse>, OuContainerUpdateResponse>>;
495+
beginUpdate(resourceGroupName: string, domainServiceName: string, ouContainerName: string, containerAccount: ContainerAccount, options?: OuContainerUpdateOptionalParams): Promise<SimplePollerLike<OperationState<OuContainerUpdateResponse>, OuContainerUpdateResponse>>;
467496
beginUpdateAndWait(resourceGroupName: string, domainServiceName: string, ouContainerName: string, containerAccount: ContainerAccount, options?: OuContainerUpdateOptionalParams): Promise<OuContainerUpdateResponse>;
468497
get(resourceGroupName: string, domainServiceName: string, ouContainerName: string, options?: OuContainerGetOptionalParams): Promise<OuContainerGetResponse>;
469498
list(resourceGroupName: string, domainServiceName: string, options?: OuContainerListOptionalParams): PagedAsyncIterableIterator<OuContainer>;
@@ -542,6 +571,9 @@ export type SyncNtlmPasswords = string;
542571
// @public
543572
export type SyncOnPremPasswords = string;
544573

574+
// @public
575+
export type SyncScope = string;
576+
545577
// @public
546578
export interface SystemData {
547579
createdAt?: Date;

sdk/domainservices/arm-domainservices/src/domainServicesResourceProvider.ts

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { DomainServicesResourceProviderOptionalParams } from "./models";
3131
export class DomainServicesResourceProvider extends coreClient.ServiceClient {
3232
$host: string;
3333
apiVersion: string;
34-
subscriptionId: string;
34+
subscriptionId?: string;
3535

3636
/**
3737
* Initializes a new instance of the DomainServicesResourceProvider class.
@@ -44,12 +44,28 @@ export class DomainServicesResourceProvider extends coreClient.ServiceClient {
4444
credentials: coreAuth.TokenCredential,
4545
subscriptionId: string,
4646
options?: DomainServicesResourceProviderOptionalParams
47+
);
48+
constructor(
49+
credentials: coreAuth.TokenCredential,
50+
options?: DomainServicesResourceProviderOptionalParams
51+
);
52+
constructor(
53+
credentials: coreAuth.TokenCredential,
54+
subscriptionIdOrOptions?:
55+
| DomainServicesResourceProviderOptionalParams
56+
| string,
57+
options?: DomainServicesResourceProviderOptionalParams
4758
) {
4859
if (credentials === undefined) {
4960
throw new Error("'credentials' cannot be null");
5061
}
51-
if (subscriptionId === undefined) {
52-
throw new Error("'subscriptionId' cannot be null");
62+
63+
let subscriptionId: string | undefined;
64+
65+
if (typeof subscriptionIdOrOptions === "string") {
66+
subscriptionId = subscriptionIdOrOptions;
67+
} else if (typeof subscriptionIdOrOptions === "object") {
68+
options = subscriptionIdOrOptions;
5369
}
5470

5571
// Initializing default values for options
@@ -61,7 +77,7 @@ export class DomainServicesResourceProvider extends coreClient.ServiceClient {
6177
credential: credentials
6278
};
6379

64-
const packageDetails = `azsdk-js-arm-domainservices/4.1.1`;
80+
const packageDetails = `azsdk-js-arm-domainservices/5.0.0`;
6581
const userAgentPrefix =
6682
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
6783
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -114,7 +130,7 @@ export class DomainServicesResourceProvider extends coreClient.ServiceClient {
114130

115131
// Assigning values to Constant parameters
116132
this.$host = options.$host || "https://management.azure.com";
117-
this.apiVersion = options.apiVersion || "2021-05-01";
133+
this.apiVersion = options.apiVersion || "2022-12-01";
118134
this.domainServiceOperations = new DomainServiceOperationsImpl(this);
119135
this.domainServices = new DomainServicesImpl(this);
120136
this.ouContainerOperations = new OuContainerOperationsImpl(this);

sdk/domainservices/arm-domainservices/src/lroImpl.ts

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,37 @@
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
*/
88

9+
// Copyright (c) Microsoft Corporation.
10+
// Licensed under the MIT license.
11+
12+
import { AbortSignalLike } from "@azure/abort-controller";
913
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
1014

11-
export class LroImpl<T> implements LongRunningOperation<T> {
12-
constructor(
13-
private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,
14-
private args: Record<string, unknown>,
15-
private spec: {
16-
readonly requestBody?: unknown;
17-
readonly path?: string;
18-
readonly httpMethod: string;
19-
} & Record<string, any>,
20-
public requestPath: string = spec.path!,
21-
public requestMethod: string = spec.httpMethod
22-
) {}
23-
public async sendInitialRequest(): Promise<LroResponse<T>> {
24-
return this.sendOperationFn(this.args, this.spec);
25-
}
26-
public async sendPollRequest(path: string): Promise<LroResponse<T>> {
27-
const { requestBody, ...restSpec } = this.spec;
28-
return this.sendOperationFn(this.args, {
29-
...restSpec,
30-
path,
31-
httpMethod: "GET"
32-
});
33-
}
15+
export function createLroSpec<T>(inputs: {
16+
sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;
17+
args: Record<string, unknown>;
18+
spec: {
19+
readonly requestBody?: unknown;
20+
readonly path?: string;
21+
readonly httpMethod: string;
22+
} & Record<string, any>;
23+
}): LongRunningOperation<T> {
24+
const { args, spec, sendOperationFn } = inputs;
25+
return {
26+
requestMethod: spec.httpMethod,
27+
requestPath: spec.path!,
28+
sendInitialRequest: () => sendOperationFn(args, spec),
29+
sendPollRequest: (
30+
path: string,
31+
options?: { abortSignal?: AbortSignalLike }
32+
) => {
33+
const { requestBody, ...restSpec } = spec;
34+
return sendOperationFn(args, {
35+
...restSpec,
36+
httpMethod: "GET",
37+
path,
38+
abortSignal: options?.abortSignal
39+
});
40+
}
41+
};
3442
}

0 commit comments

Comments
 (0)