Skip to content

Commit 7592071

Browse files
authored
eventgrid-track2-release (Azure#21878)
1 parent efc8c94 commit 7592071

File tree

9 files changed

+292
-18
lines changed

9 files changed

+292
-18
lines changed

sdk/eventgrid/arm-eventgrid/CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release History
22

3-
## 14.0.0-beta.1 (2022-04-06)
3+
## 14.0.0-beta.2 (2022-05-16)
44

55
**Features**
66

@@ -30,13 +30,15 @@
3030
- Added Interface DomainEventSubscriptionsGetDeliveryAttributesOptionalParams
3131
- Added Interface DomainEventSubscriptionsGetFullUrlOptionalParams
3232
- Added Interface DomainEventSubscriptionsGetOptionalParams
33+
- Added Interface DomainEventSubscriptionsListNextOptionalParams
3334
- Added Interface DomainEventSubscriptionsListOptionalParams
3435
- Added Interface DomainEventSubscriptionsUpdateOptionalParams
3536
- Added Interface DomainTopicEventSubscriptionsCreateOrUpdateOptionalParams
3637
- Added Interface DomainTopicEventSubscriptionsDeleteOptionalParams
3738
- Added Interface DomainTopicEventSubscriptionsGetDeliveryAttributesOptionalParams
3839
- Added Interface DomainTopicEventSubscriptionsGetFullUrlOptionalParams
3940
- Added Interface DomainTopicEventSubscriptionsGetOptionalParams
41+
- Added Interface DomainTopicEventSubscriptionsListNextOptionalParams
4042
- Added Interface DomainTopicEventSubscriptionsListOptionalParams
4143
- Added Interface DomainTopicEventSubscriptionsUpdateOptionalParams
4244
- Added Interface EventChannelDestination
@@ -132,6 +134,7 @@
132134
- Added Interface TopicEventSubscriptionsGetDeliveryAttributesOptionalParams
133135
- Added Interface TopicEventSubscriptionsGetFullUrlOptionalParams
134136
- Added Interface TopicEventSubscriptionsGetOptionalParams
137+
- Added Interface TopicEventSubscriptionsListNextOptionalParams
135138
- Added Interface TopicEventSubscriptionsListOptionalParams
136139
- Added Interface TopicEventSubscriptionsUpdateOptionalParams
137140
- Added Interface VerifiedPartnersGetOptionalParams
@@ -152,12 +155,14 @@
152155
- Added Type Alias DomainEventSubscriptionsGetDeliveryAttributesResponse
153156
- Added Type Alias DomainEventSubscriptionsGetFullUrlResponse
154157
- Added Type Alias DomainEventSubscriptionsGetResponse
158+
- Added Type Alias DomainEventSubscriptionsListNextResponse
155159
- Added Type Alias DomainEventSubscriptionsListResponse
156160
- Added Type Alias DomainEventSubscriptionsUpdateResponse
157161
- Added Type Alias DomainTopicEventSubscriptionsCreateOrUpdateResponse
158162
- Added Type Alias DomainTopicEventSubscriptionsGetDeliveryAttributesResponse
159163
- Added Type Alias DomainTopicEventSubscriptionsGetFullUrlResponse
160164
- Added Type Alias DomainTopicEventSubscriptionsGetResponse
165+
- Added Type Alias DomainTopicEventSubscriptionsListNextResponse
161166
- Added Type Alias DomainTopicEventSubscriptionsListResponse
162167
- Added Type Alias DomainTopicEventSubscriptionsUpdateResponse
163168
- Added Type Alias EventChannel
@@ -249,6 +254,7 @@
249254
- Added Type Alias TopicEventSubscriptionsGetDeliveryAttributesResponse
250255
- Added Type Alias TopicEventSubscriptionsGetFullUrlResponse
251256
- Added Type Alias TopicEventSubscriptionsGetResponse
257+
- Added Type Alias TopicEventSubscriptionsListNextResponse
252258
- Added Type Alias TopicEventSubscriptionsListResponse
253259
- Added Type Alias TopicEventSubscriptionsUpdateResponse
254260
- Added Type Alias VerifiedPartner
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "515a036fd42e59b65e94c8480b3a850d0b192bfc",
2+
"commit": "3f456dba8358994af8251bfae2f911a127092e54",
33
"readme": "specification/eventgrid/resource-manager/readme.md",
4-
"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\\eventgrid\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.18.20220329.1 --generate-sample=true",
4+
"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\\eventgrid\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/js-sdk-release-tools@2.2.1",
7-
"use": "@autorest/typescript@6.0.0-alpha.18.20220329.1"
6+
"release_tool": "@azure-tools/js-sdk-release-tools@2.3.0",
7+
"use": "@autorest/typescript@6.0.0-alpha.19.20220408.1"
88
}

sdk/eventgrid/arm-eventgrid/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for EventGridManagementClient.",
6-
"version": "14.0.0-beta.1",
6+
"version": "14.0.0-beta.2",
77
"engines": {
88
"node": ">=12.0.0"
99
},
1010
"dependencies": {
1111
"@azure/core-lro": "^2.2.0",
1212
"@azure/abort-controller": "^1.0.0",
1313
"@azure/core-paging": "^1.2.0",
14-
"@azure/core-client": "^1.0.0",
14+
"@azure/core-client": "^1.5.0",
1515
"@azure/core-auth": "^1.3.0",
16-
"@azure/core-rest-pipeline": "^1.1.0",
16+
"@azure/core-rest-pipeline": "^1.8.0",
1717
"tslib": "^2.2.0"
1818
},
1919
"keywords": [

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,19 @@ export interface DomainEventSubscriptionsGetOptionalParams extends coreClient.Op
257257
// @public
258258
export type DomainEventSubscriptionsGetResponse = EventSubscription;
259259

260+
// @public
261+
export interface DomainEventSubscriptionsListNextOptionalParams extends coreClient.OperationOptions {
262+
filter?: string;
263+
top?: number;
264+
}
265+
266+
// @public
267+
export type DomainEventSubscriptionsListNextResponse = EventSubscriptionsListResult;
268+
260269
// @public
261270
export interface DomainEventSubscriptionsListOptionalParams extends coreClient.OperationOptions {
271+
filter?: string;
272+
top?: number;
262273
}
263274

264275
// @public
@@ -442,8 +453,19 @@ export interface DomainTopicEventSubscriptionsGetOptionalParams extends coreClie
442453
// @public
443454
export type DomainTopicEventSubscriptionsGetResponse = EventSubscription;
444455

456+
// @public
457+
export interface DomainTopicEventSubscriptionsListNextOptionalParams extends coreClient.OperationOptions {
458+
filter?: string;
459+
top?: number;
460+
}
461+
462+
// @public
463+
export type DomainTopicEventSubscriptionsListNextResponse = EventSubscriptionsListResult;
464+
445465
// @public
446466
export interface DomainTopicEventSubscriptionsListOptionalParams extends coreClient.OperationOptions {
467+
filter?: string;
468+
top?: number;
447469
}
448470

449471
// @public
@@ -3033,8 +3055,19 @@ export interface TopicEventSubscriptionsGetOptionalParams extends coreClient.Ope
30333055
// @public
30343056
export type TopicEventSubscriptionsGetResponse = EventSubscription;
30353057

3058+
// @public
3059+
export interface TopicEventSubscriptionsListNextOptionalParams extends coreClient.OperationOptions {
3060+
filter?: string;
3061+
top?: number;
3062+
}
3063+
3064+
// @public
3065+
export type TopicEventSubscriptionsListNextResponse = EventSubscriptionsListResult;
3066+
30363067
// @public
30373068
export interface TopicEventSubscriptionsListOptionalParams extends coreClient.OperationOptions {
3069+
filter?: string;
3070+
top?: number;
30383071
}
30393072

30403073
// @public

sdk/eventgrid/arm-eventgrid/src/eventGridManagementClient.ts

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
import * as coreClient from "@azure/core-client";
10+
import * as coreRestPipeline from "@azure/core-rest-pipeline";
1011
import * as coreAuth from "@azure/core-auth";
1112
import {
1213
ChannelsImpl,
@@ -93,7 +94,7 @@ export class EventGridManagementClient extends coreClient.ServiceClient {
9394
credential: credentials
9495
};
9596

96-
const packageDetails = `azsdk-js-arm-eventgrid/14.0.0-beta.1`;
97+
const packageDetails = `azsdk-js-arm-eventgrid/14.0.0-beta.2`;
9798
const userAgentPrefix =
9899
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
99100
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -112,6 +113,29 @@ export class EventGridManagementClient extends coreClient.ServiceClient {
112113
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
113114
};
114115
super(optionsWithDefaults);
116+
117+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
118+
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
119+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
120+
(pipelinePolicy) =>
121+
pipelinePolicy.name ===
122+
coreRestPipeline.bearerTokenAuthenticationPolicyName
123+
);
124+
if (!bearerTokenAuthenticationPolicyFound) {
125+
this.pipeline.removePolicy({
126+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
127+
});
128+
this.pipeline.addPolicy(
129+
coreRestPipeline.bearerTokenAuthenticationPolicy({
130+
scopes: `${optionsWithDefaults.baseUri}/.default`,
131+
challengeCallbacks: {
132+
authorizeRequestOnChallenge:
133+
coreClient.authorizeRequestOnClaimChallenge
134+
}
135+
})
136+
);
137+
}
138+
}
115139
// Parameter assignments
116140
this.subscriptionId = subscriptionId;
117141

sdk/eventgrid/arm-eventgrid/src/models/index.ts

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3195,7 +3195,12 @@ export type DomainTopicEventSubscriptionsGetFullUrlResponse = EventSubscriptionF
31953195

31963196
/** Optional parameters. */
31973197
export interface DomainTopicEventSubscriptionsListOptionalParams
3198-
extends coreClient.OperationOptions {}
3198+
extends coreClient.OperationOptions {
3199+
/** The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. */
3200+
filter?: string;
3201+
/** The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. */
3202+
top?: number;
3203+
}
31993204

32003205
/** Contains response data for the list operation. */
32013206
export type DomainTopicEventSubscriptionsListResponse = EventSubscriptionsListResult;
@@ -3207,6 +3212,18 @@ export interface DomainTopicEventSubscriptionsGetDeliveryAttributesOptionalParam
32073212
/** Contains response data for the getDeliveryAttributes operation. */
32083213
export type DomainTopicEventSubscriptionsGetDeliveryAttributesResponse = DeliveryAttributeListResult;
32093214

3215+
/** Optional parameters. */
3216+
export interface DomainTopicEventSubscriptionsListNextOptionalParams
3217+
extends coreClient.OperationOptions {
3218+
/** The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. */
3219+
filter?: string;
3220+
/** The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. */
3221+
top?: number;
3222+
}
3223+
3224+
/** Contains response data for the listNext operation. */
3225+
export type DomainTopicEventSubscriptionsListNextResponse = EventSubscriptionsListResult;
3226+
32103227
/** Optional parameters. */
32113228
export interface TopicEventSubscriptionsGetOptionalParams
32123229
extends coreClient.OperationOptions {}
@@ -3256,7 +3273,12 @@ export type TopicEventSubscriptionsGetFullUrlResponse = EventSubscriptionFullUrl
32563273

32573274
/** Optional parameters. */
32583275
export interface TopicEventSubscriptionsListOptionalParams
3259-
extends coreClient.OperationOptions {}
3276+
extends coreClient.OperationOptions {
3277+
/** The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. */
3278+
filter?: string;
3279+
/** The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. */
3280+
top?: number;
3281+
}
32603282

32613283
/** Contains response data for the list operation. */
32623284
export type TopicEventSubscriptionsListResponse = EventSubscriptionsListResult;
@@ -3268,6 +3290,18 @@ export interface TopicEventSubscriptionsGetDeliveryAttributesOptionalParams
32683290
/** Contains response data for the getDeliveryAttributes operation. */
32693291
export type TopicEventSubscriptionsGetDeliveryAttributesResponse = DeliveryAttributeListResult;
32703292

3293+
/** Optional parameters. */
3294+
export interface TopicEventSubscriptionsListNextOptionalParams
3295+
extends coreClient.OperationOptions {
3296+
/** The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. */
3297+
filter?: string;
3298+
/** The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. */
3299+
top?: number;
3300+
}
3301+
3302+
/** Contains response data for the listNext operation. */
3303+
export type TopicEventSubscriptionsListNextResponse = EventSubscriptionsListResult;
3304+
32713305
/** Optional parameters. */
32723306
export interface DomainEventSubscriptionsGetOptionalParams
32733307
extends coreClient.OperationOptions {}
@@ -3317,7 +3351,12 @@ export type DomainEventSubscriptionsGetFullUrlResponse = EventSubscriptionFullUr
33173351

33183352
/** Optional parameters. */
33193353
export interface DomainEventSubscriptionsListOptionalParams
3320-
extends coreClient.OperationOptions {}
3354+
extends coreClient.OperationOptions {
3355+
/** The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. */
3356+
filter?: string;
3357+
/** The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. */
3358+
top?: number;
3359+
}
33213360

33223361
/** Contains response data for the list operation. */
33233362
export type DomainEventSubscriptionsListResponse = EventSubscriptionsListResult;
@@ -3329,6 +3368,18 @@ export interface DomainEventSubscriptionsGetDeliveryAttributesOptionalParams
33293368
/** Contains response data for the getDeliveryAttributes operation. */
33303369
export type DomainEventSubscriptionsGetDeliveryAttributesResponse = DeliveryAttributeListResult;
33313370

3371+
/** Optional parameters. */
3372+
export interface DomainEventSubscriptionsListNextOptionalParams
3373+
extends coreClient.OperationOptions {
3374+
/** The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. */
3375+
filter?: string;
3376+
/** The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. */
3377+
top?: number;
3378+
}
3379+
3380+
/** Contains response data for the listNext operation. */
3381+
export type DomainEventSubscriptionsListNextResponse = EventSubscriptionsListResult;
3382+
33323383
/** Optional parameters. */
33333384
export interface SystemTopicEventSubscriptionsGetOptionalParams
33343385
extends coreClient.OperationOptions {}

sdk/eventgrid/arm-eventgrid/src/operations/domainEventSubscriptions.ts

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
1616
import { LroImpl } from "../lroImpl";
1717
import {
1818
EventSubscription,
19+
DomainEventSubscriptionsListNextOptionalParams,
1920
DomainEventSubscriptionsListOptionalParams,
2021
DomainEventSubscriptionsGetOptionalParams,
2122
DomainEventSubscriptionsGetResponse,
@@ -29,7 +30,8 @@ import {
2930
DomainEventSubscriptionsGetFullUrlResponse,
3031
DomainEventSubscriptionsListResponse,
3132
DomainEventSubscriptionsGetDeliveryAttributesOptionalParams,
32-
DomainEventSubscriptionsGetDeliveryAttributesResponse
33+
DomainEventSubscriptionsGetDeliveryAttributesResponse,
34+
DomainEventSubscriptionsListNextResponse
3335
} from "../models";
3436

3537
/// <reference lib="esnext.asynciterable" />
@@ -77,6 +79,17 @@ export class DomainEventSubscriptionsImpl implements DomainEventSubscriptions {
7779
): AsyncIterableIterator<EventSubscription[]> {
7880
let result = await this._list(resourceGroupName, domainName, options);
7981
yield result.value || [];
82+
let continuationToken = result.nextLink;
83+
while (continuationToken) {
84+
result = await this._listNext(
85+
resourceGroupName,
86+
domainName,
87+
continuationToken,
88+
options
89+
);
90+
continuationToken = result.nextLink;
91+
yield result.value || [];
92+
}
8093
}
8194

8295
private async *listPagingAll(
@@ -466,6 +479,25 @@ export class DomainEventSubscriptionsImpl implements DomainEventSubscriptions {
466479
getDeliveryAttributesOperationSpec
467480
);
468481
}
482+
483+
/**
484+
* ListNext
485+
* @param resourceGroupName The name of the resource group within the user's subscription.
486+
* @param domainName Name of the domain.
487+
* @param nextLink The nextLink from the previous successful call to the List method.
488+
* @param options The options parameters.
489+
*/
490+
private _listNext(
491+
resourceGroupName: string,
492+
domainName: string,
493+
nextLink: string,
494+
options?: DomainEventSubscriptionsListNextOptionalParams
495+
): Promise<DomainEventSubscriptionsListNextResponse> {
496+
return this.client.sendOperationRequest(
497+
{ resourceGroupName, domainName, nextLink, options },
498+
listNextOperationSpec
499+
);
500+
}
469501
}
470502
// Operation Specifications
471503
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
@@ -601,7 +633,7 @@ const listOperationSpec: coreClient.OperationSpec = {
601633
},
602634
default: {}
603635
},
604-
queryParameters: [Parameters.apiVersion],
636+
queryParameters: [Parameters.apiVersion, Parameters.filter, Parameters.top],
605637
urlParameters: [
606638
Parameters.$host,
607639
Parameters.subscriptionId,
@@ -632,3 +664,23 @@ const getDeliveryAttributesOperationSpec: coreClient.OperationSpec = {
632664
headerParameters: [Parameters.accept],
633665
serializer
634666
};
667+
const listNextOperationSpec: coreClient.OperationSpec = {
668+
path: "{nextLink}",
669+
httpMethod: "GET",
670+
responses: {
671+
200: {
672+
bodyMapper: Mappers.EventSubscriptionsListResult
673+
},
674+
default: {}
675+
},
676+
queryParameters: [Parameters.apiVersion, Parameters.filter, Parameters.top],
677+
urlParameters: [
678+
Parameters.$host,
679+
Parameters.subscriptionId,
680+
Parameters.resourceGroupName,
681+
Parameters.nextLink,
682+
Parameters.domainName
683+
],
684+
headerParameters: [Parameters.accept],
685+
serializer
686+
};

0 commit comments

Comments
 (0)