@azure/arm-eventgrid 30.0.0-alpha.20210929.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/LICENSE +21 -0
- package/README.md +94 -0
- package/dist/index.js +10620 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/src/eventGridManagementClient.d.ts +31 -0
- package/dist-esm/src/eventGridManagementClient.d.ts.map +1 -0
- package/dist-esm/src/eventGridManagementClient.js +38 -0
- package/dist-esm/src/eventGridManagementClient.js.map +1 -0
- package/dist-esm/src/eventGridManagementClientContext.d.ts +17 -0
- package/dist-esm/src/eventGridManagementClientContext.d.ts.map +1 -0
- package/dist-esm/src/eventGridManagementClientContext.js +50 -0
- package/dist-esm/src/eventGridManagementClientContext.js.map +1 -0
- package/dist-esm/src/index.d.ts +6 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +13 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +2765 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +289 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +139 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +2979 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +53 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +415 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/domainTopics.d.ts +79 -0
- package/dist-esm/src/operations/domainTopics.d.ts.map +1 -0
- package/dist-esm/src/operations/domainTopics.js +310 -0
- package/dist-esm/src/operations/domainTopics.js.map +1 -0
- package/dist-esm/src/operations/domains.d.ts +122 -0
- package/dist-esm/src/operations/domains.d.ts.map +1 -0
- package/dist-esm/src/operations/domains.js +522 -0
- package/dist-esm/src/operations/domains.js.map +1 -0
- package/dist-esm/src/operations/eventChannels.d.ts +72 -0
- package/dist-esm/src/operations/eventChannels.d.ts.map +1 -0
- package/dist-esm/src/operations/eventChannels.js +269 -0
- package/dist-esm/src/operations/eventChannels.js.map +1 -0
- package/dist-esm/src/operations/eventSubscriptions.d.ts +404 -0
- package/dist-esm/src/operations/eventSubscriptions.d.ts.map +1 -0
- package/dist-esm/src/operations/eventSubscriptions.js +1504 -0
- package/dist-esm/src/operations/eventSubscriptions.js.map +1 -0
- package/dist-esm/src/operations/extensionTopics.d.ts +24 -0
- package/dist-esm/src/operations/extensionTopics.d.ts.map +1 -0
- package/dist-esm/src/operations/extensionTopics.js +50 -0
- package/dist-esm/src/operations/extensionTopics.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +17 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +24 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +26 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +88 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/partnerNamespaces.d.ts +122 -0
- package/dist-esm/src/operations/partnerNamespaces.d.ts.map +1 -0
- package/dist-esm/src/operations/partnerNamespaces.js +537 -0
- package/dist-esm/src/operations/partnerNamespaces.js.map +1 -0
- package/dist-esm/src/operations/partnerRegistrations.d.ts +83 -0
- package/dist-esm/src/operations/partnerRegistrations.d.ts.map +1 -0
- package/dist-esm/src/operations/partnerRegistrations.js +349 -0
- package/dist-esm/src/operations/partnerRegistrations.js.map +1 -0
- package/dist-esm/src/operations/partnerTopicEventSubscriptions.d.ts +128 -0
- package/dist-esm/src/operations/partnerTopicEventSubscriptions.d.ts.map +1 -0
- package/dist-esm/src/operations/partnerTopicEventSubscriptions.js +483 -0
- package/dist-esm/src/operations/partnerTopicEventSubscriptions.js.map +1 -0
- package/dist-esm/src/operations/partnerTopics.d.ts +97 -0
- package/dist-esm/src/operations/partnerTopics.d.ts.map +1 -0
- package/dist-esm/src/operations/partnerTopics.js +408 -0
- package/dist-esm/src/operations/partnerTopics.js.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts +105 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.js +362 -0
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts +58 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.js +184 -0
- package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operations/systemTopicEventSubscriptions.d.ts +128 -0
- package/dist-esm/src/operations/systemTopicEventSubscriptions.d.ts.map +1 -0
- package/dist-esm/src/operations/systemTopicEventSubscriptions.js +483 -0
- package/dist-esm/src/operations/systemTopicEventSubscriptions.js.map +1 -0
- package/dist-esm/src/operations/systemTopics.d.ts +107 -0
- package/dist-esm/src/operations/systemTopics.d.ts.map +1 -0
- package/dist-esm/src/operations/systemTopics.js +482 -0
- package/dist-esm/src/operations/systemTopics.js.map +1 -0
- package/dist-esm/src/operations/topicTypes.d.ts +46 -0
- package/dist-esm/src/operations/topicTypes.d.ts.map +1 -0
- package/dist-esm/src/operations/topicTypes.js +175 -0
- package/dist-esm/src/operations/topicTypes.js.map +1 -0
- package/dist-esm/src/operations/topics.d.ts +150 -0
- package/dist-esm/src/operations/topics.d.ts.map +1 -0
- package/dist-esm/src/operations/topics.js +656 -0
- package/dist-esm/src/operations/topics.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/domainTopics.d.ts +54 -0
- package/dist-esm/src/operationsInterfaces/domainTopics.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/domainTopics.js +9 -0
- package/dist-esm/src/operationsInterfaces/domainTopics.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/domains.d.ts +86 -0
- package/dist-esm/src/operationsInterfaces/domains.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/domains.js +9 -0
- package/dist-esm/src/operationsInterfaces/domains.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/eventChannels.d.ts +47 -0
- package/dist-esm/src/operationsInterfaces/eventChannels.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/eventChannels.js +9 -0
- package/dist-esm/src/operationsInterfaces/eventChannels.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/eventSubscriptions.d.ts +217 -0
- package/dist-esm/src/operationsInterfaces/eventSubscriptions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/eventSubscriptions.js +9 -0
- package/dist-esm/src/operationsInterfaces/eventSubscriptions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/extensionTopics.d.ts +16 -0
- package/dist-esm/src/operationsInterfaces/extensionTopics.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/extensionTopics.js +9 -0
- package/dist-esm/src/operationsInterfaces/extensionTopics.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +17 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +24 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/partnerNamespaces.d.ts +86 -0
- package/dist-esm/src/operationsInterfaces/partnerNamespaces.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/partnerNamespaces.js +9 -0
- package/dist-esm/src/operationsInterfaces/partnerNamespaces.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/partnerRegistrations.d.ts +47 -0
- package/dist-esm/src/operationsInterfaces/partnerRegistrations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/partnerRegistrations.js +9 -0
- package/dist-esm/src/operationsInterfaces/partnerRegistrations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/partnerTopicEventSubscriptions.d.ts +103 -0
- package/dist-esm/src/operationsInterfaces/partnerTopicEventSubscriptions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/partnerTopicEventSubscriptions.js +9 -0
- package/dist-esm/src/operationsInterfaces/partnerTopicEventSubscriptions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/partnerTopics.d.ts +61 -0
- package/dist-esm/src/operationsInterfaces/partnerTopics.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/partnerTopics.js +9 -0
- package/dist-esm/src/operationsInterfaces/partnerTopics.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +74 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +27 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/systemTopicEventSubscriptions.d.ts +103 -0
- package/dist-esm/src/operationsInterfaces/systemTopicEventSubscriptions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/systemTopicEventSubscriptions.js +9 -0
- package/dist-esm/src/operationsInterfaces/systemTopicEventSubscriptions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/systemTopics.d.ts +71 -0
- package/dist-esm/src/operationsInterfaces/systemTopics.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/systemTopics.js +9 -0
- package/dist-esm/src/operationsInterfaces/systemTopics.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/topicTypes.d.ts +23 -0
- package/dist-esm/src/operationsInterfaces/topicTypes.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/topicTypes.js +9 -0
- package/dist-esm/src/operationsInterfaces/topicTypes.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/topics.d.ts +103 -0
- package/dist-esm/src/operationsInterfaces/topics.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/topics.js +9 -0
- package/dist-esm/src/operationsInterfaces/topics.js.map +1 -0
- package/dist-esm/test/eventgrid_examples.d.ts +2 -0
- package/dist-esm/test/eventgrid_examples.d.ts.map +1 -0
- package/dist-esm/test/eventgrid_examples.js +163 -0
- package/dist-esm/test/eventgrid_examples.js.map +1 -0
- package/package.json +102 -0
- package/review/arm-eventgrid.api.md +2518 -0
- package/rollup.config.js +188 -0
- package/src/eventGridManagementClient.ts +101 -0
- package/src/eventGridManagementClientContext.ts +71 -0
- package/src/index.ts +13 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +3297 -0
- package/src/models/mappers.ts +3334 -0
- package/src/models/parameters.ts +490 -0
- package/src/operations/domainTopics.ts +452 -0
- package/src/operations/domains.ts +713 -0
- package/src/operations/eventChannels.ts +382 -0
- package/src/operations/eventSubscriptions.ts +2077 -0
- package/src/operations/extensionTopics.ts +67 -0
- package/src/operations/index.ts +24 -0
- package/src/operations/operations.ts +96 -0
- package/src/operations/partnerNamespaces.ts +729 -0
- package/src/operations/partnerRegistrations.ts +440 -0
- package/src/operations/partnerTopicEventSubscriptions.ts +699 -0
- package/src/operations/partnerTopics.ts +532 -0
- package/src/operations/privateEndpointConnections.ts +529 -0
- package/src/operations/privateLinkResources.ts +259 -0
- package/src/operations/systemTopicEventSubscriptions.ts +699 -0
- package/src/operations/systemTopics.ts +656 -0
- package/src/operations/topicTypes.ts +202 -0
- package/src/operations/topics.ts +921 -0
- package/src/operationsInterfaces/domainTopics.ts +105 -0
- package/src/operationsInterfaces/domains.ts +162 -0
- package/src/operationsInterfaces/eventChannels.ts +89 -0
- package/src/operationsInterfaces/eventSubscriptions.ts +339 -0
- package/src/operationsInterfaces/extensionTopics.ts +30 -0
- package/src/operationsInterfaces/index.ts +24 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/partnerNamespaces.ts +162 -0
- package/src/operationsInterfaces/partnerRegistrations.ts +91 -0
- package/src/operationsInterfaces/partnerTopicEventSubscriptions.ts +190 -0
- package/src/operationsInterfaces/partnerTopics.ts +114 -0
- package/src/operationsInterfaces/privateEndpointConnections.ts +137 -0
- package/src/operationsInterfaces/privateLinkResources.ts +52 -0
- package/src/operationsInterfaces/systemTopicEventSubscriptions.ts +190 -0
- package/src/operationsInterfaces/systemTopics.ts +139 -0
- package/src/operationsInterfaces/topicTypes.ts +47 -0
- package/src/operationsInterfaces/topics.ts +197 -0
- package/tsconfig.json +19 -0
- package/types/arm-eventgrid.d.ts +4299 -0
- package/types/tsdoc-metadata.json +11 -0
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { DomainTopics } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { EventGridManagementClientContext } from "../eventGridManagementClientContext";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
17
|
+
import {
|
|
18
|
+
DomainTopic,
|
|
19
|
+
DomainTopicsListByDomainNextOptionalParams,
|
|
20
|
+
DomainTopicsListByDomainOptionalParams,
|
|
21
|
+
DomainTopicsGetOptionalParams,
|
|
22
|
+
DomainTopicsGetResponse,
|
|
23
|
+
DomainTopicsCreateOrUpdateOptionalParams,
|
|
24
|
+
DomainTopicsCreateOrUpdateResponse,
|
|
25
|
+
DomainTopicsDeleteOptionalParams,
|
|
26
|
+
DomainTopicsListByDomainResponse,
|
|
27
|
+
DomainTopicsListByDomainNextResponse
|
|
28
|
+
} from "../models";
|
|
29
|
+
|
|
30
|
+
/// <reference lib="esnext.asynciterable" />
|
|
31
|
+
/** Class containing DomainTopics operations. */
|
|
32
|
+
export class DomainTopicsImpl implements DomainTopics {
|
|
33
|
+
private readonly client: EventGridManagementClientContext;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Initialize a new instance of the class DomainTopics class.
|
|
37
|
+
* @param client Reference to the service client
|
|
38
|
+
*/
|
|
39
|
+
constructor(client: EventGridManagementClientContext) {
|
|
40
|
+
this.client = client;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* List all the topics in a domain.
|
|
45
|
+
* @param resourceGroupName The name of the resource group within the user's subscription.
|
|
46
|
+
* @param domainName Domain name.
|
|
47
|
+
* @param options The options parameters.
|
|
48
|
+
*/
|
|
49
|
+
public listByDomain(
|
|
50
|
+
resourceGroupName: string,
|
|
51
|
+
domainName: string,
|
|
52
|
+
options?: DomainTopicsListByDomainOptionalParams
|
|
53
|
+
): PagedAsyncIterableIterator<DomainTopic> {
|
|
54
|
+
const iter = this.listByDomainPagingAll(
|
|
55
|
+
resourceGroupName,
|
|
56
|
+
domainName,
|
|
57
|
+
options
|
|
58
|
+
);
|
|
59
|
+
return {
|
|
60
|
+
next() {
|
|
61
|
+
return iter.next();
|
|
62
|
+
},
|
|
63
|
+
[Symbol.asyncIterator]() {
|
|
64
|
+
return this;
|
|
65
|
+
},
|
|
66
|
+
byPage: () => {
|
|
67
|
+
return this.listByDomainPagingPage(
|
|
68
|
+
resourceGroupName,
|
|
69
|
+
domainName,
|
|
70
|
+
options
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
private async *listByDomainPagingPage(
|
|
77
|
+
resourceGroupName: string,
|
|
78
|
+
domainName: string,
|
|
79
|
+
options?: DomainTopicsListByDomainOptionalParams
|
|
80
|
+
): AsyncIterableIterator<DomainTopic[]> {
|
|
81
|
+
let result = await this._listByDomain(
|
|
82
|
+
resourceGroupName,
|
|
83
|
+
domainName,
|
|
84
|
+
options
|
|
85
|
+
);
|
|
86
|
+
yield result.value || [];
|
|
87
|
+
let continuationToken = result.nextLink;
|
|
88
|
+
while (continuationToken) {
|
|
89
|
+
result = await this._listByDomainNext(
|
|
90
|
+
resourceGroupName,
|
|
91
|
+
domainName,
|
|
92
|
+
continuationToken,
|
|
93
|
+
options
|
|
94
|
+
);
|
|
95
|
+
continuationToken = result.nextLink;
|
|
96
|
+
yield result.value || [];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
private async *listByDomainPagingAll(
|
|
101
|
+
resourceGroupName: string,
|
|
102
|
+
domainName: string,
|
|
103
|
+
options?: DomainTopicsListByDomainOptionalParams
|
|
104
|
+
): AsyncIterableIterator<DomainTopic> {
|
|
105
|
+
for await (const page of this.listByDomainPagingPage(
|
|
106
|
+
resourceGroupName,
|
|
107
|
+
domainName,
|
|
108
|
+
options
|
|
109
|
+
)) {
|
|
110
|
+
yield* page;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Get properties of a domain topic.
|
|
116
|
+
* @param resourceGroupName The name of the resource group within the user's subscription.
|
|
117
|
+
* @param domainName Name of the domain.
|
|
118
|
+
* @param domainTopicName Name of the topic.
|
|
119
|
+
* @param options The options parameters.
|
|
120
|
+
*/
|
|
121
|
+
get(
|
|
122
|
+
resourceGroupName: string,
|
|
123
|
+
domainName: string,
|
|
124
|
+
domainTopicName: string,
|
|
125
|
+
options?: DomainTopicsGetOptionalParams
|
|
126
|
+
): Promise<DomainTopicsGetResponse> {
|
|
127
|
+
return this.client.sendOperationRequest(
|
|
128
|
+
{ resourceGroupName, domainName, domainTopicName, options },
|
|
129
|
+
getOperationSpec
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Asynchronously creates or updates a new domain topic with the specified parameters.
|
|
135
|
+
* @param resourceGroupName The name of the resource group within the user's subscription.
|
|
136
|
+
* @param domainName Name of the domain.
|
|
137
|
+
* @param domainTopicName Name of the domain topic.
|
|
138
|
+
* @param options The options parameters.
|
|
139
|
+
*/
|
|
140
|
+
async beginCreateOrUpdate(
|
|
141
|
+
resourceGroupName: string,
|
|
142
|
+
domainName: string,
|
|
143
|
+
domainTopicName: string,
|
|
144
|
+
options?: DomainTopicsCreateOrUpdateOptionalParams
|
|
145
|
+
): Promise<
|
|
146
|
+
PollerLike<
|
|
147
|
+
PollOperationState<DomainTopicsCreateOrUpdateResponse>,
|
|
148
|
+
DomainTopicsCreateOrUpdateResponse
|
|
149
|
+
>
|
|
150
|
+
> {
|
|
151
|
+
const directSendOperation = async (
|
|
152
|
+
args: coreClient.OperationArguments,
|
|
153
|
+
spec: coreClient.OperationSpec
|
|
154
|
+
): Promise<DomainTopicsCreateOrUpdateResponse> => {
|
|
155
|
+
return this.client.sendOperationRequest(args, spec);
|
|
156
|
+
};
|
|
157
|
+
const sendOperation = async (
|
|
158
|
+
args: coreClient.OperationArguments,
|
|
159
|
+
spec: coreClient.OperationSpec
|
|
160
|
+
) => {
|
|
161
|
+
let currentRawResponse:
|
|
162
|
+
| coreClient.FullOperationResponse
|
|
163
|
+
| undefined = undefined;
|
|
164
|
+
const providedCallback = args.options?.onResponse;
|
|
165
|
+
const callback: coreClient.RawResponseCallback = (
|
|
166
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
167
|
+
flatResponse: unknown
|
|
168
|
+
) => {
|
|
169
|
+
currentRawResponse = rawResponse;
|
|
170
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
171
|
+
};
|
|
172
|
+
const updatedArgs = {
|
|
173
|
+
...args,
|
|
174
|
+
options: {
|
|
175
|
+
...args.options,
|
|
176
|
+
onResponse: callback
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
180
|
+
return {
|
|
181
|
+
flatResponse,
|
|
182
|
+
rawResponse: {
|
|
183
|
+
statusCode: currentRawResponse!.status,
|
|
184
|
+
body: currentRawResponse!.parsedBody,
|
|
185
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
const lro = new LroImpl(
|
|
191
|
+
sendOperation,
|
|
192
|
+
{ resourceGroupName, domainName, domainTopicName, options },
|
|
193
|
+
createOrUpdateOperationSpec
|
|
194
|
+
);
|
|
195
|
+
return new LroEngine(lro, {
|
|
196
|
+
resumeFrom: options?.resumeFrom,
|
|
197
|
+
intervalInMs: options?.updateIntervalInMs
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Asynchronously creates or updates a new domain topic with the specified parameters.
|
|
203
|
+
* @param resourceGroupName The name of the resource group within the user's subscription.
|
|
204
|
+
* @param domainName Name of the domain.
|
|
205
|
+
* @param domainTopicName Name of the domain topic.
|
|
206
|
+
* @param options The options parameters.
|
|
207
|
+
*/
|
|
208
|
+
async beginCreateOrUpdateAndWait(
|
|
209
|
+
resourceGroupName: string,
|
|
210
|
+
domainName: string,
|
|
211
|
+
domainTopicName: string,
|
|
212
|
+
options?: DomainTopicsCreateOrUpdateOptionalParams
|
|
213
|
+
): Promise<DomainTopicsCreateOrUpdateResponse> {
|
|
214
|
+
const poller = await this.beginCreateOrUpdate(
|
|
215
|
+
resourceGroupName,
|
|
216
|
+
domainName,
|
|
217
|
+
domainTopicName,
|
|
218
|
+
options
|
|
219
|
+
);
|
|
220
|
+
return poller.pollUntilDone();
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Delete existing domain topic.
|
|
225
|
+
* @param resourceGroupName The name of the resource group within the user's subscription.
|
|
226
|
+
* @param domainName Name of the domain.
|
|
227
|
+
* @param domainTopicName Name of the domain topic.
|
|
228
|
+
* @param options The options parameters.
|
|
229
|
+
*/
|
|
230
|
+
async beginDelete(
|
|
231
|
+
resourceGroupName: string,
|
|
232
|
+
domainName: string,
|
|
233
|
+
domainTopicName: string,
|
|
234
|
+
options?: DomainTopicsDeleteOptionalParams
|
|
235
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
236
|
+
const directSendOperation = async (
|
|
237
|
+
args: coreClient.OperationArguments,
|
|
238
|
+
spec: coreClient.OperationSpec
|
|
239
|
+
): Promise<void> => {
|
|
240
|
+
return this.client.sendOperationRequest(args, spec);
|
|
241
|
+
};
|
|
242
|
+
const sendOperation = async (
|
|
243
|
+
args: coreClient.OperationArguments,
|
|
244
|
+
spec: coreClient.OperationSpec
|
|
245
|
+
) => {
|
|
246
|
+
let currentRawResponse:
|
|
247
|
+
| coreClient.FullOperationResponse
|
|
248
|
+
| undefined = undefined;
|
|
249
|
+
const providedCallback = args.options?.onResponse;
|
|
250
|
+
const callback: coreClient.RawResponseCallback = (
|
|
251
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
252
|
+
flatResponse: unknown
|
|
253
|
+
) => {
|
|
254
|
+
currentRawResponse = rawResponse;
|
|
255
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
256
|
+
};
|
|
257
|
+
const updatedArgs = {
|
|
258
|
+
...args,
|
|
259
|
+
options: {
|
|
260
|
+
...args.options,
|
|
261
|
+
onResponse: callback
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
265
|
+
return {
|
|
266
|
+
flatResponse,
|
|
267
|
+
rawResponse: {
|
|
268
|
+
statusCode: currentRawResponse!.status,
|
|
269
|
+
body: currentRawResponse!.parsedBody,
|
|
270
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
const lro = new LroImpl(
|
|
276
|
+
sendOperation,
|
|
277
|
+
{ resourceGroupName, domainName, domainTopicName, options },
|
|
278
|
+
deleteOperationSpec
|
|
279
|
+
);
|
|
280
|
+
return new LroEngine(lro, {
|
|
281
|
+
resumeFrom: options?.resumeFrom,
|
|
282
|
+
intervalInMs: options?.updateIntervalInMs
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Delete existing domain topic.
|
|
288
|
+
* @param resourceGroupName The name of the resource group within the user's subscription.
|
|
289
|
+
* @param domainName Name of the domain.
|
|
290
|
+
* @param domainTopicName Name of the domain topic.
|
|
291
|
+
* @param options The options parameters.
|
|
292
|
+
*/
|
|
293
|
+
async beginDeleteAndWait(
|
|
294
|
+
resourceGroupName: string,
|
|
295
|
+
domainName: string,
|
|
296
|
+
domainTopicName: string,
|
|
297
|
+
options?: DomainTopicsDeleteOptionalParams
|
|
298
|
+
): Promise<void> {
|
|
299
|
+
const poller = await this.beginDelete(
|
|
300
|
+
resourceGroupName,
|
|
301
|
+
domainName,
|
|
302
|
+
domainTopicName,
|
|
303
|
+
options
|
|
304
|
+
);
|
|
305
|
+
return poller.pollUntilDone();
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* List all the topics in a domain.
|
|
310
|
+
* @param resourceGroupName The name of the resource group within the user's subscription.
|
|
311
|
+
* @param domainName Domain name.
|
|
312
|
+
* @param options The options parameters.
|
|
313
|
+
*/
|
|
314
|
+
private _listByDomain(
|
|
315
|
+
resourceGroupName: string,
|
|
316
|
+
domainName: string,
|
|
317
|
+
options?: DomainTopicsListByDomainOptionalParams
|
|
318
|
+
): Promise<DomainTopicsListByDomainResponse> {
|
|
319
|
+
return this.client.sendOperationRequest(
|
|
320
|
+
{ resourceGroupName, domainName, options },
|
|
321
|
+
listByDomainOperationSpec
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* ListByDomainNext
|
|
327
|
+
* @param resourceGroupName The name of the resource group within the user's subscription.
|
|
328
|
+
* @param domainName Domain name.
|
|
329
|
+
* @param nextLink The nextLink from the previous successful call to the ListByDomain method.
|
|
330
|
+
* @param options The options parameters.
|
|
331
|
+
*/
|
|
332
|
+
private _listByDomainNext(
|
|
333
|
+
resourceGroupName: string,
|
|
334
|
+
domainName: string,
|
|
335
|
+
nextLink: string,
|
|
336
|
+
options?: DomainTopicsListByDomainNextOptionalParams
|
|
337
|
+
): Promise<DomainTopicsListByDomainNextResponse> {
|
|
338
|
+
return this.client.sendOperationRequest(
|
|
339
|
+
{ resourceGroupName, domainName, nextLink, options },
|
|
340
|
+
listByDomainNextOperationSpec
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
// Operation Specifications
|
|
345
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
346
|
+
|
|
347
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
348
|
+
path:
|
|
349
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}",
|
|
350
|
+
httpMethod: "GET",
|
|
351
|
+
responses: {
|
|
352
|
+
200: {
|
|
353
|
+
bodyMapper: Mappers.DomainTopic
|
|
354
|
+
},
|
|
355
|
+
default: {}
|
|
356
|
+
},
|
|
357
|
+
queryParameters: [Parameters.apiVersion],
|
|
358
|
+
urlParameters: [
|
|
359
|
+
Parameters.$host,
|
|
360
|
+
Parameters.subscriptionId,
|
|
361
|
+
Parameters.resourceGroupName,
|
|
362
|
+
Parameters.domainName,
|
|
363
|
+
Parameters.domainTopicName
|
|
364
|
+
],
|
|
365
|
+
headerParameters: [Parameters.accept],
|
|
366
|
+
serializer
|
|
367
|
+
};
|
|
368
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
369
|
+
path:
|
|
370
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}",
|
|
371
|
+
httpMethod: "PUT",
|
|
372
|
+
responses: {
|
|
373
|
+
200: {
|
|
374
|
+
bodyMapper: Mappers.DomainTopic
|
|
375
|
+
},
|
|
376
|
+
201: {
|
|
377
|
+
bodyMapper: Mappers.DomainTopic
|
|
378
|
+
},
|
|
379
|
+
202: {
|
|
380
|
+
bodyMapper: Mappers.DomainTopic
|
|
381
|
+
},
|
|
382
|
+
204: {
|
|
383
|
+
bodyMapper: Mappers.DomainTopic
|
|
384
|
+
},
|
|
385
|
+
default: {}
|
|
386
|
+
},
|
|
387
|
+
queryParameters: [Parameters.apiVersion],
|
|
388
|
+
urlParameters: [
|
|
389
|
+
Parameters.$host,
|
|
390
|
+
Parameters.subscriptionId,
|
|
391
|
+
Parameters.resourceGroupName,
|
|
392
|
+
Parameters.domainName,
|
|
393
|
+
Parameters.domainTopicName
|
|
394
|
+
],
|
|
395
|
+
headerParameters: [Parameters.accept],
|
|
396
|
+
serializer
|
|
397
|
+
};
|
|
398
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
399
|
+
path:
|
|
400
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}",
|
|
401
|
+
httpMethod: "DELETE",
|
|
402
|
+
responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
|
|
403
|
+
queryParameters: [Parameters.apiVersion],
|
|
404
|
+
urlParameters: [
|
|
405
|
+
Parameters.$host,
|
|
406
|
+
Parameters.subscriptionId,
|
|
407
|
+
Parameters.resourceGroupName,
|
|
408
|
+
Parameters.domainName,
|
|
409
|
+
Parameters.domainTopicName
|
|
410
|
+
],
|
|
411
|
+
serializer
|
|
412
|
+
};
|
|
413
|
+
const listByDomainOperationSpec: coreClient.OperationSpec = {
|
|
414
|
+
path:
|
|
415
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics",
|
|
416
|
+
httpMethod: "GET",
|
|
417
|
+
responses: {
|
|
418
|
+
200: {
|
|
419
|
+
bodyMapper: Mappers.DomainTopicsListResult
|
|
420
|
+
},
|
|
421
|
+
default: {}
|
|
422
|
+
},
|
|
423
|
+
queryParameters: [Parameters.apiVersion, Parameters.filter, Parameters.top],
|
|
424
|
+
urlParameters: [
|
|
425
|
+
Parameters.$host,
|
|
426
|
+
Parameters.subscriptionId,
|
|
427
|
+
Parameters.resourceGroupName,
|
|
428
|
+
Parameters.domainName
|
|
429
|
+
],
|
|
430
|
+
headerParameters: [Parameters.accept],
|
|
431
|
+
serializer
|
|
432
|
+
};
|
|
433
|
+
const listByDomainNextOperationSpec: coreClient.OperationSpec = {
|
|
434
|
+
path: "{nextLink}",
|
|
435
|
+
httpMethod: "GET",
|
|
436
|
+
responses: {
|
|
437
|
+
200: {
|
|
438
|
+
bodyMapper: Mappers.DomainTopicsListResult
|
|
439
|
+
},
|
|
440
|
+
default: {}
|
|
441
|
+
},
|
|
442
|
+
queryParameters: [Parameters.apiVersion, Parameters.filter, Parameters.top],
|
|
443
|
+
urlParameters: [
|
|
444
|
+
Parameters.$host,
|
|
445
|
+
Parameters.subscriptionId,
|
|
446
|
+
Parameters.resourceGroupName,
|
|
447
|
+
Parameters.domainName,
|
|
448
|
+
Parameters.nextLink
|
|
449
|
+
],
|
|
450
|
+
headerParameters: [Parameters.accept],
|
|
451
|
+
serializer
|
|
452
|
+
};
|